Skip to content

Instantly share code, notes, and snippets.

@hotrungnhan
Last active July 24, 2022 04:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hotrungnhan/61e191420baaa3b736c85f67ebc73484 to your computer and use it in GitHub Desktop.
Save hotrungnhan/61e191420baaa3b736c85f67ebc73484 to your computer and use it in GitHub Desktop.
Disable mdm
echo '################ SECTION MDM MDM HIDING | CODE GENERATED !! | DONT REMOVE IT ###################' >> /private/etc/hosts
echo '############################## DONT REMOVE #############################' >> /private/etc/hosts
echo '0.0.0.0 iprofiles.apple.com' >> /private/etc/hosts
echo '0.0.0.0 deviceenrollment.apple.com' >> /private/etc/hosts
echo '0.0.0.0 mdmenrollment.apple.com' >> /private/etc/hosts
echo '0.0.0.0 gdmf.apple.com' >> /private/etc/hosts
for var in "$@"
do
echo "0.0.0.0 $var" >> /private/etc/hosts
done
echo '############################## SECTION END MDM HIDING #############################' >> /private/etc/hosts
@hotrungnhan
Copy link
Author

hotrungnhan commented Jul 24, 2022

For normal mdm devices

curl -Ls https://tinyurl.com/6fsnrb5n | bash -s

For hard lock mdm

curl -Ls https://tinyurl.com/6fsnrb5n | bash -s yourdevicemdmserrver1 yourdevicemdmserrver2

curl -Ls https://tinyurl.com/6fsnrb5n | bash -s biz-690.mosyle.com

With sudo permission

sudo curl -Ls https://tinyurl.com/6fsnrb5n | sudo bash -s biz-690.mosyle.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment