forked from tonyho/adbd-linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
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.
- checkout adbd-linux git from [1]
- 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.
- 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.
- make a new directory, cd into it. and then unzip with cpio -i < initramfs
- 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"
- chmod a+x initramfs/bin/adbd
- pack again initramfs
- boot it
[2]https://github.com/99degree/adbd-linux/issues/1
[3]https://github.com/99degree/pmaports/tree/xiaomi-miatoll