android comm
DESCRIPTION
debuging androidTRANSCRIPT
-
adb /platform-tools/
Android Debug Bridge | Android Developers http://developer.android.com/tools/help/adb.html
1 dari 12 23/05/2015 10:56
-
adb [-d|-e|-s ]
-d -e -s
-d
-e
-s
devices
help
version
logcat [option] [filter-specs]
bugreport
dumpsysdumpstatelogcat
jdwp
forward jdwp:
adb forward tcp:8000 jdwp:472jdb -attach localhost:8000
install
pull
Android Debug Bridge | Android Developers http://developer.android.com/tools/help/adb.html
2 dari 12 23/05/2015 10:56
-
push
forward tcp:local:dev:jdwp:
ppp [parm]...
dev:/dev/omap_csmi_ttyl[parm]...
defaultroutelocal notty
get-serialno
get-state
wait-for-device
device
adb wait-for-device shell getprop
install
adb wait-for-device install .apk
install
start-server
Android Debug Bridge | Android Developers http://developer.android.com/tools/help/adb.html
3 dari 12 23/05/2015 10:56
-
shell
shell [shellCommand]
devices
adb devices
- emulator-5554
offlinedevice
no device
[serialNumber] [state]
devices
adb devicesList of devices attachedemulator-5554 deviceemulator-5556 deviceemulator-5558 device
-s -s
adb -s
devices
adb -s emulator-5556 install helloWorld.apk
Android Debug Bridge | Android Developers http://developer.android.com/tools/help/adb.html
4 dari 12 23/05/2015 10:56
-
install
adb install
forward
adb forward tcp:6100 tcp:7100
adb forward tcp:6100 local:logd
pull pushinstall pull push
adb pull
adb push
adb push foo.txt /sdcard/foo.txt
/system/bin/...
am pm
Android Debug Bridge | Android Developers http://developer.android.com/tools/help/adb.html
5 dari 12 23/05/2015 10:56
-
adb [-d|-e|-s ] shell
adb [-d|-e|-s ] shell
exit
am
am
adb shell am start -a android.intent.action.VIEW
start [options]
Activity
-D
-W--start-profiler
-P --start-profiler
-R
-S--opengl-trace--user | current
startservice [options]
Service
--user | current
force-stop
kill [options]
--user | all | current
kill-all
Android Debug Bridge | Android Developers http://developer.android.com/tools/help/adb.html
6 dari 12 23/05/2015 10:56
-
broadcast [options]
[--user | all | current]
instrument [options]
Instrumentation /
-r
[-e perf true]
-e -e
[,...]-p -w
--no-window-animation--user | current
profile start
profile stop
dumpheap [options]
--user [|current]
-n
set-debug-app [options]
-w
--persistent
clear-debug-app set-debug-app
monitor [options]
--gdb
screen-compat [on|off]
display-size [reset|]
am display-size 1280x800
display-density
am display-density 480
to-uri
Android Debug Bridge | Android Developers http://developer.android.com/tools/help/adb.html
7 dari 12 23/05/2015 10:56
-
to-intent-uri
pm
pm
adb shell pm uninstall com.example.MyApp
list packages [options]
-f-d-e
-s
-3-i-u
--user
list permission-groups
list permissions [options]
-g-f-s
-d-u
list instrumentation-f
list features
list libraries
list users
path
install [options]
-r
-t-i
-s
Android Debug Bridge | Android Developers http://developer.android.com/tools/help/adb.html
8 dari 12 23/05/2015 10:56
-
-d
uninstall [options] -k
clear
enable
disable
disable-user [options] --user
grant
revoke
set-install-location
012
get-install-location0 [auto]1 [internal]2 [external]
set-permission-enforced [true|false]trim-caches
create-user
remove-user
get-max-users
sqlite3 .dump.schema
sqlite3sqlite3 sqlite3
/data/data//databases/
adb -s emulator-5554 shell# sqlite3 /data/data/com.example.google.rss.rssexample/databases/rssitems.dbSQLite version 3.3.12Enter ".help" for instructions.... enter commands, then quit...
Android Debug Bridge | Android Developers http://developer.android.com/tools/help/adb.html
9 dari 12 23/05/2015 10:56
-
sqlite3 sqlite3exit CTRL+D
screenrecord
screenrecord
$ adb shell screenrecord /sdcard/demo.mp4
--time-limit
pull
$ adb shellshell@ $ screenrecord --verbose /sdcard/demo.mp4(press Ctrl-C to stop)shell@ $ exit$ adb pull /sdcard/demo.mp4
screenrecord
screenrecord
screenrecord
--help
--size 1280x720
--bit-rate screenrecord --bit-rate 6000000 /sdcard/demo.mp4
--time-limit
--rotate
--verbose
Android Debug Bridge | Android Developers http://developer.android.com/tools/help/adb.html
10 dari 12 23/05/2015 10:56
-
adb shell monkey -v -p your.package.name 500
adb shell ls /system/bin
dumpsys
dumpstate
logcat [option]... [filter-spec]...
dmesg
start
stop
logcat
logcat
[adb] logcat [option] ... [filter-spec] ...
logcat
adb logcat
logcat
Android Debug Bridge | Android Developers http://developer.android.com/tools/help/adb.html
11 dari 12 23/05/2015 10:56
-
$ adb usbrestarting in USB mode
$ adb devicesList of devices attached######## device
$ adb tcpip 5555restarting in TCP mode port: 5555
#.#.#.#
$ adb connect #.#.#.#connected to #.#.#.#:5555
$ adb devicesList of devices attached#.#.#.#:5555 device
adb kill-server
Android Debug Bridge | Android Developers http://developer.android.com/tools/help/adb.html
12 dari 12 23/05/2015 10:56