GithubHelp home page GithubHelp logo

iceaeterna / fb-adb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from facebookarchive/fb-adb

0.0 1.0 0.0 931 KB

A better shell for Android devices

License: Other

Makefile 0.31% C 85.84% Shell 8.18% Python 4.83% M4 0.84%

fb-adb's Introduction

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

DOWNLOADS

You can use Homebrew to install fb-adb binaries:

brew install fb-adb

BUILDING

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:

./autogen.sh
export ANDROID_NDK=/path/to/android-ndk
mkdir build
cd build
../configure
make

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

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

and then use gmake instead of make.

RUNNING

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.

EXAMPLES

  • 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 com.bar.foo app:

    fb-adb rcmd -u com.bar.foo sqlite3 /data/data/com.bar.foo/databases/database.db .d

  • Open remote shell as the user com.bar.foo:

    fb-adb shell -u com.bar.foo

fb-adb's People

Contributors

dcolascione avatar jbeich avatar niedzielski avatar dalinaum avatar jamesgpearce avatar sas avatar

Watchers

IceAeterna avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.