Android Debug Bridge¶
Android Debug Bridge (ADB) is a versatile command-line tool that lets you communicate with a device (an emulator or a connected Android device).
ADB is included in the Android SDK Platform-Tools package. You can download this package with the SDK Manager, which installs it at android_sdk/platform-tools/
. Or if you want the standalone Android SDK Platform-Tools package, you can download it here.
If you are new to ADB, we recommend this tutorial on how to use it.
Useful ADB commands¶
We have made a list of the most common ADB commands that will help with your Famoco project.
FAMOCO ID
adb shell getprop ro.serialno
DEVICE MODEL
adb shell getprop ro.product.model
IMAGE VERSION
adb shell getprop ro.famoco.version
ANDROID VERSION
adb shell getprop ro.build.version.release
DEVICE SCREEN SIZE
adb shell dumpsys window | grep DisplayWidth
SEE WI-FI IP ADDRESS
adb shell ifconfig wlan0
FAMOCO APPS
adb shell ps | grep famoco
CLEAR APP DATA
adb shell pm clear PACKAGE_NAME
LIST PERMISSIONS KNOWN TO THE SYSTEM
adb shell pm list permissions -f
LIST INSTALLED PACKAGES
adb shell pm list packages -f
FILTER LOGS FOR ERRORS
adb logcat *:E
CREATE LOG FILE WITH JUST THE ERROR
adb logcat *:E > errorLog.txt
SEE THE APN LIST
adb shell cat /etc/apns-conf.xml
TAKE A SCREENSHOT
adb exec-out screencap -p > screenshot.png
GET VERSION CODE
adb shell pm dump com.your.package | grep versionCode
INSTALL APP
adb install -r APK_FILE
UNINSTALL APP
adb uninstall PACKAGE_NAME
UNINSTALL APP
-
Find the “package name” of the application you want to uninstall by running aapt:
aapt dump badging apk_file
(AAPT is provided in android_sdk/build-tools/) -
Uninstall the application:
adb uninstall package_name
Example
To uninstall the APP “Loyalty”.
- Find the “package name” of “Loyalty” by running
aapt dump badging loyalty-debug.apk
- Uninstall “Loyalty”:
adb uninstall com.famoco.loyalty