Skip to content

K2GO-562 fix(restore): wipe the old system before the extract - #761

Merged
luisguzman-adfa merged 2 commits into
mainfrom
fix/K2GO-562-restore-replaces-system
Nov 13, 2026
Merged

luisguzman-adfa merged 2 commits into
mainfrom
fix/K2GO-562-restore-replaces-system

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

What changes

  • Restore removes the installed rootfs at the point of no return, before tar writes.
  • New RootfsWipe helper: one wipe for reinstall, reset, abandoned install and restore.

Why

  • Restore extracted over the existing tree, so files that were not in the backup stayed.

Verifications

  • assembleStandardDebug + testStandardDebugUnitTest pass.
  • Samsung A16, cross-phone backup (7.6 GB): planted markers gone, excluded dirs present, identity rotated at first boot, box up.

Notes

  • Interrupted-Clone damage state follows in a second PR (K2GO-562 scope).
  • Other hand-written rootfs paths: K2GO-568.

Restore extracted over the existing tree, so files that are not in the backup stayed. One wipe helper now serves reinstall, reset, abandoned install and restore.
rm -rf cannot unlink the entries of a read-only directory, so old files stayed.
On failure, chmod -R u+rwx and run rm once more.
@luisguzman-adfa
luisguzman-adfa merged commit 2ea75de into main Nov 13, 2026
4 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the fix/K2GO-562-restore-replaces-system branch November 13, 2026 00:52
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

Successfully merging this pull request may close these issues.

1 participant