yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] Wolfcity:
Maybe it's because I'm using the F2FS loopback bug module? It moves magisk to /cache when booting because of the inability to mount img files r/w of some Moto devices.

At the moment I can't update busybox also I can't uninstall it through magisk manager.

And it doesn't seem to be installed.

Best way to uninstall? Unimod module uninstaller by [MENTION=7296895]veez21[/MENTION] doesn't work for me maybe for the same reason?
[Android Software/Hacking General [Developers Only]] osm0sis:
Yes probably that. Though if a reboot made it show correctly then it did install, just maybe isn't working on the path or something. To uninstall (most of) my zips have an uninstall feature. Rename the zip with "uninstall" in the name and flash from recovery. Might work in your case.

Or just use my SUmount zip and delete the folder manually.
[Android Software/Hacking General [Developers Only]] Wolfcity:
No, there wasn't anything in /xbin. After flashing the renamed zip with "uninstall" the result was "nothing to uninstall, system not changed". I mounted magisk and deleted the folder that contained the folder structure with /xbin in the system subfolder.

Now it doesn't show up in magisk manager anymore. The problem seems to be that magisk isn't found by busybox when the loopback module moves it to the cache partition.

Thx for your help.
[Android Software/Hacking General [Developers Only]] nogaff:
Tried to install busybox via Magisk Manager and it shows up as an installed module, but there's nothing in /system/xbin after rebooting and busybox can't be found in terminal emulator.

Device is a Pixel 2 running Oreo 8.1 with Magisk 16.4.

Install log attached.
[Android Software/Hacking General [Developers Only]] jcmm11:
Bad log. All it contains is

<html>
<head><title>403 Forbidden</title></head>
<body bgcolor="white">
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx</center>
</body>
</html>

What are the contents of /sbin/.core/img/busybox-ndk ?

It should contain auto_mount, module.prop and system/

system should contain xbin (or bin in some cases, I think), which should contain busybox + applet links.
[Android Software/Hacking General [Developers Only]] nogaff:
Yup, it contains all of those files and folders.

Here's the install log contents since the XDA forum app fails at uploading:

- Copying zip to temp directory
- Installing Busybox_for_Android_NDK-1.28.4.zip

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
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: module.prop
inflating: META-INF/MANIFEST.MF
inflating: META-INF/CERT.SF
inflating: META-INF/CERT.RSA

Installing...
Using architecture: arm64
umount: can't unmount /dev/tmp/magisk_merge: No such file or directory
mount: can't setup loop device: No such device or address
mknod: /dev/block/loop0: File exists
losetup: /data/adb/magisk_merge.img
mknod: /dev/block/loop1: File exists
Using path: /dev/tmp/magisk_merge/busybox-ndk/system/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: Invalid argument

Done!
- All done!
[Android Software/Hacking General [Developers Only]] osm0sis:
Try with the latest Magisk beta perhaps.
[Android Software/Hacking General [Developers Only]] nogaff:
Already tried 16.6 and it just caused apps to crash constantly, including Google Play Services, so I had to uninstall it and reflash 16.4. Lots of reports of similar instability on the beta thread at the moment...
[Android Software/Hacking General [Developers Only]] Khryschellia:
can i use your busybox without magisk installed?
[Android Software/Hacking General [Developers Only]] guest4711:
Yes, you can. See OP:
[Android Software/Hacking General [Developers Only]] pkgnex:
"osm0sis bro, busybox 1.29.1 came out DAYS ago! DAYS! I look forward to/demand your next update!" ! :silly:;):p
[Android Software/Hacking General [Developers Only]] osm0sis:
I'm aware. ;)

I'm away this week and I've got a couple minor things on the to-do list to get to first before I do the bring-up to 1.29.1, but I think we can all get by on the ancient 1.28.4 until then. :p
[Android Software/Hacking General [Developers Only]] pkgnex:
I figured you knew - and I'm sure it's probably the least important thing on your to-do list by a wide margin.

Sometimes I just can't help being a smart-a$$!
[Android Software/Hacking General [Developers Only]] rignfool:
I have a question about the Fla**** script...

I notice you mention that it uses openrecovery scripting...

I was wondering if it either fell back to... Or could be made to use dd to write partitions...

Being on an Essential... We don't have persistent TWRP... So swapping kernels is a pain... If I follow the logic between Fla**** and AIK... It appears that 90% of the work to swap kernels is done... If not all... I just can't find the info...

