Code Monkey home page Code Monkey logo

eadb's Introduction

eadb - eBPF Android Debug Bridge

eadb provides a powerful Linux shell environment where one can run BCC / bpftrace / bpftool on Android device.

Usage

Install the eadb first, please refer Install

Prepare eadb environment on Android device

eadb support two mode to connect the device:

  • adb
  • ssh

Both of them need the root privilege.

If you want to use adb mode, adb root is required but adb root is disabled in production build, if you doesn't have any userdebug / eng devices, you can try adb_root. But it you don't any experience on Magisk(it may brick your device), it is recommended to use ssh mode.

If you use ssh mode, it is recommended to install Magisk to Root your device and install MagiskSSH to enable ssh.

Download it from github

When you can use adb or ssh to connect to your device, you can prepare the eadb environment:

eadb --ssh root@ip prepare

The command would download a rootfs from Release page and push it to your device, then do some mounts and chroot in to the environment.

Use an existing archive

You can also download or build the rootfs and then prepare it by your rootfs file:

eadb --ssh root@ip prepare -a path/to/archive

Enter the environment

eadb --ssh root@ip shell

You will enter the eadb environment and get a shell by this command, you can use apt update to update the sources and install softwares(such as clang,llvm,bpftrace) by yourself, you can even install Rust / Golang or gcc to do development on this device!

Build the environment by yourself

Only Ubuntu / Debian is supported to build the system image running on Android, you can use docker or podman on macOS and WSL on Windows.

Install qemu-user-static and debootstrap first:

sudo apt update && sudo apt install qemu-user-static debootstrap

And then build the eadb (root is required):

sudo eadb build

After the build, you will get a debianfs-full(mini).tar.gz in your working directory. you can use this image as your environment:

eadb --ssh root@ip prepare -a deb.tar.gz

Install

Binary

Download binaries in Release page

Build from source

  1. Install Rust toolchain
  2. git clone https://github.com/tiann/eadb
  3. cargo build

Cargo

If you have Rust toolchain installed, you can install it with cargo:

cargo install eadb

Credits

All my credits to adeb! eadb is just a rewritten for adeb.

Contact

twsxtd#gmail.com

eadb's People

Contributors

tiann avatar sajjadpourali 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.