author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Sat, 10 Feb 2018 01:28:53 +0200 | |
changeset 2227 | 1e9323e7ec88 |
parent 2193 | 493d19cc34e1 |
child 2228 | 837f1337c59b |
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 |
|
2192 | 9 |
Official docs |
10 |
============= |
|
1573 | 11 |
|
2190 | 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 |
|
16 |
https://android.googlesource.com/platform/system/core/+/master/init/readme.txt |
|
17 |
init.rd file syntax. |
|
1573 | 18 |
|
2192 | 19 |
Getting tools |
20 |
============= |
|
21 |
||
22 |
https://developer.android.com/studio/releases/platform-tools.html |
|
23 |
SDK Platform Tools (includes adb and fastboot) download and rellease |
|
24 |
changelog. |
|
25 |
https://developer.android.com/studio/index.html |
|
26 |
Android Studio (official IDE for Android) and sdk-tools (includes ``sdkmanager``). |
|
27 |
||
2193 | 28 |
Android emulator |
29 |
================ |
|
30 |
||
31 |
Intel provided images and hypervisor to run x86 Android port with acceleration: |
|
32 |
||
33 |
https://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager-intel-haxm |
|
34 |
IntelĀ® Hardware Accelerated Execution Manager (IntelĀ® HAXM). It is available from SDK manager |
|
35 |
also. |
|
36 |
||
37 |
It starts service. To manage service use:: |
|
38 |
||
39 |
sc stop intelhaxm |
|
40 |
sc start intelhaxm |
|
41 |
||
2121 | 42 |
Android stats |
43 |
============= |
|
44 |
||
45 |
CPU:: |
|
46 |
||
47 |
$ cat /proc/cpuinfo |
|
48 |
$ cat /proc/cpufreq/cpufreq_freq |
|
49 |
||
50 |
Memory:: |
|
51 |
||
52 |
$ cat /proc/meminfo |
|
53 |
||
1802
a49db2d22443
Android API levels.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1743
diff
changeset
|
54 |
Android API levels. |
a49db2d22443
Android API levels.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1743
diff
changeset
|
55 |
=================== |
a49db2d22443
Android API levels.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1743
diff
changeset
|
56 |
|
2190 | 57 |
http://developer.android.com/guide/topics/manifest/uses-sdk-element.html |
58 |
"Platform Version / API Level" table. |
|
1802
a49db2d22443
Android API levels.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1743
diff
changeset
|
59 |
|
1695
67e3552bd7f6
https://f-droid.org/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1694
diff
changeset
|
60 |
Package repositories. |
67e3552bd7f6
https://f-droid.org/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1694
diff
changeset
|
61 |
===================== |
67e3552bd7f6
https://f-droid.org/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1694
diff
changeset
|
62 |
|
2190 | 63 |
https://play.google.com/ |
64 |
Google package repository. |
|
65 |
https://f-droid.org/ |
|
66 |
Free software repository. |
|
67 |
http://www.appbrain.com/ |
|
68 |
AppBrain, alternative catalog to Google Play. Packages is backed via lisnk |
|
69 |
to Google Play. |
|
1695
67e3552bd7f6
https://f-droid.org/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1694
diff
changeset
|
70 |
|
1856 | 71 |
Link to package description page:: |
1743
7e0334761f15
Link to package description page.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1742
diff
changeset
|
72 |
|
7e0334761f15
Link to package description page.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1742
diff
changeset
|
73 |
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
|
74 |
|
1856 | 75 |
See also: |
76 |
||
2190 | 77 |
http://android.stackexchange.com/questions/216/what-are-the-alternative-android-app-markets/ |
78 |
What are the alternative Android app markets? |
|
1856 | 79 |
|
1575 | 80 |
Mods. |
81 |
===== |
|
82 |
||
2190 | 83 |
http://xda-university.com/ |
84 |
How to mod. |
|
85 |
http://www.cyanogenmod.org/about |
|
86 |
CyanogenMod |
|
87 |
https://www.clockworkmod.com/ |
|
88 |
ClockworkMod |
|
1578
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
89 |
|
2187
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
90 |
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
|
91 |
========================================== |
1696
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
92 |
|
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
93 |
Add ``udev`` rule for fix permission issues:: |
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
94 |
|
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
95 |
$ 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
|
96 |
|
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
97 |
# Standard Google device. |
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
98 |
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
|
99 |
# China N101 II |
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
100 |
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
|
101 |
|
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
102 |
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
|
103 |
|
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
104 |
$ sudo service udev force-reload |
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
105 |
|
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
106 |
See: |
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
107 |
|
2190 | 108 |
http://developer.android.com/tools/device.html |
109 |
Setting up a Device for Development. |
|
1696
35ab36c1a85e
Connect to Android via USB by adb.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1695
diff
changeset
|
110 |
|
2187
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
111 |
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
|
112 |
============================================ |
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 |
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
|
115 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
116 |
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
|
117 |
Get the Google USB Driver. |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
118 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
119 |
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
|
120 |
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
|
121 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
122 |
__ 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
|
123 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
124 |
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
|
125 |
`hardware id`_. |
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 |
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
|
128 |
catalog`__. |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
129 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
130 |
__ 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
|
131 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
132 |
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
|
133 |
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
|
134 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
135 |
.. _hardware id: |
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 |
* 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
|
138 |
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
|
139 |
like:: |
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 |
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
|
142 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
143 |
* 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
|
144 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
145 |
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
|
146 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
147 |
* 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
|
148 |
``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
|
149 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
150 |
; Meizu |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
151 |
%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
|
152 |
%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
|
153 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
154 |
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
|
155 |
that we've extracted. |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
156 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
157 |
* 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
|
158 |
type ``cmd``, ``Ctrl+Shift+Enter``):: |
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 |
cmd# bcdedit /set testsigning off |
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 |
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
|
163 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
164 |
* 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
|
165 |
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
|
166 |
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
|
167 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
168 |
* Enable signing checks back:: |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
169 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
170 |
cmd# bcdedit /set testsigning on |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
171 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
172 |
and reboot. Hurrah! |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
173 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
174 |
.. note:: |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
175 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
176 |
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
|
177 |
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
|
178 |
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
|
179 |
LogoĀ® program and signing process. |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
180 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
181 |
.. tip:: |
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
182 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
183 |
``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
|
184 |
|
1eedb185a54d
Connect to Android via USB by adb in Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2121
diff
changeset
|
185 |
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
|
186 |
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
|
187 |
|
1578
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
188 |
Recovery. |
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
189 |
========= |
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
190 |
|
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
191 |
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
|
192 |
|
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
193 |
adb reboot recovery |
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
194 |
|
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
195 |
See: |
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
196 |
|
2190 | 197 |
http://teamw.in/project/twrp2 |
198 |
Custom recovery built. |
|
1578
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
199 |
|
1582 | 200 |
ADB tips. |
201 |
========= |
|
1578
c97cd8248a24
init.rd file syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1576
diff
changeset
|
202 |
|
1582 | 203 |
List available devices:: |
204 |
||
205 |
$ adb devices |
|
206 |
||
207 |
Install application from ``.apk`` file:: |
|
208 |
||
209 |
$ adb install -r /path/to/application.apk |
|
210 |
||
1592
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
211 |
List installed package names (with path to ``.apk`` files!):: |
1582 | 212 |
|
213 |
$ adb shell 'pm list packages -f' |
|
214 |
||
1740
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
215 |
Uninstall application by its package name:: |
1582 | 216 |
|
217 |
$ adb uninstall PACKAGE_NAME |
|
218 |
||
1740
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
219 |
Disable/enable application:: |
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
220 |
|
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
221 |
$ adb shell pm disable PACKAGE_NAME |
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
222 |
$ adb shell pm enable PACKAGE_NAME |
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
223 |
|
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
224 |
List of disabled packages:: |
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
225 |
|
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
226 |
$ adb shell pm list packages -d |
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
227 |
|
2051
b517b191156b
List of application properties (version, permissions, etc).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2046
diff
changeset
|
228 |
List of application properties (version, permissions, etc):: |
b517b191156b
List of application properties (version, permissions, etc).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2046
diff
changeset
|
229 |
|
b517b191156b
List of application properties (version, permissions, etc).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2046
diff
changeset
|
230 |
$ adb shell dumpsys package $PKG |
b517b191156b
List of application properties (version, permissions, etc).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2046
diff
changeset
|
231 |
|
1582 | 232 |
List currently run activities:: |
233 |
||
234 |
$ adb shell 'dumpsys activity' |
|
235 |
||
236 |
Find activities from package:: |
|
237 |
||
238 |
$ adb shell 'pm list packages -f' |
|
239 |
$ adb pull APK_FROM_LIST |
|
240 |
$ aapt dump badging APK_FILE |
|
241 |
||
242 |
Start an activity:: |
|
243 |
||
244 |
$ adb shell am start PACKAGE_NAME/ACTIVITY_IN_PACKAGE |
|
245 |
$ adb shell am start PACKAGE_NAME/FULLY_QUALIFIED_ACTIVITY |
|
246 |
||
1741
5c549e75b296
Start an activity with action filter.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1740
diff
changeset
|
247 |
Start an activity with action filter:: |
5c549e75b296
Start an activity with action filter.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1740
diff
changeset
|
248 |
|
5c549e75b296
Start an activity with action filter.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1740
diff
changeset
|
249 |
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
|
250 |
|
1592
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
251 |
List of running processes:: |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
252 |
|
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
253 |
$ adb shell ps |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
254 |
|
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
255 |
or (supported arguments |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
256 |
``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
|
257 |
|
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
258 |
$ adb shell |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
259 |
% ps -o pid,user,group,rss,vsz,args |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
260 |
|
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
261 |
To kill process:: |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
262 |
|
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
263 |
$ adb shell ps | grep $REGEX |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
264 |
$ adb shell kill $PID |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
265 |
|
1742 | 266 |
To stop application:: |
267 |
||
268 |
$ adb shell am kill com.google.android.contacts |
|
269 |
$ adb shell am force-stop com.google.android.contacts |
|
270 |
||
1582 | 271 |
Take a screenshort:: |
272 |
||
273 |
$ adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png |
|
274 |
||
275 |
Power button:: |
|
276 |
||
277 |
$ adb shell input keyevent 26 |
|
278 |
||
279 |
Unlock screen:: |
|
280 |
||
281 |
$ adb shell input keyevent 82 |
|
282 |
||
283 |
Show system log:: |
|
284 |
||
285 |
$ adb logcat |
|
286 |
$ adb logcat "*:W" |
|
287 |
||
1946 | 288 |
dumpsys |
289 |
======= |
|
290 |
||
291 |
Info from all services:: |
|
292 |
||
293 |
$ adb shell dumpsys |
|
294 |
||
295 |
List of available services:: |
|
296 |
||
297 |
$ adb shell service list |
|
298 |
||
299 |
Info from concrete service:: |
|
300 |
||
301 |
$ adb shell dumpsys phone |
|
302 |
$ adb shell dumpsys diskstats |
|
303 |
$ adb shell dumpsys usb |
|
304 |
$ adb shell dumpsys activity |
|
305 |
$ adb shell dumpsys package |
|
306 |
$ adb shell dumpsys display |
|
307 |
$ adb shell dumpsys gfxinfo |
|
308 |
$ adb shell dumpsys power |
|
309 |
$ adb shell dumpsys battery |
|
310 |
$ adb shell dumpsys batteryinfo |
|
311 |
$ adb shell dumpsys cpuinfo |
|
312 |
$ adb shell dumpsys dbinfo |
|
313 |
$ adb shell dumpsys meminfo |
|
314 |
$ adb shell dumpsys account |
|
315 |
$ adb shell dumpsys netstats |
|
316 |
||
317 |
* https://source.android.com/devices/tech/debug/dumpsys.html |
|
318 |
* http://stackoverflow.com/questions/11201659/whats-the-android-adb-shell-dumpsys-tool-and-what-are-its-benefits |
|
319 |
||
1742 | 320 |
List partition. |
321 |
=============== |
|
322 |
||
323 |
List partitions (with sizes):: |
|
324 |
||
325 |
android# cat /proc/partitions |
|
326 |
android# cat /proc/mtd |
|
327 |
||
328 |
List mounted file systems:: |
|
329 |
||
330 |
android# mount |
|
331 |
android# df |
|
332 |
||
1946 | 333 |
Remount /system as RW |
334 |
===================== |
|
335 |
||
336 |
Usually with:: |
|
337 |
||
338 |
$ adb remount |
|
339 |
||
340 |
If you have root but above command fail:: |
|
341 |
||
342 |
$ adb shell |
|
343 |
android# su |
|
344 |
android# mount | grep /system |
|
345 |
... |
|
346 |
android# mount -o remount,rw /system |
|
347 |
||
2046
ea76b2532bcd
Getting package name, version, API requirements and permissions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1946
diff
changeset
|
348 |
Working with apk files |
ea76b2532bcd
Getting package name, version, API requirements and permissions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1946
diff
changeset
|
349 |
====================== |
ea76b2532bcd
Getting package name, version, API requirements and permissions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1946
diff
changeset
|
350 |
|
ea76b2532bcd
Getting package name, version, API requirements and permissions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1946
diff
changeset
|
351 |
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
|
352 |
|
ea76b2532bcd
Getting package name, version, API requirements and permissions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1946
diff
changeset
|
353 |
$ aapt dump badging $FILE.apk |
ea76b2532bcd
Getting package name, version, API requirements and permissions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1946
diff
changeset
|
354 |
|
1694
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
355 |
Controlling Android from PC. |
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
356 |
============================ |
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
357 |
|
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
358 |
* http://code.google.com/p/androidscreencast/ |
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
359 |
* http://code.google.com/p/android-screen-monitor/ |
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
360 |
* http://androidwebkey.com/ |
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
361 |
|
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
362 |
Show screencast from Android. |
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
363 |
============================= |
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
364 |
|
2190 | 365 |
http://droid-at-screen.org/ |
366 |
Easily show the screen of an Android device on a computer/laptop (PC, Mac, |
|
367 |
Linux, ...) and then project the desktop using a LCD-projector. |
|
368 |
http://droid-at-screen.ribomation.com/ |
|
369 |
Old DNS name. |
|
370 |