yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] azthemansays:
I'm hoping that I can find help with my inability to get back Busybox & ADB on my phone...

Been having issues with updating modules since I updated to magisk v19+ on my Mi A1 that's on android 8.1.0. As well, it's EXT4 not FUSE.

Decided to try to completely uninstall and reinstall Magisk (19.2). Cleared dalvik and caches of all my apps via Titanium Backup afterwards.

Due to the reinstall of Magisk, I had to go back and install all my previous modules. All were successful and started working properly again, except for Busybox & ADB which say that they were successfully installed but aren't there at all.

Things I've tried:

- downloading/installing through Magisk

- downloading it from XDA and manually installing through Magisk

- installing from TWRP

- searching through the magisk module directories via a root accessed file manager (neither of them had directories)

- temporarily renaming any folders with "adb" or "busybox" in magisk areas then trying to install (this just forced me to download and run a setup for Magisk that put everything back)

I'm at my wit's end, and although I pray that I don't have to, am thinking of doing a factory reset to see if that may fix anything.

Here's the log from attempting to install Busybox via Magisk:

- Copying zip to temp directory

- Installing Busybox_for_Android_NDK-1.30.1.zip

- Current boot slot: _b

- Device is system-as-root

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

inflating: install.sh

inflating: module.prop

Busybox Installer Script

by osm0sis @ xda-developers

Mounting...

mount: can't read '/etc/fstab': No such file or directory

mount: can't read '/etc/fstab': No such file or directory

mount: can't read '/etc/fstab': No such file or directory

Extracting files...

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

inflating: busybox-mips

inflating: busybox-mips64

inflating: busybox-x86

inflating: busybox-x86_64

inflating: install.sh

inflating: module.prop

Installing...

Using architecture: arm64

umount: can't unmount /dev/tmp/su: No such file or directory

Using path: /dev/tmp/su/bin

Cleaning...

Creating symlinks...

bionic/libc/upstream-netbsd/lib/libc/regex/regerror.c:175: regerror: assertion "errbuf != NULL" failed

Aborted

bionic/libc/upstream-netbsd/lib/libc/regex/regerror.c:175: regerror: assertion "errbuf != NULL" failed

Aborted

Unmounting...

umount: can't unmount /system: Device or resource busy

umount: can't unmount /data: Device or resource busy

umount: can't unmount /cache: Invalid argument

Done!
[Android Software/Hacking General [Developers Only]] osm0sis:
The log suggests you've still got a rogue su.img from a previous SuperSU installation muddying up detection. Go delete it manually, or flash my unSU zip, then all should work well. :good:
[Android Software/Hacking General [Developers Only]] azthemansays:
Thank you so much!

Had no idea where to find su.img but a lucky "su.img" search at root using Solid Explorer found it sitting in the data folder.

Just renamed it before rebooting to make sure it was the right one, and I'm in like sin.

May I ask what gave it away in the log file so if I see it in the future I'll be able to diagnose it myself?
[Android Software/Hacking General [Developers Only]] osm0sis:
My custom installer mounts the image it finds at the name of the image (minus .img), so it saying /dev/tmp/su in the log showed that it was su.img. :)
[Android Software/Hacking General [Developers Only]] _Lenny_:
Busybox module won't install, can't find su.img though

Hello, for some time now I'm looking for a solution to my problem but I can't find any, that's why I'm asking here now.

So, when I try to install the Busybox module, either through magisk download or manually download and flash through magisk or recovery the same thing happens: The installation doesn't give any errors (except in the log), but after installation either before reboot or after, busybox doesn's show in the module list nor is it installed...

I thought it may be the same problem like the person before me because it semmed similar, but I can't find a su.img anywhere on my phone (searched at root using mixplorer). :confused:

- OP3T, stock oos 8.0, magisk 19.1, though problem was already there on 19.0, can't remember if it maybe even was before that (Needed to go on 19.0 to use gpay).

Here's my log:

- Copying zip to temp directory

- Installing Busybox_for_Android_NDK-1.30.1.zip

Archive: /data/user/0/com.iNDDV3AMkuY.dTna/cache/install.zip

inflating: install.sh

inflating: module.prop

Busybox Installer Script

by osm0sis @ xda-developers

mount: can't read '/etc/fstab': No such file or directory

Mounting...

mount: can't read '/etc/fstab': No such file or directory

mount: can't read '/etc/fstab': No such file or directory

Extracting files...

Archive: /data/user/0/com.iNDDV3AMkuY.dTna/cache/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-arm64

inflating: busybox-mips

inflating: busybox-mips64

inflating: busybox-x86

inflating: busybox-x86_64

inflating: install.sh

inflating: module.prop

Installing...

Using architecture: arm64

umount: can't unmount /dev/tmp/su: No such file or directory

Using path: /dev/tmp/su/xbin

Cleaning...

Creating symlinks...

Unmounting...

umount: can't unmount /system: Device or resource busy

umount: can't unmount /data: Device or resource busy

umount: can't unmount /cache: Device or resource busy

Done!

Sorry if I've done something wrong or something's missing, I'm pretty new here.

Thanks. :)
[Android Software/Hacking General [Developers Only]] osm0sis:
Yeah you've definitely also got a su.img hiding somewhere.

It could be one of two locations to get picked up by the installer: https://github.com/Magisk-Modules-Repo/busybox-ndk/blob/master/install.sh#L58

So look for /data/su.img or /cache/su.img and remove it. If for some reason you still can't find those then just use my unSU zip to start fresh.
[Android Software/Hacking General [Developers Only]] _Lenny_:
Thanks so much! Deleting the su.img in /cache fixed the problem.

I didn't find it before, because for some reason mixplorer doesn't show everything in /data and /cache isn't there at all, so I deleted it using the file explorer in TWRP.

Thanks alot :):good:
[Android Software/Hacking General [Developers Only]] m0han:
excuse the ot.

try a reinstall and remember to use the latest stable/beta of mixplorer.

can't Solid Explorer delete it for you?
[Android Software/Hacking General [Developers Only]] azthemansays:
Delete mixplorer?

On stock rom and I'm afraid that I wouldn't be able to do updates if I removed a system app.
[Android Software/Hacking General [Developers Only]] evilvoice:
I think you're both talking about different file explorers. MiXplorer AFAIK doesn't come built-in to a stock rom, only custom. MIUI devices use MiFileExplorer, I believe is what it's called. HootenParsa says in his thread what it's called.
[Android Software/Hacking General [Developers Only]] azthemansays:
Mi A1 is Android One not MIUI.

Here's an SS of it from my Titanium Backup.

[IMG="here"]https://i.imgur.com/IBWm9XT.png[/IMG]
[Android Software/Hacking General [Developers Only]] ashyx:
IMO there's only one root file explorer worth having if you want stability.

It's been about for years and is a serious app used by many a developer and does what a root file manager is meant to do without all the silly bells and whistles. It's well worth it's small price and that's ROOT EXPLORER.

If all you care about is free then MK EXPLORER seems to be a good no fuss root file manager.
[Android Software/Hacking General [Developers Only]] evilvoice:
What's funny is I originally said Mi, but changed it to MIUI. Anyways, with it being in data and not system, you can either remove it or update it, your choice
[Android Software/Hacking General [Developers Only]] BillGoss:
OT: I've been using TB for years and until I saw your screenshot I didn't know that you could bring up that information in TB!

Thanks for teaching me something new.
[Android Software/Hacking General [Developers Only]] _Lenny_:
A reinstall of Mixplorer fixed it and it now shows everything, it's supposed to.

Thanks :)
[Android Software/Hacking General [Developers Only]] jcmm11:
[MENTION=4544860]osm0sis[/MENTION]

Weird. I'm getting errors and a bad install of busybox. I was experimenting with some things so wiped out the existing install and went to reinstall.

The only thing that ended up on the bin directory was

[

[[

busybox

See attached image. Also including install logs. One is just a regular install log. The other is a full trace

It's been a while since I installed/upgraded this. Only thing I can think of is the June patch for Pie (Pixel 3 XL).

Need anything else just ask. Fortunately I can work around this.

Edit: beginning to suspect that coreutils is stepping on something. I haven't gone through the trace in detail. I need to know the exact command(s) it's going bad on. Probably look at it tomorrow.

It looks like if I remove both coreutils and busybox, then reboot, busybox installs clean. (Normally I'd just delete the directories then reinstall without rebooting - which means the system still has access to the deleted files)
[Android Software/Hacking General [Developers Only]] amg314:
Why do not install BB in a usual way in Magisk Manager?

My BB is installed in /system/xbin instead of /system/bin at your device (see Picture).
[Android Software/Hacking General [Developers Only]] jcmm11:
My device doesn't have an xbin folder which is why it gets installed to bin.
[Android Software/Hacking General [Developers Only]] osm0sis:
I'm thinking you probably shouldn't have both coreutils and busybox installed simultaneously.. :confused:

And maybe coreutils shouldn't be replacing things, maybe if it's in bin it should do what mine does in bin and only add symlinks for new utilities. Pretty clearly sounds like it's breaking the shell environment.
[Android Software/Hacking General [Developers Only]] jcmm11:
My version of coreutils doesn't replace most existing symlinks. I have boot scripts that resolve any discrepancies between coreutils, busybox, and native bin. I do replace things like find, awk, sed - things that are precompiled binaries rather than symlinks. Hmm - one exception to that, I'll have to try something.
[Android Software/Hacking General [Developers Only]] jcmm11:
Ok, apparently you're doing something that makes GNU grep unhappy, or something. If I revert to the default grep module everything's fine (both versions are precompiled binaries). Attaching GNU grep in case you want to take a look.
[Android Software/Hacking General [Developers Only]] alecxs:
if you just replace it, then you probably do not replace the symlink, instead you replace the busybox binary where the symlink points. so you can not "replace", you must "unlink" first
[Android Software/Hacking General [Developers Only]] jcmm11:
1) yes you can replace. Or overlay to be exact. If you have a symlink defined in a Magisk Module that overlays an existing symlink the Magisk Module link will prevail.

2) the other point is that what I'm specifically talking about here with things like find, awk, grep, etc aren't symlinks. They're precompiled binaries. Standalone programs that don't depend on busybox or toybox.

3) if you use ln -f, or cp -sf, you can actually replace a symlink with another symlink. The default with cp is to not follow symlinks
[Android Software/Hacking General [Developers Only]] alecxs:
thx (i didn't notice that you are talking about bind mounts) but "default" probably depends on what you use. gnu's behaviour is different from other binaries (or better say other binaries does not fulfil standards). btw i have stock android 7.0 and there cp, sed, find are just symlinks to toybox, while awk is a binary. nevermind :)

edit: turns out that GNU cp is NOT different from busybox cp, default is follow symlinks

found this in busybox source code

/* coreutils 6.9 compat:
* by default, "cp" derefs symlinks (creates regular dest files),
* but "cp -R" does not. We switch off deref if -r or -R (see above).
* However, "cp -RL" must still deref symlinks: */

at least, you can test

mint@debian ~/test $ echo file1 > file1
mint@debian ~/test $ echo file3 > file3
mint@debian ~/test $ ln -s file1 file2
mint@debian ~/test $ ls -l
total 8
-rw-r--r-- 1 mint mint 6 Jun 5 20:56 file1
lrwxrwxrwx 1 mint mint 5 Jun 5 20:56 file2 -> file1
-rw-r--r-- 1 mint mint 6 Jun 5 20:56 file3
mint@debian ~/test $ cat file1
file1
mint@debian ~/test $ cp file3 file2
mint@debian ~/test $ cat file1
file3
mint@debian ~/test $

regarding the grep regex error, this bug was solved with android 7.0

https://android.googlesource.com/platform/bionic/+/master/libc/upstream-netbsd/android/include/netbsd-compat.h

+ // Passing a null pointer and a size of 0 is a legitimate way to ask
+ // how large a buffer we would need for the error message.

it's probably your old grep binary which you should recompile
[Android Software/Hacking General [Developers Only]] osm0sis:
It works in recovery with toybox grep and busybox grep. Magisk installs should always have Magisk's busybox at the front of path, so I'm honestly not sure how you having GNU grep installed in some way would have any effect.
[Android Software/Hacking General [Developers Only]] jcmm11:
My bad. It's not grep. (In any case you're forcing BusyBox grep). For whatever reason it's coreutils test command, which also doesn't really make sense because test is a shell builtin, so it shouldn't even be looking at the version in bin. But that's definitely it, and this time I'm sure.

I'd expect TWRP to always work since it doesn't have access to any Magisk Module overrides.

Thing I'll modify my scripts to get rid of any shell built-ins and reserved words.
[Android Software/Hacking General [Developers Only]] johnlgalt:
^^^^^^ This. Hands down.
[Android Software/Hacking General [Developers Only]] osm0sis:
That's disturbing that the coreutils test could be so far off of what we're used to on Android with mksh, toybox and busybox that it breaks things.. But yeah, good looking out!
[Android Software/Hacking General [Developers Only]] jcmm11:
It's also disturbing that the shell builtin was bypassed. Anyway the only built-ins/reserved words are test, [, and [[ so I just deleted them from both coreutils and busybox. If I ever really want them I can still explicitly call them.
[Android Software/Hacking General [Developers Only]] Zackptg5:
Interesting. So I have symlinks made for each coreutils applet if a binary with the same name doesn't already exist (so it'll overwrite symlinks - backup existing too). Since test is a builtin, coreutils symlink was made. What's the problem with the test applet?
[Android Software/Hacking General [Developers Only]] jcmm11:
Read the top of page 240. Removing the test applet prevents that from happening. I have no clue why the test applet is even involved.
[Android Software/Hacking General [Developers Only]] osm0sis:
It's probably the test applet as [ and it reads like some kind of buffer issue.
[Android Software/Hacking General [Developers Only]] moffa~:
Hi, thanks for all the hard work. Just curious how you actually build the adb and fastboot static binaries. I figured you could get aosp and run "lunch" but how did you make it static?
[Android Software/Hacking General [Developers Only]] osm0sis:
Dope Android hacker [MENTION=4939386]Surge1223[/MENTION] is the secret chef on that one. :):highfive:

He built the insecure adb for Substratum too, maybe you could look into their build scripts and figure it out. :good:
[Android Software/Hacking General [Developers Only]] alecxs:
anybody know where i can get static built simg2img binary for arm?
[Android Software/Hacking General [Developers Only]] zputnyq:
Hi [MENTION=4544860]osm0sis[/MENTION]

Does your latest busybox still support systemless SuperSU ?

I get an error: 1 when flash it.

SuperSU 2.82 SR5
[Android Software/Hacking General [Developers Only]] osm0sis:
Log? Works fine on my SuperSU device.
[Android Software/Hacking General [Developers Only]] zputnyq:
Here is the log
[Android Software/Hacking General [Developers Only]] jcmm11:
If you're going to install via TWRP into a non-Magisk install download the version from the OP. Downloading from Magisk replaces the update-binary and that's what triggered the error in your case.
[Android Software/Hacking General [Developers Only]] zputnyq:
Yes I downloaded it from magisk repo, since I used magisk before, I thought the flashable zip was the same.
[Android Software/Hacking General [Developers Only]] osm0sis:
The way I wrote it the intent was that it should still work regardless. I'll check it out.

Edit: Yeah, that happens before I can hook in with my install.sh: https://github.com/topjohnwu/Magisk/blob/master/scripts/module_installer.sh#L42, so you'll have to just use the OP downloads as was suggested.

You could `touch /data/adb/magisk/util_functions.sh` and it might work after some errors for missing Magisk functions but that would be a kinda crazy thing to do.
[Android Software/Hacking General [Developers Only]] zputnyq:
Ok thank you ??
[Android Software/Hacking General [Developers Only]] Qui Peccavit:
Please specify the individual file dates.

It would be really helpful if the date of the last update was specified for each file, instead of only globally for the entire bunch. If doing so right behind the download links is not possible, it could be done above, where the little tools are described. Even better, have the download link directly underneath the description of each program, which will make it far easier to know what's what.

