yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] osm0sis:
Fresh out the oven!

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-nano.Terminal.Editor.v2.8.1-signed.zip:

- fix stderr output from wrappers when run with no arguments

- add clear to wrappers to work around initial view being scrolled in some scenarios

- bring-up to 2.8.x; removed a couple of my hacks since they're now supported by nano's switch to gnulib

- update to latest nano official source

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

- fix su.img installation logic being used on Magisk that would cause an install to bin (now installs to /magisk/busybox-ndk/system/xbin)

- fix build.prop fallback for architecture detection on /system/system (Pixel) layouts

- work around Android static binary issues so DNS resolver now functions in all applets!

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

99-flashafterupdate.sh (my ad-hoc "Flash After Update" addon.d script) is also updated and should now work with all types of flashable zip. Thanks [MENTION=1162986]Captain_Throwback[/MENTION] and [MENTION=4878287]_that[/MENTION] for the assists. :)

Edit: [MENTION=5787964]SuperR.[/MENTION] also since this should definitely replace the one in the kitchen. :good:
[Android Software/Hacking General [Developers Only]] djb77:
Your work is always appreciated buddy :)
[Android Software/Hacking General [Developers Only]] marcdw:
Great work [MENTION=4544860]osm0sis[/MENTION], as always.

Flashed BusyBox against crDroid and Candy7 with Magisk, all good. ROMs booted up fine. Nice.

Gotta side story. Earlier, after failing with the flashed busybox on crDroid 2.5 I wanted a full busybox with applets. Far as I knew, magisk's busybox didn't have all the applets so I went with one of the installers. In this case, BusyBox X Pro. Purchased a loong time ago but not used (or any other installer) since finding your flashable.

So anyway, after setting up ROM Adaway couldn't get root. Not important so moved on. Then Titanium Backup couldn't get root. Didn't investigate much, just assumed that magisk was the reason.

Couple of days ago, on Candy7 with magisk, TiBu couldn't get root either. Says it was using /system/xbin/su. Decided to investigate this time.

BusyBox X was also used to install BB. Discovered that /system/xbin/su was linked to that busybox. I thought to myself you gotta be kidding me. That doesn't seem like a wise thing to do. In the past I've used Stericson's installer and Busybox on Rails and I'm sure they didn't do that.

Anyhind, thanks for all the goodies you've given us here. ?✌

LG G3 D851, Candy7 v3.1 ROM, MultiROM, Tapatalk 4.9.5
[Android Software/Hacking General [Developers Only]] Maxr1998:
I really appreciate your work on this stuff! I noticed the bad address bug already quite some time ago, but I didn't really bother because I thought it was just an issue with my device or firewall, else I'd have reported it long before you noticed, sorry :( :silly:

Anyway, I'm so glad it's fixed now, keep up the great work! :good:
[Android Software/Hacking General [Developers Only]] folusmile:
Thanks for all your amazing Work. More wisdom.
[Android Software/Hacking General [Developers Only]] marcdw:
Couple of things. It was time to update Candy7 ROM (with magisk). Flashed ROM, busybox, gapps. As before the ROM wouldn't boot. Stuck at the LG logo for some 30 minutes.

Reflashed just ROM and gapps. ROM started up fine. Kernel is Enforcing by default. Changed it to Permissive for an app I use that needs it.

Flashed busybox and the ROM still booted up fine.

Wondering, did it work because of the switch to Permissive or just that the ROM needed to be run at least once.

Not sure I want to do more flashing to confirm one or the other today but as I test new ROMs/builds w/magisk I can see I guess.

Either way, busybox is flashed and good to go right now.

LG G3 D851, Candy7 v3.3 ROM, MultiROM, Tapatalk 4.9.5
[Android Software/Hacking General [Developers Only]] rignfool:
I have noticed that a lot of ROMs/kernels don't play well with Magisk on first boot...

My new method is to flash ROM/gapps and boot... Then flash magisk and boot... Then use flashfire to add custom kernel...

I haven't had any issue booting since... And magisk doesn't care if you use flashfire
[Android Software/Hacking General [Developers Only]] veez21:
[MENTION=4544860]osm0sis[/MENTION] , got any aapt binaries for android? I want to use it in something. Thanks in advance ??
[Android Software/Hacking General [Developers Only]] osm0sis:
Haha yup! ;)

https://github.com/osm0sis/aapt

https://github.com/osm0sis/APK-Patcher/tree/master/tools
[Android Software/Hacking General [Developers Only]] veez21:
Thanks man :)
[Android Software/Hacking General [Developers Only]] pattyboi:):
Can anyone mirror / repost the lollipop + updated dev scripts? Pkgnex's links to Dropbox have gone dead.
[Android Software/Hacking General [Developers Only]] ashyx:
How is that going to work?

Flashing a custom kernel AFTER flashing Magisk would mean Magisk would stop working as it's no longer integrated into the ramdisk.

Or are you somehow able to flash just the kernel without the ramdisk? :confused:
[Android Software/Hacking General [Developers Only]] osm0sis:
Most use AnyKernel2 nowadays. :D
[Android Software/Hacking General [Developers Only]] xSilas43:
No because the ramdisk is an essential part of the kernel. Just flash your kernel and then magisk.
[Android Software/Hacking General [Developers Only]] ashyx:
Erm, we'll no. The kernel is separate to the ramdisk. It's packaged with the ramdisk into a bootable image.

Anyway that wasn't the question, I asked how is Magisk going to work if the kernel (aka boot image) is replaced.

---------- Post added at 12:48 AM ---------- Previous post was at 12:35 AM ----------

Great work, but that's not what he was referring to unless I'm misreading it?
[Android Software/Hacking General [Developers Only]] jcmm11:
If a kernel is using Anykernel2 then it will incorporate any ramdisk changes that exist into it's own ramdisk.

Using SuperSU as an example, because that's what I'm more familiar with.

Install ROM. Install SuperSU. SuperSU makes backup of kernel then modifies ramdisk. Install custom kernel. Incorporates changes, works fine.

Flash update to SuperSU. SuperSU finds it's backup of original kernel and reinstalls that, again with a modified ramdisk. Reflash custom kernel and back in business.
[Android Software/Hacking General [Developers Only]] ashyx:
I give up . I wish I'd never mentioned it. :eek:
[Android Software/Hacking General [Developers Only]] osm0sis:
Magisk will stay working if it's followed by an AnyKernel2 zip since Magisk's ramdisk changes will remain intact. Of course if you flash a whole boot.img it resets things, that's a given nowadays with any systemless root.
[Android Software/Hacking General [Developers Only]] xSilas43:
If I flash magisk before a custom kernel for the nexus 6p it never functions unless I flash magisk afterwords so anykernel must be missing something. I think this is what [MENTION=4899305]ashyx[/MENTION] is referring to, yes it does work that way with supersu, but not with magisk for whatevsr reason.
[Android Software/Hacking General [Developers Only]] osm0sis:
Point me to an example of an AK2 zip where this is an issue and I'll try and figure it out.. it should work if it works for SuperSU.
[Android Software/Hacking General [Developers Only]] xSilas43:
It happens for me with The Flash kernel from http://nchancellor.net/Downloads/Kernels/

as well with Faster Angler kernel by chad https://temp.bbqdroid.org
[Android Software/Hacking General [Developers Only]] osm0sis:
Thanks. I'll see if it's something on my end or Magisk's.
[Android Software/Hacking General [Developers Only]] nathanchance:
[MENTION=4544860]osm0sis[/MENTION] just in case you need a better picture, my source: https://github.com/Flash-Kernel/AnyKernel2/tree/angler-flash-public-7.1.2
[Android Software/Hacking General [Developers Only]] osm0sis:
Looks fine to me.. I was thinking maybe ones that wouldn't work might include mkbootfs and there was something I might need to add to the file owner/perms lists, but I guess that's not the case so I can't see what could be the problem in my end.. [MENTION=4470081]topjohnwu[/MENTION], any ideas?

Edit: [MENTION=5323968]xSilas43[/MENTION], Faster Angler does a big AK2 no-no by replacing init.angler.rc whole, so that could possibly interfere with changes made by other zips but I'm fairly certain Magisk and SuperSU both only modify init.rc, so again, kinda stumped. :confused:
[Android Software/Hacking General [Developers Only]] osm0sis:
I rooted my Galaxy Nexus (running the final CM13 build) with Magisk v12, enabled MagiskHide, installed a module or 5 and flashed an AnyKernel2 zip (my Synapse support ramdisk injector) and it boots and remains rooted with SafetyNet passing perfectly fine. Not sure what else to tell you, other than I think it may lie on the kernel dev's side of things.

[MENTION=6842057]The Flash[/MENTION] can you confirm that there actually is an issue and/or provide any further insight?
[Android Software/Hacking General [Developers Only]] nathanchance:
I haven't had time to sit down and flash with a clean boot image (as I inline all of my ramdisk files into my ROM and I include Magisk as well). However, before I did that, I always flashed Magisk then my kernel and I never had any issues. There are times where the device will hang at the Google logo for no apparent reason and just rebooting into the bootloader then starting into system works so it could have been that? Otherwise, I can't think of a reason why that'd happen unless one of my files is screwed up.
[Android Software/Hacking General [Developers Only]] osm0sis:
A couple of things!

This is basically v1.0 of my FlashAfterUpdate addon.d script. It's pretty feature complete now with all the bells and whistles I could think to throw in!

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!

99-flashafterupdate.sh:

- properly create sdzipdir (defaulting to /sdcard/FlashAfterUpdate) when not found, setting correct ownership and permissions

- find the parent output fd of the ROM zip executing addon.d to display status output (by default) during flashes

- add switches for full output and to silence output entirely (old behavior) by checking, respectively, for files named verbose and silent within the sdzipdir

- test to ensure there are files to be flashed and show a message if not

- show success or failure of each flashed zip and any accompanying exit code on a fail

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

- update to latest nano official source

Cheers!

Edit

: Later updates have added more potential FlashAfterUpdate zip locations to try and accommodate encryption issues, so the default list is now: /sdcard/FlashAfterUpdate, /cache/flashafterupdate, /persist/flashafterupdate, and/or /data/flashafterupdate :good:
[Android Software/Hacking General [Developers Only]] osm0sis:
[MENTION=5323968]xSilas43[/MENTION], you'd just need to update the controls for the 6P's hardware.

You might want to check out the new UKM Reborn first though! A lot of my Synapse work was incorporated into the original UKM and they've continued to try and generalize it even more: https://xdaforums.com/android/software/zip-ukm-reborn-unified-t3558888

Though I am obviously a bit partial to my own layout. ;)
[Android Software/Hacking General [Developers Only]] Nikhil:
Hi [MENTION=4544860]osm0sis[/MENTION],

Do you think this should work for Aroma Flashable Zips?

It has update-binary, update-binary-installer, updater-script present in it and if we execute update-binary like you have mentioned. It should work. shouldn't it? (With correct FD ofcourse)
[Android Software/Hacking General [Developers Only]] osm0sis:
Worth a try! Make sure you've got verbose enabled (to pass the FD). Let me know how it goes! :)
[Android Software/Hacking General [Developers Only]] Nikhil:
Sure, I'll let you know soon :)
[Android Software/Hacking General [Developers Only]] Yozak:
Does the verbose file go in /sdcard/FlashAfterUpdate ?
[Android Software/Hacking General [Developers Only]] osm0sis:
Yessah
[Android Software/Hacking General [Developers Only]] jcmm11:
[MENTION=4544860]osm0sis[/MENTION]

Could you include the sh applet in busybox? Busybox uses Ash, Android uses mksh. Update zips via TWRP use busybox sh, so having it available for testing would be nice. (just got bit by a difference).
[Android Software/Hacking General [Developers Only]] osm0sis:
sh in busybox is just a redirect to ash or hush, both of which I include. Same goes for bash. So it shouldn't matter, just take your pick directly. TWRP's busybox uses ash.

https://github.com/osm0sis/android-busybox-ndk/blob/master/osm0sis-full.config

Search for "sh_is" and you'll see what I mean.
[Android Software/Hacking General [Developers Only]] jcmm11:
Didn't even look for ash, just looked for sh. Thanks.

Hmm - you mention hush and bash. I'm not showing either of those (just ash).

bullhead:/ # busybox --list|grep sh
ash
fbsplash
fdflush
sha1sum
sha256sum
sha3sum
sha512sum
showkey
shuf
bullhead:/ #
[Android Software/Hacking General [Developers Only]] osm0sis:
I meant bash is also a redirect to ash/hush if you find it in a busybox binary. I have both ash and hush in my builds, but TWRP's only has ash.
[Android Software/Hacking General [Developers Only]] jcmm11:
What I printed out was from your build. No hush.

It's not a big deal, ash is the one I wanted. Just pointing it out.

And thanks. For all your helpful scripts (keeps me from having to write my own).
[Android Software/Hacking General [Developers Only]] osm0sis:
Ah **** you're right. hush has never been enabled on 64-bit.

https://github.com/osm0sis/android-busybox-ndk/blob/master/osm0sis-full-64.config#L1054

I'll see about enabling it for the next build I do. Anyway, ash is the standard you'll find in all busybox builds, so it's the one to depend on. :good:
[Android Software/Hacking General [Developers Only]] noob4598:
http://kevinboone.net/kbox.html

Not sure if anyone sis still interested or follows but I just noticed kbox4 on Kevin Boones site. I have been trying to figure out how to compile a kernel from source on my Note 4 with no luck yet. Would this be an option maybe?
[Android Software/Hacking General [Developers Only]] osm0sis:
Ah cool! I noticed his site was down the other day when I was looking for something - guess he was just updating it!

As I said before, yes it would most likely take a fair bit of work but it's possible.
[Android Software/Hacking General [Developers Only]] jcmm11:
If you're looking for Linux installs on Android phones another option (which I have installed) is https://play.google.com/store/apps/details?id=com.gnuroot.debian

This gives you a Debian install, with access to the Debian repositories. No root needed.
[Android Software/Hacking General [Developers Only]] robcore:
Oh my goodness, is the setup for building native binaries really as easy described by Kevin? Sure the actual porting of certain tools would require some special attention, but it blows my mind that I've struggled with the basic setup for so long and it's that simple. Thanks for the heads up!
[Android Software/Hacking General [Developers Only]] osm0sis:
Yeah! When I first wrote AIK-mobile all my binary compiles were built on my Nexus 7 2013. It's pretty easy until you start getting into headers and such that you don't have, but even then, once you're set up for your dependencies it's surprisingly straightforward since it's just a simple native `make`. :)

I might have to check out KBox4 again for fun, though the GNURoot Debian setup jcmm mentioned sounds a bit more official and direct perhaps. :good:
[Android Software/Hacking General [Developers Only]] UltraM8:
Great work:good: Seems like yours busybox is the best solution to overcome several problems with our audio mod magisk module. Wonder if we can add this to mod, giving a credit for you? Users gonna benefit a lot from it.
[Android Software/Hacking General [Developers Only]] osm0sis:
Absolutely, by all means. :)
[Android Software/Hacking General [Developers Only]] UltraM8:
Thx)
[Android Software/Hacking General [Developers Only]] user2k10:
Deleted
[Android Software/Hacking General [Developers Only]] osm0sis:
You can try the build from the APK-Patcher repo:

https://github.com/osm0sis/APK-Patcher/tree/master/tools
[Android Software/Hacking General [Developers Only]] DEVILOPS 007:
Not sure if this has been asked already but what is the difference between your busybox and other versions like stericson and meefik? Thanks. Also, how would I go about installing this? Dirty flash to remove other busybox?
[Android Software/Hacking General [Developers Only]] osm0sis:
Mine are made with the NDK, so certain things like user group names tend to work out-of-the-box with no workarounds. The configs and patches are all open source, but I originally​ made the configs with Stericson's in mind, so the app list should be similar.
[Android Software/Hacking General [Developers Only]] fluffi444:
And the most important is that you get first class support from the master [MENTION=4544860]osm0sis[/MENTION] himself.... ?
[Android Software/Hacking General [Developers Only]] jcmm11:
Applet differences comparing your version to Stericson and Bionic (used by TWRP and also is the pre-installed version in at least some ROMs. Note that Bionic is 1.22.1>

Some "missing" applets can be found in /system/bin. These may or may not function identically to busybox counterparts.

Bionic only (not in osm0sis)

-----

chcon (found in /system/bin)

flash_lock

flash_unlock

flashcp

getenforce (found in /system/bin)

getsebool

halt

matchpathcon

ntpd

restorecon (found in /system/bin)

route (found in /system/bin)

runcon (found in /system/bin)

selinuxenabled

sestatus

setenforce (found in /system/bin)

setfiles

setsebool

sh (found in /system/bin)

taskset (found in /system/bin)

time (reserved word)

=====

Stericson only (not in osm0sis)

-----

chpst

envdir

envuidgid

hostid

hush

i2cdetect

i2cdump

i2cget

i2cset

init

ipcrm

ipcs

last

linux32

linux64

linuxrc

logger

logname (found in /system/bin)

logread

mdev

mkpasswd

mt

nsenter

ntpd

ping6 (found in /system/bin)

readahead

route (found in /system/bin)

rpm

rpm2cpio

runlevel

runsv

runsvdir

setarch

sh (found in /system/bin)

softlimit

sv

svlogd

syslogd

time (reserved word)

traceroute6

unshare

users

wall

who

==========

On the flip side of the coin osm0sis contains some applets that they don't.

osm0sis but not Bionic

-----

acpid . . . . . . . . ar

arping . . . . . . . .beep

blkdiscard . . . . . .chat

chrt . . . . . . . . .cksum

conspy . . . . . . . .cttyhack

dhcprelay . . . . . . dnsdomainname

dumpkmap . . . . . . .dumpleases

eject . . . . . . . . ether-wake

fakeidentd . . . . . .fatattr

fbset . . . . . . . . fdflush

fdformat . . . . . . .fsck

fsck.minix . . . . . .ftpd

hd . . . . . . . . . .hdparm

hostname . . . . . . .httpd

ifdown . . . . . . . .ifenslave

ifplugd . . . . . . . ifup

inotifyd . . . . . . .ipaddr

ipcalc . . . . . . . .iplink

ipneigh . . . . . . . iproute

iprule . . . . . . . .iptunnel

kbd_mode . . . . . . .klogd

loadfont . . . . . . .loadkmap

makedevs . . . . . . .makemime

microcom . . . . . . .mkfs.minix

mkfs.reiser . . . . . nameif

pivot_root . . . . . .popmaildir

powertop . . . . . . .pscan

raidautorun . . . . . readprofile

reformime . . . . . . rfkill

rtcwake . . . . . . . script

scriptreplay . . . . .sendmail

setfont . . . . . . . setlogcons

setuidgid . . . . . . showkey

shuf . . . . . . . . .slattach

start-stop-daemon . . svc

tcpsvd . . . . . . . .truncate

tty . . . . . . . . . tunctl

ubiattach . . . . . . ubidetach

ubimkvol . . . . . . .ubirename

ubirmvol . . . . . . .ubirsvol

ubiupdatevol . . . . .udhcpc

udhcpd . . . . . . . .udpsvd

uevent . . . . . . . .unlink

vconfig . . . . . . . volname

watchdog . . . . . . .whois

zcip

==============

osm0sis but not Stericson

-----

ar

bbconfig

depmod

inotifyd

insmod

lsmod

lzma

makemime

mkfs.reiser

modprobe

popmaildir

reformime

rfkill

rmmod

sendmail

sync

tune2fs

uncompress

unlzma
[Android Software/Hacking General [Developers Only]] osm0sis:
Some of those depend on your architecture.

For example, the patch for ipv6 utils (ping6, etc.) only works on my 32bit arches (ARM, x86, MIPS), and hush, readahead, and logger are also currently enabled only on 32bit. As I said, I'll look into these again to see if anything has changed since the last time I tried. I already explained sh recently, it's just an alias for ash or hush, so is unnecessary.

In general, the ones omitted are login/passwd utils which can be built using uClibc instead of the NDK but still don't really function properly on Android to be honest (we don't have a terminal login ;)). I also don't bother with selinux utils because they increase the file size significantly, and if your device supports selinux you're often better supported by the ones in your /system/bin.