And before the torches and pitchforks... I know that using dd is a no no... But with all the checks in the scripts... It ALMOST seems safe?
[Android Software/Hacking General [Developers Only]] osm0sis:
It's never used openrecovery scripts, it works using dd. :)
[Android Software/Hacking General [Developers Only]] nextheart:
Can you please provide a flashable zip which can make Selinux permissive?
[Android Software/Hacking General [Developers Only]] jcmm11:
This is easy to do without a flashable zip. Simply create a file, call it "permissive.sh". In that file enter the following

#!/system/bin/sh
setenforce 0

If you're rooted using Magisk place the file in /sbin/.core/img/.core/service.d and give it 700 permissions ( rwx --- --- ). That's it, when you reboot you'll be running in permissive mode.

If you're using supersu then place it in the su.d directory (either /su/su.d or /sbin/supersu/su.d depending on what mode supersu is in)
[Android Software/Hacking General [Developers Only]] slimcyril:
Flashed the busybox on S7 Oreo with system Supersu but the path is /system/bin/busybox instead of /system/xbin/busybox, why is that?
[Android Software/Hacking General [Developers Only]] osm0sis:
Install log?
[Android Software/Hacking General [Developers Only]] slimcyril:
Where can I find the install log?

Cache folder?
[Android Software/Hacking General [Developers Only]] jcmm11:
As long as you haven't run TWRP since then then yes /cache/recovery/.

Does your system normally have an xbin directory?
[Android Software/Hacking General [Developers Only]] slimcyril:
Yes it does have that, I had to use stericsson busybox to install on xbin directory but the busybox on this thread it's only one that enables Cron to run on all rooted devices.
[Android Software/Hacking General [Developers Only]] osm0sis:
There's really no way it can install to /system/bin if /system/xbin exists, especially not with a system install. Here's the logic in play:

mount -o ro /system;

test -f /system/system/build.prop && root=/system;

mount -o rw,remount /system;
mount /system;
if -d [ "$root/system/xbin" ]; then
target=$root/system/xbin;
else
target=$root/system/bin;
fi;

Please upload an installation log from your recovery.
[Android Software/Hacking General [Developers Only]] slimcyril:
I will flash again and get logs
[Android Software/Hacking General [Developers Only]] slimcyril:
Here's the log

During installation with flashfire it says path /system/bin

Edit: it just enabled the crontab.log on /data/ :)
[Android Software/Hacking General [Developers Only]] jcmm11:
Oops, line 151

if -d [ "$root/system/xbin" ]; then

Should be

if [ -d "$root/system/xbin" ]; then
[Android Software/Hacking General [Developers Only]] osm0sis:
Wait, what? Haha holy ****
[Android Software/Hacking General [Developers Only]] slimcyril:
Checked busybox with root checker and figured it installed in /system/bin and /system/xbin.
[Android Software/Hacking General [Developers Only]] osm0sis:
Yeah I'll have the install logic fixed for the next release. Thanks to jcmm11 and you for bringing that typo to my attention! :silly::cyclops:
[Android Software/Hacking General [Developers Only]] marcdw:
LOL. ?

Been flashing a lot of ROMs along with BusyBox. Noticed the /system/bin thing a long time ago but just assumed it had become the new destination. Never thought to ask about it

Moto G5S Plus XT1806, Lluvia OS v1.4, TridentExperience, MultiROM, Tapatalk 4.9.5
[Android Software/Hacking General [Developers Only]] rignfool:
So... I finally had a reason to try out Fla****™ and I have realized that it doesn't like the fact that I don't have a recovery partition to flash TWRP to?

Now... I can rename boot images... But I have a feeling my stupidity level will kick in at some point and I'm sure I'll mess something up...

Should I just make my own dd script to deal with it... Or is this something you want to support?
[Android Software/Hacking General [Developers Only]] osm0sis:
Can you explain what you mean "don't have a recovery partition"? What do you have? Are you talking A/B devices? Or just some weird non-standard device where things are only mmcblk1p4 or p4 or sda4 etc?

With --exact you can already override the default partition-guessing feature and write to specific ones instead.
[Android Software/Hacking General [Developers Only]] rignfool:
An Essential PH-1... So standard A/B... With recovery in ramdisk...

However... It's stuffed into a Nougat boot.img... so it's only good for recovery...
[Android Software/Hacking General [Developers Only]] osm0sis:
Fla**** supports A/B with --slot, but of course for TWRP to be installed that requires a flashable zip, which generally requires recovery unless you want to do it manually (since I think all TWRP's zips do is replace the ramdisk whole).

That second part of your answer is confusing again. I thought PH-1 was Oreo for awhile now. Are you saying someone has hacked a dedicated recovery partition for the PH-1 out of another partition? You're still very short on details for a bug report or a feature request..

I'd like to help you and make Fla**** support whatever it can but you need to help me help you. :)
[Android Software/Hacking General [Developers Only]] rignfool:
The only version of TWRP that we have is hacked into a nougat kernel... It won't boot the OS... But it will boot into recovery...

So the common move for us is to flash TWRP before doing any modification...

Fla**** wants to flash TWRP to a recovery partition that doesn't exist... Since TWRP is in the boot.img... and I for the life of me... Without renaming it... Cannot figure out how to get TWRP to my boot partition...
[Android Software/Hacking General [Developers Only]] osm0sis:
fla****.sh --exact boot twrp.img

Or something very close to that. Type fla****.sh --help if you're not sure. I mentioned --exact a couple replies ago. :)

Edit: Oh wait, you're right. --exact still uses whatever the file is named.. I'll tackle it 2 ways; I'll see about adding an argument to --exact to specify a different target, and have twrp-* named images fall back to boot partition when no recovery exists.
[Android Software/Hacking General [Developers Only]] mrrocketdog:
[MENTION=4544860]osm0sis[/MENTION]

confirm. # 4789534541138316

mrrocketdog

err on the side of kindness
[Android Software/Hacking General [Developers Only]] osm0sis:
Thank you so very much for the generous donation! They are few and far between but always greatly appreciated, and help keep me motivated to work on things in my spare time as I do. :)
[Android Software/Hacking General [Developers Only]] starcms:
So what does --exact currently do if it doesn't force fla**** to use the name of the partition provided? Thanks!
[Android Software/Hacking General [Developers Only]] osm0sis:
It forces the exact partition name for dumping, but for flashing it forces the exact name of the supplied .img to match against a target partition of the same name.
[Android Software/Hacking General [Developers Only]] DEVILOPS 007:
Hey [MENTION=4544860]osm0sis[/MENTION] I hope you don't mind me asking you this as I'm a complete noob at doing this but I figured you'd be the best person to help me with this. I'm basically trying to make a flashable zip in twrp that deletes the line: import /system/vendor/etc/init/hw/init.kerneltune.rc which is line 35 of the file init.qcom.rc located at the directory vendor/etc/init/hw. I'd really appreciate a bit of help as I'm not sure what is required to do this. Thank you. Vendor needs to not be mounted btw.:good: I'm on a OnePlus 5T running TreskMod (custom aosp ROM)
[Android Software/Hacking General [Developers Only]] osm0sis:
So something like this function is pretty much all you need: https://github.com/osm0sis/AnyKernel2/blob/master/tools/ak2-core.sh#L425-L431

Check out this for the rest: https://xdaforums.com/android/software-hacking/dev-complete-shell-script-flashable-zip-t2934449
[Android Software/Hacking General [Developers Only]] DEVILOPS 007:
Appreciate the help mate. Got it working just fine?
[Android Software/Hacking General [Developers Only]] dkadds2:
Solved!!!

Problem originated from the fact that Magisk was installed as boot.img - version 16.7, though MagiskManager (as wipe was forced by Samsung) was still on 16.0 (Stable) and not as it should be Beta stream = 16.7.

Hope it helps others.

####

Hi Guys,

Did any of you have problem that after downloading and what seems installing correctly BusyBox, it shows:

(No info provided)

(No info provided)

(No info provided)

Under Downloads it shows that BusyBox update is available. Tried it to no effect.

08-09 00:03:46.771 4199 4199 I Magisk : ** Initializing Magisk
08-09 00:03:46.933 4199 4199 I Magisk : * Creating /sbin overlay
08-09 00:03:46.937 4199 4199 I Magisk : * Mounting mirrors
08-09 00:03:46.938 4199 4199 I Magisk : mount: /sbin/.core/mirror/system
08-09 00:03:46.938 4199 4199 I Magisk : mount: /sbin/.core/mirror/vendor
08-09 00:03:46.938 4199 4199 I Magisk : bind_mount: /sbin/.core/mirror/bin
08-09 00:03:47.051 4207 4207 I Magisk : Magisk v16.7(1671) logger started
08-09 00:03:47.051 4203 4203 I Magisk : Magisk v16.7(1671) daemon started
08-09 00:03:47.061 4203 4210 I Magisk : ** post-fs-data mode running
08-09 00:03:47.187 4203 4210 I Magisk : Upgrade/New module: busybox-ndk
08-09 00:03:47.187 4203 4210 I Magisk : Create /data/adb/tmp.img with size 64M
08-09 00:03:47.297 4203 4210 I Magisk : * Merging /data/adb/magisk_merge.img + /data/adb/magisk.img -> /data/adb/tmp.img
08-09 00:03:47.580 4203 4210 I Magisk : * Move /data/adb/tmp.img -> /data/adb/magisk.img
08-09 00:03:47.580 4203 4210 I Magisk : * Mounting /data/adb/magisk.img
08-09 00:03:47.673 4203 4210 I Magisk : * Running post-fs-data.d scripts
08-09 00:03:47.673 4203 4210 I Magisk : * Running module post-fs-data scripts
08-09 00:03:47.673 4203 4210 I Magisk : * Loading modules
08-09 00:03:47.673 4203 4210 I Magisk : busybox-ndk: constructing magic mount structure
08-09 00:03:47.676 4203 4254 I Magisk : * Starting MagiskHide
08-09 00:03:47.676 4203 4254 I Magisk : hide_utils: Hiding sensitive props
08-09 00:03:47.676 4203 4254 I Magisk : hide_list: [com.google.android.gms.unstable]
08-09 00:03:48.708 4203 4505 I Magisk : ** late_start service mode running
08-09 00:03:48.708 4203 4505 I Magisk : * Running service.d scripts
08-09 00:03:48.708 4203 4505 I Magisk : * Running module service scripts
08-09 00:04:03.338 4203 4254 I Magisk : proc_monitor: com.google.android.gms.unstable
08-09 00:04:19.218 4203 4254 I Magisk : proc_monitor: com.google.android.gms.unstable
08-09 00:04:53.953 4203 4254 I Magisk : proc_monitor: com.google.android.gms.unstable
08-09 00:10:22.107 4203 4254 I Magisk : proc_monitor: com.google.android.gms.unstable

copy from: https://xdaforums.com/showpost.php?p=77282507&postcount=26277
[Android Software/Hacking General [Developers Only]] notstevek:
First off, Oreo is supported with this script?

I can't get the FlashAfterUpdate folder to set proper permissions. I got the script okay, can I run the script so it can create the folder without having to wait for a LineageOS update to trigger said script? I also tried setting permissions via a root file manager (root explorer) but it threw an error. Not sure why this is happening, any help would be appreciated.

Nexus 6P

LineageOS 15.1 (2018-08-13)

8.1.0 OPM6.171019.030H1

ElementalX 6.08
[Android Software/Hacking General [Developers Only]] osm0sis:
You made /sdcard/FlashAfterUpdate in a root prompt, so you won't get access to it without root unless you fix permissions, ownership and context. Just delete the folder with root, then create the folder in a normal file explorer app without root. I recommend FX Explorer.
[Android Software/Hacking General [Developers Only]] notstevek:
I did that because root explorer wouldn't set permissions to folder, and I also have FX but don't see any options to set permissions. Only shows me info, details and checksum option.

Here's a video, unless I'm being oblivious to the option, but I didn't see anything in FX, and root explorer is also throwing an issue when created in a file explorer. Just can't seem to get 0777 permissions. Sorry for being an idiot.

https://u.teknik.io/AP21D.mp4

Edit: I see script calls for 775 not 777 but I can't set 775 either. 770 won't suffice? Guess I'll just have the script create the folder on next update, since I see the script will make it and set proper permissions .
[Android Software/Hacking General [Developers Only]] osm0sis:
Yeah, don't set permissions. Just delete it from shell with `rm -rf /sdcard/FlashAfterUpdate` so you're starting clean, then go to /sdcard in FX Explorer and create the directory. Done. :eek:
[Android Software/Hacking General [Developers Only]] notstevek:
I've ran Debian as my main is for 10 years, no issues with commands, and I know bash, python, nodejs, php. Reason I was trying to set permissions is because I googled "flash zip after LineageOS update" Reddit post came up, linked to this, and quoted somewhere about setting 777 to the folder. Then I looked through the script and saw it was also setting permissions to 0775, so I figured it must be done. But thanks for the help, that I don't actually have to do that. You're the best.
[Android Software/Hacking General [Developers Only]] osm0sis:
Only needs to be done when set up in recovery, since then you're dealing with the legit directory. If you want to further see what I'm talking about you can check it while booted as well if you go look at /data/media/0/ in a root file explorer app, but when booted /sdcard is fuse or sdcardfs, so permissions and ownership are all handled by Android.
[Android Software/Hacking General [Developers Only]] notstevek:
Ahh, I didn't think about that, I forgot how it changes after boot versus pre android userspace (recovery/bootloader). I get it now, why the script does it vs making it in userspace. I was making it more complicated than it should have been, lol. Thanks again.
[Android Software/Hacking General [Developers Only]] osm0sis:
Oreo 8.1 and above should technically automatically fix permissions/ownership/context on /sdcard files to make them always accessible when booted, but I'm discovering on my OnePlus devices that this isn't apparently always the case, so I'll have to add chcon u:object_r:media_rw_data_file:s0 as well in a future update.
[Android Software/Hacking General [Developers Only]] notstevek:
OnePlus runs oos, correct? Maybe altered code for boot with encrypted user data partition? I don't know much about how aosp works internally, let alone aosp based roms, just talking out my ass here now. :confused: This is out of my league. Good luck. :good:
[Android Software/Hacking General [Developers Only]] osm0sis:
If you're using Magisk then you've already had my updated busybox 1.29.1 and 1.29.2 for awhile, since those simple module updates are a little easier for me to do on-the-go, but I'm only now finding the time for all the other updates and uploads to the appropriate threads, so, on to the updates!

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 do hit the donate link from my profile. Thanks for your support!

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