This way, one would not always have to download the entire bunch just for the one file that is new and that may not even be the one that one hoped would be.
[Android Software/Hacking General [Developers Only]] marcdw:
Entire bunch of what to get at what file? Be specific. I'm not aware of any bundles of stuff here that one has to download to get at some particular tool. You sure you posted in the right thread?

LG G3 D851, AOSP-CAF 6.0.1, NanoDroid, MultiROM, XDA Legacy
[Android Software/Hacking General [Developers Only]] Qui Peccavit:
Reading Comprehension Skills ...

Well,

There is an entire bunch of download links at the bottom of the first post, but there is only one «latest update» information above them all, underneath the «created» date. This means that one cannot know which of the individual tools is/are the one(s) that was/were updated on that date. The question or suggestion was to specify the date of the last update for each of the individual files.

I have always been wondering why XDA's system does not specify the date after each download link automatically, simply based on when it was uploaded, as it is done that way on many, many other message boards, but your humble servant is merely a tiny light in the overwhelming darkness. Maybe one could include the date in the first section with the description of what each tool does, add the date to the file name itself or whatever.

This is what the sentence «It would be helpful if the date of the last update was specified for each file, instead of only globally for all of them» was referring to. My apologies if that sentence was somehow not precise enough. It was just a simple idea and not meant to cause any harm. :D
[Android Software/Hacking General [Developers Only]] Trundler:
Hi, sorry to bother everyone. I am trying to install the "Busybox for Android NDK" module through Magisk, but after downloading and installing, and even after a reboot, the module does not appear as installed. There are no errors in the installer script that I can see. I'm using a OnePlus 3 and I need Busybox to get systemize to work properly according to a guide I'm following.

Thanks in advance!
[Android Software/Hacking General [Developers Only]] osm0sis:
With no install log how do you expect any help?
[Android Software/Hacking General [Developers Only]] amg314:
Run terminal command

which busybox

You will see something like (in my case)

/system/xbin/busybox

If no answer, busybox is not installed.
[Android Software/Hacking General [Developers Only]] ogisha:
Hi [MENTION=4544860]osm0sis[/MENTION],

I am using your busybox, especially the Magisk version, which I consider excellent, but I have one problem on one my old tablet.

It is x86 tablet with Android 5.0, SuperSU rooted, without bootloader like TWRP, so I cannot install your busybox.

I used to use YDS's busybox which had .bin script I run from shell after gaining root access to install busybox. But YDS does not develop his busybox anymore and I am stuck with 1.29.1 version.

I would like to switch to yours busybox.

Could you please make .bin version of your busybox installer and busybox cleaner? It would help me a lot.

Thank you very much.
[Android Software/Hacking General [Developers Only]] jcmm11:
Try this. Get a copy of flashfire from the play store. Development stopped at the beginning of 2018 or so, but it should work for your purposes.

One catch - there's a time bomb built into the app so in order to get it to work you'll have to set the system date on your tablet to sometime before March 2018.

If you decide you want to keep the app just for the old device you can buy the pro version, which will disable the time bomb.
[Android Software/Hacking General [Developers Only]] osm0sis:
Busybox is also just a binary after all, so you could download the x86 build from my Magisk module GitHub repo to your device then use your SuperSU su root shell to

`cp -f /sdcard/Download/busybox-x86 /system/xbin/busybox`

then

`chmod 755 /system/xbin/busybox`

and

`busybox --install -s /system/xbin`

Boom, done.
[Android Software/Hacking General [Developers Only]] jcmm11:
I didn't know about the --install option! Is that relatively new, or did I just never notice it?

Also, looking at --help, it appears that both -s and dir are optional. If dir is missing I assume it'll install in the current directory. What's the -s do? Symlinks? (If that's what it is what's it do without the -s)?
[Android Software/Hacking General [Developers Only]] osm0sis:
Install has been there for ages, I just don't use it in my installer because we need to filter out applets depending on the location.

Probably hard links, much like ln vs. ln -s.
[Android Software/Hacking General [Developers Only]] jcmm11:
Yes it's hard links. And not including dir does not install in the current directory. It tries to install in bin/sbin according to the listing you get with --list-full (fortunately bin isn't writable and sbin refreshes on boot ? )