Projeto que facilita a hackear telefones Android, compilando e piscando kernels, etc., em um contêiner/devContainer do Docker.
Suportes: Download/build do kernel, boot.img Desconjear da ROM + reembalar, kernel/boot.img boot/flash, raiz de magisk no computador em vez de android, system.img descompactar, construir binários para Android como Kexec e muito mais!
No entanto, você pode usar esse repositório, mas não é recomendado, pois você mexe com o repositório e não poderá fazer compromissos/PRs. Use o modelo, modifique para o seu telefone, aproveite os fluxos de trabalho do GitHub etc.
Este repositório não deve ser usado diretamente. Deveria ser usado como submódulo em outro repositório, onde você também colocará arquivos específicos para o seu telefone. Para um modelo baseado no telefone Poco M3, consulte aqui: https://github.com/lattics0/poco_m3_hacking e clique em "Use este modelo".
Vamos baixar o kernel, rom, patch boot.img dentro da ROM e Flash para o telefone. Dentro do modelo, depois de adquirir o 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
ffbEste repositório permite que você use combos de comandos para fazer as coisas em série. Exemplos de combos:
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
Você pode abrir o modelo ou mesmo este repo no DevContainer do VSCODE, onde poderá realizar todos os comandos. Edite o .DevContainer.json para definir seu telefone.