yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] rezapatel:
Thank you. Another in road into an upgrade for next time :) I'm happy I've been rewarded for today's hard work with the help on this thread :)
[Android Software/Hacking General [Developers Only]] CriticalWill:
@osm0sis you just fixed a super annoying issue for me. Thank you!!!
[Android Software/Hacking General [Developers Only]] iooxda:
I tried installing this module today on zippo on LineageOS 18.1, it copies the zip to temp, extracts files successfully but it hangs on "Installing..." and never recovers. If I reboot it shows that that busybox-ndk by " " under Installed however /data/adb/modules/busybox-ndk/system/xbin is empty

I have installed this module before on other phones and I have several other modules installed on this phone successfully already. Any ideas? Has anyone else seen this?
[Android Software/Hacking General [Developers Only]] osm0sis:
Logs or nobody can help you.
[Android Software/Hacking General [Developers Only]] iooxda:
Are you asking for Magisk logs? I looked and there was very little there. The last line in the log was "Installing..." I will try again and attach a log.
[Android Software/Hacking General [Developers Only]] iooxda:
I have attached the log here : https://pastebin.ubuntu.com/p/zcryPMPZZM/

There isn't much to look at but I tried it again and I got the same results. It starts to install, hangs on Installing... then nothing happens. I waited for 1 full how this time. I rebooted and after rebooting I see:

Installed

busybox-nkd

by

and nothing else. This is for Version 1.33.1

I did have another strange issue, after I rebooted I had a very strange screen flicker that I have never seen before. It went away after another reboot, not sure if it is related or not but I haven't seen it since.

Edit:

I tried it a 3rd time, same result, this time I saw something different, after a reboot I saw the same:

Installed

busybox-nkd

by

same empty folder undre magisk modules however now I see in Magisk busybox is listed under updates.

I click the update button and... same result. I end up hanging on Installing... and nothing installed.
[Android Software/Hacking General [Developers Only]] osm0sis:
What Magisk are you installing this with? It looks like it's copying and installing it twice at the same time judging by the log entries at the top. Sounds like app bugs to me.
[Android Software/Hacking General [Developers Only]] iooxda:
I am using Magisk 23.0 (23000) from here:

https://github.com/topjohnwu/Magisk/releases/download/v23.0/Magisk-v23.0.apk

When you say app bugs do you mean a Magisk bug or a busybox for Android NDK bug? Any ideas on further actions I can take to troubleshoot?

I only saw the double copying one time, all the other times I tried to install once and it hangs at Installing... then nothing.
[Android Software/Hacking General [Developers Only]] osm0sis:
Magisk is the app. Busybox is only a module. Try with latest Canary maybe? I'm on latest and I've had no trouble installing any of my modules on any of my devices. Without more log there's no way to figure it out honestly. What's your device and ROM setup? Other conflicting modules? Try from TWRP recovery or from an app like FKM? FKM might show an empty onscreen log for Magisk modules but there'll be an sdcard log that shows everything.
[Android Software/Hacking General [Developers Only]] iooxda:
Where do the apps come from that are included in you release? I am trying to write scripts using some of the GNU coreutils apps and none of them are working in busybox-ndk. For example:

shred su -c /system/xbin/shred -n1 --verbose /dev/block/mmcblk0.

In busybox-ndk this doesn't work. If I run the same command in Debian on PC or Termux on the same device I get a successful execution.

When I do:

shred --help or shred --version I can see this is the tool written by Colin Plumb, version 8.30. If I do a /system/xbin/shred -- help most of the argument flags are missing. It shows the busybox version rather than the app version and it doesn't work. Was this app rewritten or is it a different app all together?

Same thing with mke2fs, several key flags are missing (-t) to specify the filesytem type.
[Android Software/Hacking General [Developers Only]] osm0sis:
Oh so you figured out how to install it finally but didn't mention what worked or what the problem was? Kinda weird..

Anyway, busybox applets probably shouldn't be referred to as apps, since that's confusing. Also, I didn't invent or develop busybox, so if you have a problem with their conformity to POSIX or GNU or whatever then you can go file a bug report with them at https://bugs.busybox.net
[Android Software/Hacking General [Developers Only]] iooxda:
You may have made an incorrect assumption. I have tried again a few times and unfortunately, I did not figure out how to install it which is the reason why I didn't mention what worked or what the problem is.

I had your module running on an older device. I still cannot install on the new device which I originally reported. Other users in a telegram group have reported no issues installing modules with Magisk 23 but none of them were using busybox-ndk.

I'm not sure the busybox applets are buggy they are just different than expected and appear to be missing argument flags, but you are right this is a question for busybox.net

