yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] AnonVendetta:
@osm0sis I have a log in regards to my unknown arch error.

But I also have a bit more understanding of what is happening:

I noticed that the installer leaves product/system/vendor mounted after exiting. So I explicitly checked those boxes, then issued the following commands in twrp terminal:

mount -o rw,remount /

mount -o rw,remount /system_root

mount -o rw,remount /product

mount -o rw,remount /vendor

No errors, they're all writable. Then I ran the zip installer again, with -system in the filename. My desired install dir /system/xbin.

This time the install succeeds, it installs to /system/bin. However....not the /system/bin that's visible when the gsi is booted. But the one that's only visible in twrp. I suspect my twrp uses that path internally, because if I write a test file/dir into it, the changes are deflected and gone after rebooting into recovery. It's probably a ramdisk of some kind.

So:

/system/bin (visible only from twrp)

/system_root/system/bin (the one I initially thought the installer used)

/system_root/system/xbin (my desired location, it's on my path statement in /init.environ.rc
[Android Software/Hacking General [Developers Only]] AnonVendetta:
I'm pretty sure it's SAR. I have a super partition. And my boot.img ramdisk is mostly just a bunch of empty folders.
[Android Software/Hacking General [Developers Only]] osm0sis:
Yeah, I need to know about /system_root/system/apex and/or /mnt/system/system/apex though, which is in the system partition, not boot ramdisk. Let me know what you see. (y)
[Android Software/Hacking General [Developers Only]] AnonVendetta:
I have screenshots:

1. Proof of a super partition

2. Partial contents of the dir you requested

3. /system as seen by twrp, and not used by the rom

The apex dir is from an Android 13 gsi, not stock FW
[Android Software/Hacking General [Developers Only]] osm0sis:
Ah, thanks! Might be an issue with the new .capex support, which your GSI needs. Where AK3 packages its own busybox, my Diffusion installer tries to rely only on the TWRP env, so the timing of the mounts can affect commands running correctly. I had it working previously, so my guess is something is off with the new .capex stuff and when /system_root/system gets bind mounted over /system everything goes kaboom.
[Android Software/Hacking General [Developers Only]] AnonVendetta:
I find it weird that it installs without errors when I ran the mount commands first, but to the wrong location. Which would seem to indicate that the compressed apex files aren't the real issue. Maybe your installer thinks I'm not SAR, so it mistakes TWRP's /system as being the real one.
[Android Software/Hacking General [Developers Only]] AnonVendetta:
Your BB installer obv packages BB...so why not use your own BB binaries as a fallback to get the correct info?
[Android Software/Hacking General [Developers Only]] osm0sis:
It's because you just manually mounted a bunch of things first, specifically /system_root, so that might have interfered with it mounting in the right order and so installed to the ramdisk in memory instead of the real system. That shouldn't happen, since setup_env explicitly does umount_all before starting the mount, but things are already interacting wonky with the .capex stuff in your setup, so who knows.

Because all my other Diffusion Installer Backended modules don't have busybox, and my goal with Diffusion is for it to be entirely script-based.
[Android Software/Hacking General [Developers Only]] AnonVendetta:
It's nice for it to be script based, but if your scripts are entirely dependent on twrp giving the correct info, and sometimes it doesn't, then it makes sense to use your BB as a fallback to get reliable info. You already have to bundle it because of the nature of the package.

Do you think there is a way to work around the capex issue? I think they're easily decompressible. Is there no other way for your installer to get the info it needs when it detects capex files?
[Android Software/Hacking General [Developers Only]] osm0sis:
It's not a case of incorrect info, it's the scripts failing to mount some things in a specific scenario, so the info request and other general commands fail. My last update to the Diffusion Backend was to add .capex support, so either that's still not working, or there's just something timing-wise I missed, since it's based on my similar .capex support for Magisk and AK3, which I know works. I'll figure it out.
[Android Software/Hacking General [Developers Only]] osm0sis:
Anyway, in the meantime.. :)

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-mtd-utils.Installer.v2.1.5-signed.zip:

