Created
January 11, 2019 09:53
-
-
Save tomjegan/2af39399c51ac21640411549501c9140 to your computer and use it in GitHub Desktop.
Script containing useful adb commands which I have used in the past. There may be better ways to achieve the same thing and some may be obsolete now
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
--Find current activity | |
adb shell dumpsys window windows | grep "mFocusedApp" | |
--Find running activities | |
adb shell dumpsys activity activities | grep "run" | |
-- Find specfic exco running processes (good for fragments) | |
adb shell dumpsys activity com.excointouch | |
--Pull database to desktop | |
adb shell "run-as com.excointouch.core.par10823 chmod 666 /data/data/com.excointouch.core.par10823/databases/excocore.db" | |
adb pull /data/data/com.excointouch.core.par10823/databases/excocore .\Desktop\excocore.db | |
adb shell "run-as com.excointouch.core.par10823 chmod 600 /data/data/com.excointouch.core.par10823/databases/excocore.db" | |
--Verify signing | |
jarsigner -verify -verbose -certs .\{FILE_NAME}.apk | grep "X.509" | |
--Change emulator language/region (while running) | |
adb -e shell | |
setprop persist.sys.locale es-US;stop;sleep 5;start | |
--Pull Robotium files from emulator | |
adb pull "storage/sdcard/Pictures/Robotium" | |
--trigger a broadcast and deliver it to a component | |
adb shell am broadcast -a android.intent.action.BOOT_COMPLETED -c android.intent.category.HOME -n package_name/class_name | |
--Launch emulator | |
emulator -avd "Galaxy_Nexus_API_19" -verbose -dns-server 8.8.8.8 | |
--Send reboot signal | |
adb shell | |
am broadcast -a android.intent.action.BOOT_COMPLETED -c android.intent.category.HOME -n com.excointouch.core.par10823.receivers./RebootReceiver |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment