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

Errorneous fstab patching in boot image #3998

Closed
hh85v2 opened this issue Mar 9, 2021 · 0 comments
Closed

Errorneous fstab patching in boot image #3998

hh85v2 opened this issue Mar 9, 2021 · 0 comments
Labels
confirmed Issue confirmed to exist and the reason is known

Comments

@hh85v2
Copy link

hh85v2 commented Mar 9, 2021

Issue:
Looks like the mount option 'fileencrypt' is considered to be parameterless, thus only this world itself is deleting from userdata entry. In the case it has some parameters that leads to the spare tail inside fstab line, which prevents userdata partition mounting. The result is continuous bootlooping. Here is the diff between ramdisks unpacked from both original and patched bootimages:

--- ramdisk.orig/fstab.mt6771 2021-03-09 08:18:57.899091100 +0200 +++ ramdisk.patched/fstab.mt6771 2021-03-09 08:20:18.814931800 +0200 @@ -19,7 +19,7 @@ -/dev/block/platform/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,noauto_da_alloc,errors=panic wait,check,formattable,quota,resize,reservedsize=128m,checkpoint=block,fileencryption=aes-256-xts +/dev/block/platform/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,noauto_da_alloc,errors=panic wait,check,formattable,quota,resize,reservedsize=128m,checkpoint=block,=aes-256-xts

Suggestion:
Use regexp like ,f[a-z]*encrypt=*[^$,]* to delete from fstab while patching boot. It would remove both 'fileencrypt' and 'forceencrypt' options together with thier parameters and leading commas.

@topjohnwu topjohnwu added the confirmed Issue confirmed to exist and the reason is known label Mar 9, 2021
kubalav pushed a commit to kubalav/Magisk that referenced this issue Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed Issue confirmed to exist and the reason is known
Projects
None yet
Development

No branches or pull requests

2 participants