- update to latest mtd-utils official source

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

- update to latest nano official source

- fix running from recovery /sbin script for /system/product installs

(y)
[Android Software/Hacking General [Developers Only]] AnonVendetta:
For now I'm going to try a hacky workaround which I believe will work:

Do my mount commands as before, but create /system/xbin. And then symlink that to /system_root/system/xbin. If it works, the install should end up in the dir I want. It shouldn't matter that the symlink disappears after exiting TWRP. And because the symlinks are relative, they should work within Android or TWRP.
[Android Software/Hacking General [Developers Only]] u_no_fr:
Why the busybox magisk module tells me that there is a new release many times a day?
[Android Software/Hacking General [Developers Only]] osm0sis:
Doesn't happen in Magisk app on any of my devices. If you're using MMM ask Fox2Code or Androidacy, since that's their app and has nothing to do with me.
[Android Software/Hacking General [Developers Only]] insestito:
There is something for undervolt Exynos?

Thanks Osm0sis
[Android Software/Hacking General [Developers Only]] osm0sis:
Small PSA, I figured out why my FlashAfterUpdate addon.d-v2 script wasn't working on newer Android versions.

Turns out it wasn't actually anything wrong with FlashAfterUpdate, but more Magisk's own addon.d-v2 script inadvertently causing all root access to break after it ran until the post-update reboot, preventing the FlashAfterUpdate addon.d-v2 script from executing correctly.

Anyway, I tracked down the cause: Magisk uses /system/bin/su now instead of /sbin/su on newer Android and the Magisk addon.d-v2 script removed the su binary/link in error from the live system instead of on the updated slot.

It will be fixed with the next Magisk Canary. 🙂👍

scripts: fix root loss until reboot after Magisk addon.d-v2 by osm0sis · Pull Request #6453 · topjohnwu/Magisk

/system/bin/su was being removed in error from the live system so update remove_system_su to be aware of a running A/B OTA and generalize/simplify removal logic with relative paths to correctly run...

github.com
[Android Software/Hacking General [Developers Only]] xracerx123:
nano Terminal Editor Installer (many devices) - attached

Hi there, how do I install the above script? Do I use the magisk installer and hit the download button?
[Android Software/Hacking General [Developers Only]] xracerx123:
Is there a magisk modules with nano and how do I install it?

is there anyway I can stimulate an alias like what I do in linux?

Is there a way I can install on Fox Magisk Manager?
[Android Software/Hacking General [Developers Only]] asripath:
Yes,Yes,Yes.

Have you read post #1
[Android Software/Hacking General [Developers Only]] xracerx123:
I have read it, how do I install the .zip file for nano? I was trying to install using magisk installer but it says failed
[Android Software/Hacking General [Developers Only]] osm0sis:
If Magisk says it failed then you have a bad download and you should get it again.
[Android Software/Hacking General [Developers Only]] xracerx123:
Ok, I managed to install successfully,

my goals is to have a permanent alias in nano, where and how can i do this? I try to edit the following but it seems that [ File '/etc/mkshrc' is unwritable ]. Do let me know if you have any modules that can do this.
[Android Software/Hacking General [Developers Only]] xracerx123:
Excuse me, do you sort of provide a bash module?
[Android Software/Hacking General [Developers Only]] osm0sis:
If you don't see it in the OP it's not here. @Zackptg5 made a good bash module, check him out.
[Android Software/Hacking General [Developers Only]] ashish1989:
Can SD card fix permissions zip be used in case we get irregular or messed storage folders, bcoz I got the same in twrp in my oneplus 6 device. So then I have to format data and reboot to recovery to acces internal storage with proper folder names
[Android Software/Hacking General [Developers Only]] hwntw:
Hello, how do I run this module- i tried to in Termux but nothing
[Android Software/Hacking General [Developers Only]] hwntw:
Solved- run as Root in Termux
[Android Software/Hacking General [Developers Only]] GIutton:
Could you explain how to do this for a novice?
[Android Software/Hacking General [Developers Only]] hwntw:
I just ran the executable to test it and to view the operators, I didnt use an BIN or IMG file or anything. Root and Termux seem to be preconditions, as I cant see another way of doing it on phone. An apk that does drag and drop would be simpler- in reality I have used the Windows app to do this succesfully on my PC then take it onto my phone
[Android Software/Hacking General [Developers Only]] ipdev:
Nano is a command line editor and osm0sis's port works the same as it does on a computer.

