Last active
November 18, 2016 12:08
-
-
Save valenso/6208992 to your computer and use it in GitHub Desktop.
ADB useful tips
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#connect/disconnect | |
#if you use usb cable, you do not need connect to devices | |
adb connect [ip] | |
adb disconnect [ip] | |
#show all devices | |
adb devices | |
#sceenshots | |
alias s='adb shell screencap -p | perl -pe "s/\x0D\x0A/\x0A/g" > ~/Documents/$(date +%d-%m-%Y_%k-%M-%S)_screen.png' | |
adb shell screencap -p | sed 's/\r$//' > screen.png | |
#all packages | |
adb shell pm list packages -f [-s] | |
#delete application | |
adb shell am start -a android.intent.action.DELETE -d package:<your app package> | |
#Make application system | |
adb shell sh -c 'su -c cp /sdcard/file.apk /system/app/' | |
#delete from system | |
adb shell | |
su | |
cd system/app/ | |
rm [filename] | |
adb push /path/to/local/file /mnt/sdcard/path/to/file | |
#open settings | |
adb shell am start -a android.settings.AIRPLANE_MODE_SETTINGS | |
#open app | |
adb shell am start -n com.package.name/com.package.name.ActivityName | |
adb logcat ##log | |
adb logcat -c ##clear log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment