ADB usage problems in Windows
Questions about using ADB in Windows
Applicable environment:
In Windows XP and WIN7, follow the instructions in this article. In WIN8, no experiment is performed, but the operation settings are roughly the same. Except for step 1, the location of adb_usb.ini may be different, other parts can be operated as described in this document.
Note the following when using ADB normally in Windows:
1. Enable the debugging mode on the mobile phone
In settings, open the developer option and enable the USB debugging option.
2. Install the device driver on the PC.
The USB Drivers of various devices may be different. The following uses Zhan Xun as an example.
Disconnect the device from the PC before installing the driver.
Zhan Xun USB driverAndroidSCI-android-usb-driver-jungo-v4.zip, extract the detailed Driver Installation instructions, distinguish between 32-bit or 64-bit system, according to different systems choose their adaptation of the driver, installation.
The following message is displayed on the mobile phone device,
After the program is installed, connect the device through USB;
The PC will prompt you to find the new hardware, and the driver is being installed. Wait until the driver is successfully installed on the PC.
Then there will be a new AndroidPhone in the Device Manager.
The following figure shows the status of the Device Manager after the driver is installed.
View device Properties
You can view the VID of a device here.
3. Modify adb_usb.ini
End the adb process in the task manager, or execute adb kill-server in the command line window, and then modify the following to eliminate the possible impact.
Directory stored in the simulator <For example: C: \ Documents ents and Settings \ Administrator \. android>, locate or create an adb_usb.ini file, and add or write the 0 xVID of the above device (VID is the number following VID _ above, for example: 0x1782 (Zhan Xun USB device VID)
4. Restart the ADB service.
If the path of the ADB command tool has been added to the environment variable of the system, you can directly perform the following operations in the open command line window, if the path of the ADB command tool is not added to the environment variable of the system, open the command line window, you can switch to the platform-tools directory in the directory where the ADK is located (the directory where the ADB command tool of the ADK is located ).
Then, run adb devices in the command line window.
Now, ADB can connect to the device normally.
5. Common ADB commands
Adbkill-server # Stop the adb service process
Adbstart-server # Open the adb service process
Adbdevices # display the connected devices
Adbshell # enter the shell mode of the device
Adbversion # view adb version
6. FAQs
The common problem is that the device cannot be found. The specific symptom is as follows:
C:\Users\cc>adb devicesList of devices attachedC:\Users\cc>adb devices* daemon not running. starting it now on port 5037 ** daemon started successfully *List of devices attached
There may be many reasons why the device cannot be found, except that the debugging item on the mobile phone device is not enabled, and almost all other reasons are caused by problems in the PC environment configuration, experiment one by one and solve the problem as follows.
-------------------------------------------------
Confirm this document one by one ~ 4. The four operations are completed.
Generally, after these four steps are completed, the device can be connected. If the connection fails, proceed with the following checks and operations.
1. Disable some mobile phone Assistance software on the PC (similar to pods and mobile assistants)
2. Shut down some adb in the process, which may be other names, such as tadb and other processes that encapsulate the adb function.
3. Ensure that there is only one android device
4. Disconnect the device and restart the ADB service.
5. Connect the device with USB to find the device.
If the device cannot be found, restart the computer and re-check the above steps.
----------------------------------
Welcome to browse, technical exchange, respect for labor achievements, repost, please indicate the source, thank you! Http://blog.csdn.net/netwalk/article/details/38069383
Where can I download the ADB toolkit? How can I install it?
How to Use ADB toolkit pai.android.com/sdk/index.html provided by Google: Copy adb.exe and AdbWinApi. dll under the tools directory in the Android SDK package to the system32 directory in Windows. If you use the ADB toolkit, you can directly extract it to the system32 directory. Enter adb in cmd to obtain the adb user manual.
In Windows, how does MFC use ADB to give commands to the mobile phone ,!
A Software Development Kit (SDK) is also released ). The SDK contains the windows functions and constant definitions, API function instructions, and related tools and examples required for developing the windows version. The SDK generally uses C language, but does not include the compiler. The later version of VC ++ includes all the SDK header files, help, examples, and tools. You do not need to install sdks. For earlier versions, such as VC ++ 5.0, you need to install sdks. Since windows 98, the windows SDK is called Platform SDK (), which contains the latest statements and examples of windows API functions.
There are two methods for compiling windows programs with VC: windows c (SDK) and C ++ (Packaging SDK functions, such as MFC in VC and VCL in BCB ). SDK programming is to use windows API for programming. An API is composed of thousands of API functions (more than two thousand IN win95), while MFC is an API encapsulation. It consists of more than one hundred classes in combination with Object-oriented Inheritance and polymorphism.
Sdks are short for Software Development Kit ". This is a widely used term. It can be said that the collection of documents, examples, and tools used to assist in the development of a certain type of software can be called "sdks ". The SDK used to develop applications on the Windows platform is only a subset of the general SDK.
The above is just a general concept of the SDK. To understand the concept, the SDK has to introduce APIs, dynamic link libraries, Import and Export libraries, and so on.
The first thing to contact is the "API", that is, the Application Programming Interface, which is actually a call Interface left by the operating system for the Application, by calling the API of the operating system, an application enables the operating system to execute commands (Actions) of the application ). As early as the DOS era, there was an API concept, but at that time the API was provided in the form of Interrupt calls (INT 21 h, all applications running under DOS use the operating system functions directly or indirectly through interrupt calls, for example, if you set AH to 30 h and call INT 21 h, you can get the dos OS version number. In Windows, system APIs are provided through function calls. In Windows, you need to call the GetVersionEx () function. In this case, the dos api is "Thinking in assembly language", while the Windows API is "Thinking in advanced language. DOS APIs are part of the system program. They are loaded into the memory together with the system and can be found through the interrupt vector table.
DLL is the Dynamic Link Library (Dynamic Link Library ). We often see files in. dll format. These files are dynamic link library files, but they are also executable files. Unlike. exe files,. dll files cannot be executed directly. They are usually imported by. exe during execution, which contains some resources and executable code. In fact, the three modules of Windows are provided in the form of DLL (Kernel32.dll, User32.dll, GDI32.dll), which contains the Execution Code of API functions. To use the API functions in DLL, we must have the Declaration (. H) of the API function and its import and export (. LIB ). Import to database can be understood as used to find the API entry point in the DLL.
Therefore, in order to use API functions, we need to have corresponding APIs. H and. the SDK provides a complete set of related files, examples, and tools required to develop Windows applications ".
Because the SDK contains the full text of using AP...>