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:
Similar Posts:
- How to Solve Android wireless debug Error
- [Android test] solution to error closed after ADB shell carriage return
- The ADB command installs APK, and the installation problem is solved by daemon not running. Starting it now on port 5037
- Android studio can’t find the emulator and can’t connect to the mobile phone. Prompt adb.exe start server ‘failed — run manually if necessary
- How to Solve React Native Error: Could not get BatchedBridge
- Connect unity profiler to Android real machine for debugging
- adb server version (31) doesn’t match this client (41); killing…
- Permissions required by Vibrator.vibrate: android.permission.VIBRATE
- Obnoxious permission denied: how does ADB handle permission denied when accessing mobile directory