Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions hexpatch_targets.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Custom ROM and kernel identifiers to hexpatch-delete from system properties.
# One string per line. Empty lines and lines starting with # are ignored.
# Users can add their ROM's identifiers here without editing service.sh.

LSPosed
marketname
custom.device
modversion
kernel.qemu

lineage
aospa
pixelexperience
evolution
pixelos
pixelage
crdroid
crDroid

aicp
arter97
blu_spark
cyanogenmod
deathly
elementalx
elite
franco
hadeskernel
morokernel
noble
optimus
slimroms
sultan

aokp
bharos
calyxos
calyxOS
divestos
emteria.os
grapheneos
indus
iodéos
kali
nethunter
omnirom
paranoid
replicant
resurrection
rising
remix
shift
volla

icosa
kirisakura
infinity
Infinity
9 changes: 9 additions & 0 deletions post-fs-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,12 @@ for prefix in system vendor system_ext product oem odm vendor_dlkm odm_dlkm boot
replace_value_resetprop "$prop" "aosp_" ""
done
done

# Capture boot_hash early before other modules can tamper with it
BOOT_HASH_FILE="/data/adb/boot_hash"
if [ ! -s "$BOOT_HASH_FILE" ]; then
_digest=$(resetprop -v ro.boot.vbmeta.digest 2>/dev/null | tr '[:upper:]' '[:lower:]' | tr -d '[:space:]')
if echo "$_digest" | grep -qE '^[a-f0-9]{64}$'; then
echo "$_digest" > "$BOOT_HASH_FILE"
fi
fi
27 changes: 13 additions & 14 deletions service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,17 @@ until [ -d "/sdcard/Android" ]; do sleep 3; done

### Props ###

# Periodically hexpatch delete custom ROM props
# Periodically hexpatch delete custom ROM props (read targets from file)
TARGETS_FILE="$MODPATH/hexpatch_targets.list"
while true; do
hexpatch_deleteprop "LSPosed" \
"marketname" "custom.device" "modversion" "kernel.qemu" \
"lineage" "aospa" "pixelexperience" "evolution" "pixelos" "pixelage" "crdroid" "crDroid" "aospa" \
"aicp" "arter97" "blu_spark" "cyanogenmod" "deathly" "elementalx" "elite" "franco" "hadeskernel" \
"morokernel" "noble" "optimus" "slimroms" "sultan" "aokp" "bharos" "calyxos" "calyxOS" "divestos" \
"emteria.os" "grapheneos" "indus" "iodéos" "kali" "nethunter" "omnirom" "paranoid" "replicant" \
"resurrection" "rising" "remix" "shift" "volla" "icosa" "kirisakura" "infinity" "Infinity"
# add more...

# Wait for 1 hour before the next check.
if [ -f "$TARGETS_FILE" ]; then
set --
while IFS= read -r line; do
line=$(echo "$line" | sed 's/#.*//' | tr -d '[:space:]')
[ -n "$line" ] && set -- "$@" "$line"
done < "$TARGETS_FILE"
[ $# -gt 0 ] && hexpatch_deleteprop "$@"
fi
sleep 3600
done &

Expand Down Expand Up @@ -138,10 +137,10 @@ set_permissions /sdcard/TWRP 750

### VBMeta ###

# Set vbmeta verifiedBootHash from file (if present and not empty)
# Restore vbmeta digest captured by post-fs-data
BOOT_HASH_FILE="/data/adb/boot_hash"
if [ -s "$BOOT_HASH_FILE" && grep -qE '^[a-f0-9]{64}$' ]; then
force_resetprop ro.boot.vbmeta.digest "$(tr -d '[:space:]' | tr '[:upper:]' '[:lower:]' <"$BOOT_HASH_FILE")"
if [ -s "$BOOT_HASH_FILE" ] && grep -qE '^[a-f0-9]{64}$' "$BOOT_HASH_FILE"; then
force_resetprop ro.boot.vbmeta.digest "$(tr -d '[:space:]' < "$BOOT_HASH_FILE")"
fi

# Fix altered VBMeta
Expand Down
2 changes: 2 additions & 0 deletions uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ chmod 644 /proc/cmdline
chmod 644 /proc/net/unix
chmod 755 /system/addon.d
chmod 755 /sdcard/TWRP

rm -f /data/adb/boot_hash