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

Magisk is not automatically reinstalled on LineageOS updates since 18.1 #4655

Closed
christophehenry opened this issue Sep 6, 2021 · 28 comments
Closed
Assignees
Labels
invalid Not a valid issue

Comments

@christophehenry
Copy link

Device: OnePlus 5T
Android version: 11 (LineageOS 18.1)
Magisk version name: 23.0
Magisk version code: 23001

Following the suggestion here, I'm opening the issue to raise the concern that Magisk is not automatically reinstalled on LineageOS updates since 18.1.

This issue has persisted accross all Lineage's updates despite the presence of the 99-magisk.sh in /system/addon.d/. I also asked to Lineage's team if this was a known issue and their response was basically "Yeah, we don't care" which is disappointing.

I need Magisk for several app, including automated backups using Titanium and app isolation with AFWall+. I can't afford to run Android without it.

@gbschenkel
Copy link

gbschenkel commented Sep 6, 2021

This happens because OnePlus 5T doesn't have A/B partition. Each time a update is installed it will overwrite the Magisk modifications. For you be able to upgrade and maintain Magisk you will need patch the OTA. I didn't find a easy way.
I have and use the OnePlus 5 (cheeseburger) also same OS, and I reinstall Magisk after the OTA upgrade, using adb probably as you do.

@christophehenry
Copy link
Author

I reinstall Magisk after the OTA upgrade, using adb probably as you

Yes, that's what I do.

I don't understand. People from LineageOS told me that GApps reinstall after updates through /system/addon.d/ worked correctly. How is it different from Magisk?

@Didgeridoohan
Copy link
Contributor

Didgeridoohan commented Sep 7, 2021

IIRC the discussion on this ended with both LOS devs and John saying: "but I/we want it this way and that doesn't work with your way". Which means that it's unlikely to be fixed, ever...

I may be remembering that completely wrong though.

@t-aus-m
Copy link

t-aus-m commented Sep 7, 2021

This happens because OnePlus 5T doesn't have A/B partition.

That might be wrong. I have the same issues on my Fairphone 3, which is a A/B device.

@topjohnwu
Copy link
Owner

@osm0sis would you be able to take a look?

@osm0sis
Copy link
Collaborator

osm0sis commented Sep 7, 2021

On my to-do to investigate already, just very little time at the moment. I'll see what I can work on when I'm off in a few weeks!

@christophehenry
Copy link
Author

christophehenry commented Sep 7, 2021

If I can be of any help, please tell me.

@ChenDanCMU
Copy link

Same issue here on a Mi MIX (lithium) LOS 18.1.

@gbschenkel
Copy link

This happens because OnePlus 5T doesn't have A/B partition.

That might be wrong. I have the same issues on my Fairphone 3, which is a A/B device.

Was the response I got at LineageOS channel on Libera.chat

@jasonl502
Copy link

Same issue. galaxy s10, official los 18.1

@osm0sis osm0sis added the regression Something works in previous versions but not in the current one label Sep 17, 2021
@coxackie
Copy link

Isn't the main problem this? It has nothing to do with A/B partitions - it is a problem whenever one uses lineage recovery (that does not support FBE decryption). There is even a fork recently created to deal with the fact gives /data access in addon.d.

@osm0sis
Copy link
Collaborator

osm0sis commented Sep 20, 2021

Yep, might be that if they're using Lineage Recovery (which doesn't support decryption) on an A-only device, but if they're using a TWRP build with working decryption then could be something else.

On A/B devices data should always be decrypted (since you're booted to Android) for addon.d-v2 so that shouldn't be a problem.

Maybe @christophehenry can describe his setup a bit more.

@Iey4iej3
Copy link

Iey4iej3 commented Sep 20, 2021

To add: I don't have this issue myself, but I use TWRP and I install the updates manually in the recovery. However, it is unclear if it is due to Lineage Recovery "since 18.1", since the full-disk encryption was applied much earlier.

@coxackie
Copy link

@osm0sis granted, it could be one or the other; the fact is, there is a large basis of lineage users that faces this same issue due to lineage recovery, and it is a bit sad that they either have to do update manually every time, or now have to use a fork that will try to keep up with upstream. but, oh well, decisions are decisions.

@cocka11
Copy link
Contributor

cocka11 commented Sep 20, 2021

Device: OnePlus 5T
Android version: 11 (LineageOS 18.1)
Magisk version name: 23.0
Magisk version code: 23001

Following the suggestion here, I'm opening the issue to raise the concern that Magisk is not automatically reinstalled on LineageOS updates since 18.1.

This issue has persisted accross all Lineage's updates despite the presence of the 99-magisk.sh in /system/addon.d/. I also asked to Lineage's team if this was a known issue and their response was basically "Yeah, we don't care" which is disappointing.

I need Magisk for several app, including automated backups using Titanium and app isolation with AFWall+. I can't afford to run Android without it.

i am in xiaomi redmi 7 and use lineage recovery and i did not have any this problem during the update. 🤔

@christophehenry
Copy link
Author

christophehenry commented Sep 21, 2021

@osm0sis Yes, indeed, during 18.1 update, LineageOS was uncivil enough to replace TWRP by its own recovery (edit: I was told that there is a setting in the updates section to disable recovery flash). I could try to reflash TWRP. But then I'm afraid Lineage replaces it again on each major release or even minor since, from what I've heard, they decided to stop supporting TWRP?

@Iey4iej3
Copy link

@osm0sis Yes, indeed, during 18.1 update, LineageOS was uncivil enough to replace TWRP by its own recovery. I could try to reflash TWRP. But then I'm afraid Lineage replaces it again on each major release or even minor since, from what I've heard, they decided to stop supporting TWRP?

I don't know whether they decided to stop supporting TWRP, but you could disable System → Advanced → Updater → ⫶ → Preferences → Update recovery. I don't use OTA updates though.

@osm0sis
Copy link
Collaborator

osm0sis commented Sep 21, 2021

If not in the updater I think there's a Developer Setting too for disabling Lineage Recovery flashing. Okay so technically that might make this issue invalid, but I'll still look into addon.d on a few devices to see what's up before closing. 😉

@christophehenry
Copy link
Author

christophehenry commented Sep 21, 2021

This is disappointing for LineageOS but I understand it's not up to you if this is confirmed. At least I have a fix I can test. You might want to add this in the documentation, though.

And thank you very much for your time on debugging this.

@osm0sis
Copy link
Collaborator

osm0sis commented Sep 22, 2021

Yeah it's just a limitation of Lineage Recovery not supporting decrypting data. There were options/proposals for working around this by storing Magisk binaries in system with the addon.d scripts, but that's a bit ugly to have multiple copies of Magisk files around which could get out of sync, so John was never really interested in that solution.

@osm0sis osm0sis closed this as completed Sep 22, 2021
@osm0sis osm0sis reopened this Sep 22, 2021
@osm0sis
Copy link
Collaborator

osm0sis commented Sep 22, 2021

Whoops, tapped by mistake. Still want to do the testing I mentioned above. 😅

@Iey4iej3
Copy link

Iey4iej3 commented Sep 22, 2021

There was a post above (#4655 (comment)) which indicated that it works on a Xiaomi device with Lineage Recovery. Seemingly one still needs to look into that.

@ARitz-Cracker
Copy link

@osm0sis Yes, indeed, during 18.1 update, LineageOS was uncivil enough to replace TWRP by its own recovery. I could try to reflash TWRP. But then I'm afraid Lineage replaces it again on each major release or even minor since, from what I've heard, they decided to stop supporting TWRP?

Hey there! I'm also running a OnePlus 5t with LineageOS. Just wanted to let you know that you can disable updating recovery in the OTA updates settings, and installing OTA updates using TWRP works fine for now!

Though it'll definitely be interesting if Magisk can survive updates in a way which does not require /data decryption

@osm0sis osm0sis added invalid Not a valid issue and removed regression Something works in previous versions but not in the current one labels Oct 20, 2021
@osm0sis
Copy link
Collaborator

osm0sis commented Oct 20, 2021

Can confirm Magisk's addon.d still working flawlessly on OP5T (addon.d), and OP6 and OP7Pro (addon.d-v2), all with latest Lineage 18.1 and latest TWRP for each. 👍

CC: @topjohnwu

@osm0sis osm0sis closed this as completed Oct 20, 2021
@ARitz-Cracker
Copy link

Can confirm Magisk's addon.d still working flawlessly on OP5T (addon.d), and OP6 and OP7Pro (addon.d-v2), all with latest Lineage 18.1 and latest TWRP for each. 👍

CC: @topjohnwu

I assume that surviving updates without data decryption isn't something you wish to do, then?

@osm0sis
Copy link
Collaborator

osm0sis commented Oct 20, 2021

#4655 (comment)

@malnvenshorn
Copy link

I'm experiencing this issue with TWRP as recovery on my Nexus 7. Might not only be related to the lack of data decryption?

@osm0sis
Copy link
Collaborator

osm0sis commented Oct 23, 2021

I'm experiencing this issue with TWRP as recovery on my Nexus 7. Might not only be related to the lack of data decryption?

I have official Lineage flox on my N7 2013 and Magisk's addon.d works perfectly with TWRP.

Repository owner locked as resolved and limited conversation to collaborators Oct 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid Not a valid issue
Projects
None yet
Development

No branches or pull requests