• We are moving to xdaforums.com!

    Posts made between now and when the migration is complete will not be carried over.
    You will be automatically redirected once the migration is complete.

[TOOLS][ZIPS][SCRIPTS] osm0sis' Odds and Ends [Multiple Devices/Platforms]

Search This thread

AnonVendetta

Senior Member
Apr 29, 2016
1,644
599
I was able to somewhat recreate this issue by mounting things like /system_root and /product in TWRP before attempting a system flash. Happily it seems resolved with my upcoming Diffusion Backend updates (mirroring my recent Backend changes for AnyKernel3)! :)
I am back on stock firmware and my bootloader is relocked, so I won't be able to test any new releases for a few days. I'd kinda already forgot that I posted in this thread at all.
 
  • Like
Reactions: ipdev

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
15,670
35,420
Halifax
GT-i9250
Google Nexus 4
Changed my mind since I did all the bring-up work already, verified there were no further differences from the source archive, tested builds in AK3 and it seems stable, so instead of waiting for the busybox team to push their missing official version bump commit and tag, here we are!

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

I work on these projects in my limited time off, so if you like the progress I'm making, or enjoy anything else I've done on xda, please consider sponsoring my ongoing work using my GitHub Sponsors profile. For a one-time donation you can hit the donate link from my profile. Thanks for your support!

UPDATE-adb.Installer.v1.0.41-signed.zip;
UPDATE-Adreno.Systemless.Installer-signed.zip;
UPDATE-mtd-utils.Installer.v2.1.5-signed.zip;
UPDATE-nano.Terminal.Editor.v7.2-signed.zip;
UPDATE-Nexus.Media.Installer-signed.zip;
UPDATE-ZipSigner.Installer.v3.0-signed.zip:

- Diffusion Installer Backend updates

UPDATE-Busybox.Installer.v1.36.1-ALL-signed.zip:
- update to latest busybox stable official source
- Diffusion Installer Backend updates
- add patch to fix direct loopback mount and losetup next loop

Happy hacking! :cowboy:


Edit: There, they pushed the tag!

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

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
15,670
35,420
Halifax
GT-i9250
Google Nexus 4
Haha, well I do of course create the SELinux builds with ndk-box-kitchen, so you're right: guess I forgot to change that back to osm0sis before build time. 😅🤦‍♂️

Fresh builds incoming... 😛


Edit: F*ck it, I've got some more Diffusion fixes too from what I figured out last night for AK3, might as well do 'em all! Then hopefully no more Backend fixes needed for a bit. 🤪
 
Last edited:

AnonVendetta

Senior Member
Apr 29, 2016
1,644
599
Just tested your latest bb zip, it works fine. ROM is Project Elixir Android 13 gsi, latest TWRP by @afaneh92, on a Note 20 Ultra 5g. I just had to add -system into the filename so it would ignore Magisk and not install it systemlessly.
@osm0sis: is there a chance that SafetyNet detects BusyBox (any, not just yours)? I think Google would view it as a root tool. And no major OEM includes it in recent-ish firmwares, so it would be considered as a custom, non-standard binary not found on stock firmwares. I have seen it on ZTE firmwares, but not called BusyBox, it was using a non-standard filename.
 
  • Wow
Reactions: ipdev

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
15,670
35,420
Halifax
GT-i9250
Google Nexus 4
@osm0sis: is there a chance that SafetyNet detects BusyBox (any, not just yours)? I think Google would view it as a root tool. And no major OEM includes it in recent-ish firmwares, so it would be considered as a custom, non-standard binary not found on stock firmwares. I have seen it on ZTE firmwares, but not called BusyBox, it was using a non-standard filename.
No I've never seen any indication SafetyNet/PlayIntegrity has anything to do with busybox detection.

Edit: I guess only if at least DenyList is in use! See https://forum.xda-developers.com/t/...ices-platforms.2239421/page-165#post-88606079
 
Last edited:

AnonVendetta

Senior Member
Apr 29, 2016
1,644
599
No I've never seen any indication SafetyNet/PlayIntegrity has anything to do with busybox detection.
I find it weird that they wouldnt single it out for detection. Unless they think of it as being similar to toybox/toolbox, and therefore harmless, since it's just a multi-use utility with lots of function bundled in. But busybox being installed is also a good indication that the device is probably rooted. Even though busybox itself doesnt require root.
 

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
15,670
35,420
Halifax
GT-i9250
Google Nexus 4
Last edited:

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
15,670
35,420
Halifax
GT-i9250
Google Nexus 4
I'm a root-a-holic, I can't imagine running an Android device without root. If I can't be rooted, I might as well buy an iPhone/iPad instead...f that.
Well (as I'm sure you know) that's where USNF and Shamiko come in! 😁

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

AnonVendetta

Senior Member
Apr 29, 2016
1,644
599
Well (as I'm sure you know) that's where USNF and Shamiko come in! 😁

I do think a lot about Chainfire's comment as he was leaving the scene about how it had become an unhealthy cycle where he only rooted to develop root, however... 🫤
Pretty soon SN won't matter, google is deprecating it in favor of the Play Integrity API. Which can be spoofed to a degree. That is, until they start requiring hardware backed attestation on all devices, then it's game over.

I don't root just to root, it's not about that. It's about the perceived level of power/control it gives me. Want to delete a file in a protected partition?...root needed. Want to tweak kernel parameters?...sorry, root required. There's still just a lot of things you can't do without it.

And why should root be considered a security risk? Linux distros come with it enabled by default. Good luck doing any admin stuff on Linux without it. Android uses a Linux kernel, Linux filesystems, alot of other concepts from the open source community which have been around since Unix/Linux.

And yet, somehow, having root access on Linux is deemed ok, but on Android it's a no no. That's retarded, backward thinking.

I'll tell you what it's really all about, it's about money and power. They want to control both the hardware and the software, so they put a taboo on anything the user can do to exercise more control. When you buy the device, their mindset is that it's still theirs regardless.

And don't even get me started on the locked/unlocked bootloader thing. Look at PCs, the concept is practically unheard of. If I want to install Linux alongside Windows, or replace it, I can. No bootloader unlocking BS. But if I want a custom ROM on an Android-powered device, unlocking is required. That's BS.
 

pndwal

Senior Member
@osm0sis: is there a chance that SafetyNet detects BusyBox (any, not just yours)? I think Google would view it as a root tool. And no major OEM includes it in recent-ish firmwares, so it would be considered as a custom, non-standard binary not found on stock firmwares. I have seen it on ZTE firmwares, but not called BusyBox, it was using a non-standard filename.
Actually, without root hiding this does occur, and apparently it's nothing new...

The DroidGuard VM attestation engine that provides device integrity measurements to gsm does various checks (security checkscan detect Magisk, emulators, rooted devices, and even Pegasus) and "busybox" is among keywords searched for to enhance it's predefined su path checks when DroidGuard iterates over the content of certain directories...

These particular detections are simply sent from DroidGuard via gsm (Play Services) to Google's servers, but were used originally by the S/N API backend to generate a basicIntegrity attestation and, unlike hardware key backed measurements (for ctsProfileMatch), were easy to bypass. Now such measurements are used by the new PI API backend to generate a similar basicIntegrity attestation...

MagiskHide was enough to hide all these signs of root originally, but since 24.0 and Zygisk, zy-USNF integrates its own root hiding (used exclusively for hiding these detections from gsm) which is also equal to the task...

The reason we are aware of what checks* the DroidGuard engine (proprietary code) performs is because skilled reversers have published details that give valuable insight.

*Categories include Magisk and root, hooking frameworks (dynamic instrumentation), emulators, bootloader status, conditional checks (on files matching specific keywords).

For example, here's an excerpt from Romain Thomas's whitepaper on reversed DroidGuard VM of a year ago (just prior to Play Integrity API rollout) relating to the above:
4 TheDevice Integrity Checks
...

Magisk & Root Detections

As in most of the root detections techniques, the bytecode running through DroidGuard checks predefined su paths listed in the Annex 8.1 To enhance the predefined su path checks, DroidGuard iterates over the content of some directories (like /sdcard) to verify if they contain files that match keywords like giefroot or sbin_orig. In that case, DroidGuard performs extended checks on these directories and files. By looking at the list of these keywords, we can notice entries like pegasus.apk or coldboot_init which suggests that DroidGuard is able to identify devices that would have been compromised by Pegasus. The list of the identified keywords is given in the Annex 8.5. In addition to the file checks, DroidGuard tries to detect Magisk by looking for system properties like init.svc.magisk_pfsd and by inspecting the current mounting points (/proc/self/mounts). The list of the system properties is given in the Annex 8.1.1. DroidGuard also covers legacy rooting tools like KingRoot[11]. The detection of this tool seems to be performed through an analysis of the environment variables (cf. Annex 8.1.2)
https://www.romainthomas.fr/publication/22-sstic-blackhat-droidguard-safetynet/

If we examine Romain's appended list in Annex 8.5 we find busybox among some 30 keywords DroidGuard checked for in May 2022... The list has likely grown since then.

👀 PW
 
Last edited:

pndwal

Senior Member
I find it weird that they wouldnt single it out for detection. Unless they think of it as being similar to toybox/toolbox, and therefore harmless, since it's just a multi-use utility with lots of function bundled in. But busybox being installed is also a good indication that the device is probably rooted. Even though busybox itself doesnt require root.
They don't detect anything file-wise except su.
FWIW, List per post above (as of May 2022):
8 Annexes
...
8.5 Conditional Checks on Files Matching Specific Keywords

• daemonsu
• pegasus.apk
• androVM-prop
• busybox
• mu
• .coldboot_init (related to Pegasus: [7] page 29)
• su
• temp_su
• init.magisk.rc
• baservice
• badamon
• droid4x-prop
• ttVM-prop
• igpi
• qemu_props
• giefroot
• microvirt-prop
• smsdamon
• waw
• smsservice
• libimcrc_64.so
• wland
• microvirtd
• libinjector.so
• nox-prop
• su2
• sbin_orig
• magisk
• supersu
• .author
... The whitepaper is comprehensible even to a lay person like me... I think you'd benefit from and even enjoy reading it. 🤠 PW
 
  • Like
Reactions: osm0sis

pndwal

Senior Member
Pretty soon SN won't matter, google is deprecating it in favor of the Play Integrity API.
True...
Which can be spoofed to a degree. That is, until they start requiring hardware backed attestation on all devices, then it's game over.
But nothing has really changed with PI re. device integrity...

Whereas SafetyNet was simply a device integrity API, Play Integrity API adds Application integrity and Account details attestations to a revamped Device integrity attestation engine.

A strong device integrity verdict was available since evaluationType was added to the labels available from S/N... Banks now had the capacity to demand passing ctsProfileMatch in combination with evaluationType=HARDWARE_BACKED, BASIC, essentially the same as PI strongIntegrity pass...

None did that with S/N and nothing has since changed...
And why should root be considered a security risk?
Because it is!... As Shawn Willden said, 'it weakens Google's security model'...
Linux distros come with it enabled by default. Good luck doing any admin stuff on Linux without it. Android uses a Linux kernel, Linux filesystems, alot of other concepts from the open source community which have been around since Unix/Linux.
Yup... But Android is Linux adapted as a mobile OS!... It has to complete again IOS in the secure mobile OS space, and it's already losing... Google are really being as good to us modders as they can afford to be while they play 'catch up'...
And yet, somehow, having root access on Linux is deemed ok, but on Android it's a no no. That's retarded, backward thinking.
No, Google support root... They never said it's 'not ok'!

Really they've given you that cake (IOS never will) but have said their banking partners can decide if you can have the cherry they provide on top...

This is only right if you believe like Google that they have the right to determine that their code runs only in an unmodified trusted environment that's CTS/VTS compliant per the rules even OEMs must play by... Both unlocking and root break CTS/VTS compliance and we are already resorting to subterfuge (spoofing expected signals) to enjoy our cherries...

Keeping our moddable OS both competitive and viable in the eyes of app (including security centric ones) makers really is good for this community long term... Samsung's Knox based 'enterprise' security enhancements are an example of an OEM trying to claw back market share already lost due to the perception of IOS as the only properly secured mobile OS...

Only if Google's chosen mobile OS can remain relevant in this arena will we continue to be able to have our cake and eat it to... Cherry or no cherry.
I'll tell you what it's really all about, it's about money and power.
Of course it is! Google is like any other big corporate player... It must make sink-or-swim decisions...
They want to control both the hardware and the software, so they put a taboo on anything the user can do to exercise more control.
Nah... They've made Android unlockable and rootable by design!... No need for a 'Jail Break' even... except where some OEMs excercise their own right to block OEM unlocking...
When you buy the device, their mindset is that it's still theirs regardless.
Sorry, thought we were discussing Android... Who's mindset; Google's? The OEM's?...

In most instances both entities allow (and don't block) unlocking and rooting...
And don't even get me started on the locked/unlocked bootloader thing. Look at PCs, the concept is practically unheard of. If I want to install Linux alongside Windows, or replace it, I can. No bootloader unlocking BS. But if I want a custom ROM on an Android-powered device, unlocking is required. That's BS.
Nah... The concepts here are merging even if PC's are behind mobile OS's.

To install late windows you need to circumvent hardware TPM 2 requirements... And already you must disable Secure Boot in order to run Linux or even non compliant hardware!... And thankfully, as with Android/Google allowing running without AVB (Green state), Windows/Microsoft allow running without Secure Boot! 👀 PW
 
Last edited:

pndwal

Senior Member
  • Like
Reactions: osm0sis

ale5000

Senior Member
Dec 24, 2013
1,273
1,153
  • Like
Reactions: osm0sis and pndwal

Top Liked Posts

  • 3
    I shudder to think of all the link rot xda migrating to xdaforums.com is going to cause... 🫤
  • 10
    Got it. ;)


    Must've been broken since topjohnwu bumped APP_PLATFORM to android-24 in:
    🤯

    Edit: Module update pushed. 👍
    4
    Thanks for adding whoami to the root check in the adb/fastboot module.
    4
    I thought there was a specific thread for your Magisk Busybox installer, but I only can see this one, so I guess it's the correct place to ask?

    If I run the following, I get the results listing the methods available from busybox. Which includes sed

    Code:
    sunfish:/busybox --help
    BusyBox v1.31.1-osm0sis (2020-05-06 20:45:25 ADT) multi-call binary.
    BusyBox is copyrighted by many authors between 1998-2015.
    Licensed under GPLv2. See source distribution for detailed
    copyright notices.
    
    Usage: busybox [function [arguments]...]
       or: busybox --list[-full]
       or: busybox --show SCRIPT
       or: busybox --install [-s] [DIR]
       or: function [arguments]...
    
            BusyBox is a multi-call binary that combines many common Unix
            utilities into a single executable.  Most people will create a
            link to busybox for each function they wish to use and BusyBox
            will act like whatever it was invoked as.
    
    Currently defined functions:
            [, [[, acpid, adjtimex, ar, arch, arp, arping, ash, awk, base64, basename, bbconfig, beep, blkdiscard, blkid, blockdev, brctl,
            bunzip2, bzcat, bzip2, cal, cat, chat, chattr, chcon, chgrp, chmod, chown, chroot, chrt, chvt, cksum, clear, cmp, comm, conspy, cp,
            cpio, crond, crontab, cttyhack, cut, date, dc, dd, deallocvt, depmod, devmem, df, dhcprelay, diff, dirname, dmesg, dnsd,
            dnsdomainname, dos2unix, du, dumpkmap, dumpleases, echo, ed, egrep, eject, env, ether-wake, expand, expr, factor, fakeidentd,
            false, fatattr, fbset, fbsplash, fdflush, fdformat, fdisk, fgconsole, fgrep, find, findfs, flash_eraseall, flash_lock,
            flash_unlock, flock, fold, free, freeramdisk, fsck, fsck.minix, fsfreeze, fstrim, fsync, ftpd, ftpget, ftpput, fuser, getenforce,
            getopt, grep, groups, gunzip, gzip, hd, hdparm, head, hexdump, hexedit, hostname, httpd, hush, hwclock, id, ifconfig, ifdown,
            ifenslave, ifplugd, ifup, inetd, inotifyd, insmod, install, ionice, iostat, ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, ipneigh,
            iproute, iprule, iptunnel, kbd_mode, kill, killall, killall5, klogd, less, link, ln, loadfont, loadkmap, logread, losetup, ls,
            lsattr, lsmod, lsof, lspci, lsscsi, lsusb, lzcat, lzma, lzop, lzopcat, makedevs, makemime, man, md5sum, mesg, microcom, mkdir,
            mkdosfs, mke2fs, mkfifo, mkfs.ext2, mkfs.minix, mkfs.reiser, mkfs.vfat, mknod, mkswap, mktemp, modinfo, modprobe, more, mount,
            mountpoint, mpstat, mv, nameif, nanddump, nandwrite, nbd-client, nc, netstat, nice, nl, nmeter, nohup, nologin, nslookup, nuke, od,
            openvt, partprobe, paste, patch, pgrep, pidof, ping, ping6, pipe_progress, pivot_root, pkill, pmap, popmaildir, poweroff, powertop,
            printenv, printf, ps, pscan, pstree, pwd, pwdx, raidautorun, rdate, rdev, readlink, readprofile, realpath, reboot, reformime,
            renice, reset, resize, resume, rev, rfkill, rm, rmdir, rmmod, route, rtcwake, run-init, run-parts, runcon, rx, script,
            scriptreplay, sed, selinuxenabled, sendmail, seq, sestatus, setconsole, setenforce, setfattr, setfont, setkeycodes, setlogcons,
            setpriv, setserial, setsid, setuidgid, sh, sha1sum, sha256sum, sha3sum, sha512sum, showkey, shred, shuf, slattach, sleep, smemcap,
            sort, split, ssl_client, start-stop-daemon, stat, strings, stty, sum, svc, svok, swapoff, swapon, switch_root, sync, sysctl,
            syslogd, tac, tail, tar, tc, tcpsvd, tee, telnet, telnetd, test, tftp, tftpd, time, timeout, top, touch, tr, traceroute,
            traceroute6, true, truncate, ts, tty, ttysize, tunctl, tune2fs, ubiattach, ubidetach, ubimkvol, ubirename, ubirmvol, ubirsvol,
            ubiupdatevol, udhcpc, udhcpc6, udhcpd, udpsvd, uevent, umount, uname, uncompress, unexpand, uniq, unix2dos, unlink, unlzma, unlzop,
            unshare, unxz, unzip, uptime, usleep, uudecode, uuencode, vconfig, vi, volname, watch, watchdog, wc, wget, which, whoami, whois,
            xargs, xxd, xz, xzcat, yes, zcat, zcip

    Now if I run the following, I notice most of the above have links, but some do not. Should I be expecting links to all? For example, sed has no link
    Code:
    sunfish:/ # ls -l /data/adb/modules/busybox-ndk/system/bin
    total 2008
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 [ -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 [[ -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 acpid -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 adjtimex -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ar -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 arch -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 arp -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ash -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 bbconfig -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 beep -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 blkdiscard -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 brctl -> busybox
    -rwxr-xr-x 1 root shell 2054232 2023-06-20 13:15 busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 chat -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 chvt -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 conspy -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 crond -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 crontab -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 cttyhack -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 dc -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 deallocvt -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 depmod -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 dhcprelay -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 dnsd -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 dnsdomainname -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 dumpkmap -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 dumpleases -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ed -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 eject -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ether-wake -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 factor -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 fakeidentd -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 fatattr -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 fbset -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 fbsplash -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 fdflush -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 fdformat -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 fdisk -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 fgconsole -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 findfs -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 flash_eraseall -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 flash_lock -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 flash_unlock -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 fold -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 freeramdisk -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 fsck -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 fsck.minix -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 fsfreeze -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 fstrim -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ftpd -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ftpget -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ftpput -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 fuser -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 getopt -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 hd -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 hdparm -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 hexdump -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 hexedit -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 httpd -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 hush -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ifdown -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ifenslave -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ifplugd -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ifup -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 inetd -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 iostat -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ipaddr -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ipcalc -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ipcrm -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ipcs -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 iplink -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ipneigh -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 iproute -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 iprule -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 iptunnel -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 kbd_mode -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 killall5 -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 klogd -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 less -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 link -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 loadfont -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 loadkmap -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 logread -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 lsscsi -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 lzcat -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 lzma -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 lzop -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 lzopcat -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 makedevs -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 makemime -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 man -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 mesg -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 mkdosfs -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 mkfs.minix -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 mkfs.reiser -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 mkfs.vfat -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 mpstat -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 nameif -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 nanddump -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 nandwrite -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 nbd-client -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 nmeter -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 nologin -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 nslookup -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 nuke -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 openvt -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 partprobe -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 pipe_progress -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 pivot_root -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 popmaildir -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 poweroff -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 powertop -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 pscan -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 pstree -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 pwdx -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 raidautorun -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 rdate -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 rdev -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 readprofile -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 reformime -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 reset -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 resize -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 resume -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 rev -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 rfkill -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 route -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 run-init -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 run-parts -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 rx -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 script -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 scriptreplay -> busybox
    
    **************** NO SED ***********************
    
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 selinuxenabled -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 sendmail -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 sestatus -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 setconsole -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 setfattr -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 setfont -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 setkeycodes -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 setlogcons -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 setpriv -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 setserial -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 setuidgid -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 sha3sum -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 showkey -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 shred -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 shuf -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 slattach -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 smemcap -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ssl_client -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 start-stop-daemon -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 sum -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 svok -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 switch_root -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 syslogd -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 tcpsvd -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 telnet -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 telnetd -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 tftp -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 tftpd -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 traceroute -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ts -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ttysize -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 tunctl -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ubiattach -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ubidetach -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ubimkvol -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ubirename -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ubirmvol -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ubirsvol -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 ubiupdatevol -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 udhcpc -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 udhcpc6 -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 udhcpd -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 udpsvd -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 uevent -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 uncompress -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 unexpand -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 unlzma -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 unlzop -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 unxz -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 vconfig -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 vi -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 volname -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 watchdog -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 wget -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 whois -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 xz -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 xzcat -> busybox
    lrwxrwxrwx 1 root root       18 2023-06-20 13:15 zcip -> busybox

    But if I check, it will / can be handled by busybox. I am guessing it's the way it's suppose to be and it's my assumption that is wrong?

    This is the place! Your device doesn't have /system/xbin (most don't anymore), so busybox is installed to /system/bin where the ROM's toybox is also installed, and the installer intentionally "filters" the symlinks to not overwrite any existing ROM versions since that can cause ROM functionality to break.
    3
    I shudder to think of all the link rot xda migrating to xdaforums.com is going to cause... 🫤
    3
    I still can't make a busybox build (of either version, 1.34.1 or 1.36.1... 🤷) with working SELinux right now... Completely baffled. :(

    I've done all the troubleshooting I can think of:

    But apparently it works for topjohnwu, so until I can work out what's wrong on my side I'll just include the Magisk builds so we've got working SELinux builds out. Same difference really, except for the name. Super frustrating though.

    Tried Cygwin git to create the ndk-box-kitchen repos today, then build with Windows NDK since that's how I used to do it, and also tried it with Windows and Linux ONDK v26.0 in Windows and WSL2, but all still with the same result as before...

    Only other things I can think to try is make a complete proper WSL2 or Windows build of Magisk and see if the busybox works from that, and failing that try the busybox (and/or Magisk) build in a full VM of Ubuntu to see if it can at least do it there since WSL2 seems off the table for unknown reasons at the moment. 😕
  • 713
    osm0sis' Odds and Ends -- Misc./Batch Tools, Flashable Zips, Scripts, etc.

    General Information


    In a nutshell, I just wanted a single thread to gather links to some of my other, larger projects, but also serve as a spot I could put some smaller scripts and zips I've created that I don't think merit their own separate threads. This is partially for my own sanity and will hopefully make it easier for others to find some things as well. A lot of the stuff here was developed with the GN, N4, N5, N7s or N5X, OP5/T, OP6/T, OP7Pro/T, OP8Pro/T or OP9Pro (my devices) and Windows in mind, but could generally be applicable to most devices either out-of-the-box or with some slight modification. If you see something that inspires you, go ahead and mod it, just let me know and give me some credit somewhere. If anyone would like to know the specifics of what's in a particular script that I haven't already linked to more information on, just let me know and I'll post that in here as well.

    Note: Older zips with a "cwm-" prefix are NOT only for the now-defunct ClockworkMod Recovery, the prefix was used to denote a flashable zip before I adopted Chainfire's "UPDATE-" prefix. Please use a currently maintained recovery, like TWRP, for all zips to ensure the best compatibility/results.

    My development work on my many projects comes out of my free time, so if you enjoy this project or 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. Thank you for your support!


    Misc./Batch Tools

    • AnyKernel3 (many devices) - link
      AnyKernel was a simple template for an update.zip that could apply any kernel to any ROM, regardless of ramdisk to reduce the chance of any issues arising from the custom kernel pairing. The drawback to this is that some kernels require modifications to the ramdisk to enable/set up kernel features, and in the old AnyKernel format there was no way to do this. AnyKernel3 pushes the format even further by allowing kernel developers to modify the underlying ramdisk for kernel feature support easily using a number of included command methods along with properties and variables to customize the install experience.
    • APK-Patcher (many devices) - link
      A proof-of-concept, simplifies APK modification to make it easier for modification creators to keep creating. Using JesusFreke's brilliant bak/smali and iBotPeaches' excellent apktool, modified to run on-device along with the various binaries required, allows on-the-fly APK modifications to be applied via recovery, to whatever ROM APK is present, taking the constant update burden off of the modification creator. The zip is smart and automated, using the APK name to run all the various parts involved for complicated patches and is extensible to any number of APKs in a single zip.
    • Android Image Kitchen (many devices) - link
      A collection of Windows/Android ports of the necessary Linux utilities for Android image (kernel+recovery) mod work, and my own automation script to unpack, edit and repack the ramdisk. Other guides/scripts exist but none of them are universal for target device, compression and/or developed for Windows/Android. Now also Linux builds to bring my improved featureset back to where it came from, recently extended to macOS as well. Has been extremely useful for me in my messing around with kernel ramdisks.
    • ADB Screenshot (many devices) - attached
      Take screenshots while in recovery. Useful for development of recovery apps or error reporting. Original method had lots of different threads around with the general method for various devices but I figured out a couple tricks required for getting it working on the Galaxy Nexus and then automated the process. Tested and confirmed working with both pixel formats of CWM and TWRP. More information in this GN Q&A FFmpeg thread. New method uses fb2png and should work on all ARM devices.
    • ADBsync sdcard Backup (many devices) - attached
      Backs up the entire sdcard so that you can have a complete snapshot of your device when you make periodic backups, and be able to restore things exactly as they were. Automates the sync process of Renate NST's great adbsync utility which makes only newer files get pulled, significantly decreasing backup time for the sdcard compared to "adb pull". Original version posted in the old adbsync thread. Defaults for devices with /data/media/ internal sdcards (Nexus devices, etc.), but is easily customizable to backup other mountpoints or backup via ADB over WiFI.

    Flashable Script Zips
    • TWRP A/B Retention Module script (many devices) - link
      We need an interoperable root ecosystem again. A/B and system-as-root were a big setback to the root community in this respect. To help alleviate this issue, this atypical Magisk script zip "module" will keep TWRP installed to both slots when flashed from Magisk Manager after an A/B OTA has installed in the background, but before you use Manager to install Magisk to inactive slot.
    • Nexus BootUnlocker script (GN, N4, N5, N7 '13, N10) - attached
      I don't know about everyone else but sometimes I find I've rebooted into the bootloader only to realize I've forgotten to unlock it in segv11's excellent BootUnlocker App beforehand. Well, I decided to make a BootUnlocker Script for my Galaxy Nexus so I could just boot to recovery quickly, unlock, then adb reboot-bootloader (or use my Reboot To Bootloader script below) to get back without having to fully boot the OS to make the change. Also extremely useful in the case you aren't able to boot. As with the app there is no data loss like there would be with fastboot, allowing you to relock for safety. Originally posted in the GN EDIFY Scripting thread. Modified for the newer Nexus devices and combined into a single Nexus BootUnlocker zip with tamperbit reset support added using information from the BootUnlocker App Dev thread. For newer devices using Factory Reset Protection (N6 and later), the BootUnlocker Script can't directly toggle the lockstate due to new security tokens, but it does now toggle the ability to use "fastboot oem unlock" without needing a booted device.
    • N7 BootUnlocker script (N7 '12) [creation guide] - link
      The Nexus 7 2012 is a special case. Per-device encryption of an entire partition makes it impossible to support the N7 '12 in a simple root app, or flashable zip as above, however using my guide and included script you can now create a working BootUnlocker Script Zip for your specific device. As with the above scripts there is no data loss like there would be with fastboot, allowing you to relock for safety.
    • sdcard Fix Permissions script (many devices) - attached
      A little flashable zip script to fix ownership and permissions of files and directories on the sdcard to what they would be if Android OS had put them there itself, since some apps can't access pushed files that have root.root as owner/group. This is useful when restoring to your sdcard backup, as with my ADBsync sdcard Backup batch script above, since generally, pushed files get root.root from adb shell and higher permissions than usual. Also a solution for a bug where sdcard files get lower permissions somehow, resulting in similar access problems. Currently written for devices with /data/media/ internal sdcards (Nexus devices, etc.), but could easily be modified for other mountpoints. No longer required on Oreo since it fixes these itself at boot.
    • Recovery SLAM script (many devices) - link
      Recovery "Simple Legacy Auto-Mount" (SLAM!) is for devices that have been updated to SAR, but there are older zips that break in TWRP 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, generally allowing them to proceed. Most useful for premounting /system before a legacy zip with my FlashAfterUpdate addon.d script.
    • SUmount script (many devices) - attached
      Another tool for the toolkit of anyone using Chainfire's SuperSU or topjohnwu's Magisk systemless root, this simple flashable zip script toggles the mounting of the su.img, magisk.img and magisk_merge.img while in recovery to allow easier access to the /su, /magisk and /magisk_merge filesystems, simplifying manipulating it via ADB shell, AROMA Filemanager or TWRP's terminal/file manager. Especially useful to anyone who uses su.d/post-fs-data.d scripts or can't boot due to some issue with a user addition in /su/su.d, /su/bin or a Magisk module.
    • unSU script (many devices) - link
      While experimenting with Chainfire's brilliant SuperSU systemless root, I discovered that uninstalling the older style system-modifying root through his app (<2.60) didn't restore all of the modified system files correctly, so I wrote this script to do so and aid in people wanting to unroot from recovery. Expanded to support uninstallation of Koush's SuperUser, phh's Superuser, SuperSU Systemless (su.img and BINDSBIN), Magisk, LineageOS addonsu and custom ROM su binaries.
    • Adreno Systemless Installer script (N5, N6, N7 '13) - link
      For use with Qualcomm's official updated preview GPU drivers packages for Adreno 3xx/4xx-powered Nexus stock images. This is a different frontend to take whatever device zip from Qualcomm is in the same directory as it (also searching /sdcard), then unpack and install it as a Magisk module or into the SuperSU systemless root /su filesystem, instead of the usual /system.
    • Kernel MultiROM Injector script (many devices) - attached
      Intended for use in Chainfire's excellent FlashFire app to automate re-injecting the current boot image ramdisk with Tasssadar's brilliant MultiROM's trampoline bootmenu; this avoids having to do this as an extra step in MR-TWRP following an OTA, ROM Delta or SuperSU update. Should work for all EMMC devices with MultiROM installed.
    • GN PIT Editor script (GN) - link
      Dumps and alters the Galaxy Nexus' Partition Information Table (PIT) to reclaim unneeded space from the /cache partition and add it to /system to allow for larger ROMs and GApps packages to make continued support for Lollipop+ easier. The resulting file is byte-for-byte identical to those created by external tools like PIT Magic, so that it may be flashed back to the device in Odin Mode to complete the repartitioning.
    • Kernel Emergency Reset script (many devices) - link
      Basically a go-to cure-all for custom kernel users experiencing issues after an upgrade due to old settings left over in a kernel control app (eg. franco.Kernel updater, Trickster, etc.), or problematic init.d/userinit.d scripts. It's also useful if you just want to make sure you're running clean defaults without conflicts.
    • Reboot To Bootloader script (all devices) - attached
      Those who preferred using CWM may have noticed a couple of things missing that the other popular custom recovery, TWRP, has built-in. One of these is a file explorer/manager, which is answered by amarullz' brilliant AROMA Filemanager. Another thing I found myself wanting was a way to reboot back to the bootloader once I'm in recovery, so I created this very very simple flashable zip script. (No longer required on CWM >=6.0.3.5). Note: Once in the bootloader, "Start" will boot you back to recovery. Not sure why, but it's not a big deal, just reboot normally from recovery at that point.

    Flashable Installer Zips
    • Flashlt Installer (many devices) - attached
      Installs my Flashlt script to allow easy flash and dump of boot, recovery and radio/modem (possibly others) EMMC or MTD partitions while booted, and trimming of null characters from files. Also installs a script zip that makes flashing boot.img (kernel), recovery.img, and radio.img/modem.img (baseband) files via recovery simple. It aims to save the average user the hassle of repacking their own image zip, or using the command-line or fastboot to flash it. Place an appropriately named file in the same directory as the zip and flash away! Should work on all devices with normal partition naming ("boot", "recovery" and "radio" or "modem") which accept Android standards-compliant images (including a/b slot devices like Pixel). Extremely handy when used with amarullz' brilliant AROMA Filemanager, and/or my Android Image Kitchen: Mobile Edition (linked above).
    • Busybox Installer (all devices) - attached
      A byproduct of building my own static busybox compiles in all Android architectures for my AIK-mobile package, I figured I might as well offer them up separately as well since there weren't any providers making Android x64 builds when I was researching. Detects device (ARM/64, x86/_64, MIPS/64) to install the busybox binary, cleans up symlinks from any previous install and generates new ones. Detects and supports SuperSU/Magisk systemless installs. Please read the release post about applet inclusion and special features.
    • nano Terminal Editor Installer (many devices) - attached
      An installer to push my own static Android ARM build of the nano editor and required files to /system/xbin and /system/etc/terminfo, with a wrapper adding a --term option to try terminfo profiles more easily. Detects and supports SuperSU/Magisk systemless installs. Can then be used from Terminal while booted. When flashed in recovery also allows temporary recovery use by pushing a script to /sbin/nano with the required setup, so you can trigger it from adb shell or TWRP Terminal. Makes it extremely easy and worry-free to tweak and mod on the go, knowing you can edit the faulty build.prop or startup script if something goes wrong.
    • adb + fastboot Installer (many devices) - attached
      Marshmallow removed adb from the /system/bin directory. For those wanting this functionality back, here's an installer to push static compiles of adb and fastboot to /system/xbin, with a wrapper to point adb to the correct HOME directory and set TMPDIR for compatibility. Detects and supports SuperSU/Magisk systemless installs. Can then be used from Terminal while booted.
    • Nexus Media Installer (many devices) - attached
      Custom ROMs usually don't include Google ringtones/notifications/system sounds and bootanimation, instead including numerous terrible sounds and often less-than-desirable visuals. This installs the media from old Nexus devices systemlessly (SuperSU and Magisk supported), or to system with an addon.d script to survive a ROM update or dirty flash, and using the zip name (also reading from /data/.nexusmedia) to allow user choice.
    • mtd-utils Installer (many devices) - attached
      mtd-utils (flash_erase, nanddump, nandwrite) are necessary for mod work on a number of Android devices using mtd/char devices instead of the more standard emmc/block devices, and where the busybox versions have been less reliable in the past (especially where it doesn't include flash_erase), using the official suite is preferable. The older ARM builds available on XDA were about a decade old, so I worked out how to configure and cross-compile from the latest source. Detects and supports SuperSU/Magisk systemless installs. Can then be used from Terminal while booted
    • ZipSigner + Zip Installer (many devices) - attached
      Signing zips and APKs on-device has always been a tricky proposition due to memory requirements of the old SignApk.jar, running a jar on an Android device, and other complications for script-based zips. Android has always been missing a zip binary (for unzip see my Busybox Installer). ZipAlign is also handy if you do APK work. To remedy this once and for all, here's an installer to push my dexed version of topjohnwu's brilliant zipsigner.jar and static ARM compiles of zip and zipalign to /system/xbin, with a wrapper to run zipsigner with Android's dalvikvm. Detects and supports SuperSU/Magisk systemless installs. Can then be used from Terminal while booted.
    • odex Script Installer (all devices) - attached
      Based on the great work and binaries from this thread, a simple installer to push my odex script along with the required dexopt-wrapper and zip binaries to /system/xbin and set the appropriate permissions. Automates the procedure to odex any apk or jar from the commandline to potentially improve performance. Dalvik runtime (KitKat and below) only. Also uses cut from busybox.
    • N5X/6P BLOD Workaround Injector (N5X, N6P) - link
      When, unfortunately, my Nexus 5X was recently stricken with the abominable Bootloop of Death, I looked into the well-publicized workaround and turns out it was all contained in the ramdisk and cmdline of a Android image. This is the perfect application of AnyKernel2, so I made an AK2 add-on zip to patch both the current boot and recovery partitions with all the current workarounds to help others afflicted by this issue to hopefully regain their data/device as easily as possible. Linked is the Nexus 5X thread, the Nexus 6P thread may be found here.
    • N7'13 TWRP flo2flox Injector (N7 '13) - link
      The Nexus 7 2013 (flo) has seen a bit of a resurgence with official Lineage 18.1 support repartitioned as "flox". Since official TWRP is still automatically being built only for flo and this isn't compatible with flox, and the minor changes required for flox support were a great application of AnyKernel3, this zip automates the patching process so making official TWRP from flo2flox is easy for all going forward.
    • GN Synapse Support Injector (GN) - link
      This AK2 kernel add-on for the Galaxy Nexus injects support for the Synapse tweaking app into the current boot partition ramdisk, including all the Synapse interfaces for the GN I've maintained since the Franco Kernel and DirtyV Kernel days.
    • GN Recovery Color Correction Injector (GN) - link
      The aging screen on the Galaxy Nexus was looking pretty rough in recovery until I discovered the recently added new OMAP kernel color correction was also present in the most recent TWRP recovery versions. So this add-on zip uses AK2 to patch the current recovery partition ramdisk to add the command to reduce that green/yellow SAMOLED nastiness.
    • Kernel init.d Support Injector (many devices) - attached
      An experimental proof-of-concept. Following from great ideas by Captain_Throwback in my AnyKernel2 thread and using script from my Flashlt script above, this AK2 zip will inject basic init.d bootscript support into any kernel ramdisk on any emmc device with normal partition naming and using the Android bootable image standard, without having to bloat a ramdisk using a busybox binary. This zip is also signed, so could potentially be used with non-Nexus stock recovery on a locked bootloader.
    • CMSetup Fix for GApps Installer (many devices) - attached
      Installs a su.d script fix to work around the CyanogenMod/LineageOS 13 ROM issue of a broken Quick Settings pull-down when CMSetupWizard is removed as part of a GApps installation. Removing CMSetupWizard is useful because it allows Google's SetupWizard to grant apps default permissions, so the workaround automatically executes the only required command at the appropriate time following first boot. Requires a SuperSU/Magisk installation (for su.d/post-fs-data.d support). Flash after the SuperSU/Magisk zip and your GApps.
    • Dev Team init.d Pack Installer (all devices) [see "950iosettings, etc." below] - link
      A simple installer I wrote to create the /system/etc/init.d/ directory, extract the latest init.d scripts as published by the "Franco's Dev Team" tuning collective (of which I was a member), then set correct owner, group and permissions to the entire init.d directory. If you are a developer and would like to include these tunables/scripts in your kernel or ROM please provide credit. A lot of time and effort has gone into this project and that's all we ask.
    240
    Scripts
    • 999-flashafterupdate.sh addon.d+addon.d-v2 script (many devices) - attached
      For ROMs that don't have "Flash After Update" support built into their delta/update process. During an upgrade, this script will flash zips from an sdcard directory, with several options (listed in the script header) for displayed output, after all other addon.d backup/restore actions have completed. This can be used to flash SuperSU and then an AnyKernel2/3 kernel on LineageOS, for example. Only zips that specifically support addon.d-v2 can be supported on A/B devices. Partition img flashing is also supported. See this how to for usage instructions with A/B devices. Unzip once downloaded and place in /system/addon.d/ with rwxr-xr-x (755) permissions.
    • 98-twrp_ab.sh addon.d-v2 script (many devices) - attached
      Allows you to keep TWRP installed in a boot partition through A/B OTAs with Magisk installed by copying the TWRP ramdisk from the current slot to the updated one, before Magisk's addon.d-v2 script patches it. Requires a current Magisk installation since we need the tools and Magisk's the only way to ensure a working addon.d-v2 environment across ROMs at the moment. Unzip once downloaded and place in /system/addon.d/ with rwxr-xr-x (755) permissions.
    • 97-dumpimages.sh addon.d+addon.d-v2 script (many devices) - attached
      For ROMs with boot.img, etc. inside an OTA payload.bin or otherwise inaccessible, it dumps the updated chosen partitions before further modifications (TWRP, Magisk, etc.), saving it to /sdcard/Download/boot.img, etc., or to/from other customizable locations at the top of the script. Unzip once downloaded and place in /system/addon.d/ with rwxr-xr-x (755) permissions.
    • 00-omnirootfix.sh addon.d-v2 scipt (many devices) - attached
      OmniROM appears to include 69-gapps.sh automatically in its /system/addon.d directory despite not shipping with any GApps; when not rooted this doesn't appear to present a problem, but really this is only because the script doesn't have enough permissions to run how it's supposed to since Omni's sepolicy doesn't let addon.d-v2 work correctly. Once Magisk is installed, providing more privileges to the addon.d-v2 update_engine, Omni's 69-gapps.sh would remove important system files during an A/B OTA when no GApps were installed, so this script will simply prevent that for those wanting to run Omni minimally and with root. Remove the .txt extension once downloaded and place in /system/addon.d/ with rwxr-xr-x (755) permissions.
    • 00-resizesystem.sh addon.d script (many devices) - attached
      One common solution for aging devices is to resize the /system partition so that it can hold newer, larger ROMs and, of course, GApps packages. On devices where the /system partition has been resized to hold larger GApps packages, but the ROM in use has system.dat format zips with no resizing functionality, the extra space would get lost in a ROM delta flash, breaking things when GApps attempted to restore. This script will resize the system partition to its maximum before the GApps restore occurs on EMMC-based devices with standard partition naming. Remove the .txt extension once downloaded and place in /system/addon.d/ with rwxr-xr-x (755) permissions.
    • 10-extract-lineage-kernel.sh addon.d script (many devices) - attached
      Nowadays with systemless root and other boot.img mods out there, it's good to have a backup of your ROM's unmodified boot.img handy in case you want to do a clean flash of your boot partition. Since LineageOS moved their update zips to a /data/data subdirectory that made this harder to get to, I automated the procedure as an addon.d script so that the newest gets extracted on each update. The output directory may be changed by editing the script. Remove the .txt extension once downloaded and place in /system/addon.d/ with rwxr-xr-x (755) permissions.
    • 999-customkernel.sh addon.d script (many devices) - attached
      Addon.d is awesome at restoring your GApps, root app, and other things after a ROM Delta, update, or dirty flash, but of course this can leave a lot of stuff out that you'd also have to re-flash (see below for a personal addon.d script you can modify to cover anything else you want to save). This script aims to help remedy the issue for custom kernel users on EMMC-based devices with standard partition naming by dumping the current kernel as part of the addon.d backup process, and then restoring it after the ROM has flashed its included kernel. Remove the .txt extension once downloaded and place in /system/addon.d/ with rwxr-xr-x (755) permissions. This is deprecated by my FlashAfterUpdate addon.d script, above.
    • logohack.sh (GN) - link
      Galaxy Nexus bootloader image replacement hack script. Inspired by bitdomo's brilliant imgdata tool and replicating the functionality of Ezekeel's abandoned, broken paid Logo Me app, this script improves upon the app version by working on all Galaxy Nexus bootloaders and on-the-fly, to allow replacement of the Google logo and lock images within the sbl partition. Remove the .txt extension once downloaded and place in /system/bin/ or /su/bin/ with rwxr-xr-x (755) permissions. It can then be run from the Terminal.
    • flash_image (many devices) - attached
      MTD devices require a little extra finesse when flashing partitions from the command prompt and multiple commands, versus MMC devices, for which we can just use the dd command both ways. I wrote this little script to simplify the process for myself in my MX Box tinkering. It parses /proc/mtd so you only need to enter the partition name. It requires _n0p_'s excellent MTD-Utils compiled for Android, and uses grep and cut from busybox. Remove the .txt extension once downloaded and place in /system/xbin/ with rwxr-xr-x (755) permissions. It can then be run from the Terminal.
    • getprio (all devices) - attached
      Android doesn't allow you to check the priority (or "niceness") of a process with the getpriority command as you would with normal Linux, and busybox doesn't provide this functionality either, so I wrote this reasonably simple script to allow you to check the niceness of a process. Some kernels have been experimenting with increasing the priority of com.android.systemui for smoothness, so this command can be used for testing different levels and whether the renice command set it correctly. Remove the .txt extension once downloaded and place in /system/xbin/ with rwxr-xr-x (755) permissions. It can then be run from Terminal with either the pid (default), class or a class name search string. Uses pidof and pgrep from busybox.
    • 950iosettings + 875mntsettings + 925vmsettings + 975experimental init.d scripts (all devices) [with Franco's Dev Team] - links
      Also available bundled in an installer. The scheduler tunables have already gained a bit of attention/adoption on various devices and kernels, but this is the init.d script I wrote to set the new custom scheduler tunables values as "default" by an independent loop, sleeping in the background and detecting each time the scheduler is changed. There is no effect on idle drain or deep sleep. The settings included are the complete work of the "Franco's Dev Team" (or "Team Franco") tuning collective, of which I was a member. We strove to perfect the scheduler, vm and various other settings for the smoothest and fastest experience available. The collective was: malaroth, osm0sis, joaquinf, The Gingerbread Man, pkgnex, Khrushy, shreddintyres. If you are a developer and would like to include these tunables/scripts in your kernel or ROM please provide credit. A lot of time and effort has gone into this project and that's all we ask. Lollipop(+) updated versions now also available through the continued excellent work of pkgnex.
    • gappsintegrator init.d script (many devices) - link
      ROM GApps Auto-Integration of /data/app GApps into /system, complete with libs (unlike Titanium Backup), for Jelly Bean through Marshmallow. It should process things early enough in the boot that afterwards Dalvik will immediately do the cleanup ("Android is upgrading..."), much like following an OTA. An initial GApps installation is one requirement and there are some important notes for support of Lollipop and above. Intended for ROMs with a busybox installation. Can also remove libs from and zipalign the integrated APKs if those binaries are present in the ROM.
    • lmkwhitelist init.d script (all devices) - link
      Users running ROMs or kernels with extremely aggressive custom lowmemorykiller (lmk) driver settings may notice their launcher redrawing frequently. Some kernels/ROMs also include an exclusion for this by making stock (or the included) launcher unkillable, however that still leaves all the 3rd party launchers out there that people use. I wrote this init.d script with a community created list of the most common launchers to make whichever one is installed unkillable. This also has instructions for how to set up init.d scripts. If your launcher isn't included in the list, you can modifiy it by adding the application class name (from the Play Store URL) to the list within quotes, separated by spaces. Also part of the 975experimental Franco's Dev Team init.d script, linked above.
    • dalvik2cache init.d script (all devices) - link
      Bind mounts the dalvik-cache directory to the cache partition. Useful on devices where the cache is sizable and unlikely to be used for OTAs (custom ROM, etc.), and the data partition is not. Every little bit counts!
    • settingsdump.sh (all devices) - attached
      In comparing vm settings from various kernels and ROMs to see what's out there, I wrote this script to generate a list of the values of all the relevant sysfs files and directories. Now expanded to cover cpu and governor as well. Remove the .txt extension once downloaded. To run it, assuming you just put it in /sdcard/, open Terminal Emulator and type: "sh /sdcard/settingsdump.sh" (without quotes). It will output the file to /sdcard/r*-output.txt where * is the revision of the kernel you're running. This makes it easier to compare what's changed between different nightlies, for example.

    Other
    • BootUnlocker app (many devices) [with segv11] - link
      With a number of users researching and contributing the bootloader lockbit and tamperbit offsets in threads around xda and to the development thread for seg11's excellent BootUnlocker app, I have begun making beta builds with these new devices added. With hopes of adding any/all that can be, it now supports all the older Nexus devices, OnePlus devices and several others. We are accepting Pull Requests and collaborators for further device/design updates. Check my original revival post for more details.
    • G-Box Midnight MX2 g18ref ROM, recovery and kernel osmods (MX Box) [with BenniBenassi & relol] - link
      I bought one of these unbranded Android TV boxes and was immediately determined to tweak it as much as possible following my work on the Galaxy Nexus. Flashing the official Matricom stock ROM over the generic included one I also discovered the recovery didn't have any A/V output to my old CRT TV. I set out to dump the kernel and recovery images, fix the recovery images and tweak the kernel defaults for the most performance.
    • Holo Stock Notification Icons for Notification Toggle (many devices) - link
      This was likely my first post ever on xda. It is a "Notificon" pack for j4velin's fantastic Notification Toggle App, bringing a seamless stock look to this indespensibly useful app. Also a great way to get back to Settings easily from the notification shade since Android 4.2, and add shutdown/reboot menu functionality to stock/vanilla ROMs.
    • My GN Kernel Settings + 900colorsettings init.d script (GN) - link
      I was being asked a fair amount for my kernel settings over in the GN f.K thread where I helped out, so I posted them up. I also put up an init.d script for setting color values on boot, which can drastically change the outcome on older panels, and at least makes custom values seamless. Instructions for how to set up init.d scripts are included.
    • Galaxy Nexus Baseband Collection: maguro - i9250 / M420 / SC-04D Radios (GN) [with josteink] - link
      Original thread author josteink moved on to other devices and asked me to take over the thread. Lots of great information on the GN radios, posted alphabetically by region and chronologically by the build string date I found embedded in the images. Huge respect and massive thanks to josteink for seeing the need for a baseband thread almost as soon as the Galaxy Nexus was launched, way back in December 2011, and maintaining it diligently.
    • TK GApps (many devices) [with TKruzze] - link
      After helping TKruzze with some of the concept and script work for his famous Paranoid Android Google Apps packages (PA GApps 2.0), we decided to collaborate again for his return to XDA after a much-needed hiatus, with me doing the thread setup and management with DevDB, and a Q&A section so things don't get overwhelming for those trying to follow along. The main thread remains locked and can be subscribed-to for those wanting notification only when there's a new GApps release, and the Q&A functioned as the main discussion thread where people can help each other. Much of the script is the same from PA GApps but TKruzze has added some impressive new features, made many fixes and revamped a large portion of the documentation. I also continued as an adviser and submitted script when needed.
    • Nexus Louder Audio Improvement Patch (GN, N4, N5, N7 '12, N7 '13) [with Misledz] - link
      One of my earliest forays into EDIFY scripting, I wrote the flashable zip install/revert scheme for this great volume boost mod by Misledz. The scripts check to see if the mod is already installed and if so recommends you flash the version-specific revert that goes with it. More on that in the Intelligent EDIFY thread. During install the script also backs up the ROM files it replaces so that you don't need to reflash your whole ROM if something goes wrong, just use the revert to restore the backups. I eventually rewrote this completely in shell script with a Universal install/revert, that detects which files to backup and leaves a list for itself to revert. I also wrote automation batch scripts for Misledz as the "Louder Build Farm" to simplify his work for all the versions of the mod he maintains for various devices, linked in the knowledge base below. GN/Dev thread linked; Other links can be found there.
    • Payload-Dumper-Go for Android Magisk Module (many devices) [with ssssut] - link
      payload-dumper-go arm compile and wrapper for use extracting from payload.bin on-device.
    • Git for Android Magisk Module (many devices) [with Termux] - link
      Hacked arm64 git commands for use on booted Android.
    • Google Experience XML Magisk Module (many devices) [with Google] - link
      Hacked Google Nexus/Pixel/Android One sysconfig feature xml entries for use on non-Google devices.
    • Digital Wellbeing Add-on Magisk Module (many devices) [with Google & Open GApps] - link
      Digital Wellbeing for Android 12L and 13 GApps that don't properly support it (like MindTheGapps).
    • Model Mod Magisk Module (many devices) - link
      Experiment to append _SN to the existing device model to get CTS passing again after the September 2021 server-side SafetyNet changes, (superceded by kdrag0n's excellent Universal SafetyNet Fix module).
    • Xposed Framework Installer Zip (many devices) [with rovo89 & Tungstwenty] - link
      When JB4.3 broke all previous root methods I made this simple frontend script to install rovo89's brilliant Xposed Framework for modding ROMs until they could release a new version themselves. Xposed Framework files and the install.sh used are the work of rovo89 and Tungstwenty; I have only created a recovery flashable zip and shell script to function as an alternative frontend for the framework installation process. Then updated to mimic the APK installation and allow devices with /system write protection like HTC's S-ON to install the framework. (Deprecated as of Xposed 2.5).
    • BBCode for my xda Signature (n/a) - link
      Last and definitely least. A number of people have asked me about the formatting of my signature, so here are some simple BBCode tricks and workarounds I thought others might like too. Keep in mind that my signature can be significantly larger because of my RC status.

    Enjoy!
    Questions, comments and feedback welcome.



    Credits & Thanks: All authors of any included binaries and libraries for their amazing work. Anyone who's helped me with these projects along the way.

    Disclaimer: Naturally, you take all the responsibility for what happens to your device when you start messing around with things.
    170
    Knowledge Base

    Links to information/research posts I've made and other experiments.

    ----

    avbtool-arm (zip package)
    - link
    AOSP's BootSignature.jar for AVB v1 was relatively simple to run on-device for boot.img modifying flashable zips like SuperSU and AnyKernel2 but avbtool for AVB v2 is written in Python, so that makes things a bit trickier. For experimentation I whipped up a little wrapper script to run avbtool on-device with an actual Python interpreter.

    Omni SoundPacks (and Nexus Stock pack) - link
    My suggested expansion to the Omni SoundPacks feature to allow it to cover all SystemUI sounds.

    OnePlus FingerPrint Material Icons (Information) - link
    My preferred fingerprint icon for the in-screen OP6T sensor using Zacharee1's excellent OPFPControl app.

    ----

    Complete Shell Script Flashable Zip Replacement + Signing Documentation (Reference)
    - link
    Using a shell script instead of an update-binary in flashable zips can make them universal for architecture and put a lot more power in the hands of the developer. This reference documents all of the analogous functions myself and others have written to make this easy.

    Booted Zip Flashing Shell Setup Script (Reference/How-To) - link
    My implementation of booted zip flashing, originally for AnyKernel2 in Franco Kernel Updater (now Franco Kernel Manager) and since expanded to support AK3's ability to be flashed from anywhere and support most other flashable zips on devices that allow remounting /.

    Unified ext4/f2fs ramdisk + ROM installer (Reference) - link
    Supporting multiple filesystems like ext4 and f2fs in a custom kernel boot.img ramdisk required some work before custom ROMs were updated to do this themselves and use fallback fstabs. This is the roll-up post gathering all the changes necessary for someone to add this pre-official support to their ramdisk, kernel and ROM installers.

    FlashFire Recipe Book (Reference/How-To) - link
    Just a quick reference of common tasks (OTA flashing, etc.) for people figuring out how to use Chainfire's brilliant flashing app.

    personal addon.d (How-To/Template) - link
    I was tired of having to redo a number of tasks (remove files, backup Nexus sounds and replace the AOSP ones, etc.) to get my device back to where I wanted it after flashing a newer nightly, so I wrote an addon.d script to do it all for me. Provided if anyone wants to modify it for their own personal setups.

    KBox2: Set Up A Build Environment On Android (How-To) - link
    Very cool Linux-like command prompt environment on Android. I originally had it set up as a native build environment with rudimentary git support. You can follow my steps to do the same.

    Keeping SafetyNet Passing With Incremental Google OTA on Virtual A/B Devices (How-To) - link
    Post-reboot checks added to the incremental OTA process for Virtual A/B devices using Google's servers made it impossible to remain rooted throughout the OTA process, but following these instructions you can complete the OTA then re-root without SafetyNet catching you.

    Cygwin-Linux Cross-Compiler (How-To) - link
    Compiling from Cygwin with a Linux target required some fixes to the toolchain, so I detailed them for future reference.


    N4/N5/N7 '13 Qualcomm Optimized Bionic/Dalvik Patch Comparisons (updated zips) - link
    Using Qualcomm optimized files on Snapdragon devices improves performance greatly on KitKat. Especially good on Nexus devices or AOSP ROMs. I took the time to dissect the required files and see what worked best.

    AIK Build Farm (desktop shell script) - link
    The Cygwin shell script "build farm" I wrote for my Android Image Kitchen project to perform all of the cross-compiles required for the mobile and Linux versions. Allows someone to setup the repos from scratch and build.

    Louder Farm (zip packages) - link
    The Nexus Louder project was a pretty massive system file modifcation undertaking. This details my work to make building the patch zips easy for co-dev Misledz, and includes the farm packages at various stages.

    ----

    N7 '13 Bootloader cracking (Information)
    - link
    Sat down with my parents' Nexus 7 2013 (before I got my own) over Christmas and cracked the bootloader for unlock support via my Nexus BootUnlocker Script zip and later the official BootUnlocker App.

    N7 '13 Unbricking (Information) - link
    Instructions I put together for recovering from a hard brick (bad bootloader flash usually), via the exposed Qualcomm/Marshall London "HS-USB Diagnostics 9006" mode.

    Default System Alarm Setting Script (Information) - link
    A script snippet function to allow easily changing the default alarm sound on ROMs that hide this ability, like OnePlus' OxygenOS.

    SELinux Audit2Allow Script (Information) - link
    A script snippet for turning SELinux audits in a logcat into allow statements ready for supolicy or magiskpolicy.

    Partition Dumping Script (Information) - link
    A script snippet for dumping all non-userland partitions from any eMMC device, useful for bootloader lockstate hacking.

    GN Partition Information Table (PIT) Research (Information) - link
    Wanting to push the GN as far as possible, several remaining users came together to discuss how it could be repartitioned to add more space to /system to better support Lollipop+ and I contributed a large amount of R&D over several posts throughout the thread which resulted in the PIT Editor script zip (posted above). Could be useful for other devices using PITs as well.

    GN/N7 '12 tunables post (deprecated) (Reference) - link
    The list of supported basic tunables on franco.Kernel for the Galaxy Nexus and Nexus 7 2012 back when those were my primary supported devices.

    GN scheduler tunables HZ scale (Information) - link
    The Galaxy Nexus scheduler (and other) tunables opperate on an odd scale due to the the device's HZ value in the source being weird. This post experiments with that and finding the method/equation behind it.

    LMK boot timing (Information) - link
    The Android lowmemorykiller module default tunables go through a bizarre sequence during boot, so I experimented and came up with a script to allow setting alternates as soon as possible.

    LMK Launcher Whitelist/Niceness settings reversion (Information) - link
    Setting oom_adj values and changing the niceness on launchers and systemui improved responsiveness and helped avoid these important processes being killed by LMK. Then I noticed sometimes they spontaneously reset; experimentation followed.

    MTD partition flashing (Reference) - link
    My MTD-based MX Box set-top device gave me a few hours of headaches until I figured out how to dump and flash the boot (kernel) partition correctly. This details my experiments and the correct procedure I discovered.

    nano Android static build instructions (Reference) - link
    A little documentation of all the dirty tricks I used to get the nano terminal editor utility to build for Android from the official git repo source.

    mtd-utils Android static build instructions (Reference) - link
    A little documentation of all the dirty tricks I used to get mtd-utils to build for Android from the official git repo source.

    Pixel Launcher bind mount instructions (Reference) - link
    I was annoyed that on stock Nexus 5X and 6P Pixel Launcher wasn't available and when sideloaded lost the Google Feed pane, so I replaced Google Now Launcher with Pixel Launcher using bind mounts.

    Netflix broken DRM workaround instructions (Reference) - link
    Custom Nexus 7 2013 ROMs Nougat+ have all had issues with Netflix due to some peculiarities of the DRM libraries the ROMs use, but some found that intentionally semi-breaking DRM using files from other devices allows Netflix to work again, but this broke Google Play Movies. I did some more testing, resolved the Play Movies issue and wrote up how to install the single needed replacement library either to system or with a systemless bind mount.

    ----

    Thanks for the interest! More to come, I'm sure!
    121
    New addition to the OP. ;)

    Busybox Installer:
    As a byproduct of building my own static busybox compiles in all supported Android architectures for my AIK-mobile package, I figured I might as well offer them up separately as well since there aren't any providers making Android x64 builds when I was researching.

    The installer detects what architecture (ARM/64, x86/_64, MIPS/64) your device uses and installs the correct busybox binary to /system/xbin accordingly; it detects and supports "systemless" root installation as well, installing to /su/(x)bin instead. It then cleans up any symlinks from a possible previous installation at that location and cleverly generates new symlinks directly from the output of the installed binary, so they always match.

    My busybox configs and patches are available here: https://github.com/osm0sis/android-busybox-ndk

    I've submitted some patches to the official busybox mailinglist to resolve some API 21 compatibility, so that will save people time and make it easier for more providers. Anyway, hopefully I got all the applets most people want working. (y)


    Edit: Now the zip will also clean up an installation made to /su/bin and then install to /su/xbin. (y) :)

    Edit 2: New special zip features
    You may add keywords to zip filename or in a file at /data/.busybox-ndk:
    1) system or System or SYSTEM to force a system installation.
    2) uninstall or Uninstall or UNINSTALL to uninstall busybox from the zip's detected target location (/su/xbin > /magisk/busybox-ndk/system/xbin > /data/adb/su/xbin > /data/adb/modules/busybox-ndk/system/xbin > /system/xbin, unless system forced per above).
    3) nolinks or NoLinks or NOLINKS to opt out of symlink creation and only push the busybox binary.
    4) noselinux or NoSELinux or NOSELINUX to force the non-SELinux busybox binary to be installed.


    For those curious, I automate bundling my busybox binaries directly with builds from my AIK Build Farm using the following script.

    ~/bbox-bundle.sh:
    Bash:
    #!/bin/bash
    # also this
    
    # bbox-bundle.sh
    #
    # osm0sis @ xda-developers
    #
    # requires (in addition to the default basic Ubuntu WSL packages):
    # zip, default-jre
    #
    # ~/aik-build.sh for basic busybox compiles, and ~/ndk-box-kitchen for selinux busybox compiles
    
    MAGISK=$HOME/magisk-modules;
    
    bold() { echo -e "\033[1m"$@"\033[0m"; }
    
    reset() {
      bold "--- Removing busybox-ndk module ...";
      rm -rfv $MAGISK/UPDATE-Busybox.Installer* zipsigner-*.jar Busybox-*-ALL*.zip UPDATE-Busybox.Installer.*-ALL-signed.zip;
      rmdir $MAGISK 2>/dev/null;
    }
    
    init() {
      local zipsigner;
      reset;
      bold "--- Initializing busybox-ndk module ...";
    
      # busybox-ndk build environment is initialized by aik-build.sh and ndk-box-kitchen/run.sh
    
      bold "- Cloning busybox-ndk installer git repository ...";
      mkdir -p $MAGISK;
      git clone https://github.com/Magisk-Modules-Repo/busybox-ndk $MAGISK/UPDATE-Busybox.Installer-ALL;
    
      bold "- Downloading zipsigner ...";
      zipsigner=$(wget -qO- https://github.com/opengapps/opengapps/tree/master/scripts/zipsigner-resources | grep -o 'opengapps/.*jar' | cut -d\" -f1 | sed 's/blob/raw/');
      wget -O $HOME/$(basename $zipsigner) https://github.com/$zipsigner;
    }
    
    main() {
      local zipflag stdout copy ver i out modver modcode newmodver newmodcode iteration skipmodprop curdir;
    
      zipflag=-q;
      stdout=/dev/null;
      copy=1;
    
      until [ ! "$1" ]; do
        case $1 in
             help) echo "bbox-bundle.sh reset, init, [verbose] [nocopy]"; exit 1;;
       reset|init) $1; return;;
          verbose) stdout=/dev/stdout; unset zipflag; shift;;
           nocopy) unset copy; shift;;
                *) echo "unknown option: $1"; exit 1;;
        esac;
      done;
    
      ver=$(ls | grep ^busybox- | cut -d- -f2);
      if [ ! "$ver" ]; then
        echo "bbox-bundle: busybox repo not found, run aik-build.sh 'init' option";
        exit 1;
      fi;
    
      bold "--- Bundling ...";
      rm -f Busybox-*-ALL*.zip UPDATE-Busybox.Installer.*-ALL-signed.zip 2>/dev/null;
      if [ -f AIK-build/mobile/arm/busybox -a "$copy" ]; then
        bold "- Copying new Busybox $ver builds ...";
        cd AIK-build/mobile;
        for i in *; do
          cp -fp $i/busybox $MAGISK/UPDATE-Busybox.Installer*-ALL/busybox-$i;
        done;
        cd $HOME;
      fi;
      if [ -f ndk-box-kitchen/libs/armeabi-v7a/busybox -a "$copy" ]; then
        bold "- Copying new Busybox $ver SELinux builds ...";
        cd ndk-box-kitchen/libs;
        for i in *; do
          case $i in
            armeabi-v7a) out=arm;;
              arm64-v8a) out=arm64;;
                      *) out=$i;;
          esac;
          cp -fp $i/busybox $MAGISK/UPDATE-Busybox.Installer*-ALL/busybox-$out-selinux;
        done;
        cd $HOME;
      fi;
    
      modver=$(grep -o "^version=.*$" $MAGISK/UPDATE-Busybox.Installer*-ALL/module.prop | cut -d= -f2);
      modcode=$(grep -o "^versionCode=.*$" $MAGISK/UPDATE-Busybox.Installer*-ALL/module.prop | cut -d= -f2);
      if [ "$ver" == "$modver" ]; then
        newmodver="$modver";
        newmodcode="$((modcode + 1))";
        iteration=1;
      else
        newmodver="$ver";
        newmodcode="${ver//.}0";
      fi;
      if [ "$iteration" ]; then
        echo -ne "\033[1m\n*** Update Magisk module version code ($modcode -> $newmodcode) (y/n)? \033[0m";
        read n; echo;
        case $n in
          Y|y) ;;
          *) skipmodprop=1;;
         esac;
      fi;
      if [ ! "$skipmodprop" ]; then
        sed -i -e "s/version=.*/version=$newmodver/" -e "s/versionCode=.*/versionCode=$newmodcode/" $MAGISK/UPDATE-Busybox.Installer*-ALL/module.prop;
        sed -i -e "s/version\".*/version\": \"$newmodver\",/" -e "s/versionCode\".*/versionCode\": \"$newmodcode\",/" $MAGISK/UPDATE-Busybox.Installer*-ALL/update.json;
      fi;
    
      bold "- Packing \"Busybox-$ver-ALL.zip\" ...";
      cd $MAGISK/UPDATE-Busybox.Installer*-ALL;
      zip -9 -x .git -x .github -x update.json -r $zipflag $HOME/Busybox-$ver-ALL.zip *;
      curdir=$(basename $PWD);
      cd ..;
      if [ "$curdir" != "UPDATE-Busybox.Installer.v$ver-ALL" ]; then
        mv UPDATE-Busybox.Installer*-ALL UPDATE-Busybox.Installer.v$ver-ALL;
      fi;
    
      cd $HOME;
      bold "- Signing as \"UPDATE-Busybox.Installer.v$ver-ALL-signed.zip\" ...";
      java -jar zipsigner-*.jar Busybox-$ver-ALL.zip Busybox-$ver-ALL-signed.zip;
      mv -f Busybox-$ver-ALL-signed.zip UPDATE-Busybox.Installer.v$ver-ALL-signed.zip 2>/dev/null;
      rm -f Busybox-*-ALL.zip /tmp/signAPK*.tmp 2>/dev/null;
    }
    
    cd $HOME;
    main "$@";
    exit 0;
    64
    Here we go again!

    Gotta say, I'm pretty gobsmacked at the 16,252 downloads of my busybox zip in the last month and a half (and that's not counting via Magisk), the 20,966 downloads of my sdcard Fix Permissions script zip and then there's the 158,506 downloads of unSU! :cyclops:

    Thanks for the continued support all! I guess I should sit down and figure out how to write an app or something, huh? ;)

    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!

    10-extract-lineage-kernel.sh:
    - update for new /data/lineageos_updates location

    UPDATE-adb.Installer.v1.0.36-signed.zip;
    UPDATE-nano.Terminal.Editor.v2.8.7-signed.zip:

    - create magisk.img if needed (e.g. clean recovery flash of Magisk 14+)
    - possible fix for stuck Magisk module update message on some devices by ensuring install is to magisk_merge.img
    - bump Magisk template version to 1400

    UPDATE-Adreno.Systemless.Installer-signed.zip:
    - mount /system (ro) in case we need it for e2fsck (e.g. FlashFire)
    - fix su.d script with BINDSBIN SuperSU
    - create magisk.img if needed (e.g. clean recovery flash of Magisk 14+)
    - possible fix for stuck Magisk module update message on some devices by ensuring install is to magisk_merge.img
    - bump Magisk template version to 1400

    UPDATE-Busybox.Installer.v1.27.2-ALL-signed.zip:
    - create magisk.img if needed (e.g. clean recovery flash of Magisk 14+)
    - fix forced system installation with BINDSBIN SuperSU
    - possible fix for stuck Magisk module update message on some devices by ensuring install is to magisk_merge.img
    - bump Magisk template version to 1400

    UPDATE-CMSetup.Fix.For.GApps.Installer-signed.zip:
    - update installer to latest versions of set_perm and set_perm_recursive from my Complete Shell Zip Documentation
    - add support for Magisk post-fs-data.d and BINDSBIN SuperSU su.d

    UPDATE-Nexus.Media.Installer-signed.zip:
    - mount /system (ro) in case we need it for e2fsck (e.g. FlashFire)
    - fix su.d script with BINDSBIN SuperSU
    - fix Magisk bootanimation restoration script install
    - add cleanup script for Magisk workarounds when uninstalled
    - create magisk.img if needed (e.g. clean recovery flash of Magisk 14+)
    - fix forced system installation with BINDSBIN SuperSU
    - possible fix for stuck Magisk module update message on some devices by ensuring install is to magisk_merge.img
    - bump Magisk template version to 1400

    UPDATE-sdcard.Fix.Permissions-signed.zip:
    - update installer to latest versions of set_perm, set_perm_recursive and restore_con from my Complete Shell Zip Documentation
    - remove MultiROM paths support since these vary per device and version, better handled by reflashing the MultiROM zip and secondaries

    UPDATE-SUmount-signed.zip:
    - add support for magisk.img and magisk_merge.img

    UPDATE-unSU-signed.zip:
    - add support for BINDSBIN SuperSU, Magisk and LineageOS addonsu
    - add support for suhide and suhide-lite
    - add support for /system/system (Pixel) layouts

    AnyKernel2 has also seen some improvements in the last few weeks, and GN Synapse Injector AK2 zip has been updated accordingly. If your custom kernel of choice uses an AK2 zip or you have ever enjoyed a kernel packaged with it then please go thank my AnyKernel2 thread OP, it's still not even on my member profile's Most Thanked threads, despite being my most known project. :):good: