Skip to content
99degree edited this page Feb 15, 2024 · 4 revisions

Welcome to the adbd-linux wiki!

This is a mini howto for compiling and running adbd on postmarketOS

Here to compile the adbd static binary under wsl.

  1. checkout adbd-linux git from [1]
  2. compile it with below: RANLIB=aarch64-linux-gnu-ranlib AR=aarch64-linux-gnu-ar CXX=aarch64-linux-gnu-g++ CC=aarch64-linux-gnu-gcc make

At this moment pmbootstrap chroot method is not working due to [2] so compile it under WSL2 is a good idea. since adbd binary is static so compile once use many ways.

  1. use pmaport[3] and do a git merge with upstream version. to generate the boot and root img. or download latest from postmarketos. unzip the pmbootstrap generated boot img, gunzip is fine.
  2. make a new directory, cd into it. and then unzip with cpio -i < initramfs
  3. put adbd binary into initramfs/bin/ also replace init and init_functions.sh from the said pmaport/main/postmarketos-initramfs/ also note that there is named "init.sh" but ramdisk is "init"
  4. chmod a+x initramfs/bin/adbd
  5. pack again initramfs
  6. boot it

[1]https://github.com/99degree/adbd-linux.git

[2]https://github.com/99degree/adbd-linux/issues/1

[3]https://github.com/99degree/pmaports/tree/xiaomi-miatoll

Clone this wiki locally