android_hacking_container
1.0.0
在Docker容器/DevContainer上促进促进黑客式Android手机,编译和闪烁内核等的项目。
支持:内核下载/build,boot.img从ROM +重新包装,内核/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设置手机。