Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Failed to load latest commit information.
Latest commit message
Commit time

fb-adb is a tool for interacting with Android systems. It does much of what adb does, but with better remote shell support and, hopefully, fewer bugs. Differences between adb and fb-adb are that fb-adb:

  • is binary clean (no LF -> CRLF mangling)
  • transmits and updates window size
  • distinguishes standard output and standard error
  • properly muxes streams with independent flow control
  • allows for ssh-like pty allocation control
  • propagates program exit status instead of always exiting with status 0
  • properly escapes program arguments
  • kills remote program
  • provides a generic facility to elevate to root without re-escaping


You can use Homebrew to install fb-adb binaries:

brew install fb-adb


An out-of-tree build is required. You'll need a copy of the Android NDK: tell configure about it by setting the ANDROID_NDK environment variable to your NDK path or by using the --with-android-ndk argument to the configure script.

For example:

export ANDROID_NDK=/path/to/android-ndk
mkdir build
cd build

If building on Mac, you need gmake to build. You can use Homebrew to get it:

brew install homebrew/core/make

on earlier systems this was:

brew tap homebrew/dupes
brew install homebrew/dupes/make

and then use gmake instead of make.


The fb-adb executable itself has no dependencies other than the adb executable, which must be on PATH. Generally, you can use fb-adb just like adb; fb-adb forwards unknown commands to adb. fb-adb supports the same device-selection options that adb does.

fb-adb shell is the fancy shell command that supports the features described above. Run fb-adb shell -h for additional options.


  • Capture a screenshot from device and write it locally to a timestamped file:

    fb-adb rcmd screencap -p > screenshot-$(timestamp).png

  • Dump database.db of the app:

    fb-adb rcmd -u sqlite3 /data/data/ .d

  • Open remote shell as the user

    fb-adb shell -u