[MODS][SCRIPTS] Zackptg5's Misc Projects

Zackptg5

Recognized Developer
Sep 18, 2014
4,079
6,648
263
zackptg5.com
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,079
6,648
263
zackptg5.com

Attachments

  • Like
Reactions: HemanthJabalpuri

Zackptg5

Recognized Developer
Sep 18, 2014
4,079
6,648
263
zackptg5.com
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
565
247
73
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,079
6,648
263
zackptg5.com
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,079
6,648
263
zackptg5.com
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,568
3,579
263
@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,079
6,648
263
zackptg5.com
@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
 

jcmm11

Recognized Contributor
Feb 10, 2012
3,568
3,579
263
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
xbin is not present
 

jcmm11

Recognized Contributor
Feb 10, 2012
3,568
3,579
263
You mean you have no xbin or is everything installed to bin? Can you add debug to the zipname, flash in twrp, then post debug log?
I have no xbin (which I think is becoming the norm with stock). I'll post the log in a bit
 

Zackptg5

Recognized Developer
Sep 18, 2014
4,079
6,648
263
zackptg5.com
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,568
3,579
263
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,568
3,579
263
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