[MODS][SCRIPTS] Zackptg5's Misc Projects

Search This thread

Zackptg5

Recognized Developer
Sep 18, 2014
4,148
7,005
zackptg5.com
Google Pixel 4a
Google Pixel 5a
Here the recovery Log

I can't replicate the error on my end and your cpu is armv8 so arm busybox included should work. I updated the readme for it link to the list of special binaries that may be needed. I don't have any samsung devices but maybe you need one of the ones listed for your device. Either way, not sure how to help you there
 

Zackptg5

Recognized Developer
Sep 18, 2014
4,148
7,005
zackptg5.com
Google Pixel 4a
Google Pixel 5a
@Zackptg5
With latest magisk
API is down to 17...
Can you please update unity and other mods like bash to API 17?...

Thanks

Already updated bash. Unity test branch is updated as well. I wasn't going to make it stable since very little changed but I guess I can update it and some of the others today
 
  • Like
Reactions: HemanthJabalpuri

Zackptg5

Recognized Developer
Sep 18, 2014
4,148
7,005
zackptg5.com
Google Pixel 4a
Google Pixel 5a

Attachments

  • pacextractor.zip
    2.2 KB · Views: 109
  • Like
Reactions: HemanthJabalpuri

Zackptg5

Recognized Developer
Sep 18, 2014
4,148
7,005
zackptg5.com
Google Pixel 4a
Google Pixel 5a
Based on what I learned with bash, I finally figured out how to compile coreutils 8.30 for android! However I only wanted cp and mv after I applied some patches to them so they'll have a progress bar functionality so they'll work for sure but no guarantees for the rest of coreutils (you'll probably need to tweak some things). See OP for link to build script (and yes I'll be using these in Unity)
 
  • Like
Reactions: mrrocketdog

zputnyq

Senior Member
Apr 19, 2013
619
278
Hi @Zackptg5
Thanks for creating usefull tools,
I've recently tried your kernel sepolicy patcher &
I get a problem using your kernel sepolicy patcher.
It said

mv: can't rename 'boot-new-signed.img': No such file or directory

Do I have to uninstall magisk first to make it works or with magisk is ok ?

I'm on xperia m4 stock 6.0.1 twrp 3.2.1-0 & nautilus kernel.

I can't sent the actual log Idk why. xda app give an error
 
Last edited:

Zackptg5

Recognized Developer
Sep 18, 2014
4,148
7,005
zackptg5.com
Google Pixel 4a
Google Pixel 5a
Hi @Zackptg5
Thanks for creating usefull tools,
I've recently tried your kernel sepolicy patcher &
I get a problem using your kernel sepolicy patcher.
It said

mv: can't rename 'boot-new-signed.img': No such file or directory

Do I have to uninstall magisk first to make it works or with magisk is ok ?

I'm on xperia m4 stock 6.0.1 twrp 3.2.1-0 & nautilus kernel.

I can't sent the actual log Idk why. xda app give an error
That's normal so don't worry about it
 

Zackptg5

Recognized Developer
Sep 18, 2014
4,148
7,005
zackptg5.com
Google Pixel 4a
Google Pixel 5a
Updated mods to unity v4.0!
Updated kernel sepolicy patcher to use magisk tools now so it should have better compatibility now
Added coreutils module :)
Added option to bash so you can replace android shell (mksh) with bash. If just normally replaced, this would break boot so it is instead a late-start service script that bind mounts bash over sh each boot
 
Last edited:

jcmm11

Recognized Contributor
Feb 10, 2012
3,589
3,614
Google Pixel 4a 5G
@Zackptg5
If I'm not mistaken then the coreutils module isn't supposed to generate links that would replace OEM modules. However the latest version [v1.1 (8.30)] is generating all 102 symlinks in /system/bin/

Pixel 3 XL, stock, Canary Magisk

Install was via Magisk and the install log showed nothing of interest.
Code:
- Copying zip to temp directory
- Installing GNU_Coreutils_For_Android_(with_Advcpmv)-v1.1_(8.30).zip
- Current boot slot: _a
- Mounting /system, /vendor
- Device is system-as-root
Archive:  /data/user/0/com.UZTw5Y35DInko0Kb/cache/install.zip
  inflating: post-fs-data.sh
  inflating: sepolicy.sh
  inflating: service.sh
  inflating: system.prop
  inflating: unity_install.sh
  inflating: unity_uninstall.sh
  inflating: busybox
  inflating: busybox
  inflating: util_functions.sh
  inflating: install.sh
  inflating: module.prop
  inflating: uninstall.sh
 
Unzipping files...
    *******************************************
    *GNU Coreutils For Android (with Advcpmv) *
    *******************************************
    *               v1.1 (8.30)               *
    *               by zackptg5               *
    *******************************************
 
- MagiskSU detected
 
- Installing
   Installing scripts and files for arm64 SDK 28 device...
 
- Setting Permissions
 
    *******************************************
    *      Powered by Magisk (@topjohnwu)     *
    *******************************************
 
    *******************************************
    *    Unity by ahrion & zackptg5 @ XDA     *
    *******************************************
 

Zackptg5

Recognized Developer
Sep 18, 2014
4,148
7,005
zackptg5.com
Google Pixel 4a
Google Pixel 5a
@Zackptg5
If I'm not mistaken then the coreutils module isn't supposed to generate links that would replace OEM modules. However the latest version [v1.1 (8.30)] is generating all 102 symlinks in /system/bin/

Pixel 3 XL, stock, Canary Magisk

Install was via Magisk and the install log showed nothing of interest.
It's supposed to generate symlinks for each coreutils applet but it should be installed to xbin if present. Only exception is mv and cp are symlinked to system/bin as well since they're the special advanced ones with progress bar and that won't break anything
 

Zackptg5

Recognized Developer
Sep 18, 2014
4,148
7,005
zackptg5.com
Google Pixel 4a
Google Pixel 5a
I have no xbin (which I think is becoming the norm with stock). I'll post the log in a bit
Oh, ok. That's an odd trend. But if it's installing to bin, it should only create symlinks for coreutil applets when a binary of the same name doesn't already exist. Of a symlink does (like a toybox applet), then it'll still create the coreutils applet so that's by design. Coreutils ones are better anyways
 

jcmm11

Recognized Contributor
Feb 10, 2012
3,589
3,614
Google Pixel 4a 5G
Oh, ok. That's an odd trend. But if it's installing to bin, it should only create symlinks for coreutil applets when a binary of the same name doesn't already exist. Of a symlink does (like a toybox applet), then it'll still create the coreutils applet so that's by design. Coreutils ones are better anyways
Not so odd when you think about the fact that system is supposed to be strictly read only.

As far as overriding toybox applets - coreutils may be (usually are) better but in some cases may act differently which may lead to unexpected results since most things will be written expecting the toybox version. It's the same reason busybox doesn't override existing applets.

However if I know that's by design I can work with it.
 

jcmm11

Recognized Contributor
Feb 10, 2012
3,589
3,614
Google Pixel 4a 5G
Updated bash to 5.0.7 and coreutils to 8.31 - sort and timeout binaries work now so coreutils is complete :)
Just installed GNU_Coreutils_For_Android_(with_Advcpmv)-v1.2_(8.31).zip
There's no sort or timeout module
Code:
/data/adb/modules_update/coreutils/system/bin:
[         expand   nproc     stat     
b2sum     expr     numfmt    stty     
base32    factor   od        sum      
base64    false    paste     sync     
basename  fmt      pathchk   tac      
cat       fold     pinky     tail     
chcon     ginstall pr        tee      
chgrp     groups   printenv  test     
chmod     head     printf    touch    
chown     hostid   ptx       tr       
chroot    id       pwd       true     
cksum     join     readlink  truncate 
comm      kill     realpath  tsort    
coreutils link     rm        tty      
cp        ln       rmdir     uname    
csplit    logname  runcon    unexpand 
cut       ls       seq       uniq     
date      md5sum   sha1sum   unlink   
dd        mkdir    sha224sum uptime   
df        mkfifo   sha256sum users    
dir       mknod    sha384sum vdir     
dircolors mktemp   sha512sum wc       
dirname   mv       shred     who      
du        nice     shuf      whoami   
echo      nl       sleep     yes      
env       nohup    split
 

Top Liked Posts

  • There are no posts matching your filters.
  • 59
    Many of you already know that I have them all of my projects listed with their respective xda threads and download links on my website, but not all of them had an xda thread. So rather than cluttering xda with a new thread for each individual mod I make, I decided to put the smaller ones here :victory:

    Binaries
    • Cross Compiled Binaries For Android Build Script
      The new home for my binary build script. Combines what was formerly GNU and Misc build scripts into one. It contains a good number of useful binaries such as aria2, bash, coreutils (with advanced cp/mv - adds progress bar functionality), curl, gawk (GNU awk), sed, vim, zsh, and more. Check it out to see the expanding list
    • Keycheck
      Finally tracked down the source code for this. This will compile the keycheck binary so you can use vol key selections and what not. Uses a modified build script by @osms0sis. Instructions on the repo
    • Zip for Android
      This builds the zip binary, prepared for android by cloudchou @github in addition to a build script by @osm0sis that I modified for this. Just clone the repo, cd to jni, chmod the build script, and run it

    Mods
    • Cross Compiled Binaries For Android
      This zip contains a term script which can install any number of the growing list of binaries I've managed to cross compile for android. Here's the repo where they're all stored
    • Codec Power Gating Disabler [Deprecated]
      Another straightforward one. Disables codec power gating. It's needed for some audio mods like @chdloc's Biquads
    • Kernel Sepolicy Patcher [Deprecated]
      Unlike most sepolicy mods out there, this one changes sepolicy at the kernel level - meaning no boot script crap so it'll work regardless of other mods/root solutions (or lack there of). You can choose between enforcing or permissive while flashing it - you can use this to switch at will to test stuff out or whatever
    • Module Manager [Deprecated - not needed with magisk v24]
      Magisk Canary v23.x got rid of the magisk-modules-repo from the app. This term script replaces that temporarily until an in-app solution is implemented. Allows you to update and install mods with ease.
    • Overlay Mount Fix [Deprecated]
      Fix for overlay mount related issues with magisk - often seen in oneplus devices with /product
    Misc
    • Searx Instance
      Searx is a metasearch engine with a focus on privacy. It allows you to search many search engines at once without being tracked by them - I use it to remain private while using google and to for scientific journal article searching (science tab). I have more details on what it is/setup here on my website

    More will be added when I come out with them. For a complete list of all of the stuff I work on, check out my website linked at the top of this post :)

    Audio Mod Troubleshooting Guide

    XDA:DevDB Information

    Zackptg5's Misc Projects, Tool/Utility for all devices (see above for details)

    Contributors
    Zackptg5
    7
    So I got annoyed with crafting sed statements, testing them and making sure they work on linux shell, and then finding that busybox and toybox sed can't handle it. So I cross-compiled GNU sed for android, problem solved :)

    I decided it'd be best to combine all of the GNU binaries I got going into 1 mod so bash, coreutils, and sed are all in one GNU-Utils mod now
    6
    Added GNU awk (Gawk) build script and compiled binaries to my GNU Utils mod per @osm0sis suggestion :)
    5
    Finally got around to looking more into GNU and ended up reworking the build script and as a result, the mod here. Dropped v4.0 update. Changelog:
    • Update findutils to 4.7.0
    • Update bash with to 5.11
    • Fix Fortify issues with cpio, gzip, and tar
    • Add perl regex to grep
    • Switch everything to NDK
    • Fixed sort and timeout in coreutils (almost, sort can't read in files so just pass it through instead - ex: cat file.txt | sort)
    • Switched to dynamic link (except bash and gawk)
    • Removed ncurses - no reason for it
    You can grab it here: https://zackptg5.com/android.php#gnu
    5
    Could you please give an example of a situation. I still don't really understand :confused:
    So on some oneplus devices, some directories are mounted at boot as overlays (google overlay mounting if you're unsure of what it is). The problem here is that when an overlay is created, it effectively overwrites the destination which nullifies anything magisk has already mounted. So any modules that had files mounted to where the overlay is won't work.

    I think of overlay mounting as combining multiple folders into 1.

    So for example, during boot, an overlay mount is created for /product/priv-app:
    /system/product/priv-app
    /system/india/priv-app
    /data/adb/modules/somemagiskmod/system/priv-app
    /data/adb/modules/anothermod/system/priv-app

    S the mount command would be:

    Code:
    mount -t overlay -o  ro,context=u:object_r:system_file:s0,relatime,lowerdir=/data/adb/modules/anothermod/system/priv-app
    :/data/adb/modules/somemagiskmod/system/priv-app:/system/india/priv-app:/system/product/priv-app overlay /product/priv-app

    this would take all 4 of those directories and essentially combine them into 1 in /product/priv-app

    Timing is important here. This overlay is made AFTER magisk has already mounted module files which means that the overlay pretty much overwrites them.

    So what my mod does is effectively unmount all overlay and related magisk directories/files and remounts them as unified overlay mounts