[TOOLS][ZIPS][SCRIPTS] osm0sis' Odds and Ends [Multiple Devices/Platforms]

osm0sis

Senior Recognized Developer / Recognized Contribut
Mar 14, 2012
14,400
32,365
263
Halifax
Welp, figure I'd better publish these before something else breaks. :p

For more on the "Diffusion Installer Backend updates" see any of my module GitHub commit histories, e.g. https://github.com/Magisk-Modules-Repo/busybox-ndk/commits/master (y)

I work on these projects in my limited time off, so if you like the progress I'm making, or enjoy anything else I've done on xda, please consider sponsoring my ongoing work using my GitHub Sponsors profile. For a one-time donation you can hit the donate link from my profile. Thanks for your support!

000gappsintegrator;
97-dumpbootimage.sh:

- clean up old `test` style tic

UPDATE-adb.Installer.v1.0.41-signed.zip;
UPDATE-Adreno.Systemless.Installer-signed.zip;
UPDATE-Busybox.Installer.v1.31.1-ALL-signed.zip;
UPDATE-FlashIt.Installer.v3.8-signed.zip;
UPDATE-mtd-utils.Installer.v2.1.2-signed.zip;
UPDATE-Nexus.Media.Installer-signed.zip;
UPDATE-ZipSigner.Installer.v3.0-signed.zip:

- Diffusion Installer Backend updates
- clean up old `test` style tic

UPDATE-nano.Terminal.Editor.v5.5-signed.zip:
- hide error if resize command doesn't exist (thanks @KreAch3R)
- update to latest nano official source
- Diffusion Installer Backend updates
- clean up old `test` style tic

TWRP_A_B_Retention_Script-Magisk(1).zip and AnyKernel3 also saw some significant updates to support newer Magisk, devices and recoveries. Download TWRP A/B Retention Script again from the repo in the Magisk app to obtain the new version. 👌
 
Last edited:

HippoMan

Senior Member
May 5, 2009
1,476
377
113
Hippoland
The latest (22.x) version of Magisk no longer supports the A/B Retention Script, which I have been happily using for a year or so, whenever I want to upgrade the OS on my A/B device (OnePlus 7Pro - GM-1917).

I am not upgrading Magisk from 21.4 to the latest 22.x because of this.

But at some point, I'll probably want to upgrade to the later version of Magisk, so i am wondering what steps I can take manually -- if possible -- to emulate the very helpful functionality of the A/B Retention Script under Magisk 22.x.

Or am I simply out of luck?
 

osm0sis

Senior Recognized Developer / Recognized Contribut
Mar 14, 2012
14,400
32,365
263
Halifax
The latest (22.x) version of Magisk no longer supports the A/B Retention Script, which I have been happily using for a year or so, whenever I want to upgrade the OS on my A/B device (OnePlus 7Pro - GM-1917).

I am not upgrading Magisk from 21.4 to the latest 22.x because of this.

But at some point, I'll probably want to upgrade to the later version of Magisk, so i am wondering what steps I can take manually -- if possible -- to emulate the very helpful functionality of the A/B Retention Script under Magisk 22.x.

Or am I simply out of luck?
News to me. I had fixed it a little while back for 21402+, but I guess it needs something new again. Can you provide a log of the breakage? I'll take a look. 👍
 
Last edited:
  • Like
Reactions: DiamondJohn

HippoMan

Senior Member
May 5, 2009
1,476
377
113
Hippoland
News to me. I had fixed it a little while back for 21402+, but I guess it needs something new again. Can you provide a log of the breakage? I'll take a look. 👍
Oh, I'm sorry. I was just going by the Magisk update log where it said that the A/B Retention script is not supported, so I didn't even try to upgrade Magisk and check it out. But I will check now and get back to you.
 
  • Like
Reactions: osm0sis

HippoMan

Senior Member
May 5, 2009
1,476
377
113
Hippoland
News to me. I had fixed it a little while back for 21402+, but I guess it needs something new again. Can you provide a log of the breakage? I'll take a look. 👍
Oh, I'm sorry. I was just going by the Magisk update log where it said that the A/B Retention script is not supported, so I didn't even try to upgrade Magisk and check it out. But I will check now and get back to you.
I just now tried upgrading Magisk to 22.0, and indeed the A/B Retention Script is available .. and it works fine!

So again, I apologize for my false alarm.

Here's what I did, for anyone else who might be interested ...

I don't have a new ROM for upgrade, so I just went to Settings->System Update->Settings and selected Local upgrade of the current ROM image that I had previously installed a few weeks ago. This could also be done with any new ROM that has been stored on /sdcard ... perhaps via the Oxygen Updater app, if like me, you happen to be using a OnePlus device.

After the Local upgrade completed, I went through the standard A/B Retention Script procedure:
* DO NOT (!!!) reboot after Local upgrade
* Install the A/B retention Script in Magisk
* DO NOT (!!!) reboot
* Select Install next to Magisk on the main page of the Magisk app
* Select Install to Inactive Slot (after OTA)
* Select LET'S GO
* When that completes, do indeed choose to reboot.

In my case, everything ran and came up fine.
 
Last edited:

osm0sis

Senior Recognized Developer / Recognized Contribut
Mar 14, 2012
14,400
32,365
263
Halifax
Oh, I'm sorry. I was just going by the Magisk update log where it said that the A/B Retention script is not supported, so I didn't even try to upgrade Magisk and check it out. But I will check now and get back to you.
Ah, that's not what it says; I believe you're referring to the Magisk Install to Inactive Slot (after OTA) option being unavailable on specifically Virtual A/B devices since it's a different verification process for the new slot which occurs after the reboot and we don't know how to work around it currently.
 
Last edited:

HippoMan

Senior Member
May 5, 2009
1,476
377
113
Hippoland
Ah, that's not what it says; I believe it's referring to the Magisk Install to Inactive Slot (after OTA) option being unavailable on specifically Virtual A/B devices since it's a different verification process for the new slot which occurs after the reboot and we don't know how to work around it currently.
Oh, I've never learned what a "virtual" A/B device is, and that message about it confused me. I guess it must differ somehow from the way my OnePlus 7Pro A/B device is architected.

Well, in any case, I'm just glad that I can still use the A/B Retention Script.

Thank you for clarifying!
 

zputnyq

Senior Member
Apr 19, 2013
568
248
73
Well I'm really not sure then, I guess your device just has something that conflicts within xbin. My advice would be to uninstall, then use the advanced options file to skip symlink creation during an install by running this command beforehand:

`echo NOLINKS > /data/.busybox-ndk`
@osm0sis I decide to downgrade magisk to 20.4 & there's no problem with symlink. But on 21.x to 22.x I should nolink it.
 
  • Like
Reactions: osm0sis

osm0sis

Senior Recognized Developer / Recognized Contribut
Mar 14, 2012
14,400
32,365
263
Halifax
Yup that's it. Anything else I could provide (boot.img probably), since the boot log won't help much, I had taken it many times & the result was the same as I posted here ?
Well arguably it's something related to a change in Magisk on your device, rather than my module or my installer, since the symlinks should be the same regardless since they're in xbin. 🤔

Can you give me the output of `su -c magisk --path` on 20.4 plus the list of symlinks in the busybox module, and then the same on 22.0?
 
  • Like
Reactions: zputnyq

zputnyq

Senior Member
Apr 19, 2013
568
248
73
Well arguably it's something related to a change in Magisk on your device, rather than my module or my installer, since the symlinks should be the same regardless since they're in xbin. 🤔

Can you give me the output of `su -c magisk --path` on 20.4 plus the list of symlinks in the busybox module, and then the same on 22.0?
Magisk path is the same for both, they're in /sbin. Differences are in /sbin/.magisk/mirror, on v20.4 it has folders named system, data & vendor while on v22.0 it adds / includes folders cache, persist & sepolicy.rules. For sepolicy.rules folder I saw it linked to modules folder.
My apology I don't really get what you mean by "symlink in the busybox module". On magisk v22.0 I use nolinks since if I install it directly / without nolinks command it will bootloop my device, inside busybox module folder only busybox file no symlinked applets.
I attached magisk log for symlinked files on magisk v22.0 & 20.4
 

Attachments