Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fastboot flash partition doesn't work on lk1st #241

Open
iovxw opened this issue Mar 10, 2023 · 3 comments
Open

fastboot flash partition doesn't work on lk1st #241

iovxw opened this issue Mar 10, 2023 · 3 comments

Comments

@iovxw
Copy link

iovxw commented Mar 10, 2023

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

lk2nd/app/aboot/aboot.c

Lines 2696 to 2706 in 627d219

#if !WITH_LK2ND
if (!strcmp(pname, "partition"))
{
dprintf(INFO, "Attempt to write partition image.\n");
if (write_partition(sz, (unsigned char *) data)) {
fastboot_fail("failed to write partition");
return;
}
}
else
#endif

@stephan-gh
Copy link
Member

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

@iovxw
Copy link
Author

iovxw commented Mar 11, 2023

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

@185264646
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants