Connecting to android device:
- Navigate to the location of ADB tools.
- Open a command prompt as the administrator where adb,exe is located.
- Type:
Syntax
adb connect <deviceIP>
Example
adb connect 192.168.3.101
- A success message will appear when the device is successfully connected.
| adb root | Restart the connection with root permission |
| adb devices | list connected devices |
| adb shell am start -a android.settings.SETTINGS | Open device android settings page |
| adb shell am force-stop com.android.settings | Close android settings page |
| adb shell ps -ef | List all running proceess |
| adb logcat -c | Clear all logs |
| adb logcat -b all -D -d >>C:\temp\abdlogs.txt Note: Path is configurable | Export device log to C:\temp\adblogs.txt |
| adb install <apk path> | Install APK |
Reference: https://www.automatetheplanet.com/adb-cheat-sheet/.
