Adb related operations, adb related
1 adb send Broadcast
Adb shell am broadcast-a com. android. launcher4.launcherReceiver -- es path "/mnt/sdcard/xx.apk" -- ei action 1 -- ei versionCode 21
How to Use the ADB command to view mobile phone-related information Parameters
Getprop ro. serialno
Getprop ro. carrier
Getprop ro. hardware
Getprop ro. bootloader view SPL (Hboot) version
First, press WIN + R on your computer keyboard. A running window will pop up.
Enter CMD in the box and press OK. At this time, a command window will pop up!
The ADB Command provided above is run in this window! Enter adb shell and press Enter. Then you can start to enter the Command provided above! Getprop ro. serialno: view the machine's SN getprop ro. carrier: Check the CID of the machine. android female uses the legendary Samsung M100S. Here, we use the T-Mobile version G1 as an example, so TMUS is displayed here. Getprop ro. hardware: Check the server code. You can see that the development code of G1 is trout! Getprop ro. bootloader: View SPL (Hboot) version number getprop: view all information parameters of the machine. Here, you can see all information parameters of your machine, from your hardware information to the brushed ROM version information. Appendix: Explanation of adb operation commands in Android
Android basic file operation commands
ADB (Android Debug Bridge)
Note: The following commands must have the root permission to be successfully executed.
Quickly start the dos window and execute adb:
1. Add the path of adb.exe to the system environment variable
2. Configure the shortcut key to start dos
Go to the C: \ WINDOWS \ system32directory and find cmd.exe.
Right-click the menu "send to"-> desktop shortcut.
Right-click "shortcut to cmd.exe"-> "properties"-> "shortcut" on the desktop.
-> Highlight the cursor "shortcut key"-> press the custom shortcut key (for example, Ctrl + Alt + Z)
In any case, press Ctrl + Alt + Z to start the dos window and run the adb command.
----------- View device connection status series -----------
Adb get-serialno get the device ID and serial number serialNumber
Adb devices queries the devices connected to the current computer (including simulators and mobile phones). The output format is [serialNumber] [state].
Adb get-state to view the current status of the simulator/facility.
Note:
Serial number [serialNumber] -- a string created by adb, which uses its own control port <type>-<leleport>
Uniquely identifies a simulator/device instance. Example of a serial number: emulator-5554
----------- Send command to device series -----------
Adb [-d |-e |-s <serialNumber>] <command>
-D. Send the command to the usb-connected device.
-E. Send the command to the simulator device.
-S <serialNumber> sends the command to the specified device
For example, start the mobile phone device shell: adb-d shell.
Adb forward <local> <remote> Publish port. You can set any port number,
The request port from the host to the simulator or device. For example, adb forward tcp: 5555 tcp: 8000
Adb reboot restart mobile phone
Adb remount remounts system partitions as read/write partitions
Adb kill-server terminates the adb service process
Adb start-server restart adb service process
Adb root has root permission to restart adb Service
Adb wait-for-device: the command is reprinted in the adb CLI before the simulator/device connection.
Adb jdwp view available JDWP information of the specified facility.
You can use forward jdwp: <pid> port ing information to connect to the specified JDWP process. For example:
Adb forward tcp: 8000 jdwp: 472
Jdb-attach local host: 8000
The adb shell am command can start the application.
Adb shell input text <string> input text to the device (text box where the cursor is located)
Adb shell input keyevent <event_code> sends a key event to the device
For example:
When editing the text message, enter adb shell input text "hello" in the text box"
Send the key value back to Home: adb sh ...... the remaining full text>