#!/system/bin/sh

export PATH=/system/bin

# disable goolge leaks (204 fetch for captive portal detection, google ntp)
echo "Fix google data leaks and time configuration"
settings put global captive_portal_server 127.0.0.1
# old (< 7.1.2) captive portal setting
settings put global captive_portal_detection_enabled 0
# new (≥ 7.1.2) captive portal setting
settings put global captive_portal_mode 0
settings put global ntp_server 127.0.0.1

echo "Fix date format"
settings put system date_format dd-MM-yyyy

echo "disable google device admin for good"
pm disable com.google.android.gms/.mdm.receivers.MdmDeviceAdminReceiver
