feat: customize.sh: service.sh: detect digimi package

and only disable usb debugging if found them

this is the only known bank that requiring usb debugging off with bshield protection
This commit is contained in:
Cuynu 2025-08-26 03:15:27 +07:00
commit 29318d990b
2 changed files with 40 additions and 18 deletions

View file

@ -2,13 +2,25 @@
echo "Module only hide custom rom like LineageOS. You have to hide other things like root, etc !"
resetprop init.svc.adb_root stopped
resetprop init.svc.adbd stopped
resetprop persist.sys.usb.config mtp
resetprop ro.adb.secure 1
resetprop ro.secure 1
resetprop ro.debuggable 0
resetprop service.adb.root 0
if [[ -d /data/data/vn.banvietbank.mobilebanking ]]; then
echo "digimi detected!"
echo "Disabling USB debugging..."
resetprop init.svc.adbd stopped
resetprop ro.adb.secure 1
resetprop ro.secure 1
resetprop ro.debuggable 0
echo "Disabling adb root..."
resetprop init.svc.adb_root stopped
resetprop service.adb.root 0
# Set SELinux to enforcing
echo "Changing SELinux to Enforcing..."
setenforce 1
# Set SELinux to enforcing
setenforce 1
else
echo "Disabling adb_root"
resetprop init.svc.adb_root stopped
resetprop service.adb.root 0
# Set SELinux to enforcing
echo "Changing SELinux to Enforcing..."
setenforce 1
fi

View file

@ -1,12 +1,22 @@
#!/system/bin/sh
resetprop init.svc.adb_root stopped
resetprop init.svc.adbd stopped
resetprop persist.sys.usb.config mtp
resetprop ro.adb.secure 1
resetprop ro.secure 1
resetprop ro.debuggable 0
resetprop service.adb.root 0
sleep 5
if [[ -d /data/data/vn.banvietbank.mobilebanking ]]; then
# Disable usb debugging
resetprop init.svc.adbd stopped
resetprop ro.adb.secure 1
resetprop ro.secure 1
resetprop ro.debuggable 0
# Disable adb root
resetprop init.svc.adb_root stopped
resetprop service.adb.root 0
# Set SELinux to enforcing
setenforce 1
# Set SELinux to enforcing
setenforce 1
else
# Disable adb root
resetprop init.svc.adb_root stopped
resetprop service.adb.root 0
# Set SELinux to enforcing
setenforce 1
fi