Unable to flash userdata: (bootloader) flash permission denied

tjysunset

New member
Jun 9, 2017
3
1
0
Messed up upgrading LineageOS...
The long story:

  • LineageOS 16.0 came out
  • reboot into recovery
  • strangely TWRP didn't ask me for decryption password as usual
  • whatever, flash anyway
  • first reboot
  • LineageOS: decryption unsuccessful - the password you entered is correct, but unfortunately your data is corrupt.png
  • wtf
  • maybe I can just backup /data in twrp, format /data to disable encryption, then restore it back
  • followed https[colon]//jomo[dot]tv/android/remove-android-device-encryption
  • fastboot.exe: (bootloader) flash permission denied.png

Long story short, something strange happened with full-disk encryption, so I decided to format /data and now I want to flash a backup of /data made from `adb pull /dev/block/<data>`.
Flashing with `fastboot flash userdata data.img` always ends up with "(bootloader) flash permission denied".
Console output:
Code:
$ fastboot flash userdata data.img
(bootloader) slot-count: not found
(bootloader) slot-suffixes: not found
(bootloader) slot-suffixes: not found
(bootloader) has-slot:userdata: not found
target reported max download size of 536870912 bytes
Invalid sparse file format at header magic
sending sparse 'userdata' 1/110 (524285 KB)...
OKAY [ 21.066s]
writing 'userdata' 1/110...
(bootloader) flash permission denied
FAILED (remote failure)
finished. total time: 21.088s
Flashing recovery finishes with no error. Formatting userdata to ext4 fails with permission denied. However, erasing userdata is successful.
Ideas...? Can qualcomm edl be used to achieve this?
Any help is appreciated :)
 

tjysunset

New member
Jun 9, 2017
3
1
0
Turns out adb CAN push raw images to block device as simple as `adb push data.img /dev/block/<device name>`. Though not a direct answer to the original post, the problem was solved for me.
Pardon my intrusion :p
 
  • Like
Reactions: O l l i X