Nano is a must for me.

I have used it for years on computer and thanks to osm0sis also on android.​

Termux is all together a bit different than other terminal apps and adb shell.

I have used Termux every now and then and for some reason alot has to be run as root instead of user.

You have to switch user `su` (defaults to root unless another user is supplied).​

No clue why. ¯\_(ツ)_/¯

Spoiler content hidden.

Cheers. :cowboy:
[Android Software/Hacking General [Developers Only]] hwntw:
I forgot about ADB shell, which is the obvious way to do payload.bin dump thing, but we run that from a PC so no real gain over the easy Windows app
[Android Software/Hacking General [Developers Only]] osm0sis:
What are you on about? It works fine from command line in the Terminal Emulator app, or any other terminal app which has root. The wrapper I wrote clearly tells you it needs root if you try to run it without. It's very simple and straightforward. If you want an app specifically to dump payload files then I guess feel free to go ahead and make one?
[Android Software/Hacking General [Developers Only]] GIutton:
Yeeeeah I guess I'm a bit slower than that. I have installed the module in magisk but where do I find the exe? I am I supposed to use the one from the windows version?
[Android Software/Hacking General [Developers Only]] hwntw:
The developer will soon provide a detailed explainer on how to use it on phone using a terminal. This needs Root so for simplicity sake use the Windows app on your PC instead. I used Payload-Dumper.exe as a stage in getting Root in the first place, so the Magisk module (which needs Root) must be for other purposes, the developer can advise you on this
[Android Software/Hacking General [Developers Only]] osm0sis:
Here are a couple things which I've previously updated in the OPs but not posted about, and a couple actual new updates I wanted to get out while I work away at some other things. Enjoy!

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!

97-dumpimages.sh:

- rewrite from dumpbootimage.sh to dumpimages.sh to expand support to dump multiple normal block partitions at a time

- default list to dump (if existing) of "boot dtbo init_boot recovery vbmeta vendor_boot vendor_kernel_boot" to cover most standard devices, old and new

- custom partition list, partition by-name directory, and output directory may all be specified

ADBsync.sdcard.Backup.v2.2-Win32.zip:

- update included ADB files to platform-tools_r34.0.1-windows

- use stripped arm zip binary to reduce size

- add default ignored directories list of /sdcard/.transforms and /sdcard/Android since these now cause issues on Android 11+ when restored thanks to Scoped Storage

- fix adb root failure when Developer options "Rooted debugging" is disabled, causing "no devices/emulators found" error

- hide .noadbsync push output

- update to most recent adbsync build (April 13 2022)

- workaround latest adbsync build regression with Android path leading slash handling

Digital_Wellbeing_Addon-13(2).zip:

- update WellbeingPrebuilt.apk to Android 13 build

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

- update to latest nano official source

- fix 5s wait from resize stderr redirect bug

AnyKernel3 has also been getting some regular bugfixes. (y)
[Android Software/Hacking General [Developers Only]] osm0sis:
Some more update goodies!

Biggest thing here is FlashAfterUpdate now supports flashing whole partitions, which I'm sure could have many powerful uses post-OTA, but I've personally found pretty useful for downgrading my OnePlus 9 Pro abl partition to the one before OnePlus added the hideous "Bootloader is unlocked" wait message, since Lineage always ships the latest in each OTA. ;)

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!

TWRP_A_B_Retention_Script-Magisk(1).zip:

- unroot TWRP ramdisk to prevent old SHA1 in Magisk config from carrying over

98-twrp_ab.sh:

- unroot TWRP ramdisk to prevent old SHA1 in Magisk config from carrying over

