Raiden Android emulator modification information and common adb commands

1. What if adb is found?
The Thunderbolt Installation Simulator comes with a copy. Of course, friends who are familiar with it can also use their own collection. The version that comes with Raiden is named adb.exe in the installation directory. For example, the full path of adb on my computer is: c:\mnq\dnplayer\adb.exe.

In addition, the latest Raiden has provided the adb command to solve the trouble of using -s, and the most important thing is that you only need to care about the name instead of the index. For example, take the package list of a certain simulator:
dnconsole .exe adb --name *** --command "shell pm list packages"

2. How to link devices?
Look at the command line step by step
cmd
cd F:\mnq\dnplayer
adb.exe kill-server (not
connected in many cases because there is no kill) adb.exe devices
This step is very important. After completion, all devices will be listed

3. How to specify which simulator to operate in case of multiple openings?
This step is very important, so explain in advance that all subsequent operations are for single opening as an example. For multiple openings, please refer to this part and remember! ! !
adb devices will get the list of emulators. To specify the emulator, you only need to add "-s emulator ID" after adb!
For example:
127.0.0.1:5555
127.0.0.1:5557

(Yes, Raiden’s adb port is regular, the rule is 5555 + index * 2)

If you specify to install an apk on 5555, then please write: adb -s 127.0.0.1:5555 install d:\abc.pak

4. How to transfer files or folders on the computer to the simulator?
adb push f:/Tokyo hot.avi /mnt/avi/

5. How to transfer files or folders in the simulator to the computer?
adb pull /mnt/avi/Cang teacher.avi f:/avi/

6. Install APK
adb install d:\qq.apk

7. Uninstall APK
adb uninstall package name

8. PM package command
1) Get all package names of the simulator
adb shell pm list packages

2) Get all the package names of the simulator and include the APK path
adb shell pm list packages -f

3) Get the APK path corresponding to the package name
adb shell pm path packageName

4) Clear application data
adb shell pm clear packageName

9. Start the application
adb shell am start -n package name/Activity class name

Example: Start the application treasure:
adb shell am start -n com.tencent.android.qqdownloader/com.tencent.assistant.activity.SplashActivity

Specify the emulator to start the mobile application treasure:
adb -s 127.0.0.1:5555 shell am start -n com.tencent.android.qqdownloader/com.tencent.assistant.activity.SplashActivity

10. Close the application
adb shell am force-stop package name

11. Analog input
adb shell input text string (Chinese is not supported)

12. Simulation key
adb shell input keyevent key value

13. Simulate mouse click
adb shell input tap XY

14. Simulate mouse sliding
adb shell input swipe X1 Y1 X2 Y2

13. Screenshot
adb shell screencap -p /sdcard/screencap.png

14. Set the mobile phone IMEI/IMSI/mobile phone number/SIM card serial number (version 1.7 and later)
adb shell setprop phone.imei 865166023949731
adb shell setprop phone.imsi 460000000000000
adb shell setprop phone.linenum 13800000000
adb shell setprop phone.simserial 89860000000000000000

Guess you like

Origin blog.csdn.net/Memroy/article/details/104990064