Magisk-Modules-Repo / terminal_systemizer

terminal_systemizer
318 stars 79 forks source link

soft-brick after reverting system-priv app #25

Open seffparker opened 8 months ago

seffparker commented 8 months ago

I have successfully tried systemizing as system and system-priv app and they worked fine. After I did reverting systemized app via this module (terminal), phone stuck at bootloop. Fortunately, none of my data were lost (like in https://github.com/Magisk-Modules-Repo/terminal_systemizer/issues/24).

Spend hours troubleshooting. Did these all, but nothing worked:

Finally noticed the selinux context of /data/data/my-target-app/* was u:object_r:privapp_data_file instead of u:object_r:app_data_file. Set the proper context using chcon command and rebooted. Still bootloop and noticed the selinux context I set were reverted back to u:object_r:privapp_data_file. So, somewhere the Android still treat this app as system-priv app and fails to boot. So, I just took data backup of /data/data/my-target-app/ using tar command and removed /data/data/my-target-app/ and /data/app/my-target-app-XXXXXX/.

Then the phone booted successfully. Reinstalled my-target-app via Google PlayStore and restored its data from the tar backup file.

May be, these all caused due to the issue reported in https://github.com/Magisk-Modules-Repo/terminal_systemizer/issues/22 (not sure though)