999-flashafterupdate.sh:

- refactor and improve partition mounting, and unmount any after that were so before

- fix opposite/inactive slot finding copy-pasta breakage

- add support to addon.d-v2 mount hack for vendor, product and system_ext logical partitions

- add support for flashing .img files that have a matching named partition (e.g. abl.img for abl/abl_a/abl_b)

- add .img file exceptions for recovery*, *-recovery-*, RECOVERY*, twrp* and TWRP* to all target recovery partition

Happy hacking! :cowboy:
[Android Software/Hacking General [Developers Only]] KeRbYRoK:
Your so fukin awesome! Thanks frfr!
[Android Software/Hacking General [Developers Only]] Litttle_fish:
Hello,

I just saw that busybox released 1.36.1 stable.

Will the magisk module get updated?
[Android Software/Hacking General [Developers Only]] justDave:
@zgfg has a BusyBox module that links to the one built into Magisk. Is this module still needed?
[Android Software/Hacking General [Developers Only]] Litttle_fish:
Hm, I checked magisk built-in one and it is the same to this module, both are 1.34.1(at least on version side this is right).

So it might be useful if got an update.
[Android Software/Hacking General [Developers Only]] Litttle_fish:
Ugh I forgot to quote

I checked magisk built-in one and it is the same to this module, both are 1.34.1(at least on version side this is right).

So it might be useful if got an update.
[Android Software/Hacking General [Developers Only]] justDave:
I was suggesting that this module might not be needed anymore but you have a point. This module can provide a more updated version while Magisk updates on it's own schedule.
[Android Software/Hacking General [Developers Only]] osm0sis:
My busybox module supports more architectures (MIPS/64, non-SELinux), and allows more fine-tuned installs (no symlinks, xbin if available or bin with filtered links, forced system install, no SELinux). Both Magisk's and my busybox are built on my patches and config.

As for the busybox stable (finally!), I'm aware of it, but they've only pushed the news item, not published the version bump commit or tag: https://git.busybox.net/busybox/log/?h=1_36_stable

So I'm working on the bring-up already, for my patchset+module and to update Magisk's busybox repo (which would then make it into the next Magisk build, once merged), but still waiting on them to correctly publish it so I'm not altering the version number myself. And yeah, "mine" will probably be out before "Magisk's". 😉

Edit: Noticed the official source blob posted has 1.36.1 in the Makefile, but the git doesn't; compared to the git it's the only change, so that's good at least. (y)

Submitted a bug report to hopefully get it resolved more quickly: https://bugs.busybox.net/show_bug.cgi?id=15596
[Android Software/Hacking General [Developers Only]] osm0sis:
I was able to somewhat recreate this issue by mounting things like /system_root and /product in TWRP before attempting a system flash. Happily it seems resolved with my upcoming Diffusion Backend updates (mirroring my recent Backend changes for AnyKernel3)! :)
[Android Software/Hacking General [Developers Only]] ale5000:
@osm0sis

You can look at my code to detect the fake system folder of recovery: https://github.com/micro5k/microg-u...5eb2/zip-content/inc/common-functions.sh#L411
[Android Software/Hacking General [Developers Only]] osm0sis:
Thanks, but not really necessary since I intentionally mount over top of it.
[Android Software/Hacking General [Developers Only]] AnonVendetta:
I am back on stock firmware and my bootloader is relocked, so I won't be able to test any new releases for a few days. I'd kinda already forgot that I posted in this thread at all.
[Android Software/Hacking General [Developers Only]] osm0sis:
I on the other hand never forget. 😆
[Android Software/Hacking General [Developers Only]] osm0sis:
Changed my mind since I did all the bring-up work already, verified there were no further differences from the source archive, tested builds in AK3 and it seems stable, so instead of waiting for the busybox team to push their missing official version bump commit and tag, here we are!

Also, in case it wasn't obvious by the recent flurry of updates, we got a daycare spot so I've got a little sliver of free time again amongst other long overdue things I'm catching up on. :P

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-adb.Installer.v1.0.41-signed.zip;

UPDATE-Adreno.Systemless.Installer-signed.zip;

UPDATE-mtd-utils.Installer.v2.1.5-signed.zip;

UPDATE-nano.Terminal.Editor.v7.2-signed.zip;

UPDATE-Nexus.Media.Installer-signed.zip;

UPDATE-ZipSigner.Installer.v3.0-signed.zip:

- Diffusion Installer Backend updates

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

- update to latest busybox stable official source

- Diffusion Installer Backend updates

- add patch to fix direct loopback mount and losetup next loop

Happy hacking! :cowboy:

Edit: There, they pushed the tag!

Now the great wait for it to be merged into Magisk can begin... 😛:

Update for BusyBox 1.36.1 by osm0sis · Pull Request #9 · topjohnwu/ndk-box-kitchen

remove upstreamed/resolved patches rebase patches over released stable 1.36.1 fix KBuild parsing of .S files for Android.mk add new patch to fix direct loopback mount and losetup next loop switch t...

github.com
[Android Software/Hacking General [Developers Only]] osm0sis:
New busybox 1.36.1 build patched to fix loop mounts (via both mount and losetup) on kernels <5.x. (y)
[Android Software/Hacking General [Developers Only]] Displax:
Is it expected that "EXTRAVERSION" now print "Magisk" instead of "osm0sis" ?

BusyBox v1.36.1-Magisk (2023-05-25 10:16:11 ADT) multi-call binary.

Maybe wrong config from Magisk PR?
[Android Software/Hacking General [Developers Only]] osm0sis:
Haha, well I do of course create the SELinux builds with ndk-box-kitchen, so you're right: guess I forgot to change that back to osm0sis before build time. 😅🤦‍♂️

Fresh builds incoming... 😛

Edit: F*ck it, I've got some more Diffusion fixes too from what I figured out last night for AK3, might as well do 'em all! Then hopefully no more Backend fixes needed for a bit. 🤪
[Android Software/Hacking General [Developers Only]] AnonVendetta:
Just tested your latest bb zip, it works fine. ROM is Project Elixir Android 13 gsi, latest TWRP by @afaneh92, on a Note 20 Ultra 5g. I just had to add -system into the filename so it would ignore Magisk and not install it systemlessly.
[Android Software/Hacking General [Developers Only]] AnonVendetta:
@osm0sis: is there a chance that SafetyNet detects BusyBox (any, not just yours)? I think Google would view it as a root tool. And no major OEM includes it in recent-ish firmwares, so it would be considered as a custom, non-standard binary not found on stock firmwares. I have seen it on ZTE firmwares, but not called BusyBox, it was using a non-standard filename.
[Android Software/Hacking General [Developers Only]] osm0sis:
No I've never seen any indication SafetyNet/PlayIntegrity has anything to do with busybox detection.

Edit: I guess only if at least DenyList is in use! See https://xdaforums.com/t/tools-zips-...ices-platforms.2239421/page-165#post-88606079
[Android Software/Hacking General [Developers Only]] AnonVendetta:
I find it weird that they wouldnt single it out for detection. Unless they think of it as being similar to toybox/toolbox, and therefore harmless, since it's just a multi-use utility with lots of function bundled in. But busybox being installed is also a good indication that the device is probably rooted. Even though busybox itself doesnt require root.
[Android Software/Hacking General [Developers Only]] osm0sis:
They don't detect anything file-wise except su.

https://twitter.com/i/web/status/1490800939116154880
[Android Software/Hacking General [Developers Only]] AnonVendetta:
I'm a root-a-holic, I can't imagine running an Android device without root. If I can't be rooted, I might as well buy an iPhone/iPad instead...f that.
[Android Software/Hacking General [Developers Only]] osm0sis:
Well (as I'm sure you know) that's where USNF and Shamiko come in! 😁

I do think a lot about Chainfire's comment as he was leaving the scene about how it had become an unhealthy cycle where he only rooted to develop root, however... 🫤