Android on Raspberry Pi4
mouse 297 · person cloud · link
Last update
2023-05-29
2023
05-29
« — »
  1. download LineageOS image from konstakang
  2. write image to sdcard

    1
    2
    unzip -p lineage-*-rpi4.zip lineage-20.0-20230505-UNOFFICIAL-KonstaKANG-rpi4.img | \
      pv | sudo dd of=/dev/sdc
    
  3. use gparted to expand data partition

  4. Settings -> System -> Raspberry Pi settings -> SSH / VNC (enable both)

  5. Enable Android debugging & Rooted debugging under Settings -> System -> Developer options

  6. Settings -> About tablet -> IP address; copy SSH key then connect:

    1
    2
    3
    4
    5
    6
    adb connect 192.168.X.Y
    adb root
    adb pull /data/ssh/ssh_host_ed25519_key my_private_key
    
    chmod 600 my_private_key
    ssh -i my_private_key root@192.168.0.100
    
  7. Settings -> System -> Raspberry Pi settings -> Audio device (choose HDMI)

  8. Download Magisk TWRP patch + APK

  9. enable advanced restart options, reboot to recovery (TWRP), install Magisk patch, reboot then install Magisk APK