FORUMS
Remove All Ads from XDA

Unity Installer [TEMPLATE]

3,114 posts
Thanks Meter: 5,076
 
By ahrion, Retired Forum Moderator / Recognized Developer on 26th March 2017, 10:31 PM
Post Reply Email Thread
31st March 2019, 06:12 PM |#331  
Senior Member
Thanks Meter: 5,376
 
More
Pushed a quick hotfix for some boot script variables. Sorry about that :/

Also added boot script variables to wiki, should've added that long ago: https://github.com/Zackptg5/Unity/wiki/Variables
The Following User Says Thank You to Zackptg5 For This Useful Post: [ View ] Gift Zackptg5 Ad-Free
 
 
1st April 2019, 05:02 AM |#332  
Senior Member
Thanks Meter: 5,376
 
More
Last hotfix hopefully. Small typo in uninstall.sh, just replace the file
2nd April 2019, 05:27 PM |#333  
Member
Thanks Meter: 6
 
More
Quote:
Originally Posted by Zackptg5

Last hotfix hopefully. Small typo in uninstall.sh, just replace the file

How can I install unity installer modules without volume keys? I'm trying to put the flags which might bypass the volume key press but somehow it's not working. Can I get some help in installing the viper4fx and audio compatibility patch?
2nd April 2019, 05:29 PM |#334  
Senior Member
Thanks Meter: 5,376
 
More
Quote:
Originally Posted by Peter1212

How can I install unity installer modules without volume keys? I'm trying to put the flags which might bypass the volume key press but somehow it's not working. Can I get some help in installing the viper4fx and audio compatibility patch?

This belongs in the mod specific threads but you need to flash in twrp. Magisk manager renames the zip when flashed so zipname triggers won't work there
2nd April 2019, 05:48 PM |#335  
Member
Thanks Meter: 6
 
More
Quote:
Originally Posted by Zackptg5

This belongs in the mod specific threads but you need to flash in twrp. Magisk manager renames the zip when flashed so zipname triggers won't work there

Got the same results, it asks for volume keys once again. I'll check out the specific thread too and post this query there then.
4th May 2019, 12:38 AM |#336  
Senior Member
Thanks Meter: 5,376
 
More
Unity v4.1 has been released! This is a super minor update with 2 bug fixes and some minor scripting changes to keep in line with magisk 19.1. Changelog:
  • Bug fix in uninstall.sh
  • Bug fix for LOS Su detection
  • Update scripting and tools to magisk 19.1

So what files changed/do you need to update?

uninstall.sh
common/unityfiles/util_functions.sh

Pretty straightforward update. Magisk changed the way it mounts partitions: there's a new function called mount_part (which you can use if needbe). It's very straightforward. For example:
Code:
mount_part /odm
Wiki is of course update with these changes


Also, ramdisk patcher addon has been updated too
The Following 4 Users Say Thank You to Zackptg5 For This Useful Post: [ View ] Gift Zackptg5 Ad-Free
4th May 2019, 03:10 PM |#337  
Senior Member
Thanks Meter: 5,376
 
More
Quick hotfix to util_functions.sh. Sorry about that!
The Following 2 Users Say Thank You to Zackptg5 For This Useful Post: [ View ] Gift Zackptg5 Ad-Free
9th May 2019, 10:20 PM |#338  
Senior Member
Thanks Meter: 5,376
 
More
So in case anyone else is trying to pull original (before magisk mount change) files in a magisk install, here's the layout:
The directory is: /sbin/.magisk/mirror

Folders in it:
  • system = original system
  • vendor = original vendor
these always hold true but they can be symlinks instead if:

Devices with no vendor partition:
  • vendor = symlink to mirror system/vendor

System as root devices (this is where things get weird):
  • system_root = original system_root or whatever you call it - contains both original system and vendor folders
  • system = symlink to mirror system_root/system
The vendor setup varies based on if the device has a separate vendor partition or not. If it does:
  • vendor = symlink to mirror system_root/vendor
  • system_root/vendor = original vendor
  • system_root/system/vendor = symlink to /vendor -> Not what you want, this is mounted stuff
If it doesn't:
  • vendor = symlink to mirror system_root/system/vendor
  • system_root/vendor = symlink to /system/vendor -> Not what you want, this is mounted stuff

The source code for these mirror paths is in this file: https://github.com/topjohnwu/Magisk/...bootstages.cpp

Note that with unity, this goofy stuff is done for you so you can instead do something like:
Code:
if $BOOTMODE; then
    CFGS="$(find /system /vendor -type f -name "*audio_effects*.conf" -o -name "*audio_effects*.xml")"
  else
    CFGS="$(find -L /system -type f -name "*audio_effects*.conf" -o -name "*audio_effects*.xml")"
  fi
for OFILE in ${CFGS}; do
  FILE="$UNITY$(echo $OFILE | sed "s|^/vendor|/system/vendor|g")"
  cp_ch -i $ORIGDIR$OFILE $FILE
  # Patch files here
done
So what we did was first set the CFGS variable to a list of all system and vendor audio_effects
Then we looped through each file and changed any files from /vendor partition to /system/vendor for proper copying to magisk path (and works fine on system installs since /system/vendor symlinks to /vendor)
Then we copied the original file to the destination ($UNITY/system/vendor/whatever file is)
$ORIGDIR is equal to /sbin/.magisk/mirror (or nothing if system install) and as you can see in the notes on mirror paths above, mirror system and vendor are always equal to or symlinked to the original, unmodified by magisk mount system and vendor directories

The more you know
The Following User Says Thank You to Zackptg5 For This Useful Post: [ View ] Gift Zackptg5 Ad-Free
16th May 2019, 04:03 PM |#339  
Senior Member
Thanks Meter: 5,376
 
More
Updated Unity to v4.2! Quite a few changes here actually, see usual location for changelog: https://github.com/Zackptg5/Unity/wiki/Changelog
The Following User Says Thank You to Zackptg5 For This Useful Post: [ View ] Gift Zackptg5 Ad-Free
Post Reply Subscribe to Thread

Tags
audmodlib, magisk

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes