android_hacking_container
1.0.0
在Docker容器/DevContainer上促進促進黑客式Android手機,編譯和閃爍內核等的項目。
支持:內核下載/構建,boot.img從ROM + REPACK,內核/boot.img boot/flash,Magisk root On On Computer On On Computer,而不是Android,System.img打開包裝,為Android構建Android,例如Kexec等!
但是,您可以使用此存儲庫,但是不建議您使用倉庫,並且無法做出提交/PR。使用模板,修改手機,享受github工作流程,等等。
此存儲庫並不是要直接使用。它應該用作另一個存儲庫的子模塊,您還將在其中放置針對手機的文件。有關基於POCO M3電話的模板,請參見以下:https://github.com/lattice0/poco_m3_hacking,然後單擊“使用此模板”。
讓我們下載ROM內的內核,ROM,Patch Boot.img,然後閃爍到手機中。在模板內,採購source_me.sh之後
DEVICE=poco_m3
# Show all commands:
h
# Downloads/Installs toolchain for device
dt
# Downloads the kernel
kd
# Builds the kernel
kb
# Downloads the ROM:
rd
# Extracts the ROM:
re
# Extracts the boot.img from inside the ROM
be
# Repacks the boot.img with the newest compiled kernel
br
# Reboots into fastboot mode using adb (phone must be on, connected and you should have accepted adb connection from this container)
f
# Fastboot Flashes boot.img to the boot partition on the Android device
ffb
# Fastboot Boot boot.img, but some phones don´t support this option (Poco M3 does not)
# fbb
# Reboots the phone using fastboot so it boots with the new kernel (must be in fastboot mode)
r
# If the kernel goes wrong and you return to fastboot mode, then you can do re to Rom Extract again and thus overwriting everything you changed
re
# Then do ffb to reflash the original unmodified boot.img from the unzipped ROM
ffb此存儲庫允許您使用命令組合來串聯做事。組合的示例:
f && kb && re && be && br && ffb && r # fastboot, kernel build, rom extract, boot.img extract, boot.img repack (w/ built kernel), fastboot flash boot.img, reboot
im && be && pm && ffb && r # install magisk, boot.img extract, patch (boot.img) with magisk, fastboot flash boot, reboot
f && kb && re && mbe && br && ffb && r # fastboot, kernel build, rom extract, boot.img extract, magisk boot.img repack (w/ built kernel), fastboot flash boot.img, reboot
您可以在Vscode的DevContainer上打開模板,甚至可以打開此存儲庫,您可以在其中完成所有命令。編輯.devcontainer.json設置手機。