3 roots
="/tmp/security.roots.tgz"
4 syms
="/tmp/security.syms.tgz"
5 srcs
="/tmp/security.src.tgz"
6 sshopts
=(-o CheckHostIP
=no
-o StrictHostKeyChecking
=no
-o NoHostAuthenticationForLocalhost
=yes -o UserKnownHostsFile
=/dev
/null
)
8 locations
=(`mobdev list | awk '/UDID/ { gsub(/^(.*location ID = )+|(,.*)+$/, ""); print}'`)
13 symdir
="/var/mobile/secsyms"
15 for location
in $locations
17 echo 'Installing to location '"$location"
19 tcprelay
--portoffset $port_offset --locationid $location ssh >/dev
/null
2>&1 &
21 (( sshport
= $port_offset + 22 ))
23 echo "Copying roots to device (via port $sshport)"
24 scp
-P $sshport $sshopts $roots $syms $srcs root@localhost
:/var
/mobile
/
26 echo "SSH to device and do commands"
27 ssh $sshopts -p $sshport root@localhost
<< END
30 mkdir -p /var/mobile/syms
31 mkdir -p /var/mobile/srcs
32 rm -rf /var/mobile/syms/*
33 rm -rf /var/mobile/srcs/*
34 /usr/local/bin/darwinup install "/var/mobile/`basename $roots`" | grep -v '^ /'
35 /usr/local/bin/darwinup uninstall superseded > /dev/null 2>&1 || true
36 touch /System/Library/Caches/com.apple.xpcd/xpcd_cache.dylib
37 /usr/local/bin/mobile_install rebuild internal
38 /bin/launchctl stop com.apple.securityd
39 /bin/launchctl stop com.apple.security.cloudkeychainproxy3
40 /bin/launchctl stop com.apple.security.CircleJoinRequest
41 tar -xzvf "/var/mobile/`basename $syms`" -C /var/mobile/syms >/dev/null
42 tar -xzvf "/var/mobile/`basename $srcs`" -C /var/mobile/srcs >/dev/null
48 echo "in lldb: settings set target.source-map ""$mysrcdir"" /var/mobile/srcs/"
49 echo "in lldb: add-dsym /var/mobile/syms/securityd.dSYM"