Thanks for the link, I installed the busybox and ran the tools directly from busybox.net, the output does match your output as mentioned.
[Android Software/Hacking General [Developers Only]] osm0sis:
I've got my busybox module installed on my Galaxy Nexus and my OnePlus 9 Pro, all fine. So again, not sure what the problem is with your specific device, that you still haven't even told us what it is.. I asked you multiple questions and told you multiple things to try and you outright ignored it, so if you aren't going to try to help figure this out then we're done here.
[Android Software/Hacking General [Developers Only]] DiamondJohn:
Busybox is NOT Linux or Unix. What works on a fully fledge system is different to the cut down world of Busybox. These applets are heavily cut down, and some are almost just shells/place-holders. The real test I personally use of any busybox implementation, is to try a different busybox implementation. If it does not work there either, then as @osm0sis directed you, the busybox maintainers are the oines to speak to. If it does work, @osm0sis can only help if you help him by following his requests.

Additionally, to remove all doubt you are running busybox and not the Toybox implementation on your device (or the relics of some other previous install), i would explicitly prefix all busybox commands with the explicit path & the busybox binary, for my own comfort.

/system/bin/busybox echo "Hello World";
[Android Software/Hacking General [Developers Only]] ipdev:
Use Magisk debug (canary) and grab the install and magisk debug log.

Run an adb logcat at the same time.

One of the logs should show what is failing on the install. ;)

You noted using Termux, that is a heavy linux shell port for Android.

It even includes curl

Curl is not included in toolbox, toybox or busybox.

If i remember correctly, Termux only uses it own installed components.

Can be increased/updated by installing additional Termux packages.​

Termux is a great terminal for Android but, not the one to test script commands in. ;)

Best to test shell commands using a basic terminal app or use adb shell.

adb can have slightly elevated permissions, best to do final test as regular user.

If you can not find a different way doing what you want to do..

Check the license for Termux and it's binaries.

or see if you can find a different binary that you can use.

If you can, barrow the shred binary and include it in your project.

Remember to give credit where credit is due.

No Kanging!​

Then call the shred binary included in your project.

Cheers. :cowboy:
[Android Software/Hacking General [Developers Only]] ipdev:
Might be time to update your installer script. 🙃

# Output device information since I do not have a crystal ball.​

---

More honest question..

Is it possible to use the rename feature for magisk modules?

-debugging.zip​

Cheers. :cowboy:
[Android Software/Hacking General [Developers Only]] osm0sis:
Got an update release and a minor addition today for you all! :)

00-Recovery.SLAM.Script.zip or "Recovery Simple Legacy Auto-Mount" is for devices that have been updated to SAR, but there are older zips that break because they rely on the mounts occuring a certain way, especially during a ROM OTA. Recovery SLAM mounts them more as the zips would expect, allowing them to proceed. Most useful for premounting /system before a legacy zip in FlashAfterUpdate, which is why I've prefixed the filename with a number so a user can rename it to come before the troublesome zip in your FlashAfterUpdate directory. I currently use it on my Nexus 7 2013 for example, where the old Adreno Beta zip wouldn't flash to system from FlashAfterUpdate until /system (and /vendor on flox) was mounted first using this script. It'll live here in this post and I'll link it from the OP. (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!

999-flashafterupdate.sh:

- always use stderr to hide zip ui_print output to avoid legacy update-binary segfaults

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

- update to latest busybox stable official source

UPDATE-Fla****.Installer.v3.8-signed.zip:

- update busybox binary (1.33.1) with the latest patches and fixes from my repo

- add vendor_boot.img auto-detect support to scripts and recovery zip

UPDATE-nano.Terminal.Editor.v5.8-signed.zip:

- update to latest nano official source

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

- fix addon.d script for ROMs with product/media

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

- add check to ensure running as root

- automatically generate output filename if none supplied

The Payload-Dumper-Go Magisk Module has been updated to the latest build and some wrapper edge-cases fixed. AnyKernel3 also got a big update for simple vendor_boot support. TWRP_A_B_Retention_Script-Magisk(1).zip got some cosmetic fixes as well. Download TWRP A/B Retention Script again from the repo in the Magisk app to obtain the new version. 🤘

Edit

: Just uploaded some updated N5X/6P BLOD Workaround AK3 zips to their respective threads as well. ;)
[Android Software/Hacking General [Developers Only]] Achsel:
Hello osmOsis,

I have successfully installed LineageOS 18.1 (Android 11), Magisk 23.0, Busybox Installer 1.33.1 and ADB & Fastboot Installer 1.0.41 (newest version) on a Samsung Galaxy S4 and Tab4 (both with 32Bit ARM architecture). Android 11 has implemented debugging via WLAN. The "adb pair" command is required for the first connection. But I get the "Unknown command pair" error. In the "UPDATE-adb.Installer.v1.0.41.-signed.zip" I could find a "adb.bin" for ARM (959 KB, which is installed) and another "adb.bin" (2,47 MB, probably not for 32Bit ARM). Is there also a version of the "adb.bin" for 32Bit ARM devices that contains the "pair" command?

