Skip to content

Improve permission structure and Magisk compatibility + Add root device test workflow#4

Merged
tryigit merged 3 commits intomainfrom
copilot/improve-permission-structure
Jan 7, 2026
Merged

Improve permission structure and Magisk compatibility + Add root device test workflow#4
tryigit merged 3 commits intomainfrom
copilot/improve-permission-structure

Conversation

Copy link
Contributor

Copilot AI commented Jan 7, 2026

The customize.sh had multiple issues: incorrect set_perm_recursive usage on individual files, broken shell syntax in gpu_cache_cleaner, and an invalid chmod on system partition. The permission structure was also redundant and conflict-prone.

Permission Structure

  • Replaced 45+ redundant per-file set_perm_recursive calls with directory-level permissions
  • Added existence checks before applying permissions
  • Proper SELinux contexts: vendor_firmware_file, vendor_configs_file, same_process_hal_file
  • Removed invalid chmod 644 /system/vendor/firmware/a650_sqe.fw (can't modify system partition)

Magisk Compatibility

  • Added debug.angle.rules="" to prevent ANGLE driver conflicts
  • Changed ro.zygote.disable_gl_preload=1true for consistency

Shell Fixes

  • Fixed broken if-else syntax in gpu_cache_cleaner()
  • Changed inconsistent echoui_print
  • Optimized find command with -prune

Root Device Test Workflow

  • Added .github/workflows/root-device-test.yml for CI validation
  • Validates module structure: module.prop fields, customize.sh syntax, update-binary syntax, directory structure
  • Builds test module zip artifact ready for deployment
  • Placeholder for future root device tests (test.so files to be added later for OpenGL/Vulkan/OpenCL validation)
  • Triggers on push/PR to Magisk Template files, or manually via workflow_dispatch with device/Android version inputs

Before:

set_perm_recursive $MODPATH/system/vendor/lib/libEGL_adreno.so 0 0 0755 0644 u:object_r:same_process_hal_file:s0
set_perm_recursive $MODPATH/system/vendor/lib/libGLESv2_adreno.so 0 0 0755 0644 u:object_r:same_process_hal_file:s0
# ... 40+ more similar lines

After:

if [ -d "$MODPATH/system/vendor/lib" ]; then
    set_perm_recursive $MODPATH/system/vendor/lib 0 0 0755 0644 u:object_r:same_process_hal_file:s0
fi
Original prompt

Improve the permission structure and Magisk compatibility. Avoid conflicts.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: tryigit <40565628+tryigit@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve permission structure and Magisk compatibility Improve permission structure and Magisk compatibility Jan 7, 2026
Copilot AI requested a review from tryigit January 7, 2026 19:54
@tryigit
Copy link
Owner

tryigit commented Jan 7, 2026

@copilot also create workflow for root device test (test.so files will be added later.)

Co-authored-by: tryigit <40565628+tryigit@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 7, 2026

@copilot also create workflow for root device test (test.so files will be added later.)

Created the root device test workflow in commit 1cde5e8. The workflow:

  • Validates module structure: Checks module.prop fields, customize.sh syntax, update-binary syntax, and directory structure
  • Builds test module: Creates a zip artifact ready for deployment
  • Root device test placeholder: Ready for test.so files to be added later for OpenGL/Vulkan/OpenCL validation
  • Triggers: On push/PR to Magisk Template files, or manually via workflow_dispatch with device/Android version inputs

Location: .github/workflows/root-device-test.yml

Copilot AI changed the title Improve permission structure and Magisk compatibility Improve permission structure and Magisk compatibility + Add root device test workflow Jan 7, 2026
@tryigit tryigit marked this pull request as ready for review January 7, 2026 19:59
@tryigit tryigit merged commit 432194c into main Jan 7, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants