author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Fri, 18 Dec 2020 18:20:15 +0200 | |
changeset 2474 | cc7945bce35e |
parent 2254 | b01b5f568c5a |
child 2487 | 3554b388e7a2 |
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' |
|
2254
b01b5f568c5a
adb shell'cmd package list packages
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2228
diff
changeset
|
214 |
$ adb shell 'cmd package list packages -f' |
1582 | 215 |
|
1740
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
216 |
Uninstall application by its package name:: |
1582 | 217 |
|
218 |
$ adb uninstall PACKAGE_NAME |
|
219 |
||
1740
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
220 |
Disable/enable application:: |
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
221 |
|
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
222 |
$ adb shell pm disable PACKAGE_NAME |
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
223 |
$ adb shell pm enable PACKAGE_NAME |
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
224 |
|
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
225 |
List of disabled packages:: |
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
226 |
|
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
227 |
$ adb shell pm list packages -d |
0d897830a5d3
Disable/enable application.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1696
diff
changeset
|
228 |
|
2051
b517b191156b
List of application properties (version, permissions, etc).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2046
diff
changeset
|
229 |
List of application properties (version, permissions, etc):: |
b517b191156b
List of application properties (version, permissions, etc).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2046
diff
changeset
|
230 |
|
b517b191156b
List of application properties (version, permissions, etc).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2046
diff
changeset
|
231 |
$ adb shell dumpsys package $PKG |
b517b191156b
List of application properties (version, permissions, etc).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2046
diff
changeset
|
232 |
|
1582 | 233 |
List currently run activities:: |
234 |
||
235 |
$ adb shell 'dumpsys activity' |
|
236 |
||
237 |
Find activities from package:: |
|
238 |
||
239 |
$ adb shell 'pm list packages -f' |
|
240 |
$ adb pull APK_FROM_LIST |
|
241 |
$ aapt dump badging APK_FILE |
|
242 |
||
243 |
Start an activity:: |
|
244 |
||
245 |
$ adb shell am start PACKAGE_NAME/ACTIVITY_IN_PACKAGE |
|
246 |
$ adb shell am start PACKAGE_NAME/FULLY_QUALIFIED_ACTIVITY |
|
247 |
||
1741
5c549e75b296
Start an activity with action filter.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1740
diff
changeset
|
248 |
Start an activity with action filter:: |
5c549e75b296
Start an activity with action filter.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1740
diff
changeset
|
249 |
|
5c549e75b296
Start an activity with action filter.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1740
diff
changeset
|
250 |
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
|
251 |
|
1592
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
252 |
List of running processes:: |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
253 |
|
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
254 |
$ adb shell ps |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
255 |
|
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
256 |
or (supported arguments |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
257 |
``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
|
258 |
|
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
259 |
$ adb shell |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
260 |
% ps -o pid,user,group,rss,vsz,args |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
261 |
|
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
262 |
To kill process:: |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
263 |
|
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
264 |
$ adb shell ps | grep $REGEX |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
265 |
$ adb shell kill $PID |
5ebe526dd687
List of running processes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1582
diff
changeset
|
266 |
|
1742 | 267 |
To stop application:: |
268 |
||
269 |
$ adb shell am kill com.google.android.contacts |
|
270 |
$ adb shell am force-stop com.google.android.contacts |
|
271 |
||
1582 | 272 |
Take a screenshort:: |
273 |
||
274 |
$ adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png |
|
275 |
||
276 |
Power button:: |
|
277 |
||
278 |
$ adb shell input keyevent 26 |
|
279 |
||
280 |
Unlock screen:: |
|
281 |
||
282 |
$ adb shell input keyevent 82 |
|
283 |
||
284 |
Show system log:: |
|
285 |
||
286 |
$ adb logcat |
|
287 |
$ adb logcat "*:W" |
|
288 |
||
1946 | 289 |
dumpsys |
290 |
======= |
|
291 |
||
292 |
Info from all services:: |
|
293 |
||
294 |
$ adb shell dumpsys |
|
295 |
||
296 |
List of available services:: |
|
297 |
||
298 |
$ adb shell service list |
|
299 |
||
300 |
Info from concrete service:: |
|
301 |
||
302 |
$ adb shell dumpsys phone |
|
303 |
$ adb shell dumpsys diskstats |
|
304 |
$ adb shell dumpsys usb |
|
305 |
$ adb shell dumpsys activity |
|
306 |
$ adb shell dumpsys package |
|
307 |
$ adb shell dumpsys display |
|
308 |
$ adb shell dumpsys gfxinfo |
|
309 |
$ adb shell dumpsys power |
|
310 |
$ adb shell dumpsys battery |
|
311 |
$ adb shell dumpsys batteryinfo |
|
312 |
$ adb shell dumpsys cpuinfo |
|
313 |
$ adb shell dumpsys dbinfo |
|
314 |
$ adb shell dumpsys meminfo |
|
315 |
$ adb shell dumpsys account |
|
316 |
$ adb shell dumpsys netstats |
|
317 |
||
318 |
* https://source.android.com/devices/tech/debug/dumpsys.html |
|
319 |
* http://stackoverflow.com/questions/11201659/whats-the-android-adb-shell-dumpsys-tool-and-what-are-its-benefits |
|
320 |
||
1742 | 321 |
List partition. |
322 |
=============== |
|
323 |
||
324 |
List partitions (with sizes):: |
|
325 |
||
326 |
android# cat /proc/partitions |
|
327 |
android# cat /proc/mtd |
|
328 |
||
329 |
List mounted file systems:: |
|
330 |
||
331 |
android# mount |
|
332 |
android# df |
|
333 |
||
1946 | 334 |
Remount /system as RW |
335 |
===================== |
|
336 |
||
337 |
Usually with:: |
|
338 |
||
339 |
$ adb remount |
|
340 |
||
341 |
If you have root but above command fail:: |
|
342 |
||
343 |
$ adb shell |
|
344 |
android# su |
|
345 |
android# mount | grep /system |
|
346 |
... |
|
347 |
android# mount -o remount,rw /system |
|
348 |
||
2046
ea76b2532bcd
Getting package name, version, API requirements and permissions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1946
diff
changeset
|
349 |
Working with apk files |
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 |
|
ea76b2532bcd
Getting package name, version, API requirements and permissions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1946
diff
changeset
|
352 |
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
|
353 |
|
ea76b2532bcd
Getting package name, version, API requirements and permissions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1946
diff
changeset
|
354 |
$ aapt dump badging $FILE.apk |
ea76b2532bcd
Getting package name, version, API requirements and permissions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1946
diff
changeset
|
355 |
|
1694
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
356 |
Controlling Android from PC. |
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 |
|
2228
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2193
diff
changeset
|
359 |
* http://code.google.com/p/androidscreencast/ |
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2193
diff
changeset
|
360 |
* http://code.google.com/p/android-screen-monitor/ |
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2193
diff
changeset
|
361 |
* http://androidwebkey.com/ |
1694
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
362 |
|
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
363 |
Show screencast from Android. |
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
364 |
============================= |
46dd85e3d6c6
Move important info higher.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1669
diff
changeset
|
365 |
|
2190 | 366 |
http://droid-at-screen.org/ |
367 |
Easily show the screen of an Android device on a computer/laptop (PC, Mac, |
|
368 |
Linux, ...) and then project the desktop using a LCD-projector. |
|
369 |
http://droid-at-screen.ribomation.com/ |
|
370 |
Old DNS name. |
|
371 |