Thanks in advance!

Axel
[Android Software/Hacking General [Developers Only]] osm0sis:
Both binaries sets are 32bit still I think, but the legacy ones are for older armeabi instruction devices where the newer don't work due to segfaults. There's so much tech debt to try to get it working on the older devices that Surge rightly decided it wasn't worth it. If your device is in that category then unfortunately there's not much to be done: old device is old. 😕
[Android Software/Hacking General [Developers Only]] Achsel:
Thanks a lot for the response. For test purposes I once dubbed the smaller adb.bin (armeabi) with the larger one. However, as expected, the "Unknown command pair" error remains. I hoped, I can use the LABD.apk for debugging via WLAN directly on the S4 or Tab4. So I have to use debugging via USB.
[Android Software/Hacking General [Developers Only]] osm0sis:
Last I heard they just use our binaries, though they didn't request permission or inform us.. 🙄 but maybe that's changed, good luck! 🙂
[Android Software/Hacking General [Developers Only]] Achsel:
The current version of LABD is 1.5.1 (2.99 $ at Google play store). But I have no payment account. So I was only able to find and test version 1.4.3 on the Internet. Maybe version 1.5.1 uses its own ADB binary. At GitHub you can legally download the source code and create an APK file from it. But I didn't have the required Android Studio and SDK tools installed on my old PC. Maybe you or another user can compile the attached source code from LADB 1.5.1 into an APK file. So I could test whether version 1.5.1 uses its own command "pair".

https://github.com/tytydraco/ladb

Thanks in advance!

Axel

Another specific question: The 8 years old Samsung S4 has no native ethernet support. On the old stock ROM with Android 4.4.2 I could activate a connected Ethernet adapter via this shell commands (example for Google server):

su

dhcpcd eth0

ndc resolver setifdns eth0 "" 8.8.8.8 8.8.4.4

On LineageOS 18.1 the shell command "dhcpcd" does not exist. Do you have any idea, to activate a connected Ethernet adapter via shell or busybox commands? I found the busybox command "dhcprelay", but I don’t know how to use.
[Android Software/Hacking General [Developers Only]] osm0sis:
LADB is still using our binaries without permission, see the file sizes of the binaries in the subdirectories here: https://github.com/tytydraco/LADB/tree/main/app/src/main/jniLibs 🤨🤦‍♂️

No idea about what specific commands for your other question, but my busybox does have udhcpc and udhcpd, which may work. 🤷‍♂️
[Android Software/Hacking General [Developers Only]] Achsel:
You're right, both binaries are exactly the same size. The larger binary is called "arm64-v8a" (Attempt to add Android 11 support). So the larger binary (incl. command "pair") only seems to work on ARM 64Bit devices with Android 11. The S4 is a 32Bit device. Therefore LADB 1.5.1 will not work on S4 either.

In order for the Ethernet adapter to work on the S4, I have to activate "eth0" and "DHCP", perhaps with the "busybox" commands "udhcpc" and "udhcpd". To do this, I first have to find out about the exact syntax of these commands on the Internet.

Thanks for your support

Axel
[Android Software/Hacking General [Developers Only]] Surge1223:
Yeah the 32 bit binaries are tricky. I hope you find a solution. S4 is what I used to test on, but 32 bit is long outdated.
[Android Software/Hacking General [Developers Only]] Achsel:
@Surge1223

Nice to hear from you. I heard you compiled the ADB binaries. OK, 32 bit is outdated. In order to conserve world resources, however, I think it's good to keep using old devices as long as possible. Android 11 is the last operating system to support 32 bit. LineageOS 18.1 runs better on the old S4 and Tab4 than the stock ROM with Android 4.4.2, because it doesn't contain any bloatware. However, under Android 4.4.2 you could connect to the old Samsung S4/Tab4 directly via WiFi using the Remote ADB Shell app via IP address and port 5555. Under LineageOS 18.1 (Android 11), however, the "pair" command is required for the first connection via WLAN. So I would be happy if you were ready to implement the "pair" command in the 32 bit ADB binary afterwards. I know this would be not easy. I would be available for any tests.

@osmOsis

I use the Qute app to run shell scripts. So far, however, I have not had any success with activating the Ethernet adapter connected to the S4 via Busybox commands ("udhcpc" and "udhcpd" etc.). With the Tab4 it is also automatically recognized under LineageOS 18.1.

Many greetings to both of you!

Axel
[Android Software/Hacking General [Developers Only]] Surge1223:
Incae

It's not a matter of ease, its more of a situation of whether or not to keep something on life support or not, I'm sure you could easily sell your devices for a 64 bit compatible one. It's not easy to make something as elaborate as adb work for this long on something so outdated, you have to understand that even though roms keep coming out for your device, the source for the binaries for stuff like adb and aapt aren't meant for on device use, and especially not for 32 bit.

