Tag Archives: adb

[Solved] ADB connect simulator error: ADB Server Version (36) doesn’t match this client (41); killing…

0. I use the night god emulator, other emulators also the same
adb server version (36) doesn't match this client(41); killing...
* daemon started successfully
List of devices attached

The solution is as follows.
1. Check the adb version

adb version

2. Enter the nocturnal simulator directory to view the version

nox_adb version

3. It is found that the two versions are inconsistent

You need to go to the platform Tools Directory of SDK and copy adb.exe

Rename adb.exe copied from the previous step to NOx_Adb.exe to replace NOx under nocturnal simulator_adb.exe

4. Restart the night God simulator

adb devices

Error reporting using ADB; error: unknown host service

An error occurs when installing APK on the virtual machine genymotion with ADB. Summarize the solutions to the problems I encounter in this process

This error is reported because host port 5037 is occupied

Next, you need to check which application 5037 is occupied by, and then end the program before using ADB

Enter the command netstat – ano | findstr “5037” in CMD

Tip: netstat is not an internal or external command

In this case, the current operation of CMD is not in the system folder system32. At this time, you need to enter CD C: \ windows \ system32 \ to switch to the windows system folder

Then enter the command netstat – ano | findstr “5037”, and press enter

You can view the corresponding process, but there are too many processes and the display is incomplete. You can’t see the PID (port) of the corresponding process_id)

There are two methods

1. You can use the command more

Add more after netstat – ano | findstr “5037”, that is, netstat – ano | findstr “5037”  |more

To load more, just press enter

2. Click the icon – > Attribute – > Layout, appropriately increase the height and size of the screen buffer

3. Original command > The text file name is. TXT, so that the relevant output information will be saved in the TXT text under the folder of C: \ documents and settings \ account

We can use the PID command to determine which process is occupied by the process

“Taskkill/PID 9012/F” after determining that the process is not one that we need to use/cannot end   Kill 9012 process

 

Two methods to solve the device offline problem of ADB

Fault phenomenon: error: device offline

Troubleshooting:

First method:

C:\Users\WXY\Desktop\XY\adb>adb nodaemon server

cannot bind ‘tcp:5037’

C:\Users\WXY\Desktop\XY\adb>netstat -ano|findstr “5037”

TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 41416

TCP 127.0.0.1:5037 127.0.0.1:53689 TIME_WAIT 0

C:\Users\WXY\Desktop\XY\adb>tasklist | findstr “41416”

adb.exe 41416 Console 1 8,200 K

C:\Users\WXY\Desktop\XY\adb>taskkill /pid “41416” /t /f

Success: The process with PID 41416 (a subprocess of PID 28764) has been terminated.

The second method:

Then use the following method, provided you need to install QQ, open your directory below, if you can’t find it, use the search tool to search for tadb.exe , as long as you have QQ installed, there will be this

C:\Users\your computer name\AppData\Roaming\Tencent\AndroidServer\1.0.0.584 There is a Tencent packaged adb called tadb.exe

C:\Users\[Your Computer Name]\AppData\Roaming\Tencent\AndroidServer\1.0.0.584>tadb connect 192.168.1.190

connected to 192.168.1.190:5555

C:\Users\[Your Computer Name]\AppData\Roaming\Tencent\AndroidServer\1.0.0.584>tadb.exe pull /storage/emulated/0/Screenshots/Screenshot_20190627-122353.png ./abc.png

error: device unauthorized. Please check the confirmation dialog on your device.

//This error message you need to confirm on your Android device

C:\Users\WXY\AppData\Roaming\Tencent\AndroidServer\1.0.0.584>tadb.exe pull /storage/emulated/0/Screenshots/Screenshot_20190627-122353.png ./abc.png

30 KB/s (281681 bytes in 8.986s) //This statement is what I’m doing to downlink the screenshot from the remote Android to the local pC

C:\Users\WXY\AppData\Roaming\Tencent\AndroidServer\1.0.0.584>

[Solved] Adb Start Error: adb server version (32) doesn’t match this client (39)

My system is windows

There are two versions of ADB running in the system. It’s useless to execute ADB kill server. You have to deal with it yourself

both versions are installed by myself. Then remove the redundant version. I’m not this error. I won’t describe the operation in detail

other programs execute ADB * – server.exe, and occupy port 5037

netstat -ano | findstr “5037”

# > netstat -ano | findstr "5037"
TCP    127.0.0.1:5037         0.0.0.0:0              LISTENING       6312

Find the program with PID 6312

# > TASKLIST | findstr "6312"
PPAdbServer.exe               6312 Console                    1      7,104 K

This ppadbserver.exe occupies the port. Kill this to taskkill/F/im ppadbserver.exe , and then execute abd start server

# > adb start-server
* daemon not running; starting now at tcp:5037
* daemon started successfully

OK, OK

The ADB command installs APK, and the installation problem is solved by daemon not running. Starting it now on port 5037

Programmer algorithm practice must read, common Java API skills to share>>>

To test the client application on the mobile phone through the mobile phone, it is generally necessary to install the tested application APK into the mobile phone first. The installation steps are as follows:

[preset conditions]

1. Through “start” of PC, enter CMD in the running box and press enter to open the edit interface of CMD

2. If the mobile phone is connected to the PC, the PC can recognize the mobile phone. Enter ADB devices in the CMD editing interface and press enter to check whether the current mobile phone is connected. If the device information is displayed, the identification is connected, as follows:

C:\Users\posuo> adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
TWG0115A27000150 device

[installation command]

ADB install – R xxxx (APK local storage path)

Success will be prompted if the installation is successful

Where: – R: indicates that the installation can be covered

