[MODS][SCRIPTS] Zackptg5's Misc Projects

Search This thread

Dexer125

Senior Member
Feb 18, 2017
754
359
@Zackptg5 Hi, I tried your Magisk overlay fix module with Quick switch and it doesn't work, GMS still crazy. My device is Xiaomeme Mi 8 (Dipper) Havoc OS, full Q blobs, latest Magisk canary. If you need tester, I'm here.

Sent from my MI 8 using Tapatalk
 

Zackptg5

Recognized Developer
Sep 18, 2014
4,148
7,005
zackptg5.com
Google Pixel 4a
Google Pixel 5a
@Zackptg5 Hi, I tried your Magisk overlay fix module with Quick switch and it doesn't work, GMS still crazy. My device is Xiaomeme Mi 8 (Dipper) Havoc OS, full Q blobs, latest Magisk canary. If you need tester, I'm here.
Does your device have overlay mounts? I'd need you to post the output of /proc/mounts with and without the module installed?
 

Zackptg5

Recognized Developer
Sep 18, 2014
4,148
7,005
zackptg5.com
Google Pixel 4a
Google Pixel 5a
@Zackptg5 could you explain to me what the new Overlay Fix module is for? I probably don't need it but I'm just curious and I don't understand the description.
Some devices (oneplus is all I've seen so far) have some files that are mounted via overlay that interfere with magisk mount. The mod fixes that
 
Last edited:

Zackptg5

Recognized Developer
Sep 18, 2014
4,148
7,005
zackptg5.com
Google Pixel 4a
Google Pixel 5a
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
 

SpasilliumNexus

Senior Member
Jan 23, 2013
1,959
2,854
Delaware
www.last.fm
Curl fails to install on OnePlus 7 Pro with OxygenOS Open Beta 8. The installer doesn't seem to find the maximum API.

I've attached the installation log to this post.
 

Attachments

  • magisk_install_log_2020-01-19T202358Z.log
    665 bytes · Views: 38
  • Like
Reactions: Zackptg5

Zackptg5

Recognized Developer
Sep 18, 2014
4,148
7,005
zackptg5.com
Google Pixel 4a
Google Pixel 5a
Curl fails to install on OnePlus 7 Pro with OxygenOS Open Beta 8. The installer doesn't seem to find the maximum API.

I've attached the installation log to this post.
Well the installer worked as intended except the print statement so I'll push out a fix for that when I get the chance. Curl doesn't seem to work on Q so I have it set for pie and lower. Luckily for you, curl is already in oos

Edit: pushed fix
 
Last edited:
  • Like
Reactions: SpasilliumNexus

weeka89

Senior Member
Apr 15, 2012
209
54
Cairo
Still not able to debloat on OP7Pro latest beta after flashing the latest overlay fix attached is a copy of/proc/mounts post-module flash
 

Attachments

  • mounts.txt
    263.5 KB · Views: 33

weeka89

Senior Member
Apr 15, 2012
209
54
Cairo
I'll need some more info. What exactly isn't working? Mounts looked fine, zip seemed to work as intended

Systemless debloat doesn't work at all with /system/product/ directory unless the file /data/india/india.img is deleted I thought the overlay fix should've solved it without me having to manually delete it
 

Zackptg5

Recognized Developer
Sep 18, 2014
4,148
7,005
zackptg5.com
Google Pixel 4a
Google Pixel 5a
Systemless debloat doesn't work at all with /system/product/ directory unless the file /data/india/india.img is deleted I thought the overlay fix should've solved it without me having to manually delete it

Ok, I see the problem now. So with overlay mounting, all of the directories are merged into 1 with the first one listed being highest priority. So there'd be no way to remove a file from overlay mount with magisk .replace logic since it only uses lowerdir. I played around with upperdir but couldn't get it to work right. I'll see if I can get a better solution working
 

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