Note Stericson only has ARM and x86 builds and doesn't directly support any others, ie. if you're on a 64bit device you're using his 32bit build, so could lead to further incompatibly issues. I have native builds for all 6 Android architectures.
[Android Software/Hacking General [Developers Only]] veez21:
[MENTION=4544860]osm0sis[/MENTION]

Can I use your busybox on a project?

I'll just modify the installer a bit to make things work. :fingers-crossed:
[Android Software/Hacking General [Developers Only]] osm0sis:
Of course. :)

I see on GitHub you already have. :p
[Android Software/Hacking General [Developers Only]] veez21:
:cool:

I need to patch things up quickly cause i don't have much time :laugh:
[Android Software/Hacking General [Developers Only]] osm0sis:
Sorry, I barely have enough free time for my own projects let alone taking on the random requests of others.

If you don't think I already deserve a donation for all the time, effort and ingenuity I've put in... Let's just say "donate" is not the magic word here, in fact it's somewhat insulting when you use it like you have, as a sort of bait to a task.

Now, if you'd like to figure it out yourself I'd be happy to help if you've got questions. Start by getting the NDK and making standalone compilers for the architectures you want so you can use them in a normal build environment, then see about the rsync source and getting it to cross-compile through them.
[Android Software/Hacking General [Developers Only]] DAusRon:
Hi [MENTION=4544860]osm0sis[/MENTION]

If i install busybox in su/xbin (since i hv systemless supersu), how to uninstall it? Is it by simply deleting all the files inside that folder?

Thanks.
[Android Software/Hacking General [Developers Only]] jcmm11:
Yes.

What you have in there (after install) is 1 busybox binary and a bunch of symlinks pointing to it. Deleting the busybox file would effectively uninstall busybox, but would leave you a bunch of dangling symlinks. Just delete the entire contents of the folder to uninstall.
[Android Software/Hacking General [Developers Only]] osm0sis:
A quick thread search also leads to this post with a bit of script for a more surgical removal:

https://xdaforums.com/showpost.php?p=69269573&postcount=973

I'll consider introducing a function triggered by adding -uninstall to the zip filename in my next script revisions.
[Android Software/Hacking General [Developers Only]] Watanabe_You:
[MENTION=4544860]osm0sis[/MENTION] Your dev team init.d pack installer files are gone, are they deprecated?
[Android Software/Hacking General [Developers Only]] osm0sis:
Looks like BasketBuild is having issues again.

My old Dev-Host account with them still works:

http://d-h.st/users/osm0sis

Use an ad blocker.

They are kinda old though, [MENTION=4793042]pkgnex[/MENTION] had updated versions around. Maybe he can provide new links.
[Android Software/Hacking General [Developers Only]] Watanabe_You:
Lel, thanks.