author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Fri, 05 Sep 2014 20:54:46 +0300 | |
changeset 1597 | f8934a503132 |
parent 1592 | 5ebe526dd687 |
child 1669 | 12f6f6b95b7c |
permissions | -rw-r--r-- |
1565
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
1 |
|
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
2 |
========== |
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
3 |
Android. |
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
4 |
========== |
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
5 |
.. contents:: |
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
6 |
|
1573 | 7 |
Official docs. |
8 |
============== |
|
9 |
||
10 |
http://developer.android.com/sdk/index.html |
|
11 |
Get the Android SDK |
|
12 |
http://developer.android.com/guide/index.html |
|
13 |
Introduction to Android |
|
1578
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
14 |
https://android.googlesource.com/platform/system/core/+/master/init/readme.txt |
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
15 |
init.rd file syntax. |
1573 | 16 |
|
1565
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
17 |
Show screencast from Android. |
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
18 |
============================= |
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
19 |
|
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
20 |
http://droid-at-screen.ribomation.com/ |
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
21 |
Easily show the screen of an Android device on a computer/laptop |
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
22 |
(PC, Mac, Linux, ...) and then project the desktop using a |
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
23 |
LCD-projector. |
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
24 |
|
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
25 |
Controlling Android from PC. |
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
26 |
============================ |
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
27 |
|
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
28 |
* http://code.google.com/p/androidscreencast/ |
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
29 |
* http://code.google.com/p/android-screen-monitor/ |
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
30 |
* http://androidwebkey.com/ |
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
31 |
|
1575 | 32 |
Mods. |
33 |
===== |
|
34 |
||
1576
33d2941a5c73
http://xda-university.com/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1575
diff
changeset
|
35 |
http://xda-university.com/ |
33d2941a5c73
http://xda-university.com/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1575
diff
changeset
|
36 |
How to mod. |
1575 | 37 |
http://www.cyanogenmod.org/about |
38 |
CyanogenMod |
|
1578
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
39 |
https://www.clockworkmod.com/ |
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
40 |
ClockworkMod |
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
41 |
|
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
42 |
Recovery. |
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
43 |
========= |
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
44 |
|
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
45 |
To enter phone to recovery mode press ``VolumeDown``+``Power`` button or:: |
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
46 |
|
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
47 |
adb reboot recovery |
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
48 |
|
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
49 |
See: |
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
50 |
|
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
51 |
http://teamw.in/project/twrp2 |
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
52 |
Custom recovery built. |
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
53 |
|
1582 | 54 |
ADB tips. |
55 |
========= |
|
1578
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
56 |
|
1582 | 57 |
List available devices:: |
58 |
||
59 |
$ adb devices |
|
60 |
||
61 |
Install application from ``.apk`` file:: |
|
62 |
||
63 |
$ adb install -r /path/to/application.apk |
|
64 |
||
1592
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
65 |
List installed package names (with path to ``.apk`` files!):: |
1582 | 66 |
|
67 |
$ adb shell 'pm list packages -f' |
|
68 |
||
69 |
Uninstall application by it name:: |
|
70 |
||
71 |
$ adb uninstall PACKAGE_NAME |
|
72 |
||
73 |
List currently run activities:: |
|
74 |
||
75 |
$ adb shell 'dumpsys activity' |
|
76 |
||
77 |
Find activities from package:: |
|
78 |
||
79 |
$ adb shell 'pm list packages -f' |
|
80 |
$ adb pull APK_FROM_LIST |
|
81 |
$ aapt dump badging APK_FILE |
|
82 |
||
83 |
Start an activity:: |
|
84 |
||
85 |
$ adb shell am start PACKAGE_NAME/ACTIVITY_IN_PACKAGE |
|
86 |
$ adb shell am start PACKAGE_NAME/FULLY_QUALIFIED_ACTIVITY |
|
87 |
||
1592
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
88 |
List of running processes:: |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
89 |
|
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
90 |
$ adb shell ps |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
91 |
|
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
92 |
or (supported arguments |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
93 |
``user,group,comm,args,pid,ppid,pgid,etime,nice,rgroup,ruser,time,tty,vsz,stat,rss``):: |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
94 |
|
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
95 |
$ adb shell |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
96 |
% ps -o pid,user,group,rss,vsz,args |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
97 |
|
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
98 |
To kill process:: |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
99 |
|
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
100 |
$ adb shell ps | grep $REGEX |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
101 |
$ adb shell kill $PID |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
102 |
|
1582 | 103 |
Take a screenshort:: |
104 |
||
105 |
$ adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png |
|
106 |
||
107 |
Power button:: |
|
108 |
||
109 |
$ adb shell input keyevent 26 |
|
110 |
||
111 |
Unlock screen:: |
|
112 |
||
113 |
$ adb shell input keyevent 82 |
|
114 |
||
115 |
Show system log:: |
|
116 |
||
117 |
$ adb logcat |
|
118 |
$ adb logcat "*:W" |
|
119 |