tree: a40c147ede3fe90aa6adafa51cc192cb0e63be5b [path history] [tgz]
  1. README.md
  2. TODO
  3. addons/
  4. androdeb
  5. bcc/
  6. packages/
  7. utils/
README.md

androdeb: Android development environment for power users

androdeb aims to provide a powerful Linux shell environment where one can run popular and mainstream Linux tracing, compiling, editing and other development tools. All the commands typically available on a modern Linux system are supported in androdeb.

Usecases

(1) Powerful development environment with all tools ready to go (editors, compilers, tracers, perl/python etc) for your on-device development.

(2) No more cross-compiler needed: Because it comes with gcc and clang, one can build target packages natively without needing to do any cross compilation. We even ship git, and have support to run apt-get to get any missing development packages from the web.

(3) Using these one can run popular tools such as BCC that are difficult to run in an Android environment due to lack of packages, dependencies and cross-compilation needed for their operation.

(4) No more crippled tools: Its often a theme to build a static binary with features disabled, because you couldn‘t cross-compile the feature’s dependencies. One classic example is perf. However, thanks to androdeb, we can build perf natively on device without having to cripple it.

Requirements for running

Target: An ARM64 android N or later device which has “adb root” supported. Typically this is a build in a userdebug configuration. Device should have atleast 2 GB free space in the data partition.

Host: A machine running recent Ubuntu or Debian, with 4GB of memory and 4GB free space. Host needs qemu-debootstrap package installed. Run apt-get install qemu-debootstrap.

Quick Start Instructions

  • Clone androdeb repository:
git clone https://github.com/joelagnel/androdeb.git
cd androdeb
  • Fastest way of installing androdeb onto your device:
# First make sure device is connected to system (only single device supported)
sudo ./androdeb prepare --download
  • Now run androdeb shell:
./androdeb shell

More advanced usage instructions

Install kernel headers in addition to preparing androdeb device:

./androdeb prepare --download --kernelsrc /path/to/kernel-source

Update kernel headers onto an existing install:

If you need to put kernel sources for an existing install, run:

./androdeb prepare --kernelsrc /path/to/kernel-source

Note: The kernel sources should have been built (atleast build should have started).

Build and prepare device with a custom rootfs locally:

The androdeb fs will be prepared locally by downloading packages as needed:

./androdeb prepare --fullbuild

This is unlike --download where the androdeb rootfs is itself pulled from the web.

Add kernel headers to device in addition to building locally:

./androdeb prepare --fullbuild --kernelsrc /path/to/kernel-source/

Instead of --fullbuild, customize what you install:

./androdeb prepare --editors --compilers

Install only BCC:

./androdeb prepare --bcc --kernelsrc /path/to/kernel-source/

Note: BCC is built while being installed. Also --kernelsrc is recommended for tools to function unless device has them already.

Extract the FS from the device, after its prepared:

./androdeb prepare --fullbuild --buildtar /path/

After device is prepared, it will extract the root fs from it and store it as a tar archive at /path/androdeb-fs.tgz. This can be used later.

Use a previously prepared androdeb rootfs tar from local:

./androdeb prepare --archive /path/androdeb-fs.tgz