A container for hacking the Poco M3 Android phone, based on Android Hacking Container.
Edit the .sh
files inside to download the kernel for your phone, as well as the ROM, tools, etc.
docker build -t project - < Dockerfile
docker run -u "$(id -u):$(id -g)" -it -v /dev/bus/usb:/dev/bus/usb -v ~/.android:/home/dev/.android -v $PWD:/home/dev/project -e DEVICE="../../device" project /bin/bash
then do source android_hacking_container/source_me.sh
Open this in VSCode's .devcontainer, then
source android_hacking_container/source_me.sh
If you have problems with udev rules, do outside the container
sudo nano /etc/udev/rules.d/51-android.rules
Then paste, but with your vendor and product numbers (check with lsusb
)
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0666", GROUP="plugdev"
Then
sudo udevadm control --reload-rules
For that, mount into a VM, install adb via sudo apt install -y adb
, do the adb shell and accept the key on the phone. Now adb kill-server
and when you remount docker again, it will mount ˜/.android
which contains the key that works!
PS: I needed --privileged
, but I should try without it