lk2nd icon indicating copy to clipboard operation
lk2nd copied to clipboard

`fastboot flash partition` doesn't work on lk1st

Open iovxw opened this issue 2 years ago • 3 comments

Is this expected behavior?

$ fastboot getvar product
product: LK1ST_MSM8916
Finished. Total time: 0.002s

$ fastboot flash partition ./gpt_both0.bin
Sending 'partition' (33 KB)                        OKAY [  0.005s]
Writing 'partition'                                FAILED (remote: 'partition table doesn't exist')
fastboot: error: Command failed

https://github.com/msm8916-mainline/lk2nd/blob/627d2198269c6826d1056d863ae867199ab04257/app/aboot/aboot.c#L2696-L2706

iovxw avatar Mar 10 '23 17:03 iovxw

Currently this is disabled on purpose for safety reasons, since users might otherwise easily corrupt the entire storage by flashing a wrong partition table.

stephan-gh avatar Mar 10 '23 17:03 stephan-gh

Perhaps we can add a compile time option to enable it? Or a new oem command (with appropriate warnings) to enable it at runtime?

iovxw avatar Mar 11 '23 09:03 iovxw

Perhaps we can add a compile time option to enable it? Or a new oem command (with appropriate warnings) to enable it at runtime?

I suggest doing this from linux, the tools are more stable and reliable. Refer to jumpdrive and sgdisk scripts.

185264646 avatar Mar 15 '23 06:03 185264646