Connecting to an Android device:
- Navigate to the location of ADB tools on your device.
- 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.
Commands and Results:
| Command | Description |
|---|---|
| adb root | Restart the connection with root permission. |
| adb devices | List connected devices. |
| adb shell am start -a android.settings.SETTINGS | Open the Android settings page. |
| adb shell am force-stop com.android.settings | Close the Android settings page. |
| adb shell ps -ef | List all running processes. |
| adb logcat -c | Clear all logs. |
| adb logcat -b all -D -d >>C:\temp\abdlogs.txt | Export the device log to C:\temp\adblogs.txt 📝Note: Path is configurable. |
| adb install <apk path> | Install APK |
Reference: https://www.automatetheplanet.com/adb-cheat-sheet/
📟 To Consider: It is possible that debugging has been disabled on your device. You can confirm and adjust this within the Developer Options.