yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] osm0sis:
On pre-SAR devices creating xbin would brick it, so in my experience if xbin doesn't exist on a device it generally isn't wise to create it. Instead it filters existing applets from bin out of the list and only adds busybox ones for those your system doesn't already have, which is where it seems to be having the grep trouble... 🤔

Sounds like something weird with the module flashing environment on your device in general, especially with this:

sh: can't open '/data/user/0/com.topjohnwu.magisk/cache/flash/update-binary': No such file or directory

Works fine here:

- Copying zip to temp directory
- Installing Busybox_for_Android_NDK-1.34.1(13410).zip
- Current boot slot: _b
- Device is system-as-root
Archive: /data/user/0/q.zeitm.axhry/cache/flash/install.zip
inflating: module.prop
*****************************
Busybox for Android NDK
by osm0sis @ xda-developers
*****************************
Archive: /data/user/0/q.zeitm.axhry/cache/flash/install.zip
inflating: customize.sh
*******************
Powered by Magisk
*******************
Archive: /data/user/0/q.zeitm.axhry/cache/flash/install.zip
inflating: diffusion_config.sh
inflating: module.prop

Mounting...

Extracting files...
Archive: /data/user/0/q.zeitm.axhry/cache/flash/install.zip
creating: META-INF/
creating: META-INF/com/
creating: META-INF/com/google/
creating: META-INF/com/google/android/
inflating: META-INF/com/google/android/update-binary
inflating: META-INF/com/google/android/updater-script
inflating: README.md
inflating: busybox-arm
inflating: busybox-arm-selinux
inflating: busybox-arm64
inflating: busybox-arm64-selinux
inflating: busybox-mips
inflating: busybox-mips64
inflating: busybox-x86
inflating: busybox-x86-selinux
inflating: busybox-x86_64
inflating: busybox-x86_64-selinux
inflating: customize.sh
inflating: diffusion_config.sh
inflating: module.prop

Installing...
Using architecture: arm64-selinux
Using path: /data/adb/modules_update/busybox-ndk/system/xbin

Cleaning...

Creating symlinks...

Unmounting...

Done!

Edit: Also, that grep error you have is extra weird, because I'm not using regex and I'm not using any [ ] within the subshell with the grep... 🤨

busybox-ndk/diffusion_config.sh at master · Magisk-Modules-Repo/busybox-ndk

busybox-ndk. Contribute to Magisk-Modules-Repo/busybox-ndk development by creating an account on GitHub.

github.com

