-
-
Save shoeper/bd7c2132f2fd30ee617e2b79bfab08e9 to your computer and use it in GitHub Desktop.
Accept all permissions on iOS 14.8 (except location, notification and local network permission). Location permission here: https://gist.github.com/kasnder/91a64a555e962d08cd05b52f7114b897
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage:./grant_ios_permissions.sh [bundleId] | |
# Example: ./grant_ios_permissions.sh com.spotify.client | |
echo "This does not grant location, notification or local network permission. You can grant location permission with this script: https://gist.github.com/kasnder/91a64a555e962d08cd05b52f7114b897" | |
# Requirements: | |
# - iOS 14.8 device with checkra1n jailbreak | |
# - Installed `sqlite3` on iOS device from Cydia | |
# - iOS device plugged into computed and forwarded SSH port with `iproxy 2222 44` | |
# - Installed public ssh key on your device: `ssh-copy-id -p 2222 root@localhost` | |
# Some more information for the iOS simulator can be found here: https://github.com/wix/AppleSimulatorUtils/blob/master/applesimutils/applesimutils/SetNotificationsPermission.m | |
if [ -z "$1" ]; then | |
echo "Please pass bundleId" | |
exit -1 | |
fi | |
ssh -T -p 2222 root@localhost << EOF | |
# List taken on iOS 14.8 device from /System/Library/PrivateFrameworks/TCC.framework/en.lproj/Localizable.strings | |
for permission in kTCCServiceExposureNotification kTCCServiceFallDetection kTCCServiceGameCenterFriends kTCCServiceSensorKitBedSensingWriting kTCCServiceUserTracking kTCCServiceSiri kTCCServiceSpeechRecognition kTCCServiceAddressBook kTCCServiceBluetoothAlways kTCCServiceBluetoothPeripheral kTCCServiceBluetoothWhileInUse kTCCServiceCalendar kTCCServiceCalls kTCCServiceCamera kTCCServiceContactsFull kTCCServiceContactsLimited kTCCServiceMediaLibrary kTCCServiceMicrophone kTCCServiceMotion kTCCServicePhotosAdd kTCCServiceReminders kTCCServiceWillow; do | |
echo "INSERT INTO access VALUES('\$permission','$1',0,2,2,1,NULL,NULL,NULL,'UNUSED',NULL,0,"\`date +%s\`");" >> ./grant_permissions.sql | |
done | |
echo "INSERT INTO access VALUES('kTCCServicePhotos','$1',0,2,2,2,NULL,NULL,NULL,'UNUSED',NULL,0,"\`date +%s\`");" >> ./grant_permissions.sql | |
# Make sure to install sqlite3 on your device | |
sqlite3 /private/var/mobile/Library/TCC/TCC.db < ./grant_permissions.sql | |
# Cleanup | |
rm ./grant_permissions.sql | |
EOF | |
echo "Granted permissions!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment