Android and ADB
Learn to talk to an Android phone from your computer: connect it safely, install and remove apps, copy files, read its log when something crashes, and go wireless without leaving the phone open to strangers.
What you will be able to do
By the end of this track you can:
- turn on USB debugging, authorise your computer, and read what
adb devicessays about a phone; - install an APK, copy files both ways, take a screenshot and record the screen, with
adbor with DroidDeck; - connect over Wi-Fi with a pairing code, and explain why the older
adb tcpip 5555method is risky; - read logcat, filter it down to one app, and find the line in a crash that points at the bug;
- tell normal, runtime and special permissions apart, sideload an APK carefully, and close every door you opened when you are done.
Who it is for
Students, testers and new Android developers, and anyone curious about what their phone can do with a cable and a terminal. You do not need to write code. You need a computer and an Android phone or emulator that you own, or that you have been given to test.
The lessons
Read them in order. Each one starts from what the one before taught.
Every lesson ends with a short quiz. Your scores are collected on the Quizzes page.
Apps that use this knowledge
| App | What it does with Android |
|---|---|
| DroidDeck | A Linux desktop app that runs adb for you: devices, logcat, apps, files, screen tools, wireless pairing and a shell. Used in every lesson and the lab. |
| SpaceSweep | Frees storage on the phone. A clear example of all-files access and usage access, in lesson 5. |
| Mock Studio | A mock API server. Point an Android app at it over the network, in the lab's extension. |
| NearShare | Sends files between a phone and a Linux computer with Quick Share, when you do not need ADB at all. |
| SecureShell Go | An SSH client for Android. The other direction: the phone connects to a computer. |
How long it takes
About 20 minutes per lesson, plus 45 to 60 minutes for the lab. Around three hours in all, and you can stop after any lesson.
Next steps
- Start with Lesson 1: What is ADB?
- Install DroidDeck so it is ready for the examples
- All learning tracks