Edit 2: Ah, I see the issue with the greps at least... when [ and [[ in the applet list get parsed grep thought it was seeing regex. I can adjust the grep options to work around that... Still no idea what is up with the update-binary error you have which kills the whole installation, though. Looks like Magisk's flashing the same zip twice simultaneously from your duplicated log entries, so the second fails when the first cleans itself up. 😕
[Android Software/Hacking General [Developers Only]] alecxs:
on my device it's /data/adb/modules/busybox-ndk/system/xbin (no need to create /system/xbin)?
[Android Software/Hacking General [Developers Only]] osm0sis:
Yes your system already had an xbin
[Android Software/Hacking General [Developers Only]] alchemist.zim:
So I have a OnePlus Nord N10 BE86AA with TWRP and Magisk installed

I ran the TWRP A/B Retention Script at the wrong time (I ran before the OTA applied) and now the update won't run because the sha doesn't match on recovery_b.

TWRP is still installed, and working properly.

How can I restore recovery_b to stock so that I can do the OTA update?
[Android Software/Hacking General [Developers Only]] osm0sis:
Get recovery_b from a dump of stock.
[Android Software/Hacking General [Developers Only]] osm0sis:
I don't think you can create the repartitioning script file like that.. might explain it failing. See AK3 for how I've dumped scripts in the past: https://github.com/osm0sis/AnyKerne...NF/com/google/android/update-binary#L357-L363
[Android Software/Hacking General [Developers Only]] Talyrius:
As I thought the comment left above it made clear, that's functionally just a multiline comment. I'm not trying to dump or feed its contents to any command there. I've verified it's not being executed by manually running the script from the shell. However, I'll just fully comment it out and see if that changes anything. ¯\_(ツ)_/¯
[Android Software/Hacking General [Developers Only]] osm0sis:
Ah, I see now. Maybe check my other A/B addon.d-v2 scripts then, you may not be loading the backuptool functions correctly for v2.

Edit: Yep, I'm certain of it now. See here: https://github.com/Magisk-Modules-Repo/nexusmedia/blob/master/addon.d/90-media.sh
[Android Software/Hacking General [Developers Only]] Talyrius:
Well, I made those changes and still no luck. After I reboot for the OTA update, it displays the LineageOS boot animation for a bit before rebooting to recovery and saying the following:

Of course, trying again never changes the outcome and the factory data reset results in a fresh install of LineageOS without any GApps installed. 🤔

Updated Script:

#!/sbin/sh
#
# ADDOND_VERSION=2
#
# /system/addon.d/00-personal.sh
# During a LineageOS upgrade, this script resizes the system partition to
# reaccommodate a larger GApps installation, deletes an inapplicable device
# specific file, and survives by restoring itself.
#
# For future reference, the script originally used to repartition this device
# is embedded below:
#
# <repartition-ogpixel-128gb.sh>
# #!/sbin/sh
#
# echo "Repartitioning Device: Pixel (128gb)"
#
# sgdisk --delete=33 /dev/block/sda
# sgdisk --delete=34 /dev/block/sda
# sgdisk --delete=35 /dev/block/sda
#
# sgdisk --new=33:227142:4421445 --change-name=33:system_a --typecode=33:77036CD4-03D5-42BB-8ED1-37E5A88BAA34 /dev/block/sda
# sgdisk --new=34:4421446:8615749 --change-name=34:system_b --typecode=34:EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 /dev/block/sda
# sgdisk --new=35:8615750:31215429 --change-name=35:userdata --typecode=35:EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 /dev/block/sda
#
# echo "Done!"
# </repartition-ogpixel-128gb.sh>

V1_FUNCS=/tmp/backuptool.functions
V2_FUNCS=/postinstall/system/bin/backuptool_ab.functions

if [ -f $V1_FUNCS ]; then
. $V1_FUNCS
backuptool_ab=false
elif [ -f $V2_FUNCS ]; then
. $V2_FUNCS
else
return 1
fi

save_files() {
cat <<EOF
addon.d/00-personal.sh
EOF
}

delete_files() {
cat <<EOF
etc/sysconfig/pixel_2018_exclusive.xml
EOF
}

case "$1" in
backup)
save_files | while read FILE DUMMY; do
backup_file $S/"$FILE"
done
;;
restore)
save_files | while read FILE REPLACEMENT; do
R=""
[ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
[ -f "$C/$S/$FILE" ] && restore_file $S/"$FILE" "$R"
done
;;
pre-backup)
# Stub
;;
post-backup)
# Stub
;;
pre-restore)
# Force a check and resize of the file system on the /system partitions.
umount /system;
e2fsck -yf /dev/block/sda33;
resize2fs /dev/block/sda33;
e2fsck -yf /dev/block/sda34;
resize2fs /dev/block/sda34;
mount /system;
;;
post-restore)
delete_files | while read FILE DUMMY; do
[ -e "$S/$FILE" ] && rm $S/"$FILE"
done
;;
esac
[Android Software/Hacking General [Developers Only]] osm0sis:
Well the next problem I see is backuptool is running from the updated system slot, so fully unmounting both might be kinda problematic. 😛
[Android Software/Hacking General [Developers Only]] Mrcactuseater:
Greetings all. Is there any way to update the adb/fastboot version from inside the module? The versions are slightly outdated.

Thanks
[Android Software/Hacking General [Developers Only]] osm0sis:
How slightly? What's the issue? Can you show some logs of it? They're basically a nightmare to static compile; @Surge1223 has always done them for us in the past, but I'm not sure if he's active anymore.
[Android Software/Hacking General [Developers Only]] bynarie:
See post below
[Android Software/Hacking General [Developers Only]] bynarie:
So for right now, should we just clone the repo at https://github.com/Magisk-Modules-Repo/busybox-ndk and zip it up and just flash it on magisk? Is there anything else we need to do? Thanks!
[Android Software/Hacking General [Developers Only]] osm0sis:
Why? Zip is attached to the OP.

If you'd like to update directly from the repo for modules in Magisk Canary 23010+, then the stop-gap solution for now is here: https://xdaforums.com/t/module-canary-module-manager.4362875/
[Android Software/Hacking General [Developers Only]] AnonVendetta:
A bit late to respond, but I had already created xbin before you posted. Maybe for others, but no soft brick here. I have some binaries in it besides Busybox, all is working fine. It has the permissions 755, root, root, as well as everything in it. So I'm leaving it. And you say "pre-SAR", but my device shpiped as SAR, AFAIK. Probably the soft bricks people were having were due to dm-verity or something being triggered.

The Busybox installer from Magisk modules repo still doesn't flash correctly. But the one from this thread works. Strange, I thought they were the same. It systemlessly installs into the xbin I created.
[Android Software/Hacking General [Developers Only]] osm0sis:
New log from Magisk repo install in the app?

