#!/bin/sh
chmod 777 /bin/ppsync.dylib
chmod 777 /usr/bin/karen_clean_changeinstalld
echo Fixing permissions...
/usr/bin/karen_clean_changeinstalld "uninstall"
echo Invoking changeinstalld uninstallation procedure...
launchctl unload /System/Library/LaunchDaemons/com.apple.mobile.installd.plist
launchctl load /System/Library/LaunchDaemons/com.apple.mobile.installd.plist
echo Reloading installd...
#rm -f /User/Library/Caches/com.apple.mobile.installation.plist
#rm -f /User/Library/Caches/com.apple.LaunchServices-*.csstore
rm -f /usr/bin/changeinstalld
rm -f /bin/ppsync.dylib
echo Deleting all PPSync-related files...
echo Cleaning up after PanGu...
cp /Library/CompletePPSyncRemover/com.apple.mobile.installd.plist /Library/LaunchDaemons/com.apple.mobile.installd.plist
echo Rebooting device...
reboot
