Android adb cheat sheet

Flutter tips Published on

Control Your Android Phone with ADB

ADB, or Android Debug Bridge, is a tool that lets you send commands to your Android phone from your computer. It's really helpful for developers, testers, and anyone who wants more direct control.

Here are some commands you might find useful:

Getting into the Phone's Shell

Your Android phone has a command line inside. You can get to it with this command:

adb shell

Managing Apps

You can install, update, or uninstall apps using ADB.

Install an APK

adb install MyApp.apk

Force Update or Reinstall (Keep Data)

Use this if you want to update an app but keep all its data.

adb install -r MyApp.apk

Uninstall an App

To remove an app:

adb uninstall MyApp.apk

Capturing Your Screen

Take pictures or videos of what's on your phone's screen.

Capture an Image (Screenshot)

adb shell screencap -p /sdcard/image.png

Capture a Video (Screenrecord)

adb shell screenrecord -p /sdcard/video.mp4

Get Files from Your Phone

After capturing, you'll want the file on your computer. Use pull.

adb pull /sdcard/image.png ./

(Replace /sdcard/image.png with your file's location and ./ with where you want to save it on your computer)

Controlling Device Display Features

Toggle things like showing where you touch the screen.

Enable Show Touches

adb shell content insert \ 
--uri content://settings/system \ 
--bind name:s:show_touches \ 
--bind value:i:1

Disable Show Touches

adb shell content insert \ 
--uri content://settings/system \ 
--bind name:s:show_touches \ 
--bind value:i:0

Save 3 months of work

Create your app using our 6 years of making Flutter apps and more than 50+ apps

kickstarter for flutter apps

Frequently Asked Questions

What does `adb shell` do?

`adb shell` gives you access to the command line on your Android device.

How do I install an app using ADB?

Use the command `adb install [path_to_app.apk]`.

Can I update an app with ADB without losing data?

Yes, use `adb install -r [path_to_app.apk]`.

How do I uninstall an app using ADB?

Use the command `adb uninstall [package_name_of_app]`.

How can I take a screenshot with ADB?

Use `adb shell screencap -p /path/on/phone/image.png`.

How can I record my screen with ADB?

Use `adb shell screenrecord -p /path/on/phone/video.mp4`.

How do I copy a file from my phone to my computer using ADB?

Use the `adb pull` command, like `adb pull /path/on/phone/file /path/on/computer/`.

How do I show screen touches using ADB commands?

You can enable this setting with a specific `adb shell content insert` command to modify system settings.

How do I hide screen touches using ADB commands?

Similar to enabling, you use an `adb shell content insert` command, but with a different value to turn the setting off.

Read more
You may also be interested in
Go Beyond Material: Add Custom Colors in your Flutter Theme  blog card image
Go Beyond Material: Add Custom Colors in your Flutter Theme
Published on 2025-05-12T08:49:42.146Z
Waiting...  blog card image
Waiting...
Published on 2025-05-12T12:19:16.326Z
ApparenceKit is a flutter template generator tool by Apparence.io © 2025.
All rights reserved