author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Mon, 09 Oct 2017 10:49:36 +0300 | |
changeset 2188 | e95731eef030 |
parent 2187 | 1eedb185a54d |
child 2190 | f589976b8876 |
permissions | -rw-r--r-- |
1669
12f6f6b95b7c
Add standard header.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1592
diff
changeset
|
1 |
.. -*- coding: utf-8; -*- |
1565
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 |
========== |
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
4 |
Android. |
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
5 |
========== |
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
6 |
.. contents:: |
1905
fba288d59662
Include only local subsections into TOC. This prevent duplication of
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1856
diff
changeset
|
7 |
:local: |
1565
e59b35de5f28
Controlling Android from PC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
8 |
|
1573 | 9 |
Official docs. |
10 |
============== |
|
11 |
||
12 |
http://developer.android.com/sdk/index.html |
|
13 |
Get the Android SDK |
|
14 |
http://developer.android.com/guide/index.html |
|
15 |
Introduction to Android |
|
1578
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
16 |
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
|
17 |
init.rd file syntax. |
1573 | 18 |
|
2121 | 19 |
Android stats |
20 |
============= |
|
21 |
||
22 |
CPU:: |
|
23 |
||
24 |
$ cat /proc/cpuinfo |
|
25 |
$ cat /proc/cpufreq/cpufreq_freq |
|
26 |
||
27 |
Memory:: |
|
28 |
||
29 |
$ cat /proc/meminfo |
|
30 |
||
1802
a49db2d22443
Android API levels.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1743
diff
changeset
|
31 |
Android API levels. |
a49db2d22443
Android API levels.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1743
diff
changeset
|
32 |
=================== |
a49db2d22443
Android API levels.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1743
diff
changeset
|
33 |
|
a49db2d22443
Android API levels.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1743
diff
changeset
|
34 |
http://developer.android.com/guide/topics/manifest/uses-sdk-element.html |
a49db2d22443
Android API levels.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1743
diff
changeset
|
35 |
"Platform Version / API Level" table. |
a49db2d22443
Android API levels.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1743
diff
changeset
|
36 |
|
1695
67e3552bd7f6
https://f-droid.org/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1694
diff
changeset
|
37 |
Package repositories. |
67e3552bd7f6
https://f-droid.org/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1694
diff
changeset
|
38 |
===================== |
67e3552bd7f6
https://f-droid.org/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1694
diff
changeset
|
39 |
|
67e3552bd7f6
https://f-droid.org/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1694
diff
changeset
|
40 |
https://play.google.com/ |
67e3552bd7f6
https://f-droid.org/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1694
diff
changeset
|
41 |
Google package repository. |
67e3552bd7f6
https://f-droid.org/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1694
diff
changeset
|
42 |
https://f-droid.org/ |
67e3552bd7f6
https://f-droid.org/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1694
diff
changeset
|
43 |
Free software repository. |
1856 | 44 |
http://www.appbrain.com/ |
45 |
AppBrain, alternative catalog to Google Play. Packages is backed via lisnk |
|
46 |
to Google Play. |
|
1695
67e3552bd7f6
https://f-droid.org/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1694
diff
changeset
|
47 |
|
1856 | 48 |
Link to package description page:: |
1743
7e0334761f15
Link to package description page.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1742
diff
changeset
|
49 |
|
7e0334761f15
Link to package description page.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1742
diff
changeset
|
50 |
https://play.google.com/store/apps/details?id=com.google.android.talk |
7e0334761f15
Link to package description page.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1742
diff
changeset
|
51 |
|
1856 | 52 |
See also: |
53 |
||
54 |
http://android.stackexchange.com/questions/216/what-are-the-alternative-android-app-markets/ |
|
55 |
What are the alternative Android app markets? |
|
56 |
||
1575 | 57 |
Mods. |
58 |
===== |
|
59 |
||
1576
33d2941a5c73
http://xda-university.com/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1575
diff
changeset
|
60 |
http://xda-university.com/ |
33d2941a5c73
http://xda-university.com/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1575
diff
changeset
|
61 |
How to mod. |
1575 | 62 |
http://www.cyanogenmod.org/about |
63 |
CyanogenMod |
|
1578
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
64 |
https://www.clockworkmod.com/ |
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
65 |
ClockworkMod |
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
66 |
|
2187
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
67 |
Connect to Android via USB by adb in Linux |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
68 |
========================================== |
1696
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
69 |
|
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
70 |
Add ``udev`` rule for fix permission issues:: |
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
71 |
|
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
72 |
$ cat /etc/udev/rules.d/90-android.rules |
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
73 |
|
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
74 |
# Standard Google device. |
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
75 |
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0c03", MODE="0666", GROUP="plugdev" |
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
76 |
# China N101 II |
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
77 |
SUBSYSTEM=="usb", ATTR{idVendor}=="2207", ATTR{idProduct}=="0010", MODE="0666", GROUP="plugdev" |
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
78 |
|
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
79 |
Reload udev rules and re-plug device via USB:: |
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
80 |
|
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
81 |
$ sudo service udev force-reload |
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
82 |
|
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
83 |
See: |
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
84 |
|
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
85 |
http://developer.android.com/tools/device.html |
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
86 |
Setting up a Device for Development. |
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
87 |
|
2187
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
88 |
Connect to Android via USB by adb in Windows |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
89 |
============================================ |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
90 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
91 |
Get latest official Google drivers from: |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
92 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
93 |
https://developer.android.com/studio/run/win-usb.html |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
94 |
Get the Google USB Driver. |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
95 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
96 |
If your device isn't in official list you can try to find driver in `Windows |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
97 |
update catalog at http://www.catalog.update.microsoft.com`__. |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
98 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
99 |
__ http://www.catalog.update.microsoft.com |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
100 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
101 |
Use search by vendor or device name, or string ``adb``. Alternatively use |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
102 |
`hardware id`_. |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
103 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
104 |
BTW older version of official Google drivers are also in `Windows update |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
105 |
catalog`__. |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
106 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
107 |
__ http://www.catalog.update.microsoft.com/Search.aspx?q=google+adb |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
108 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
109 |
Most probably you will fail to find drivers for numerous Chinese/noname Android |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
110 |
devices. We can reuse official Google drivers. To do that: |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
111 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
112 |
.. _hardware id: |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
113 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
114 |
* Find your USB's hardware VID and PID. Locate your device in *Device Manager*, |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
115 |
open Properties => Details => Hardware Ids and copy (by ``Ctrl+C``) string |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
116 |
like:: |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
117 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
118 |
USB\VID_2A45&PID_201D&MI_01 |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
119 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
120 |
* Extract official Google's ADB driver package:: |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
121 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
122 |
unzip latest_usb_driver_windows.zip |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
123 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
124 |
* Locate and modify driver's ``.inf`` file (in my case it was |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
125 |
``android_winusb.inf``) by adding lines, like:: |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
126 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
127 |
; Meizu |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
128 |
%SingleAdbInterface% = USB_Install, USB\VID_2A45&PID_201D |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
129 |
%CompositeAdbInterface% = USB_Install, USB\VID_2A45&PID_201D&MI_01 |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
130 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
131 |
to all sections that has similar lines setting your own `hardware id`_ |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
132 |
that we've extracted. |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
133 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
134 |
* Temporary disable driver signing enforcement (run from Administrator, ``Win``, |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
135 |
type ``cmd``, ``Ctrl+Shift+Enter``):: |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
136 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
137 |
cmd# bcdedit /set testsigning off |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
138 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
139 |
and reboot. You'll see ``Test mode`` sign in right lower corner of desktop. |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
140 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
141 |
* Locate your decive, then follow *Properties => Driver => Update => Browse my computer => |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
142 |
Let me pick => Hard Disk...*. Select *Android Composite ADB interface* driver |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
143 |
and ignore security warning about broken file signature. |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
144 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
145 |
* Enable signing checks back:: |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
146 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
147 |
cmd# bcdedit /set testsigning on |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
148 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
149 |
and reboot. Hurrah! |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
150 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
151 |
.. note:: |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
152 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
153 |
As you see Google's adb driver works fine with any Android phone. It's |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
154 |
Microsoft policy to forbid class drivers so each vendor is required to |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
155 |
provide same driver with different hardware ID and to pay money for Windows |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
156 |
Logo® program and signing process. |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
157 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
158 |
.. tip:: |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
159 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
160 |
``bcdedit`` can be run with alternative options:: |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
161 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
162 |
cmd# bcdedit.exe /set nointegritychecks on |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
163 |
cmd# bcdedit.exe /set nointegritychecks off |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
164 |
|
1578
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
165 |
Recovery. |
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
166 |
========= |
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
167 |
|
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
168 |
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
|
169 |
|
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
170 |
adb reboot recovery |
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
171 |
|
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
172 |
See: |
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
173 |
|
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
174 |
http://teamw.in/project/twrp2 |
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
175 |
Custom recovery built. |
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
176 |
|
1582 | 177 |
ADB tips. |
178 |
========= |
|
1578
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
179 |
|
1582 | 180 |
List available devices:: |
181 |
||
182 |
$ adb devices |
|
183 |
||
184 |
Install application from ``.apk`` file:: |
|
185 |
||
186 |
$ adb install -r /path/to/application.apk |
|
187 |
||
1592
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
188 |
List installed package names (with path to ``.apk`` files!):: |
1582 | 189 |
|
190 |
$ adb shell 'pm list packages -f' |
|
191 |
||
1740
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
192 |
Uninstall application by its package name:: |
1582 | 193 |
|
194 |
$ adb uninstall PACKAGE_NAME |
|
195 |
||
1740
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
196 |
Disable/enable application:: |
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
197 |
|
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
198 |
$ adb shell pm disable PACKAGE_NAME |
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
199 |
$ adb shell pm enable PACKAGE_NAME |
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
200 |
|
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
201 |
List of disabled packages:: |
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
202 |
|
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
203 |
$ adb shell pm list packages -d |
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
204 |
|
2051
b517b191156b
List of application properties (version, permissions, etc).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2046
diff
changeset
|
205 |
List of application properties (version, permissions, etc):: |
b517b191156b
List of application properties (version, permissions, etc).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2046
diff
changeset
|
206 |
|
b517b191156b
List of application properties (version, permissions, etc).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2046
diff
changeset
|
207 |
$ adb shell dumpsys package $PKG |
b517b191156b
List of application properties (version, permissions, etc).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2046
diff
changeset
|
208 |
|
1582 | 209 |
List currently run activities:: |
210 |
||
211 |
$ adb shell 'dumpsys activity' |
|
212 |
||
213 |
Find activities from package:: |
|
214 |
||
215 |
$ adb shell 'pm list packages -f' |
|
216 |
$ adb pull APK_FROM_LIST |
|
217 |
$ aapt dump badging APK_FILE |
|
218 |
||
219 |
Start an activity:: |
|
220 |
||
221 |
$ adb shell am start PACKAGE_NAME/ACTIVITY_IN_PACKAGE |
|
222 |
$ adb shell am start PACKAGE_NAME/FULLY_QUALIFIED_ACTIVITY |
|
223 |
||
1741
5c549e75b296
Start an activity with action filter.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1740
diff
changeset
|
224 |
Start an activity with action filter:: |
5c549e75b296
Start an activity with action filter.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1740
diff
changeset
|
225 |
|
5c549e75b296
Start an activity with action filter.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1740
diff
changeset
|
226 |
android# am start -a com.example.ACTION_NAME -n com.package.name/com.package.name.ActivityName |
5c549e75b296
Start an activity with action filter.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1740
diff
changeset
|
227 |
|
1592
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
228 |
List of running processes:: |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
229 |
|
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
230 |
$ adb shell ps |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
231 |
|
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
232 |
or (supported arguments |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
233 |
``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
|
234 |
|
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
235 |
$ adb shell |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
236 |
% ps -o pid,user,group,rss,vsz,args |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
237 |
|
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
238 |
To kill process:: |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
239 |
|
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
240 |
$ adb shell ps | grep $REGEX |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
241 |
$ adb shell kill $PID |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
242 |
|
1742 | 243 |
To stop application:: |
244 |
||
245 |
$ adb shell am kill com.google.android.contacts |
|
246 |
$ adb shell am force-stop com.google.android.contacts |
|
247 |
||
1582 | 248 |
Take a screenshort:: |
249 |
||
250 |
$ adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png |
|
251 |
||
252 |
Power button:: |
|
253 |
||
254 |
$ adb shell input keyevent 26 |
|
255 |
||
256 |
Unlock screen:: |
|
257 |
||
258 |
$ adb shell input keyevent 82 |
|
259 |
||
260 |
Show system log:: |
|
261 |
||
262 |
$ adb logcat |
|
263 |
$ adb logcat "*:W" |
|
264 |
||
1946 | 265 |
dumpsys |
266 |
======= |
|
267 |
||
268 |
Info from all services:: |
|
269 |
||
270 |
$ adb shell dumpsys |
|
271 |
||
272 |
List of available services:: |
|
273 |
||
274 |
$ adb shell service list |
|
275 |
||
276 |
Info from concrete service:: |
|
277 |
||
278 |
$ adb shell dumpsys phone |
|
279 |
$ adb shell dumpsys diskstats |
|
280 |
$ adb shell dumpsys usb |
|
281 |
$ adb shell dumpsys activity |
|
282 |
$ adb shell dumpsys package |
|
283 |
$ adb shell dumpsys display |
|
284 |
$ adb shell dumpsys gfxinfo |
|
285 |
$ adb shell dumpsys power |
|
286 |
$ adb shell dumpsys battery |
|
287 |
$ adb shell dumpsys batteryinfo |
|
288 |
$ adb shell dumpsys cpuinfo |
|
289 |
$ adb shell dumpsys dbinfo |
|
290 |
$ adb shell dumpsys meminfo |
|
291 |
$ adb shell dumpsys account |
|
292 |
$ adb shell dumpsys netstats |
|
293 |
||
294 |
* https://source.android.com/devices/tech/debug/dumpsys.html |
|
295 |
* http://stackoverflow.com/questions/11201659/whats-the-android-adb-shell-dumpsys-tool-and-what-are-its-benefits |
|
296 |
||
1742 | 297 |
List partition. |
298 |
=============== |
|
299 |
||
300 |
List partitions (with sizes):: |
|
301 |
||
302 |
android# cat /proc/partitions |
|
303 |
android# cat /proc/mtd |
|
304 |
||
305 |
List mounted file systems:: |
|
306 |
||
307 |
android# mount |
|
308 |
android# df |
|
309 |
||
1946 | 310 |
Remount /system as RW |
311 |
===================== |
|
312 |
||
313 |
Usually with:: |
|
314 |
||
315 |
$ adb remount |
|
316 |
||
317 |
If you have root but above command fail:: |
|
318 |
||
319 |
$ adb shell |
|
320 |
android# su |
|
321 |
android# mount | grep /system |
|
322 |
... |
|
323 |
android# mount -o remount,rw /system |
|
324 |
||
2046
ea76b2532bcd
Getting package name, version, API requirements and permissions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1946
diff
changeset
|
325 |
Working with apk files |
ea76b2532bcd
Getting package name, version, API requirements and permissions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1946
diff
changeset
|
326 |
====================== |
ea76b2532bcd
Getting package name, version, API requirements and permissions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1946
diff
changeset
|
327 |
|
ea76b2532bcd
Getting package name, version, API requirements and permissions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1946
diff
changeset
|
328 |
Getting package name, version, API requirements and permissions:: |
ea76b2532bcd
Getting package name, version, API requirements and permissions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1946
diff
changeset
|
329 |
|
ea76b2532bcd
Getting package name, version, API requirements and permissions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1946
diff
changeset
|
330 |
$ aapt dump badging $FILE.apk |
ea76b2532bcd
Getting package name, version, API requirements and permissions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1946
diff
changeset
|
331 |
|
1694
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
332 |
Controlling Android from PC. |
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
333 |
============================ |
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
334 |
|
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
335 |
* http://code.google.com/p/androidscreencast/ |
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
336 |
* http://code.google.com/p/android-screen-monitor/ |
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
337 |
* http://androidwebkey.com/ |
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
338 |
|
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
339 |
Show screencast from Android. |
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
340 |
============================= |
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
341 |
|
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
342 |
http://droid-at-screen.ribomation.com/ |
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
343 |
Easily show the screen of an Android device on a computer/laptop |
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
344 |
(PC, Mac, Linux, ...) and then project the desktop using a |
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
345 |
LCD-projector. |