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

Prevent bricking devices when factory resetting in recovery #19

Open
amartinz opened this issue Oct 17, 2021 · 6 comments
Open

Prevent bricking devices when factory resetting in recovery #19

amartinz opened this issue Oct 17, 2021 · 6 comments

Comments

@amartinz
Copy link
Member

The factory reset option of the recovery executes an "Android factory reset", which wipes the whole data partition.

Depending on device, this may erase the whole ubuntu touch installation, as it is possible to push rootfs, vendor etc images to userdata to run ubuntu touch.

We should wire up the "Ubuntu Touch way" of factory resetting to the GUI instead.

@Flohack74
Copy link
Member

Is this a problem of utilizing the LOS 17 recovery? This worked well so far in pre-Halium 10 devices.

@amartinz
Copy link
Member Author

I did not test it with older Halium versions, but it bricked axolotl with H10, because system was installed in userdata and code was forced to handle every device as device, which installs system to the actual partition.

there a wipe would not matter and it just recreates data.

but on axolotl it wiped the system and vendor image files, which live on userdata and the system was bricked.

@Flohack74
Copy link
Member

Humm Android factory reset? I cannot follow, it should do this: https://github.com/ubports/halium_bootable_recovery/blob/halium-9.0/system-image-upgrader#L316 - we would need to add vendor.img there in the exclusion list but the rest should be fine. We should never format data actually...

@amartinz
Copy link
Member Author

amartinz commented Nov 3, 2021

This is from system.

But if you boot the recovery itself and select "Factory Reset", it executes the android routine instead of our system-image-upgrader.

@Flohack74
Copy link
Member

@amartinz yes our selections in recovery are stupid since ever. I always tell people to not push any of these buttons :P also in older systems you could easily brick your phone.

@amartinz
Copy link
Member Author

amartinz commented Nov 4, 2021

That's what this issue is about, as i also managed to brick a H10 device with doing so 😄

I can wire it up, but i first need some blockers regarding recovery and my device to get merged to even start properly working on it.

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

No branches or pull requests

2 participants