Edit: Oh wait, looks like I forgot to push 13411 to the repo, let me do that, then get me some logs if there are still issues. 😝
[Android Software/Hacking General [Developers Only]] AnonVendetta:
I don't see a point in providing a log, since the BusyBox zip from this thread flashes fine. It's the one from the Magisk modules repo that doesn't work. My opinion, make the MMR and thread zips identical. But it won't matter soon since next stable Magisk release will remove the repo, limiting us to local zip flashing only.
[Android Software/Hacking General [Developers Only]] osm0sis:
That was impossible because Magisk forced the backend to update for anything it downloaded from the repo. Anyway 13411 is up on the repo with the grep fix. It can be updated using the older Magisk app or the Zackptg5 Module Manager I linked above.

It's only removed until the 3rd party repo feature is added back to the Magisk app, so provide logs if you want me to try to fix anything more with booted flashing on your device.
[Android Software/Hacking General [Developers Only]] m0han:
just an fyi: folks using Custom Magisk a.k.a. MagiskCustom (me) have got this update notification. thanks.
[Android Software/Hacking General [Developers Only]] ipdev:
Thank you for the heads up. :)

I did not know about Zackptg5's manager.

Somewhere in the Magisk general thread, a user posted another option.

I bookmarked the link since I recognized the github name.

Fox2Code made an app for the interim.

I have not tried it so I do not know how it works.

FoxMagiskModuleManager - GitHub - Link

Cheers. :cowboy:

PS.

Sorry for the OT.
[Android Software/Hacking General [Developers Only]] AnonVendetta:
I'm not ready to switch from v23 to Canary yet. Riru/LSPosed don't seem to work when Zygisk is enabled. I'll wait until Magisk gets a stable update, and those modules get updated as well. I probably don't need @Zackptg5's module manager ATM.
[Android Software/Hacking General [Developers Only]] Lughnasadh:
I've been using the Fox Magisk Module Manager and it seems to be working well for me. Showed I had 3 module updates today and was able to flash each one successfully through the app.
[Android Software/Hacking General [Developers Only]] osm0sis:
Nice I still like having the downloaded zips, so I'll try Fox's next since I see @Nezorflame has an issue open for that. 👍

Also, I've got some big news! My beautiful wife's now in third trimester and due to give birth in February, so I'm going to have to be away from Android for possibly quite awhile so we can prepare together and work on our home some more beforehand, then find our footing afterwards.

Work on Android Image Kitchen for AVBv2 signing, boot hdr v4 and all the crazy multi-ramdisk shenanigans vendor_boot hdr v4 has introduced will have to wait. Upside is that in the meantime AOSP has stepped up their game with the unpack/repack Python tools: https://android.googlesource.com/platform/system/tools/mkbootimg/+/refs/heads/master
[Android Software/Hacking General [Developers Only]] Lughnasadh:
Congrats!!! 😀 See you in 18 years 😉 😁
[Android Software/Hacking General [Developers Only]] AnonVendetta:
While i'm happy for you, i'm not the marrying/relationship type. At 38, i still am very happy as a never married, single, and childless man and prefer to spend my time alone working on my pet projects. I value my independence and personal autonomy above all else, i just dont want to deal with having to consult with a significant other before making decisions. And i particularly dislike being around kids, i was a little hellion when i was young, so maybe that's jaded my opinion.

It's understandable that you'll have to take time away to spend with family, noone in XDA will resent you for that.

Good luck!
[Android Software/Hacking General [Developers Only]] tancam:
Does twrp a/b script work for op9pro
[Android Software/Hacking General [Developers Only]] Jerrvdll:
It does on op7 pro..
[Android Software/Hacking General [Developers Only]] bynarie:
Thanks man! Appreciate the quick reply
[Android Software/Hacking General [Developers Only]] AnonVendetta:
@osm0sis: I have a question. Is it possible to force system mode installation of your Busybox while Magisk is installed? I know I can remove Magisk/systemless SuperSU and it will install into system partition.

If it's not currently possible, can you make it doable?
[Android Software/Hacking General [Developers Only]] osm0sis:
It's already possible for pretty much all of my modules which use my Diffusion backend. If you're installing in recovery with the one from the OP then rename with -system in the filename before flash. If you're installing from the Magisk repo in the Magisk app or Fox's MMM, then you can create a /data/.busybox-ndk file and put system in there instead of the filename.
[Android Software/Hacking General [Developers Only]] ale82to:
hello everyone I ve got a small problem with zipsigner i use it with Tasker shell command and I work with fixed apk name so my ripetitive shell command is :

