# MOTO G56 — OTA freeze + anti-relock Credismart/PayJoy (uma passada)
# NAO trocar DNS. NAO tocar phone/telecom/vending/wifi.

# ===== SETTINGS OTA =====
shell settings put global ota_disable_automatic_update 1
shell settings put secure ota_disable_automatic_update 1
shell settings put global software_updates_enabled 0
shell settings put secure system_update_automatic 0
shell settings put global system_update_auto_download 0
shell settings put global auto_update_system 0
shell settings put global fota_disable 1
shell settings put global auto_update_policy 2
shell settings put secure familia_ota_locked 1
shell settings put secure familia_moto_g56_ota_freeze 1
shell settings put secure familia_credismart_locked 1
shell settings put secure familia_payjoy_locked 1
shell settings put secure familia_finance_frozen 1
shell settings put secure familia_anti_relock 1
shell settings put global familia_anti_relock 1

# ===== OTA PACKAGES =====
shell pm disable-user --user 0 com.motorola.ccc.ota
shell pm disable-user --user 0 com.motorola.ccc.notification
shell pm disable-user --user 0 com.motorola.ccc.devicemanagement
shell pm disable-user --user 0 com.motorola.android.provisioning
shell pm disable-user --user 0 com.motorola.omadm.service
shell pm disable-user --user 0 com.motorola.omadm.vzw
shell pm disable-user --user 0 com.motorola.genie
shell pm disable-user --user 0 com.motorola.motocare
shell pm disable-user --user 0 com.motorola.brapps
shell pm disable-user --user 0 com.motorola.demo
shell pm disable-user --user 0 com.motorola.carrierconfig
shell pm disable-user --user 0 com.google.android.configupdater
shell pm disable-user --user 0 com.orange.update
shell pm disable-user --user 0 com.android.updater
shell pm disable-user --user 0 com.wssyncmldm
shell cmd package suspend com.motorola.ccc.notification
shell cmd package suspend com.motorola.android.provisioning
shell cmd package suspend com.motorola.omadm.service
shell cmd package suspend com.motorola.omadm.vzw
shell cmd package suspend com.motorola.motocare
shell cmd package suspend com.motorola.genie
shell cmd package suspend com.google.android.configupdater
shell cmd package suspend com.orange.update
shell pm uninstall -k --user 0 com.google.android.configupdater
shell pm uninstall -k --user 0 com.orange.update
shell am force-stop com.motorola.ccc.ota
shell cmd appops set com.motorola.ccc.ota RUN_IN_BACKGROUND deny
shell cmd appops set com.motorola.ccc.ota RUN_ANY_IN_BACKGROUND deny
shell cmd appops set com.motorola.ccc.ota WAKE_LOCK deny
shell cmd appops set com.motorola.ccc.ota START_FOREGROUND deny
shell cmd jobscheduler cancel -u 0 com.motorola.ccc.ota

# ===== ANTI-RELOCK PAYJOY / CREDISMART =====
shell cmd appops set com.payjoy.access RUN_IN_BACKGROUND deny
shell cmd appops set com.payjoy.access RUN_ANY_IN_BACKGROUND deny
shell cmd appops set com.payjoy.access WAKE_LOCK deny
shell cmd appops set com.payjoy.access START_FOREGROUND deny
shell cmd appops set com.payjoy.access SYSTEM_ALERT_WINDOW deny
shell cmd jobscheduler cancel -u 0 com.payjoy.access
shell pm disable-user --user 0 com.motorola.securityhub
shell cmd package suspend com.motorola.securityhub
shell pm uninstall -k --user 0 com.motorola.securityhub
shell pm disable-user --user 0 com.motorola.securityhubext
shell cmd package suspend com.motorola.securityhubext
shell pm uninstall -k --user 0 com.motorola.securityhubext
shell pm disable-user --user 0 com.motorola.android.overlay.payjoy
shell cmd package suspend com.motorola.android.overlay.payjoy
shell pm uninstall -k --user 0 com.motorola.android.overlay.payjoy
shell pm uninstall -k --user 0 com.trustonic.teeservice
shell cmd package suspend com.google.android.gms.supervision
shell pm uninstall -k --user 0 com.google.android.gms.supervision
shell cmd appops set com.motorola.securityhub RUN_IN_BACKGROUND deny
shell cmd appops set com.trustonic.teeservice RUN_IN_BACKGROUND deny
shell cmd appops set com.google.android.gms.supervision RUN_IN_BACKGROUND deny
