# HG changeset patch # User Oleksandr Gavenko # Date 1402350287 -10800 # Node ID 9056efd0d2f95a979d5559815b6b8adf8f9feded # Parent 46a6bc1e9f2a560b2285e4a442b7e6c3975f1b96# Parent 84a5029867c2296a16d5ef3f7f22d0d5e2e4f254 merged diff -r 84a5029867c2 -r 9056efd0d2f9 android.rst --- a/android.rst Wed Jun 04 01:49:15 2014 +0300 +++ b/android.rst Tue Jun 10 00:44:47 2014 +0300 @@ -51,4 +51,54 @@ http://teamw.in/project/twrp2 Custom recovery built. +ADB tips. +========= +List available devices:: + + $ adb devices + +Install application from ``.apk`` file:: + + $ adb install -r /path/to/application.apk + +List installed package names:: + + $ adb shell 'pm list packages -f' + +Uninstall application by it name:: + + $ adb uninstall PACKAGE_NAME + +List currently run activities:: + + $ adb shell 'dumpsys activity' + +Find activities from package:: + + $ adb shell 'pm list packages -f' + $ adb pull APK_FROM_LIST + $ aapt dump badging APK_FILE + +Start an activity:: + + $ adb shell am start PACKAGE_NAME/ACTIVITY_IN_PACKAGE + $ adb shell am start PACKAGE_NAME/FULLY_QUALIFIED_ACTIVITY + +Take a screenshort:: + + $ adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png + +Power button:: + + $ adb shell input keyevent 26 + +Unlock screen:: + + $ adb shell input keyevent 82 + +Show system log:: + + $ adb logcat + $ adb logcat "*:W" + diff -r 84a5029867c2 -r 9056efd0d2f9 oracle.rst --- a/oracle.rst Wed Jun 04 01:49:15 2014 +0300 +++ b/oracle.rst Tue Jun 10 00:44:47 2014 +0300 @@ -153,4 +153,7 @@ show errors; +Dump how exactly field stored:: + select dump(date '2009-08-07') from dual; +