Possible problems: the computer does not recognize the mobile phone, the solution:

1. After the mobile phone is connected to the computer, make sure that the driver of the mobile phone has been installed on the computer

2. In the mobile phone “Settings” – “developer options”, open “USB debugging”

(if you can’t see “developer options” in mobile phone settings, enter “Settings” – about mobile phone, and click the version number column many times – this method is common for Huawei mobile phones.)

3. Enter ADB devices in the CMD editing interface. If the following error is reported, it is caused by the occupation of port 5037. Find out the application occupied by the port and kill the application process

C:\Users\posuo> adb devices
* daemon not running. starting it now on port 5037 *
ADB server didn’t ACK
* failed to start daemon *
error: cannot connect to daemon

Methods:

First of all, find out the application (process) whose port 5037 is occupied, and input in the CMD interface:

C:\Users\posuo> netstat -ano | findstr “5037”
TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 12476

Note: 12476 is the process number of 5037

Then, kill the process and enter:

C:\Users\posuo> Taskkill – F – PID 12476
success: the process with PID 12476 has been terminated

This is the end

You can input ADB devices in the CMD interface to check whether the mobile device is recognized by the computer. If not, the connected mobile device information will be displayed

If the above method is still unable to identify the mobile phone, delete the application similar to pea pod in the computer and mobile phone, and then carry out the above problem solving steps

How to connect Android mobile phone with ADB & reasons and solutions of unable to connect to 192.168.1.100:5555

Programmer algorithm practice must read, common Java API skills to share>>>

There are two ways to connect a mobile phone with an ADB:

1, wifi

2, usb.

1. Connect the mobile phone through WiFi and ADB

Enter the command in the CMD of PC:

adb connect 192.168.1.100

If the connection is successful, you can enter the Android shell

In the process of my own operation, the PC can ping through the mobile phone, but there is a little problem when the ADB connects to the mobile phone, indicating that it is unable to connect to 192.168.1.100:5555. What is the reason?The original mobile phone’s default ADB service is not turned on, otherwise, other people’s ADBS can connect at will, isn’t it very unsafe?Therefore, we need to find a way to turn on the ADB service on the mobile phone. What’s going on?First, download an Android emulator on your mobile phone (of course, if you have one, you don’t need to download it), then switch to the root permission and execute the following command to open the ADB service:

su

setprop service.adb.tcp.port 5555

stop adbd

start adbd

Then the ADB can connect to the mobile phone, as shown in the figure:

2. Connect the mobile phone through USB and ADB

I connected the mobile phone to the PC through USB, but the ADB didn’t connect the mobile phone, so I downloaded the Android driver and installed it. So the ADB is connected to the phone. So you can use the ADB shell to enter the Android system of the mobile phone

Pay attention to the way of USB connection, do not need ADB connect xxx.xxx.xxx.xxx

  

Comparison: Method 1 has higher requirements, needs to rely on a stable network, and the operation is troublesome. Method 2 is much simpler

Of course, first of all, open the developer option – > USB debugging is recommended to connect with 360 mobile assistant, install USB driver and debug development interface before exiting

After the successful connection of the ADB, you can use windows CMD terminal mode to debug, and of course, you can also use Android Studio – > Tools-> Android-> Android device monitor debugging:

  

INSTALL FAILED U NO MATCHING ABIS

Why can’t you stop buying 618?From the technical dimension to explore>>>

#Background

Change group, went to UC international browser, was hugged changed. Still in the familiar stage, I tried the ADB, and then I came across the install_ FAILED_ NO_ MATCHING_ The pit of ABIS

#Solutions

INSTALL_ FAILED_ NO_ MATCHING_ ABISis when you are trying to install an app that has native libraries and it doesn’t have a native library for your cpu architecture. For example if you compiled an app forarmv7and are trying to install it on an emulator that uses theIntelarchitecture instead it will not work.

Understand the general principle: the application uses the native library (NDK). The compilation target of these libraries is usually the CPU of arm architecture. Running on the x86 simulator will report such an error

If you know the reason, it’s easy to build a new arm based simulator. What’s painful is that the simulator card is dying and can’t work

#Follow up

In fact, the cause of this problem was found very quickly, but the actual solution was one day later

is too laggy to wait for the mobile phone simulator to open and the ADB install command not to wait. p>

The second is: when creating a new arm architecture simulator, as prompted me not to recommend creating an arm architecture, but strongly recommended using x86. At first, I thought that because the system was 64 bit and the new 32-bit CPU was a problem, I still created an x64 simulator

#References

https://stackoverflow.com/questions/24572052/install-failed-no-matching-abis-when-install-apk
https://juejin.im/post/5a30dca7f265da4324807033

The method of eliminating “more than one device and emulator” in ADB

Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>

When I connect my mobile phone to charge, I start the simulator to debug, and when I execute the ADB command, I report an error
C:\Users\gaojs>adb shell
error: more than one device and emulator
C:\Users\gaojs>adb install e:\good.apk
error: more than one device and emulator

In this case, we should first check whether there are multiple devices or simulators
C:\Users\gaojs> ADB devices
list of devices attached
emulator-5554 device
4dfadcb86b00cf05 device
if it is found that there are really multiple devices, it is necessary to specify the serial number of the device for the ADB command
C:\Users\gaojs> ADB – s emulator-5554 shell
as shown above, just add the – S parameter to the command

If there is only one device or simulator, and the offline status is found
that means that the bug of ADB itself is the cause, so we need to deal with it in the following way:
C: users/gaojs & gtadb kill-server
C:\Users\gaojs> taskkill/F/im adb.exe
the first command is to kill the service of ADB, and the second command is to kill the process of ADB