I'm telling you this for your own best interest, you should adapt to something newer my friend. Almost no one is around that's going to port up 32 bit compatibility, it's not only an issue with technicality but also an issue with low use base, there are not that many folks in the same boat as you, and for good reason.

I wish you the best though.
[Android Software/Hacking General [Developers Only]] Achsel:
I understand your motivation that it no longer makes sense to support 32 bit systems. At the moment I can live with these limitations. In the long term I will definitely have to switch to a 64 bit device. Probably the stubbornness of holding onto old things has something to do with my age (almost 67 years old). I have great respect for your work as developer.

Thanks, Axel
[Android Software/Hacking General [Developers Only]] osm0sis:
Hey all! Hope everyone's well.

Had a bit of fun lately trying to get my Nexus 7 2013 flox working how I'd like, including updating the Recovery SLAM Script zip for /vendor support so I could make FlashAfterUpdate reinstall the Adreno Beta drivers after each OTA. Then I've also just created a N7'13 TWRP flo2flox Injector AK3 zip to patch the official flo TWRP builds to support Lineage's flox repartitioned setup, linked in the OP. 🤘

I experimented a little while back with a Model Mod Magisk module to simply add _SN to the model name to get SafetyNet CTS passing on devices again after Google's September server-side changes (until it was superceded by @kdrag0n's excellent Universal SafetyNet Fix), so now that's also linked in the OP for posterity.

Then I just spent the last couple days doing the bring-up for the newly released Busybox 1.34.1 stable for myself and Magisk, which includes a number of patches I had upstreamed, and nobody even managed to nag me about it at all beforehand! 😆

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!

00-Recovery.SLAM.Script.zip:

- add support for mounting /vendor, /product, and /system_ext rw, plus /persist ro

- add slot support (in case some crazy legacy device gets retrofitted A/B)

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

- update to latest busybox stable official source

UPDATE-nano.Terminal.Editor.v5.9-signed.zip:

- update to latest nano official source

Meanwhile, AnyKernel3 got some important backend updates in tandem with my testing for the Recovery SLAM Script.

Stay safe and happy hacking! :cowboy:
[Android Software/Hacking General [Developers Only]] osm0sis:
Bump to add nano 5.9 which was released today. 👍
[Android Software/Hacking General [Developers Only]] AnonVendetta:
@osm0sis: I have a question about your Busybox build. Are we allowed to integrate it into a custom ROM (not the zip itself, but as having Busybox preinstalled into system partition)? I always try to get permission before including things. If not, no big deal, I'll just use someone else's build. If your answer is yes, I'll give credit and a link to the 1st page of this thread.

And what about your other tools? I'm especially interested in including things like zip/zipalign and nano.

Thanks!
[Android Software/Hacking General [Developers Only]] osm0sis:
Hi! That would be great and credit and link are perfect. Thanks!
[Android Software/Hacking General [Developers Only]] AnonVendetta:
@osm0sis: I'm having trouble installing your Busybox from the Magisk modules repo, the install fails. I have a log too.

Info:

Device: Galaxy Tab S7+ (SM-T970)

OS: latest stock Android 11

Magisk 23 installed

TWRP installed

Contents of logfile:

- Copying zip to temp directory

- Copying zip to temp directory

- Installing Busybox_for_Android_NDK-1.34.1(13410).zip

- Installing Busybox_for_Android_NDK-1.34.1(13410).zip

- Device is system-as-root

Archive: /data/user/0/com.topjohnwu.magisk/cache/flash/install.zip

inflating: module.prop

*****************************

Busybox for Android NDK

by osm0sis @ xda-developers

*****************************

Archive: /data/user/0/com.topjohnwu.magisk/cache/flash/install.zip

inflating: customize.sh

*******************

Powered by Magisk

*******************

Archive: /data/user/0/com.topjohnwu.magisk/cache/flash/install.zip

inflating: diffusion_config.sh

inflating: module.prop

Mounting...

Extracting files...

Archive: /data/user/0/com.topjohnwu.magisk/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/bin

Cleaning...

Creating symlinks...

grep: bad regex '^[$': brackets ([ ]) not balanced

grep: bad regex '^[[$': brackets ([ ]) not balanced

Unmounting...

Done!

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

! Installation failed

What would be causing it to fail?

I also noticed that when installed via Magisk, it attempts to install into /system/bin, rather than xbin. I think xbin is a better location, because its' priority in the path order is lower. And bin contains critical system binaries that some Busybox installers might overwrite.

I've noticed that my firmware doesn't have an xbin directory in system. I guess Google/Samsung removed it. But if I create it manually and copy a standalone BB binary into it, I can call it from a terminal without using the exact path. And 'which busybox' command confirms its' location. It looks like they just removed the directory, but left xbin in the path order.