- add UNINSTALL, System and SYSTEM to accepted keywords for recovery flashable zip extended features

- update to latest busybox stable official source

- fix system installation to /system/xbin

- improve /system/bin applet filtering, system-as-root, and Magisk Manager installs

- update configs to fix Android Pie seccomp "Bad system call" issue (thanks [MENTION=4470081]topjohnwu[/MENTION]), and x86 "clock_gettime(MONOTONIC)" issue

See the related commits here: https://github.com/osm0sis/android-busybox-ndk

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

- add System and SYSTEM to accepted keywords for recovery flashable zip extended features

- improve system-as-root, and Magisk Manager installs

UPDATE-adb.Installer.v1.0.39-signed.zip;

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

UPDATE-nano.Terminal.Editor.v2.9.8-signed.zip:

- improve system-as-root, and Magisk Manager installs

I have made some significant updates to AnyKernel2 to better cooperate with A/B devices (thanks to my OnePlus 6 :highfive::D) and multi-partition mod layouts, and have used these to improve my N5X/6P BLOD Workaround AK2 zips, now with their own support threads, linked in the OP. Android Image Kitchen had another big stable release since my last post, and my GN Recovery Color Correction + GN Synapse AK2 Injector Addons also saw updates, accordingly. Enjoy!
[Android Software/Hacking General [Developers Only]] Zebov:
After I uninstalled nexus media, every option is the same sound now. How do I revert? Pixel 9
[Android Software/Hacking General [Developers Only]] osm0sis:
You go into Settings | Sounds and pick new ones. That's what happens when the set sound goes missing. Also, wtf "Pixel 9"?
[Android Software/Hacking General [Developers Only]] Zebov:
What in trying to convey is that in the settings-sound menu, all the options are three, but they all are the same sound file.

And I'm using a pixel on android 9 (pie). A phone and OS are almost always needed to replicate a bug (if you're interested in fixing it).
[Android Software/Hacking General [Developers Only]] osm0sis:
First, weird shorthand you've developed. :p

Second, why are you using a module meant for Nexus devices on a Pixel?

Lastly, as I said, any missing file becomes a default built-in AOSP ROM sound that doesn't otherwise exist. Choose one of the non-Nexus ones, make sure the Magisk module is uninstalled and reboot. If that doesn't work then Pixel and/or Pie must cache the system sounds URIs and I'm not sure what you'd have to do to fix it, maybe reflash your system image just in case, maybe rescan media in FX File Explorer.
[Android Software/Hacking General [Developers Only]] Zebov:
Sorry for the confusion.

Second, the pixel has such a poor selection of notifications (like 6?) that I thought that this module added the nexus sounds, not a module for a nexus. That's my bad.

Finally, I'm not sure why they haven't reverted as I thought magisk worked without actually permanently modifying anything. I would HATE to have to restore my entire phone because of this, but if you aren't sure, I'll do some more digging.
[Android Software/Hacking General [Developers Only]] osm0sis:
Yeah it should be systemless, it should be universal and it's always been reversible on any device I've used it on. It doesn't add Nexus sounds, though, using Magisk it replaces them (again, systemlessly). OnePlus is a whole different ball game to Pixel but I'll try installing and uninstalling on my OP6 to see if I can replicate.
[Android Software/Hacking General [Developers Only]] Zebov:
Well apparently you need to do multiple restarts. After the 3rd time rebooting, it came back.