TechG3n / aconf

15 stars 25 forks source link

Feature Request: Magisk / Magisk Module Check and Updates #73

Closed BadWolf0081 closed 9 months ago

BadWolf0081 commented 9 months ago

It would be nice if we could have aconf check the version of Magisk as well as Magisk Modules like PlayIntegrityFix, and update when instructed to via versions file.

BadWolf0081 commented 9 months ago

Command to update play integrity: adb -s IP:Port push PlayIntegrityFix.zip /sdcard/Download/magisk_modules/ adb -s IP:Port shell "su -c 'magisk --install-module /sdcard/Download/magisk_modules/PlayIntegrityFix.zip'"

Not sure about checking current versions of either though.

matt-yml commented 9 months ago

there's a snippet from push_playintegrity.sh that goes through and reports dumps of all the magisk modules currently installed. post

# Temporary script creation
TEMP_SCRIPT="temp_magisk_check.sh"

echo "Creating temporary script..."
echo 'for module in /data/adb/modules/*; do if [ -d "$module" ]; then echo; echo "------ Module: $module ------"; echo; cat $module/module.prop; echo; fi; done' > $TEMP_SCRIPT
chmod +x $TEMP_SCRIPT

the whole push script runs this snip twice to show all magisk module(s) info before and after upgrading, so it's pretty reliable. bc the module version is pretty open ended it's not as simple as getting a number. there'd need to be specific grepping etc. for each pi's method, and even if they've changed.

TechG3n commented 9 months ago

What you mean with "it's not as simple as getting a number" ? Shouldn't that be enough?

grep "version=" /data/adb/modules/playintegrityfix/module.prop version=v13.9

matt-yml commented 9 months ago

right below it there's also versionCode which would also get grepped out. so, right there a blind grep would throw us off.

the numbering also isn't consistent.

id=playintegrityfix
name=Play Integrity Fix
version=v13.0
versionCode=130
author=chiteroman
description=Fix CTS profile (SafetyNet) and DEVICE verdict (Play Integrity)
updateJson=https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/update.json
id=playintegrityfix
name=Play Integrity Fix
version=v14.0
versionCode=14000
author=chiteroman
description=Fix CTS profile (SafetyNet) and DEVICE verdict (Play Integrity).
updateJson=https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/update.json

versionCode goes from 3 digits to 5, so they could also go v14.9 -> 14.10 -> v15.a are we using this number to compare if it's an upgrade or just displaying old and new? i'm not sure if the strategy is to check if a number is greater than another, or just install if the versions file is diff from what the current module prop reports.

we've also used different authors in the past, and we may join one that's new to us at 3.7.

i'm just saying it's not going to be fully automated forever, there will be big changes and mods required. !simple

this was much less a problem when atlas would sit on the same version for 6 months, but these play integrity fixes could be happening every several days.

TechG3n commented 9 months ago

Nothing we can do about it - only hope that they stay consitent with the versioning. Feel free to test the latest push from PlayIntegrityFix - seems to work for me. grafik

TechG3n commented 9 months ago

Please check #74