TheGammaSqueeze / GammaOS

LineageOS based firmware for Anbernic Unisoc T618 devices
Apache License 2.0
393 stars 14 forks source link

RG405V - flashing stuck on "writing vbmeta_a" #127

Closed cringeops closed 9 months ago

cringeops commented 9 months ago

I use Debian 12 to flash the firmware on my RG405V. I've successfully managed to unlock the bootloader with the Python script, and I see it's unlocked during the boot. The device is detectable by fastboot, but once I start FlashPartitions.sh script, it gets stuck on Writing 'vbmeta_a'.

So, I decided to use the latest platform-tools (34.0.5-10900879) and overrode the symlink for fastboot to point to that version. Still, it didn't help.

I've seen that such an issue was mentioned in the Windows flashing section of the README. Is there any possible solution to flash the firmware with Linux utilities?

UPD: after failed writing, the device stops responding to any further fastboot commands, and the only way to reboot it is to physically disconnect the battery.

➜  ~ fastboot oem unlock
FAILED (remote: 'Bootloader can not been unlocked repeatly.')
fastboot: error: Command failed
➜  ~ fastboot -v flash vbmeta_a flash/vbmeta_custom.img
fastboot: verbose: Do flash vbmeta_a flash/vbmeta_custom.img
fastboot: verbose: target reported max-download-size of 671088640 bytes
Sending 'vbmeta_a' (1024 KB)                       OKAY [  0.029s]
Writing 'vbmeta_a'                                 ^C
➜  ~ fastboot oem unlock                               
^C
➜  ~ 

The board revision is 405V_MB_V0.1B if that of any help at all.

UPD 2: no luck with --disable-verity --disable-verification as well.

➜  ~ fastboot flash --disable-verity --disable-verification vbmeta_a flash/vbmeta_custom.img
Rewriting vbmeta struct at offset: 0
Sending 'vbmeta_a' (1024 KB)                       OKAY [  0.029s]
Writing 'vbmeta_a'                                 ^C
cringeops commented 9 months ago

I am a blind moron. I should've issued fastboot reboot fastboot to boot into fastbootd, but I skipped that part in the README. Closing the issue since the only issue is my stupidity.

➜  ~ ./FlashPartitions.sh
---------------------------------------
  GammaOS v1.5.1 - Anbernic RG405V
---------------------------------------
fastboot devices
RG405V03244945   fastbootd

fastboot flash vbmeta_a flash/vbmeta_custom.img
fastboot flash vbmeta_b flash/vbmeta_custom.img
fastboot flash boot_a flash/boot_custom.img
fastboot flash boot_b flash/boot_custom.img
fastboot flash dtbo_a flash/dtbo_custom.img
fastboot flash dtbo_b flash/dtbo_custom.img
fastboot flash vendor_boot_a flash/vendor_boot_custom.img
fastboot flash vendor_boot_b flash/vendor_boot_custom.img
fastboot delete-logical-partition vendor_a-cow
fastboot delete-logical-partition vendor_b-cow
fastboot flash vendor flash/vendor_custom.img
This will take some time, please wait...