Solutions for displaying the same device name on different mobile phones in the pea clip & ADB re-identification after the PID/VID is modified & Recognition of multiple PIDs on a single device

Source: Internet
Author: User
Tags lenovo

During development, two different but similar models are identified as the same model in the pea clip. For example, xt810 and mt810 are both identified as xt810 by the pea clip, the mt810 engineers are depressed because different models need to be treated differently. Because the pea clip is identified based on the device's PID and vid, we need to modify the phone's PID and vid.

This requirement involves the modification of Android ADB driver on PC and Alps in engineering code.
(1) Android mobile phone DRIVER: directly modify the Alps \ mediatek \ custom \ mt6573 \ kernel \ USB \ SRC \ mtk_usb_custom.h file. As follows:

# Define usb_ms_product_id 0x0008 // PID displayed when USB mode is disabled
# Define usb_ms_adb_product_id 0x0c08 // PID displayed when the USB mode is enabled
# Define vendor_id 0x0bb8 // The modified vid

(2) PC-side DRIVER: Modify the adb usb driver and add the new vid and PID. Otherwise, the ADB cannot be connected. Specifically, android_winusb.inf, in

HTC magic
% Compositeadbinterface % = usb_install, USB \ vid_0bb4 & pid_0c03 & mi_01
Refer to the above sentence and add your changes later. For example:

;
% Compositeadbinterface % = usb_install, USB \ vid_xxxx & pid_xxxx & mi_01

That is, complete. Note that the PC driver needs to be added in two modules, respectively in the [Google. ntx86] section and [Google. ntamd64] adds the segment (applicable to CPUs on different PCs), so that these three values correspond to the model. After we pass these parameters of this model to, they will match these parameters with the model. In this way, the pea clip software can match the correct model.
Note that you should pay attention to other aspects when adapting to the pods. Before the pod adaptation is complete, the vendor automatically installs the ADB driver on the Android device and can connect to the pods using the pods, however, the device may not be correctly identified. The vendor must provide the following information for accurate identification:

A. The official model name of the Android device, for example, "meizu M9" and "Lenovo phone", used for display to users.

B. The internal model value of the Android device, that is, the model value. This value is not unique, but only one is used for each device. Method to obtain this value: ADB shell getpropro. Product. Model (self-verification is not feasible), you can also see it in "about mobile phone" --> "model" of the mobile phone.

C. All vids, PID, and Sn used by Android (Optional). These values are not unique.

========================================================== ========================================================== ==========================================

In reality, when we modify the USB driver PID/VID in the Linux code of the Android mobile phone device, the previous ADB tool may not recognize the device, the message "device not found" is displayed. The ADB driver needs to be re-installed (the premise is that android_winusb.inf also has a new PID/VID), enter dos cmd, enter ADB kill-server, ADB start-server, and ADB devices respectively; if you can see that the devices is re-listed, it will be successful.

Here, kill-server is used to kill the daemon of ADB. Otherwise, ADB retains the information of the first vender, and start-server loads the new vender information.

========================================================== ========================================================== ==========================================

In actual use, the same Android phone may have multiple PIDs, such as the product ID and acm id. As a result, the device can be connected to ADB on startup, but cannot enter ADB in factory mode. In this case, add the identified PID in factory mode to the INF file of the device driver so that the device can reload the ADB driver. Note: Some PIDs are followed by complete characters such as & mi_10.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.