icedream / denon-prime4

Fork of @ghuntley's Denon Prime 4 firmware research repository for experimental purposes.
MIT License
14 stars 1 forks source link

Flashing via fastboot (PoC) #15

Open icedream opened 2 years ago

icedream commented 2 years ago
dzelionis commented 1 year ago

Flashing unpacked root file system via fastboot

  1. reboot the device into firmware update mode
  2. check if you fastboot can see it: sudo fastboot devices (on Linux) fastboot devices (on Windows)
  3. In case you can not see the device, check if you running the latest adb/fastboot sdk toolkit, in case you using Windows you need manually install fastboot driver for the device which is detected as Prime4 in your device manager. (optional)
  4. temporary unlock oem on the device to allow flashing: sudo fastboot oem inmusic-unlock-magic-7de5fbc22b8c524e
  5. flash unpacked root files system on the device (make sure you have it unmounted first) sudo fastboot flash rootfs <path to rootfs_filesystem.img>
  6. reboot device: sudo fastboot reboot

image

shell script example to automate it:

#!/bin/bash
sudo umount /denon/ssh_rootfs
sudo fastboot oem inmusic-unlock-magic-7de5fbc22b8c524e
sudo fastboot flash rootfs /denon/rootfs_PRIME4-2.3.2-ssh-Update.fs.img
sudo fastboot reboot
sudo mount /denon/rootfs_PRIME4-2.3.2-ssh-Update.fs.img /denon/ssh_rootfs
icedream commented 1 year ago

I have no idea why on initial attempts this never worked for me, but on my current setup I easily got it working as described. I will document it in the readme and maybe leave another script file for it, though I would love to move away from those at some point... hm...

Would be interesting to see how the original updater tool triggers the progress screen and compressed transfer, it seems to be MPC-specific.