eadb provides a powerful Linux shell environment where one can run BCC / bpftrace / bpftool on Android device.
Install the eadb first, please refer Install
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 user build, if you doesn't have a userdebug / eng build, you can try ssh
mode.
If you use ssh
mode, it is recommended to install Magisk to Root your device and install MagiskSSH to enable ssh.
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.
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
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!
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:
apt update && apt install qemu-user-static debootstrap
And then build the eadb (root is required):
sudo eadb build
After the build, you will get a deb.tar.gz
in your working directory. you can use this image as your environment:
eadb --ssh root@ip prepare -a deb.tar.gz
Download binaries in Release page
- Install Rust toolchain
- git clone https://github.com/tiann/eadb
- cargo build
All my credits to adeb! eadb is just a rewritten for adeb.
twsxtd#gmail.com