/system/bin/zipsigner /storage/emulated/0/Download/1.apk /storage/emulated/0/Download/2.apk

the command works as expected but just for the first time the second or third or xxx times in order to make it work I ve for to change the output apk name every damn time :

/system/bin/zipsigner /storage/emulated/0/Download/1.apk /storage/emulated/0/Download/some-random-name.apk

how can my initial command

/system/bin/zipsigner /storage/emulated/0/Download/1.apk /storage/emulated/0/Download/2.apk be run infinite times without this error :

android.system.ErrnoException: open failed: ENOENT (No such file or directory)

at libcore.io.Linux.open(Native Method)

at libcore.io.ForwardingOs.open(ForwardingOs.java:166)

thank you very much for the help.
[Android Software/Hacking General [Developers Only]] AnonVendetta:
@osm0sis: The link to nano text editor is broken. Can you fix it?

Thanks!
[Android Software/Hacking General [Developers Only]] osm0sis:
It's a new year! Time to clear out my desktop before things get really real with baby on the way shortly. 😅

Basically just some minor updates which I'd already had out on the Magisk Module Repo (RIP :( ), and some Magisk shenanigans I got up to when I had some downtime on night shifts at work lately.

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!

Google_Experience_XML-2021.10.28(2).zip:

- update with entries from Pixel 5a 5G (barbet) and Pixel 6 Pro (raven)

- ...but then disable most entries to get an optimal Pixel feature set ;)

magisk-ci_installer.sh:

- allows easily installing the Continuous Integration (CI) GitHub Actions builds of Magisk for those testing bleeding edge commits pre-release or Pull Requests

- can be run using root from a file explorer app like FX from your Download directory with the full Artifact zip from GitHub

Magisk_PATCHVBMETAFLAG_true_Injector_Addon-AK3-signed.zip:

- until the Canary Magisk app allows enabling PATCHVBMETAFLAG=true in the patching process for devices that require it (very few), this will allow people to force the setting into their Magisk patched boot partition using TWRP

UPDATE-Busybox.Installer.v1.34.1-ALL-signed.zip:

- fix booted xbin filtering of [ and [[

UPDATE-nano.Terminal.Editor.v6.0-signed.zip:

- update to latest nano official source

TWRP_A_B_Retention_Script-Magisk(1).zip:

- add find_manager_apk fallback updates

I also managed a number of contributions to Magisk and the Universal SafetyNet Fix (USNF) module, and AnyKernel3 (AK3) Android 12/hdr_v4 updates before I started stepping things back. 🤘

Take care out there everybody! ❤️
[Android Software/Hacking General [Developers Only]] m0han:
posting after searching to the best of my ability. maybe my best was not good enough.

how do magisk alpha users update? update not seen in the latest fox's mmm app.

this link is seen last updated on 01.nov.2021. where to download today's release?
[Android Software/Hacking General [Developers Only]] osm0sis:
As I said, they've been up on the Magisk repo for awhile now. So you've already got it from Nov 23 👍:

Commits · Magisk-Modules-Repo/busybox-ndk

busybox-ndk. Contribute to Magisk-Modules-Repo/busybox-ndk development by creating an account on GitHub.

github.com
[Android Software/Hacking General [Developers Only]] m0han:
i know you're busy right now. maybe (later) you could consider posting the md5 values, so people can check.
[Android Software/Hacking General [Developers Only]] osm0sis:
It's not possible to md5 the Magisk repo hosted ones since they're downloaded on-the-fly by an app. As for the thread zips, I'll consider it but it sounds like a lot of extra work for very little gain; updating the post links to all the updated attachments every time is already obnoxious enough.
[Android Software/Hacking General [Developers Only]] m0han:
under the circumstances it is only fair that i take back my suggestion :D
[Android Software/Hacking General [Developers Only]] sdeft:
Hello and Happy New Year to all

@osm0sis

Could you please re-attach nano 5.9, Or do you have a repo where we can download previous versions ?
[Android Software/Hacking General [Developers Only]] osm0sis:
You can grab the 5.9 nano binary from GitHub if you need it, but 6.0 is solid from my testing.
[Android Software/Hacking General [Developers Only]] sdeft:
Which github link is this ?
[Android Software/Hacking General [Developers Only]] osm0sis:
GitHub - Magisk-Modules-Repo/nano-ndk: nano-ndk

nano-ndk. Contribute to Magisk-Modules-Repo/nano-ndk development by creating an account on GitHub.

github.com
[Android Software/Hacking General [Developers Only]] monster234:
where i can get latest busybox for android sdk i can't find option on github unlike other modules and sadly magisk removed its own repo :(
[Android Software/Hacking General [Developers Only]] ipdev:
Downloads are attached to the OP.

UPDATE-Busybox.Installer.v1.34.1-ALL-signed.zip

After you download it.

You can install it from the Magisk app..

Modules -> Install from storage -> Navigate to the zip file and select it.

You can install it using a custom recovery (TWRP).

Note: If you install it using a custom recovery without Magisk installed, it will install as a system app.

Alternatively.

You can use Fox2Code's Magisk Module Manager app.

- GitHub

Downloads are in the Release section.

Cheers. :cowboy:
[Android Software/Hacking General [Developers Only]] tonytrijullo:
How do i use this script in Magisk v24.1? You can't download modules from the repository anymore and you have to flash .zip files. Is it fine simply to zip the shell script or your whole repo and install that zipfile in magisk?
[Android Software/Hacking General [Developers Only]] AnonVendetta:
Not exactly related, but you can use Fox's Magisk Module Manager for downloading modules, on canary/24.x+ Magisk versions. Fox uses some other repo list, not sure exactly where from. But it essentially restores access to the repo.

Or you can just install standalone zip files directly from within Magisk Manager.

As for using a script, you should just be able to drop it into either service.d/postfsdata folders and set proper permissions, located in /data/adb/. Or, if it's an actual Magisk module in the form of a zip, just flash it.
[Android Software/Hacking General [Developers Only]] rodken:
In the event that the /postfsdata does not exist, do I simply create a new one and what are the proper permissions?
[Android Software/Hacking General [Developers Only]] ipdev:
The directory is post-fs-data.d and if it does not exist, Magisk is not installed properly. 🙃

Magisk Developer Guides - GitHub.io - Link

[ Boot Scripts ] - Link

Set owner and group to root

Set permissions to 0755​

Example.

OnePlus6T:/ # ls -la /data/adb/post-fs-data.d/
total 24
drwxr-xr-x 2 root root 4096 2021-11-25 10:40 .
drwx------ 6 root root 4096 1970-03-22 17:04 ..
-rwxr-xr-x 1 root root 192 2022-02-21 19:46 test_set_oos.sh

Cheers. :cowboy:
[Android Software/Hacking General [Developers Only]] rodken:
I turns out that I was able to locate the folder(s) in question.

All is well - [at least temporarily].
[Android Software/Hacking General [Developers Only]] rodken:
Wondering if I can run something like this as a stand-alone.

Spoiler content hidden.
[Android Software/Hacking General [Developers Only]] osm0sis:
[ * ] : add new Magisk auto-update support 😉

...

ALSO,

https://twitter.com/i/web/status/1494714771270250502

😁
[Android Software/Hacking General [Developers Only]] asripath:
Congratulations on your new release 🙂
[Android Software/Hacking General [Developers Only]] Blade22222:
Congratulations!
[Android Software/Hacking General [Developers Only]] DiamondJohn:
Wait a sec, how old is he/she? Thats a LOT of hair! get a hair cut before he starts school! and congrats!
[Android Software/Hacking General [Developers Only]] osm0sis:
I know, right? She's 6 days old in that picture! 🤯
[Android Software/Hacking General [Developers Only]] CXZa:
Congrats from here too! (y)
[Android Software/Hacking General [Developers Only]] ipdev:
Congratulation

The best "Hello World" release one can have. 😄

The Magisk is built in with this type of release. 🙃

Cheers to you, Mrs. osm0sis , and your now expanded family.

:cowboy:
[Android Software/Hacking General [Developers Only]] osm0sis:
Had hoped to get a bit more picked-away-at on Diffusion Installer Backend updates and a few other things before I return to work tomorrow, but ended up having to do some serious bug hunting in gnulib (between baby feedings ;)) instead, since it broke the nano build for v6.1+ on Cygwin+NDK while I've been off. Last evening I finally found the actual issue, have worked around it for now by applying the fix via my nano build script, and will submit the fix upstream when I have some more time. Fun to test out pushing my first real update through the new Magisk app module update system too! 👍

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!

UPDATE-nano.Terminal.Editor.v6.2-signed.zip:

- update to latest nano official source

Also kept AnyKernel3 up-to-date with latest Magisk tools and some great fixes from contributors.🤘

Happy hacking! 🤠
[Android Software/Hacking General [Developers Only]] GabriLed:
Hi, this magisk module support A12 and a12l?
[Android Software/Hacking General [Developers Only]] mrrocketdog:
i say (my ¢.02) let i t grow!! and big congrats osm0sis
[Android Software/Hacking General [Developers Only]] osm0sis:
You're going to have to be a little more specific.