android_hacking_container
1.0.0
Dockerコンテナ/DevContainerで、ハッキングアンドロイド携帯電話のハッキング、カーネルのコンパイルと点滅などを容易にするプロジェクト。
サポート:カーネルのダウンロード/ビルド、boot.img rom + repack、kernel/boot.img boot/flash、androidの代わりにコンピューターのマジスクルート、system.img uppack、kexecのようなAndroidのバイナリを構築するなど!
ただし、このリポジトリは使用できますが、リポジトリをいじり、コミット/PRを作ることができないため、お勧めしません。テンプレートを使用し、携帯電話の変更、GitHubワークフローなどをお楽しみください。
このレポは、直接使用することを意図したものではありません。これは、別のリポジトリのサブモジュールとして使用されることになっており、電話に固有のファイルも配置します。 Poco M3電話に基づくテンプレートについては、https://github.com/lattice0/poco_m3_hackingを参照して、「このテンプレートを使用」をクリックします。
カーネル、ROM、パッチboot.imgをROM内にダウンロードし、電話にフラッシュしましょう。 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を編集して、電話を設定します。