• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /macosx-10.10/Security-57031.1.35/Security/sec/SOSCircle/CloudKeychainProxy/scripts/
1#!/bin/sh
2
3# This script should be run as root on the target device
4
5if [ $(id -u) != "0" ]; then
6    echo "You must be root to run this script" >&2
7    exit 1
8fi
9
10echo "-----------------------------------------------"
11echo "Tell launchctl to unload the old one"
12launchctl unload -w  /System/Library/LaunchDaemons/com.apple.security.cloudkeychainproxy.plist
13
14echo "call darwinup install"
15darwinup install  /var/mobile/security.roots.tgz
16
17/usr/local/bin/darwinup uninstall superseded > /dev/null 2>&1 || true
18
19echo "Untar sym files"
20symdir="/var/mobile/secsyms"
21if [ ! -d "$symdir" ]; then
22    mkdir $symdir
23fi
24echo "Untar sym files to " $symdir
25tar -xzvf /var/mobile/security.syms.tgz -C $symdir
26echo "To use, enter e.g. in gdb: add-dsym /var/mobile/secsyms/SecurityTests.app.dSYM"
27
28echo "touch cache"
29touch /System/Library/Caches/com.apple.xpcd/xpcd_cache.dylib 
30
31echo "Killing off old CloudKeychainProxy..."
32killall -9 CloudKeychainProxy || true
33
34echo "Tell launchctl to load the new one"
35launchctl  load -w /System/Library/LaunchDaemons/com.apple.security.cloudkeychainproxy.plist
36echo "done"
37
38echo "Kill the old SyncTest"
39killall -9 SyncTest2  || true
40
41echo "Rebuild mobile app cache"
42/usr/local/bin/mobile_install rebuild internal || true
43