009: publish AXPR23 final source and public documentation

This commit is contained in:
sunfish-admin committed 2026-11-06 21:11:35 +01:00
1 parent 72930e0fd6
commit 2c714d8d34
35 files changed
+2498 -403

No files matched your search

+57
View File
@@ -0,0 +1,57 @@
#!/system/bin/sh
INSTALL_LOG=/data/local/tmp/intellirat-install.log
INSTALL_APK=/data/local/tmp/intellirat-install.apk
printf '%s phase=customize start\n' "$(date -u '+%Y-%m-%dT%H:%M:%SZ')" >> "$INSTALL_LOG"
set_perm "$MODPATH/service.sh" 0 0 0755
set_perm "$MODPATH/uninstall.sh" 0 0 0755
set_perm "$MODPATH/system/bin/intellirat" 0 0 0755
set_perm "$MODPATH/payload/IntelliRAT.apk" 0 0 0644
package_ready=0
attempt=0
while [ "$attempt" -lt 30 ]; do
if cmd package path android >/dev/null 2>&1; then
package_ready=1
break
fi
attempt=$((attempt + 1))
sleep 1
done
if [ "$package_ready" != 1 ]; then
printf '%s phase=customize error=package_service_timeout\n' \
"$(date -u '+%Y-%m-%dT%H:%M:%SZ')" >> "$INSTALL_LOG"
abort "IntelliRAT: Android package service did not become available"
fi
if ! cp "$MODPATH/payload/IntelliRAT.apk" "$INSTALL_APK"; then
printf '%s phase=customize error=copy_failed\n' \
"$(date -u '+%Y-%m-%dT%H:%M:%SZ')" >> "$INSTALL_LOG"
abort "IntelliRAT: could not stage APK for PackageManager"
fi
chmod 0644 "$INSTALL_APK"
install_result=$(pm install -r --user 0 "$INSTALL_APK" 2>&1 || true)
printf '%s phase=customize result=%s\n' \
"$(date -u '+%Y-%m-%dT%H:%M:%SZ')" "$install_result" >> "$INSTALL_LOG"
rm -f "$INSTALL_APK"
case "$install_result" in
*Success*) ;;
*) abort "IntelliRAT APK installation failed: $install_result" ;;
esac
for user in $(cmd user list 2>/dev/null | awk -F '[{}:]' '/UserInfo/ {print $2}'); do
if [ "$user" != 0 ]; then
pm uninstall --user "$user" com.axp.intellirat >/dev/null 2>&1 || true
fi
done
TILE='custom(com.axp.intellirat/.IntelliRatTileService)'
tiles=$(settings get secure sysui_qs_tiles 2>/dev/null || true)
case ",$tiles," in
*",$TILE,"*) ;;
*) settings put secure sysui_qs_tiles "$tiles,$TILE" ;;
esac
printf '%s phase=customize integration_complete\n' \
"$(date -u '+%Y-%m-%dT%H:%M:%SZ')" >> "$INSTALL_LOG"