diff --git a/Magisk Template/customize.sh b/Magisk Template/customize.sh index 736a0b3..7995ac8 100644 --- a/Magisk Template/customize.sh +++ b/Magisk Template/customize.sh @@ -87,6 +87,20 @@ if [ -d "$MODPATH/system/vendor/lib64" ]; then set_perm_recursive $MODPATH/system/vendor/lib64 0 0 0755 0644 u:object_r:same_process_hal_file:s0 fi +# Ensure specific GPU library subdirectories have the correct context (redundant but safe for MagiskHide) +if [ -d "$MODPATH/system/vendor/lib/egl" ]; then + set_perm_recursive $MODPATH/system/vendor/lib/egl 0 0 0755 0644 u:object_r:same_process_hal_file:s0 +fi +if [ -d "$MODPATH/system/vendor/lib/hw" ]; then + set_perm_recursive $MODPATH/system/vendor/lib/hw 0 0 0755 0644 u:object_r:same_process_hal_file:s0 +fi +if [ -d "$MODPATH/system/vendor/lib64/egl" ]; then + set_perm_recursive $MODPATH/system/vendor/lib64/egl 0 0 0755 0644 u:object_r:same_process_hal_file:s0 +fi +if [ -d "$MODPATH/system/vendor/lib64/hw" ]; then + set_perm_recursive $MODPATH/system/vendor/lib64/hw 0 0 0755 0644 u:object_r:same_process_hal_file:s0 +fi + ui_print " - Success 🌍" ui_print " " ui_print " - Final step for GPU Cache Cleaner by tryigitx" diff --git a/Magisk Template/system.prop b/Magisk Template/system.prop index d35b5d7..a52e9e4 100644 --- a/Magisk Template/system.prop +++ b/Magisk Template/system.prop @@ -8,3 +8,8 @@ ro.zygote.disable_gl_preload=true # Disable ANGLE driver loading by clearing the rules # This ensures native Adreno drivers are used instead of ANGLE debug.angle.rules="" + +# Force Adreno driver usage for EGL and Vulkan +# This ensures the system explicitly looks for adreno drivers (vulkan.adreno.so, etc) +ro.hardware.vulkan=adreno +ro.hardware.egl=adreno diff --git a/README.md b/README.md index 5c2b300..15e5f84 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,6 @@ You will need to learn how to use the **Adreno Profile Tools**. You can also dow ## Known Issues - [x] Kernelsu compatibility -- [ ] Magiskhide map conflict (improved with better permission structure and properties) +- [x] Magiskhide map conflict (improved with better permission structure and properties) > [!NOTE] > The prop code `ro.zygote.disable_gl_preload=true` helps fix the magiskhide EGL issue. Additional compatibility properties have been added to `system.prop`. diff --git a/tests/verify_prop.sh b/tests/verify_prop.sh new file mode 100755 index 0000000..125e8bd --- /dev/null +++ b/tests/verify_prop.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +PROP_FILE="Magisk Template/system.prop" + +echo "Checking properties in $PROP_FILE..." + +if [ ! -f "$PROP_FILE" ]; then + echo "FAIL: $PROP_FILE not found" + exit 1 +fi + +REQUIRED_PROPS=( + "ro.zygote.disable_gl_preload=true" + "ro.hardware.vulkan=adreno" + "ro.hardware.egl=adreno" +) + +RET=0 +for prop in "${REQUIRED_PROPS[@]}"; do + if grep -Fq "$prop" "$PROP_FILE"; then + echo "PASS: Found $prop" + else + echo "FAIL: Missing $prop" + RET=1 + fi +done + +exit $RET