Skip to content

Instantly share code, notes, and snippets.

@Siguza
Last active Nov 4, 2021
Embed
What would you like to do?
newstyle OTA
#!/bin/zsh
set -e;
set +m; # Job control would've been nice, but manual round robin it is, sigh.
if [ -z "${ZSH_VERSION+x}" ]; then
echo 'Try again with zsh.';
exit 1;
fi;
if ! hash curl &>/dev/null; then
echo 'Need curl.';
exit 1;
fi;
if ! hash jq &>/dev/null; then
echo 'Need jq.';
exit 1;
fi;
num_workers=256;
incr=false;
fatal=true;
legacy=true;
version='';
filter='all';
while [ "$#" -gt 0 ]; do
case "$1" in
'-i') # incremental
incr=true;
;;
'-l') # latest
legacy=false;
;;
'-n') # non-fatal
fatal=false;
;;
'ios'|'tvos'|'watchos'|'audioos'|'macos')
filter="$1";
;;
*)
version="$1";
;;
esac;
shift;
done;
dir="$(mktemp -d)";
echo "$dir" >&2;
# Apple Root CA is not universally trusted.
cat >"$dir/AppleCA.pem" <<'EOF'
-----BEGIN CERTIFICATE-----
MIIEuzCCA6OgAwIBAgIBAjANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQGEwJVUzET
MBEGA1UEChMKQXBwbGUgSW5jLjEmMCQGA1UECxMdQXBwbGUgQ2VydGlmaWNhdGlv
biBBdXRob3JpdHkxFjAUBgNVBAMTDUFwcGxlIFJvb3QgQ0EwHhcNMDYwNDI1MjE0
MDM2WhcNMzUwMjA5MjE0MDM2WjBiMQswCQYDVQQGEwJVUzETMBEGA1UEChMKQXBw
bGUgSW5jLjEmMCQGA1UECxMdQXBwbGUgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkx
FjAUBgNVBAMTDUFwcGxlIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
ggEKAoIBAQDkkakJH5HbHkdQ6wXtXnmELes2oldMVeyLGYne+Uts9QerIjAC6Bg+
+FAJ039BqJj50cpmnCRrEdCju+QbKsMflZ56DKRHi1vUFjczy8QPTc4UadHJGXL1
XQ7Vf1+b8iUDulWPTV0N8WQ1IxVLFVkds5T39pyez1C6wVhQZ48ItCD3y6wsIG9w
tj8BMIy3Q88PnT3zK0koGsj+zrW5DtleHNbLPbU6rfQPDgCSC7EhFi501TwN22IW
q6NxkkdTVcGvL0Gz+PvjcM3mo0xFfh9Ma1CWQYnEdGILEINBhzOKgbEwWOxaBDKM
aLOPHd5lc/9nXmW8Sdh2nzMUZaF3lMktAgMBAAGjggF6MIIBdjAOBgNVHQ8BAf8E
BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUK9BpR5R2Cf70a40uQKb3
R01/CF4wHwYDVR0jBBgwFoAUK9BpR5R2Cf70a40uQKb3R01/CF4wggERBgNVHSAE
ggEIMIIBBDCCAQAGCSqGSIb3Y2QFATCB8jAqBggrBgEFBQcCARYeaHR0cHM6Ly93
d3cuYXBwbGUuY29tL2FwcGxlY2EvMIHDBggrBgEFBQcCAjCBthqBs1JlbGlhbmNl
IG9uIHRoaXMgY2VydGlmaWNhdGUgYnkgYW55IHBhcnR5IGFzc3VtZXMgYWNjZXB0
YW5jZSBvZiB0aGUgdGhlbiBhcHBsaWNhYmxlIHN0YW5kYXJkIHRlcm1zIGFuZCBj
b25kaXRpb25zIG9mIHVzZSwgY2VydGlmaWNhdGUgcG9saWN5IGFuZCBjZXJ0aWZp
Y2F0aW9uIHByYWN0aWNlIHN0YXRlbWVudHMuMA0GCSqGSIb3DQEBBQUAA4IBAQBc
NplMLXi37Yyb3PN3m/J20ncwT8EfhYOFG5k9RzfyqZtAjizUsZAS2L70c5vu0mQP
y3lPNNiiPvl4/2vIB+x9OYOLUyDTOMSxv5pPCmv/K/xZpwUJfBdAVhEedNO3iyM7
R6PVbyTi69G3cN8PReEnyvFteO3ntRcXqNx+IjXKJdXZD9Zr1KIkIxH3oayPc4Fg
xhtbCS+SsvhESPBgOJ4V9T0mZyCKM2r3DYLP3uujL/lTaltkwGMzd/c6ByxW69oP
IQ7aunMZT7XZNn/Bh1XZp5m5MkL72NVxnn6hUrcbvZNCJBIqxw8dtk2cXmPIS4AX
UKqK1drk/NAJBzewdXUh
-----END CERTIFICATE-----
EOF
# ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
iOS_device=();
iOS_model=();
iOS_version=();
iOS_build=();
idevice() # device model
{
iOS_device+=("$1");
iOS_model+=("$2");
}
ios() # version build
{
iOS_version+=("$1");
iOS_build+=("$2");
}
idevice 'iPhone6,1' 'N51AP' # iPhone 5s
idevice 'iPhone6,2' 'N53AP' # iPhone 5s
idevice 'iPhone7,1' 'N56AP' # iPhone 6+
idevice 'iPhone7,2' 'N61AP' # iPhone 6
idevice 'iPhone8,1' 'N71AP' # iPhone 6s
idevice 'iPhone8,1' 'N71mAP' # iPhone 6s
idevice 'iPhone8,2' 'N66AP' # iPhone 6s+
idevice 'iPhone8,2' 'N66mAP' # iPhone 6s+
idevice 'iPhone8,4' 'N69AP' # iPhone SE
idevice 'iPhone8,4' 'N69uAP' # iPhone SE
idevice 'iPhone9,1' 'D10AP' # iPhone 7
idevice 'iPhone9,2' 'D11AP' # iPhone 7+
idevice 'iPhone9,3' 'D101AP' # iPhone 7
idevice 'iPhone9,4' 'D111AP' # iPhone 7+
idevice 'iPhone10,1' 'D20AP' # iPhone 8
idevice 'iPhone10,1' 'D20AAP' # iPhone 8
idevice 'iPhone10,2' 'D21AP' # iPhone 8+
idevice 'iPhone10,2' 'D21AAP' # iPhone 8+
idevice 'iPhone10,3' 'D22AP' # iPhone X
idevice 'iPhone10,4' 'D201AP' # iPhone 8
idevice 'iPhone10,4' 'D201AAP' # iPhone 8
idevice 'iPhone10,5' 'D211AP' # iPhone 8+
idevice 'iPhone10,5' 'D211AAP' # iPhone 8+
idevice 'iPhone10,6' 'D221AP' # iPhone X
idevice 'iPhone11,2' 'D321AP' # iPhone XS
idevice 'iPhone11,4' 'D331AP' # iPhone XS Max
idevice 'iPhone11,6' 'D331pAP' # iPhone XS Max
idevice 'iPhone11,8' 'N841AP' # iPhone XR
idevice 'iPhone12,1' 'N104AP' # iPhone 11
idevice 'iPhone12,3' 'D421AP' # iPhone 11 Pro
idevice 'iPhone12,5' 'D431AP' # iPhone 11 Pro Max
idevice 'iPhone12,8' 'D79AP' # iPhone SE 2
idevice 'iPhone13,1' 'D52gAP' # iPhone 12 mini
idevice 'iPhone13,2' 'D53gAP' # iPhone 12
idevice 'iPhone13,3' 'D53pAP' # iPhone 12 Pro
idevice 'iPhone13,4' 'D54pAP' # iPhone 12 Pro Max
idevice 'iPhone14,2' 'D63AP' # iPhone 13 Pro
idevice 'iPhone14,3' 'D64AP' # iPhone 13 Pro Max
idevice 'iPhone14,4' 'D16AP' # iPhone 13 mini
idevice 'iPhone14,5' 'D17AP' # iPhone 13
idevice 'iPod7,1' 'N102AP' # iPod touch 6
idevice 'iPod9,1' 'N112AP' # iPod touch 7
idevice 'iPad6,11' 'J71sAP' # iPad 5
idevice 'iPad6,11' 'J71tAP' # iPad 5
idevice 'iPad6,12' 'J72sAP' # iPad 5
idevice 'iPad6,12' 'J72tAP' # iPad 5
idevice 'iPad7,5' 'J71bAP' # iPad 6
idevice 'iPad7,6' 'J72bAP' # iPad 6
idevice 'iPad7,11' 'J171AP' # iPad 7
idevice 'iPad7,12' 'J172AP' # iPad 7
idevice 'iPad11,6' 'J171aAP' # iPad 8
idevice 'iPad11,7' 'J172aAP' # iPad 8
idevice 'iPad12,1' 'J181AP' # iPad 9
idevice 'iPad12,2' 'J182AP' # iPad 9
idevice 'iPad4,1' 'J71AP' # iPad Air 1
idevice 'iPad4,2' 'J72AP' # iPad Air 1
idevice 'iPad4,3' 'J73AP' # iPad Air 1
idevice 'iPad5,3' 'J81AP' # iPad Air 2
idevice 'iPad5,4' 'J82AP' # iPad Air 2
idevice 'iPad11,3' 'J217AP' # iPad Air 3
idevice 'iPad11,4' 'J218AP' # iPad Air 3
idevice 'iPad13,1' 'J307AP' # iPad Air 4
idevice 'iPad13,2' 'J308AP' # iPad Air 4
idevice 'iPad4,4' 'J85AP' # iPad mini 2
idevice 'iPad4,5' 'J86AP' # iPad mini 2
idevice 'iPad4,6' 'J87AP' # iPad mini 2
idevice 'iPad4,7' 'J85mAP' # iPad mini 3
idevice 'iPad4,8' 'J86mAP' # iPad mini 3
idevice 'iPad4,9' 'J87mAP' # iPad mini 3
idevice 'iPad5,1' 'J96AP' # iPad mini 4
idevice 'iPad5,2' 'J97AP' # iPad mini 4
idevice 'iPad11,1' 'J210AP' # iPad mini 5
idevice 'iPad11,2' 'J211AP' # iPad mini 5
idevice 'iPad14,1' 'J310AP' # iPad mini 6
idevice 'iPad14,2' 'J311AP' # iPad mini 6
idevice 'iPad6,3' 'J127AP' # iPad Pro 1 (9.7")
idevice 'iPad6,4' 'J128AP' # iPad Pro 1 (9.7")
idevice 'iPad6,7' 'J98aAP' # iPad Pro 1 (12.9")
idevice 'iPad6,8' 'J99aAP' # iPad Pro 1 (12.9")
idevice 'iPad7,1' 'J120AP' # iPad Pro 2 (12.9")
idevice 'iPad7,2' 'J121AP' # iPad Pro 2 (12.9")
idevice 'iPad7,3' 'J207AP' # iPad Pro 2 (10.5")
idevice 'iPad7,4' 'J208AP' # iPad Pro 2 (10.5")
idevice 'iPad8,1' 'J317AP' # iPad Pro 3 (11.0")
idevice 'iPad8,2' 'J317xAP' # iPad Pro 3 (11.0")
idevice 'iPad8,3' 'J318AP' # iPad Pro 3 (11.0")
idevice 'iPad8,4' 'J318xAP' # iPad Pro 3 (11.0")
idevice 'iPad8,5' 'J320AP' # iPad Pro 3 (12.9")
idevice 'iPad8,6' 'J320xAP' # iPad Pro 3 (12.9")
idevice 'iPad8,7' 'J321AP' # iPad Pro 3 (12.9")
idevice 'iPad8,8' 'J321xAP' # iPad Pro 3 (12.9")
idevice 'iPad8,9' 'J417AP' # iPad Pro 4 (11.0")
idevice 'iPad8,10' 'J418AP' # iPad Pro 4 (11.0")
idevice 'iPad8,11' 'J420AP' # iPad Pro 4 (12.9")
idevice 'iPad8,12' 'J421AP' # iPad Pro 4 (12.9")
idevice 'iPad13,4' 'J517AP' # iPad Pro 5 (11.0")
idevice 'iPad13,5' 'J517xAP' # iPad Pro 5 (11.0")
idevice 'iPad13,6' 'J518AP' # iPad Pro 5 (11.0")
idevice 'iPad13,7' 'J518xAP' # iPad Pro 5 (11.0")
idevice 'iPad13,8' 'J522AP' # iPad Pro 5 (12.9")
idevice 'iPad13,9' 'J522xAP' # iPad Pro 5 (12.9")
idevice 'iPad13,10' 'J523AP' # iPad Pro 5 (12.9")
idevice 'iPad13,11' 'J523xAP' # iPad Pro 5 (12.9")
ios '0' '0'
if $incr; then
ios '10.0' '14A5261v' # beta 1
ios '10.0' '14A5297c' # beta 2
ios '10.0' '14A5309d' # beta 3
ios '10.0' '14A5322e' # beta 4
ios '10.0' '14A5335b' # beta 5
ios '10.0' '14A5341a' # beta 6
ios '10.0' '14A5345a' # beta 7
ios '10.0' '14A5346a' # beta 8
ios '10.0' '14A346'
ios '10.0.1' '14A403'
ios '10.0.1' '14A5403'
ios '10.0.2' '14A456'
ios '10.0.2' '14A5456'
ios '10.0.3' '14A551'
ios '10.1' '14B5072'
ios '10.1' '14B55c' # beta 1
ios '10.1' '14B67' # beta 2
ios '10.1' '14B71' # beta 3
ios '10.1' '14B72b' # beta 4
ios '10.1' '14B72c' # beta 5
ios '10.1' '14B72'
ios '10.1.1' '14B100'
ios '10.1.1' '14B150'
ios '10.2' '14C5062e' # beta 1
ios '10.2' '14C5069c' # beta 2
ios '10.2' '14C5077b' # beta 3
ios '10.2' '14C82' # beta 4
ios '10.2' '14C5082' # beta 4
ios '10.2' '14C89' # beta 5
ios '10.2' '14C5089' # beta 5
ios '10.2' '14C90' # beta 6
ios '10.2' '14C5090' # beta 6
ios '10.2' '14C91' # beta 6
ios '10.2' '14C5091' # beta 6
ios '10.2' '14C92'
ios '10.2' '14C5092'
ios '10.2' '14C6092'
ios '10.2.1' '14D10' # beta 1
ios '10.2.1' '14D5010' # beta 1
ios '10.2.1' '14D15' # beta 2
ios '10.2.1' '14D5015' # beta 2
ios '10.2.1' '14D23' # beta 3
ios '10.2.1' '14D27'
ios '10.2.1' '14D5027'
ios '10.3' '14E5230e' # beta 1
ios '10.3' '14E5239e' # beta 2
ios '10.3' '14E5249d' # beta 3
ios '10.3' '14E5260b' # beta 4
ios '10.3' '14E5269a' # beta 5
ios '10.3' '14E5273a' # beta 6
ios '10.3' '14E5277a' # beta 7
ios '10.3' '14E277'
ios '10.3' '14E6277'
ios '10.3.1' '14E304'
ios '10.3.1' '14E6304'
ios '10.3.2' '14F5065b' # beta 1
ios '10.3.2' '14F5075a' # beta 2
ios '10.3.2' '14F5080a' # beta 3
ios '10.3.2' '14F5086a' # beta 4
ios '10.3.2' '14F5089a' # beta 5
ios '10.3.2' '14F89'
ios '10.3.2' '14F6089'
ios '10.3.2' '14F90'
ios '10.3.2' '14F6090'
ios '10.3.2' '14F91'
ios '10.3.2' '14F6091'
ios '10.3.3' '14G5028a' # beta 1
ios '10.3.3' '14G5037b' # beta 2
ios '10.3.3' '14G5047a' # beta 3
ios '10.3.3' '14G5053a' # beta 4
ios '10.3.3' '14G5057a' # beta 5
ios '10.3.3' '14G57' # beta 6
ios '10.3.3' '14G58' # beta 6
ios '10.3.3' '14G60'
ios '10.3.3' '14G6000'
ios '10.3.3' '14G6060'
ios '11.0' '15A5278f' # beta 1
ios '11.0' '15A5304i' # beta 2
ios '11.0' '15A5304j' # beta 2
ios '11.0' '15A5318g' # beta 3
ios '11.0' '15A5327g' # beta 4
ios '11.0' '15A5341f' # beta 5
ios '11.0' '15A5354b' # beta 6
ios '11.0' '15A5362a' # beta 7
ios '11.0' '15A5368a' # beta 8
ios '11.0' '15A5370a' # beta 9
ios '11.0' '15A5372a' # beta 10
ios '11.0' '15A372' # GM
ios '11.0' '15A6372'
ios '11.0.1' '15A402'
ios '11.0.1' '15A403'
ios '11.0.1' '15A6402'
ios '11.0.2' '15A421'
ios '11.0.2' '15A6421'
ios '11.0.3' '15A432'
ios '11.0.3' '15A6432'
ios '11.1' '15B5066f' # beta 1
ios '11.1' '15B5078e' # beta 2
ios '11.1' '15B5086a' # beta 3
ios '11.1' '15B92' # beta 4
ios '11.1' '15B6092' # beta 4
ios '11.1' '15B93'
ios '11.1' '15B6093'
ios '11.1' '15B101'
ios '11.1' '15B6101'
ios '11.1.1' '15B150'
ios '11.1.1' '15B6150'
ios '11.1.2' '15B202'
ios '11.1.2' '15B6202'
ios '11.2' '15C5092b' # beta 1
ios '11.2' '15C5097d' # beta 2
ios '11.2' '15C5107a' # beta 3
ios '11.2' '15C5110b' # beta 4
ios '11.2' '15C5111a' # beta 5
ios '11.2' '15C114'
ios '11.2' '15C6114'
ios '11.2.1' '15C153'
ios '11.2.1' '15C6153'
ios '11.2.2' '15C202'
ios '11.2.2' '15C6202'
ios '11.2.5' '15D5037e' # beta 1
ios '11.2.5' '15D5046b' # beta 2
ios '11.2.5' '15D5049a' # beta 3
ios '11.2.5' '15D5054a' # beta 4
ios '11.2.5' '15D5057a' # beta 5
ios '11.2.5' '15D5059a' # beta 6
ios '11.2.5' '15D60'
ios '11.2.5' '15D6060'
ios '11.2.6' '15D100'
ios '11.2.6' '15D6100'
ios '11.3' '15E5167f' # beta 1
ios '11.3' '15E5178f' # beta 2
ios '11.3' '15E5189f' # beta 3
ios '11.3' '15E5201e' # beta 4
ios '11.3' '15E5211a' # beta 5
ios '11.3' '15E5216a' # beta 6
ios '11.3' '15E216'
ios '11.3' '15E6216'
ios '11.3.1' '15E302'
ios '11.3.1' '15E6302'
ios '11.4' '15F5037c' # beta 1
ios '11.4' '15F5049c' # beta 2
ios '11.4' '15F5061d' # beta 3
ios '11.4' '15F5061e' # beta 3
ios '11.4' '15F5071a' # beta 4
ios '11.4' '15F5077a' # beta 5
ios '11.4' '15F5079a' # beta 6
ios '11.4' '15F79'
ios '11.4' '15F6079'
ios '11.4.1' '15G5054c' # beta 1
ios '11.4.1' '15G5063b' # beta 2
ios '11.4.1' '15G5072a' # beta 3
ios '11.4.1' '15G5074a' # beta 4
ios '11.4.1' '15G5077a' # beta 5
ios '11.4.1' '15G77'
ios '11.4.1' '15G6077'
ios '12.0' '16A5288q' # beta 1
ios '12.0' '16A5308e' # beta 2
ios '12.0' '16A5318d' # beta 3
ios '12.0' '16A5327f' # beta 4
ios '12.0' '16A5339e' # beta 5
ios '12.0' '16A5345f' # beta 6
ios '12.0' '16A5354b' # beta 7
ios '12.0' '16A5357b' # beta 8
ios '12.0' '16A5362a' # beta 9
ios '12.0' '16A5364a' # beta 10
ios '12.0' '16A5365b' # beta 11
ios '12.0' '16A5366a' # beta 12
ios '12.0' '16A366' # GM
ios '12.0' '16A6366'
ios '12.0' '16A367'
ios '12.0' '16A6367'
ios '12.0.1' '16A404'
ios '12.0.1' '16A6404'
ios '12.0.1' '16A405'
ios '12.0.1' '16A6405'
ios '12.1' '16B5059d' # beta 1
ios '12.1' '16B5068i' # beta 2
ios '12.1' '16B5077c' # beta 3
ios '12.1' '16B5084a' # beta 4
ios '12.1' '16B5089b' # beta 5
ios '12.1' '16B92'
ios '12.1' '16B6092'
ios '12.1' '16B93'
ios '12.1' '16B6093'
ios '12.1' '16B94'
ios '12.1' '16B6094'
ios '12.1.1' '16C5036c' # beta 1
ios '12.1.1' '16C5043b' # beta 2
ios '12.1.1' '16C5050a' # beta 3
ios '12.1.1' '16C50'
ios '12.1.1' '16C6050'
ios '12.1.2' '16D5024a' # beta 1
ios '12.1.2' '16C101'
ios '12.1.2' '16C6101'
ios '12.1.2' '16C104'
ios '12.1.2' '16C6104'
ios '12.1.3' '16D5032a' # beta 2
ios '12.1.3' '16D5037a' # beta 3
ios '12.1.3' '16D5039a' # beta 4
ios '12.1.3' '16D39'
ios '12.1.3' '16D6039'
ios '12.1.3' '16D40'
ios '12.1.3' '16D6040'
ios '12.1.4' '16D57'
ios '12.1.4' '16D6057'
ios '12.2' '16E5181f' # beta 1
ios '12.2' '16E5191d' # beta 2
ios '12.2' '16E5201e' # beta 3
ios '12.2' '16E5212f' # beta 4
ios '12.2' '16E5223a' # beta 5
ios '12.2' '16E5227a' # beta 6
ios '12.2' '16E227'
ios '12.2' '16E6227'
ios '12.3' '16F5117h' # beta 1
ios '12.3' '16F5129d' # beta 2
ios '12.3' '16F5139e' # beta 3
ios '12.3' '16F5148a' # beta 4
ios '12.3' '16F5155a' # beta 5
ios '12.3' '16F5156a' # beta 6
ios '12.3' '16F156'
ios '12.3' '16F6156'
ios '12.3.1' '16F203'
ios '12.3.1' '16F6203'
ios '12.3.1' '16F8202'
ios '12.3.2' '16F250'
ios '12.3.2' '16F6250'
ios '12.4' '16G5027g' # beta 1
ios '12.4' '16G5027i' # beta 2
ios '12.4' '16G5038d' # beta 3
ios '12.4' '16G5046d' # beta 4
ios '12.4' '16G5056d' # beta 5
ios '12.4' '16G5069a' # beta 6
ios '12.4' '16G5077a' # beta 7
ios '12.4' '16G77'
ios '12.4' '16G6077'
ios '12.4.1' '16G102'
ios '12.4.1' '16G6102'
ios '12.4.2' '16G114'
ios '12.4.2' '16G6114'
ios '12.4.3' '16G130'
ios '12.4.3' '16G6130'
ios '12.4.4' '16G140'
ios '12.4.4' '16G6140'
ios '12.4.5' '16G161'
ios '12.4.5' '16G6161'
ios '12.4.6' '16G183'
ios '12.4.6' '16G6183'
ios '12.4.7' '16G192'
ios '12.4.7' '16G6192'
ios '12.4.8' '16G201'
ios '12.4.8' '16G6201'
ios '12.4.9' '16H5'
ios '12.4.9' '16H6005'
ios '12.5' '16H20'
ios '12.5' '16H6020'
ios '12.5.1' '16H22'
ios '12.5.1' '16H6022'
ios '12.5.2' '16H30'
ios '12.5.2' '16H6030'
ios '13.0' '17A5492t' # beta 1
ios '13.0' '17A5508m' # beta 2
ios '13.0' '17A5522f' # beta 3
ios '13.0' '17A5522g' # beta 3
ios '13.0' '17A5534f' # beta 4
ios '13.0' '17A5547d' # beta 5
ios '13.0' '17A5556d' # beta 6
ios '13.0' '17A5565b' # beta 7
ios '13.0' '17A5572a' # beta 8
ios '13.0' '17A577'
ios '13.0' '17A6577'
ios '13.1' '17A5821e' # beta 1
ios '13.1' '17A5831c' # beta 2
ios '13.1' '17A5837a' # beta 3
ios '13.1' '17A5844a' # beta 4
ios '13.1' '17A5844b' # beta 4
ios '13.1' '17A844'
ios '13.1' '17A6844'
ios '13.1.1' '17A854'
ios '13.1.1' '17A6854'
ios '13.1.2' '17A6860'
ios '13.1.2' '17A6861'
ios '13.1.2' '17A860'
ios '13.1.2' '17A861'
ios '13.1.3' '17A878'
ios '13.1.3' '17A6878'
ios '13.2' '17B5059g'
ios '13.2' '17B5068e'
ios '13.2' '17B5077a'
ios '13.2' '17B5084a'
ios '13.2' '17B84'
ios '13.2' '17B6084'
ios '13.2.2' '17B102'
ios '13.2.2' '17B6102'
ios '13.2.3' '17B111'
ios '13.2.3' '17B6111'
ios '13.3' '17C5032d' # beta 1
ios '13.3' '17C5038a' # beta 2
ios '13.3' '17C5046a' # beta 3
ios '13.3' '17C5053a' # beta 4
ios '13.3' '17C54'
ios '13.3' '17C6054'
ios '13.3.1' '17D5026c' # beta 1
ios '13.3.1' '17D5044a' # beta 2
ios '13.3.1' '17D5050a' # beta 3
ios '13.3.1' '17D50'
ios '13.3.1' '17D6050'
ios '13.4' '17E5223h' # beta 1
ios '13.4' '17E5233g' # beta 2
ios '13.4' '17E5241d' # beta 3
ios '13.4' '17E5249a' # beta 4
ios '13.4' '17E5255a' # beta 5
ios '13.4' '17E255'
ios '13.4' '17E6255'
ios '13.4' '17E8255'
ios '13.4.1' '17E262'
ios '13.4.1' '17E6262'
ios '13.4.1' '17E8258'
ios '13.4.5' '17F5034c' # beta 1
ios '13.4.5' '17F5044d' # beta 2
ios '13.5' '17F5054h' # beta 3
ios '13.5' '17F5065a' # beta 4
ios '13.5' '17F75'
ios '13.5' '17F6075'
ios '13.5.1' '17F80'
ios '13.5.1' '17F6080'
ios '13.5.5' '17G5035d' # beta 1
ios '13.6' '17G5045c' # beta 2
ios '13.6' '17G5059c' # beta 3
ios '13.6' '17G68'
ios '13.6' '17G6068'
ios '13.6.1' '17G80'
ios '13.7' '17H33' # beta 1
ios '13.7' '17H35'
ios '14.0' '18A5301v' # beta 1
ios '14.0' '18A5319i' # beta 2
ios '14.0' '18A5332f' # beta 3
ios '14.0' '18A5342e' # beta 4
ios '14.0' '18A5351d' # beta 5
ios '14.0' '18A5357e' # beta 6
ios '14.0' '18A5369b' # beta 7
ios '14.0' '18A5373a' # beta 8
ios '14.0' '18A373'
ios '14.0.1' '18A393'
ios '14.1' '18A8395'
ios '14.2' '18B5052h' # beta 1
ios '14.2' '18B5052i' # still beta 1, but more extra
ios '14.2' '18B5061e' # beta 2
ios '14.2' '18B5072f' # beta 3
ios '14.2' '18B5083a' # beta 4
ios '14.2' '18B91' # RC 1
ios '14.2' '18B92'
ios '14.2' '18B111'
ios '14.2.1' '18B121'
ios '14.3' '18C5044f' # beta 1
ios '14.3' '18C5054c' # beta 2
ios '14.3' '18C5061a' # beta 3
ios '14.3' '18C65' # RC 1
ios '14.3' '18C66'
ios '14.4' '18D5030e' # beta 1
ios '14.4' '18D5043d' # beta 2
ios '14.4' '18D52'
ios '14.4.1' '18D61'
ios '14.4.2' '18D70'
ios '14.5' '18E5140j' # beta 1
ios '14.5' '18E5140k' # beta 1 again
ios '14.5' '18E5154f' # beta 2
ios '14.5' '18E5164h' # beta 3
ios '14.5' '18E5178a' # beta 4
ios '14.5' '18E5186a' # beta 5
ios '14.5' '18E5194a' # beta 6
ios '14.5' '18E5198a' # beta 7
ios '14.5' '18E5199a' # beta 8
ios '14.5' '18E199'
ios '14.5.1' '18E212'
ios '14.6' '18F5046e' # beta 1
ios '14.6' '18F5046f' # beta 1
ios '14.6' '18F5055b' # beta 2
ios '14.6' '18F5065a' # beta 3
ios '14.6' '18F71' # RC 1
ios '14.6' '18F72'
ios '14.7' '18G5023c' # beta 1
ios '14.7' '18G5033e' # beta 2
ios '15.0' '19A5261w' # beta 1
fi;
# ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
tvOS_device=();
tvOS_model=();
tvOS_version=();
tvOS_build=();
atv() # device model
{
tvOS_device+=("$1");
tvOS_model+=("$2");
}
tvos() # version build
{
tvOS_version+=("$1");
tvOS_build+=("$2");
}
atv 'AppleTV5,3' 'J42dAP' # AppleTV 4
atv 'AppleTV6,2' 'J105aAP' # AppleTV 4k
atv 'AppleTV11,1' 'J305AP' # AppleTV 4k 2
tvos '0' '0'
if $incr; then
tvos '11.0' '15J5284e' # beta 1
tvos '11.0' '15J5284g' # beta 1 reloaded
tvos '11.0' '15J5310e' # beta 2
tvos '11.0' '15J5310h' # beta 2 reloaded
tvos '11.0' '15J5324f' # beta 3
tvos '11.0' '15J5333f' # beta 4
tvos '11.0' '15J5347f' # beta 5
tvos '11.0' '15J5360b' # beta 6
tvos '11.0' '15J5369a' # beta 7
tvos '11.0' '15J5374a' # beta 8
tvos '11.0' '15J5378a' # beta 9
tvos '11.0' '15J5380a' # beta 10
tvos '11.0' '15J381' # GM
tvos '11.0' '15J6381'
tvos '11.1' '15J5559d' # beta 1
tvos '11.1' '15J5571d' # beta 2
tvos '11.1' '15J5580a' # beta 3
tvos '11.1' '15J5582a' # beta 4
tvos '11.1' '15J582'
tvos '11.1' '15J6582'
tvos '11.2' '15K5085b' # beta 1
tvos '11.2' '15K5090c' # beta 2
tvos '11.2' '15K5099a' # beta 3
tvos '11.2' '15K5102a' # beta 4
tvos '11.2' '15K5105a' # beta 5
tvos '11.2' '15K106'
tvos '11.2' '15K6106'
tvos '11.2.1' '15K152'
tvos '11.2.1' '15K6152'
tvos '11.2.5' '15K5531d' # beta 1
tvos '11.2.5' '15K5539b' # beta 2
tvos '11.2.5' '15K5544a' # beta 3
tvos '11.2.5' '15K5544b' # beta 4
tvos '11.2.5' '15K5549a' # beta 5
tvos '11.2.5' '15K5552a' # beta 6
tvos '11.2.5' '15K552'
tvos '11.2.5' '15K6552'
tvos '11.2.6' '15K600'
tvos '11.2.6' '15K6600'
tvos '11.3' '15L5164e' # beta 1
tvos '11.3' '15L5175d' # beta 2
tvos '11.3' '15L5186e' # beta 3
tvos '11.3' '15L5198d' # beta 4
tvos '11.3' '15L5208a' # beta 5
tvos '11.3' '15L5211b' # beta 6
tvos '11.3' '15L211'
tvos '11.3' '15L6211'
tvos '11.4' '15L5536c' # beta 1
tvos '11.4' '15L5546a' # beta 2
tvos '11.4' '15L5560b' # beta 3
tvos '11.4' '15L5570a' # beta 4
tvos '11.4' '15L5576a' # beta 5
tvos '11.4' '15L577'
tvos '11.4' '15L6577'
tvos '11.4.1' '15M5054b' # beta 1
tvos '11.4.1' '15M5063a' # beta 2
tvos '11.4.1' '15M5071b' # beta 3
tvos '11.4.1' '15M5072a' # beta 4
tvos '11.4.1' '15M6073'
tvos '11.4.1' '15M73'
tvos '12.0' '16J5283n' # beta 1
tvos '12.0' '16J5303e' # beta 2
tvos '12.0' '16J5313d' # beta 3
tvos '12.0' '16J5322d' # beta 4
tvos '12.0' '16J5334e' # beta 5
tvos '12.0' '16J5340e' # beta 6
tvos '12.0' '16J5349a' # beta 7
tvos '12.0' '16J5355a' # beta 8
tvos '12.0' '16J5360a' # beta 9
tvos '12.0' '16J5364a' # beta 10
tvos '12.0' '16J364' # GM
tvos '12.0' '16J6364'
tvos '12.0.1' '16J380'
tvos '12.0.1' '16J6380'
tvos '12.1' '16J5575c' # beta 1
tvos '12.1' '16J5584c' # beta 2
tvos '12.1' '16J5593c' # beta 3
tvos '12.1' '16J5600a' # beta 4
tvos '12.1' '16J5602a' # beta 5
tvos '12.1' '16J602'
tvos '12.1' '16J6602'
tvos '12.1.1' '16K5035b' # beta 1
tvos '12.1.1' '16K5041a' # beta 2
tvos '12.1.1' '16K5044a' # beta 3
tvos '12.1.1' '16K5045a' # beta 4
tvos '12.1.1' '16K45'
tvos '12.1.1' '16K6045'
tvos '12.1.2' '16K5524a' # beta 1
tvos '12.1.2' '16K5532a' # beta 2
tvos '12.1.2' '16K5534a' # beta 3
tvos '12.1.2' '16K534'
tvos '12.1.2' '16K6534'
tvos '12.2' '16L5181f' # beta 1
tvos '12.2' '16L5191d' # beta 2
tvos '12.2' '16L5201d' # beta 3
tvos '12.2' '16L5212e' # beta 4
tvos '12.2' '16L5221a' # beta 5
tvos '12.2' '16L5226a' # beta 6
tvos '12.2' '16L226'
tvos '12.2' '16L6226'
tvos '12.2.1' '16L250'
tvos '12.2.1' '16L6250'
tvos '12.3' '16M5117f' # beta 1
tvos '12.3' '16M5129d' # beta 2
tvos '12.3' '16M5139a' # beta 3
tvos '12.3' '16M5146a' # beta 4
tvos '12.3' '16M5151a' # beta 5
tvos '12.3' '16M153'
tvos '12.3' '16M6153'
tvos '12.4' '16M5526d' # beta 1
tvos '12.4' '16M5537c' # beta 2
tvos '12.4' '16M5545c' # beta 3
tvos '12.4' '16M568'
tvos '12.4' '16M6568'
tvos '12.4.1' '16M600'
tvos '12.4.1' '16M6600'
tvos '13.0' '17J5485s' # beta 1
tvos '13.0' '17J5501l' # beta 2
tvos '13.0' '17J5515e' # beta 3
tvos '13.0' '17J5526e' # beta 4
tvos '13.0' '17J5540d' # beta 5
tvos '13.0' '17J5549c' # beta 6
tvos '13.0' '17J5557a' # beta 7
tvos '13.0' '17J5564c' # beta 8
tvos '13.0' '17J5573a' # beta 9
tvos '13.0' '17J5579a' # beta 10
tvos '13.0' '17J5584a' # beta 11
tvos '13.0' '17J586' # GM
tvos '13.0' '17J6586'
tvos '13.2' '17K5059d' # beta 1
tvos '13.2' '17K5068b' # beta 2
tvos '13.2' '17K5078a' # beta 3
tvos '13.2' '17K5082a' # beta 4
tvos '13.2' '17K82'
tvos '13.2' '17K6082'
tvos '13.3' '17K5433c' # beta 1
tvos '13.3' '17K5440a' # beta 2
tvos '13.3' '17K5445a' # beta 3
tvos '13.3' '17K5449a' # beta 4
tvos '13.3' '17K449'
tvos '13.3' '17K6449'
tvos '13.3.1' '17K5775c' # beta 1
tvos '13.3.1' '17K5792a' # beta 2
tvos '13.3.1' '17K5795a' # beta 3
tvos '13.3.1' '17K795'
tvos '13.3.1' '17K6795'
tvos '13.4' '17L5225g' # beta 1
tvos '13.4' '17L5235e' # beta 2
tvos '13.4' '17L5245b' # beta 3
tvos '13.4' '17L5251a' # beta 4
tvos '13.4' '17L5255a' # beta 5
tvos '13.4' '17L256'
tvos '13.4' '17L6256'
tvos '13.4.5' '17L5533c' # beta 1
tvos '13.4.5' '17L5543d' # beta 2
tvos '13.4.5' '17L5553c' # beta 3
tvos '13.4.5' '17L5560a' # beta 4
tvos '13.4.5' '17L562'
tvos '13.4.5' '17L6562'
tvos '13.4.6' '17L570'
tvos '13.4.6' '17L6570'
tvos '13.4.8' '17M5535f' # beta 1
tvos '13.4.8' '17M5545a' # beta 2
tvos '13.4.8' '17M5558b' # beta 3
tvos '13.4.8' '17M61'
tvos '13.4.8' '17M6061'
tvos '14.0' '18J5313t' # beta 1
tvos '14.0' '18J5331g' # beta 2
tvos '14.0' '18J5344d' # beta 3
tvos '14.0' '18J5354d' # beta 4
tvos '14.0' '18J5364d' # beta 5
tvos '14.0' '18J5370e' # beta 6
tvos '14.0' '18J5379a' # beta 7
tvos '14.0' '18J5385a' # beta 8
tvos '14.0' '18J386'
tvos '14.0.1' '18J400'
tvos '14.0.2' '18J411'
tvos '14.2' '18K5027e' # beta 1
tvos '14.2' '18K5036d' # beta 2
tvos '14.2' '18K5047f' # beta 3
tvos '14.2' '18K5057a' # beta 4
tvos '14.2' '18K57'
tvos '14.3' '18K5545e' # beta 1
tvos '14.3' '18K5556a' # beta 2
tvos '14.3' '18K5559a' # beta 3
tvos '14.3' '18K561'
tvos '14.4' '18K5780c' # beta 1
tvos '14.4' '18K5793d' # beta 2
tvos '14.4' '18K802'
tvos '14.5' '18L5149j' # beta 1
tvos '14.5' '18L5163d' # beta 2
tvos '14.5' '18L5173f' # beta 3
tvos '14.5' '18L5186a' # beta 4
tvos '14.5' '18L5193a' # beta 5
tvos '14.5' '18L5200a' # beta 6
tvos '14.5' '18L5203a' # beta 7
tvos '14.5' '18L204'
tvos '14.6' '18L5546f' # beta 1
tvos '14.6' '18L5555c' # beta 2
tvos '14.6' '18L5565a' # beta 3
tvos '14.6' '18L569'
tvos '14.7' '18M5523d' # beta 1
tvos '14.7' '18M5533c' # beta 2
tvos '15.0' '19J5268r' # beta 1
fi;
# ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
watchOS_device=();
watchOS_model=();
watchOS_version=();
watchOS_build=();
iwatch() # device model
{
watchOS_device+=("$1");
watchOS_model+=("$2");
}
watchos() # version build
{
watchOS_version+=("$1");
watchOS_build+=("$2");
}
iwatch 'Watch1,1' 'N27aAP' # Apple Watch
iwatch 'Watch1,2' 'N28aAP' # Apple Watch
iwatch 'Watch2,6' 'N27dAP' # Apple Watch Series 1
iwatch 'Watch2,7' 'N28dAP' # Apple Watch Series 1
iwatch 'Watch2,3' 'N74AP' # Apple Watch Series 2
iwatch 'Watch2,4' 'N75AP' # Apple Watch Series 2
iwatch 'Watch3,1' 'N111sAP' # Apple Watch Series 3
iwatch 'Watch3,2' 'N111bAP' # Apple Watch Series 3
iwatch 'Watch3,3' 'N121sAP' # Apple Watch Series 3
iwatch 'Watch3,4' 'N121bAP' # Apple Watch Series 3
iwatch 'Watch4,1' 'N131sAP' # Apple Watch Series 4
iwatch 'Watch4,2' 'N131bAP' # Apple Watch Series 4
iwatch 'Watch4,3' 'N141sAP' # Apple Watch Series 4
iwatch 'Watch4,4' 'N141bAP' # Apple Watch Series 4
iwatch 'Watch5,1' 'N144sAP' # Apple Watch Series 5
iwatch 'Watch5,2' 'N144bAP' # Apple Watch Series 5
iwatch 'Watch5,3' 'N146sAP' # Apple Watch Series 5
iwatch 'Watch5,4' 'N146bAP' # Apple Watch Series 5
iwatch 'Watch5,9' 'N140sAP' # Apple Watch SE
iwatch 'Watch5,10' 'N140bAP' # Apple Watch SE
iwatch 'Watch5,11' 'N142sAP' # Apple Watch SE
iwatch 'Watch5,12' 'N142bAP' # Apple Watch SE
iwatch 'Watch6,1' 'N157sAP' # Apple Watch Series 6
iwatch 'Watch6,2' 'N157bAP' # Apple Watch Series 6
iwatch 'Watch6,3' 'N158sAP' # Apple Watch Series 6
iwatch 'Watch6,4' 'N158bAP' # Apple Watch Series 6
iwatch 'Watch6,6' 'N187sAP' # Apple Watch Series 7
iwatch 'Watch6,7' 'N187bAP' # Apple Watch Series 7
iwatch 'Watch6,8' 'N188sAP' # Apple Watch Series 7
iwatch 'Watch6,9' 'N188bAP' # Apple Watch Series 7
watchos '0' '0'
if $incr; then
watchos '4.0' '15R5281f' # beta 1
watchos '4.0' '15R5307f' # beta 2
watchos '4.0' '15R5321h' # beta 3
watchos '4.0' '15R5331g' # beta 4
watchos '4.0' '15R5345g' # beta 5
watchos '4.0' '15R5357b' # beta 6
watchos '4.0' '15R5365a' # beta 7
watchos '4.0' '15R5371a' # beta 8
watchos '4.0' '15R372'
watchos '4.1' '15R5823c' # beta 1
watchos '4.1' '15R5835d' # beta 2
watchos '4.1' '15R5843a' # beta 3
watchos '4.1' '15R846'
watchos '4.2' '15S5085b' # beta 1
watchos '4.2' '15S5090c' # beta 2
watchos '4.2' '15S5100a' # beta 3
watchos '4.2' '15S5102b' # beta 4
watchos '4.2' '15S102'
watchos '4.2.2' '15S5530d' # beta 1
watchos '4.2.2' '15S5534a' # beta 2
watchos '4.2.2' '15S5536a' # beta 3
watchos '4.2.2' '15S5540a' # beta 4
watchos '4.2.2' '15S542'
watchos '4.2.3' '15S600b'
watchos '4.3' '15T5165e' # beta 1
watchos '4.3' '15T5176c' # beta 2
watchos '4.3' '15T5187e' # beta 3
watchos '4.3' '15T5199f' # beta 4
watchos '4.3' '15T5209a' # beta 5
watchos '4.3' '15T5212a' # beta 6
watchos '4.3' '15T212'
watchos '4.3.1' '15T5535b' # beta 1
watchos '4.3.1' '15T5545b' # beta 2
watchos '4.3.1' '15T5555c' # beta 3
watchos '4.3.1' '15T5565a' # beta 4
watchos '4.3.1' '15T5567a' # beta 5
watchos '4.3.1' '15T567'
watchos '4.3.2' '15U5053b' # beta 1
watchos '4.3.2' '15U5062a' # beta 2
watchos '4.3.2' '15U5069a' # beta 3
watchos '4.3.2' '15U70'
watchos '5.0' '16R5283q' # beta 1
watchos '5.0' '16R5283r' # beta 1
watchos '5.0' '16R5303d' # beta 2
watchos '5.0' '16R5313d' # beta 3
watchos '5.0' '16R5322d' # beta 4
watchos '5.0' '16R5334f' # beta 5
watchos '5.0' '16R5340g' # beta 6
watchos '5.0' '16R5349a' # beta 7
watchos '5.0' '16R5357a' # beta 8
watchos '5.0' '16R5360a' # beta 9
watchos '5.0' '16R5363a' # beta 10
watchos '5.0' '16R364'
watchos '5.0.1' '16R381'
watchos '5.0.1' '16R382'
watchos '5.1' '16R5559d' # beta 1
watchos '5.1' '16R5568d' # beta 2
watchos '5.1' '16R5577c' # beta 3
watchos '5.1' '16R5584a' # beta 4
watchos '5.1' '16R5589c' # beta 5
watchos '5.1' '16R591'
watchos '5.1.1' '16R600'
watchos '5.1.2' '16S5042a' # beta 1
watchos '5.1.2' '16S5046a' # beta 2
watchos '5.1.2' '16S46'
watchos '5.1.3' '16S5523a' # beta 1
watchos '5.1.3' '16S5531a' # beta 2
watchos '5.1.3' '16S5535a' # beta 3
watchos '5.1.3' '16S535'
watchos '5.2' '16T5181f' # beta 1
watchos '5.2' '16T5191d' # beta 2
watchos '5.2' '16T5201c' # beta 3
watchos '5.2' '16T5212e' # beta 4
watchos '5.2' '16T5222a' # beta 5
watchos '5.2' '16T5225a' # beta 6
watchos '5.2' '16T225'
watchos '5.2.1' '16U5079d' # beta 1
watchos '5.2.1' '16U5091b' # beta 2
watchos '5.2.1' '16U5101c' # beta 3
watchos '5.2.1' '16U5110a' # beta 4
watchos '5.2.1' '16U5113a' # beta 5
watchos '5.2.1' '16U113'
watchos '5.3' '16U5526f' # beta 1
watchos '5.3' '16U5537b' # beta 2
watchos '5.3' '16U5545c' # beta 3
watchos '5.3' '16U5558b' # beta 4
watchos '5.3' '16U5566a' # beta 5
watchos '5.3' '16U5569a' # beta 6
watchos '5.3.1' '16U600'
watchos '5.3.2' '16U611'
watchos '5.3.3' '16U620'
watchos '5.3.4' '16U627'
watchos '5.3.5' '16U652'
watchos '5.3.6' '16U662'
watchos '5.3.7' '16U674'
watchos '5.3.8' '16U680'
watchos '6.0' '17R5491t' # beta 1
watchos '6.0' '17R5507l' # beta 2
watchos '6.0' '17R5521e' # beta 3
watchos '6.0' '17R5532f' # beta 4
watchos '6.0' '17R5546f' # beta 5
watchos '6.0' '17R5556d' # beta 6
watchos '6.0' '17R5566a' # beta 7
watchos '6.0' '17R5571a' # beta 8
watchos '6.0' '17R5575a' # beta 9
watchos '6.0' '17R575'
watchos '6.0.1' '17R604'
watchos '6.0.1' '17R605'
watchos '6.1' '17S5054e' # beta 1
watchos '6.1' '17S5059e' # beta 2
watchos '6.1' '17S5068e' # beta 3
watchos '6.1' '17S5076a' # beta 4
watchos '6.1' '17S5083a' # beta 5
watchos '6.1' '17S84'
watchos '6.1.1' '17S5433b' # beta 1
watchos '6.1.1' '17S5439a' # beta 2
watchos '6.1.1' '17S5446a' # beta 3
watchos '6.1.1' '17S5449b' # beta 4
watchos '6.1.1' '17S449'
watchos '6.1.2' '17S5775c' # beta 1
watchos '6.1.2' '17S5792a' # beta 2
watchos '6.1.2' '17S5796a' # beta 3
watchos '6.1.2' '17S796'
watchos '6.1.3' '17S811'
watchos '6.2' '17T5224g' # beta 1
watchos '6.2' '17T5234f' # beta 2
watchos '6.2' '17T5244c' # beta 3
watchos '6.2' '17T5251a' # beta 4
watchos '6.2' '17T5254a' # beta 5
watchos '6.2' '17T529'
watchos '6.2.1' '17T530'
watchos '6.2.5' '17T5580e' # beta 1
watchos '6.2.5' '17T5590d' # beta 2
watchos '6.2.5' '17T5600c' # beta 3
watchos '6.2.5' '17T5607a' # beta 4
watchos '6.2.5' '17T608'
watchos '6.2.6' '17T620'
watchos '6.2.8' '17U5535e' # beta 1
watchos '6.2.8' '17U5545c' # beta 2
watchos '6.2.8' '17U5559d' # beta 3
watchos '6.2.8' '17U63'
watchos '7.0' '18R5310a' # beta 1
watchos '7.0' '18R5327h' # beta 2
watchos '7.0' '18R5340d' # beta 3
watchos '7.0' '18R5350e' # beta 4
watchos '7.0' '18R5361d' # beta 5
watchos '7.0' '18R5368d' # beta 6
watchos '7.0' '18R5378a' # beta 7
watchos '7.0' '18R5382a' # beta 8
watchos '7.0' '18R382'
watchos '7.0.1' '18R395'
watchos '7.0.2' '18R402'
watchos '7.0.3' '18R410'
watchos '7.1' '18R5552f' # beta 1
watchos '7.1' '18R5561e' # beta 2
watchos '7.1' '18R5572f' # beta 3
watchos '7.1' '18R5585a' # beta 4
watchos '7.1' '18R589' # RC 1
watchos '7.1' '18R590'
watchos '7.2' '18S5545f' # beta 1
watchos '7.2' '18S5555c' # beta 2
watchos '7.2' '18S5561a' # beta 3
watchos '7.2' '18S563'
watchos '7.2' '18S564'
watchos '7.3' '18S5780d' # beta 1
watchos '7.3' '18S5793d' # beta 2
watchos '7.3' '18S801'
watchos '7.3.1' '18S801'
watchos '7.3.2' '18S821'
watchos '7.3.3' '18S830'
watchos '7.4' '18T5144k' # beta 1
watchos '7.4' '18T5159f' # beta 2
watchos '7.4' '18T5169f' # beta 3
watchos '7.4' '18T5183b' # beta 4
watchos '7.4' '18T5190a' # beta 5
watchos '7.4' '18T5193a' # beta 6
watchos '7.4' '18T5194a' # beta 7
watchos '7.4' '18T195'
watchos '7.4.1' '18T201'
watchos '7.5' '18T5546f' # beta 1
watchos '7.5' '18T5555c' # beta 2
watchos '7.5' '18T5564a' # beta 3
watchos '7.5' '18T567'
watchos '7.6' '18U5523d' # beta 1
watchos '7.6' '18U5533b' # beta 2
watchos '8.0' '19R5266q' # beta 1
fi;
# ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
audioOS_device=();
audioOS_model=();
audioOS_version=();
audioOS_build=();
homepod() # device model
{
audioOS_device+=("$1");
audioOS_model+=("$2");
}
audioos() # version build
{
audioOS_version+=("$1");
audioOS_build+=("$2");
}
homepod 'AudioAccessory1,1' 'B238aAP'
homepod 'AudioAccessory1,2' 'B238AP'
homepod 'AudioAccessory5,1' 'B520AP'
audioos '0' '0'
if $incr; then
audioos '11.0.2' '15C25'
audioos '11.2' '15C4092b' # beta 1
audioos '11.2' '15C4097d' # beta 2
audioos '11.2.5' '15D5037e' # beta 3
audioos '11.2.5' '15D5046b' # beta 4
audioos '11.2.5' '15D59'
audioos '11.2.5' '15D5059'
audioos '11.3' '15E217'
audioos '11.4' '15F80'
audioos '11.4.1' '15G77'
audioos '12.0' '16A366'
audioos '12.1' '16B92'
audioos '12.1' '16B6092'
audioos '12.1.1' '16C50'
audioos '12.1.3' '16D39'
audioos '12.2' '16E227'
audioos '12.3' '16F156'
audioos '12.4' '16G78'
audioos '13.2' '17B84'
audioos '13.2' '17B6084'
audioos '13.2.1' '17B90'
audioos '13.2.1' '17B6090'
audioos '13.3' '17C54'
audioos '13.3' '17C6054'
audioos '13.3.1' '17D50'
audioos '13.3.1' '17D6050'
audioos '13.4' '17L256'
audioos '13.4' '17L6256'
audioos '13.4.5' '17L562'
audioos '13.4.5' '17L6562'
audioos '13.4.6' '17L570'
audioos '13.4.6' '17L6570'
audioos '13.4.8' '17M61'
audioos '13.4.8' '17M6061'
audioos '14.0' '18J5313t' # beta 1
audioos '14.0' '18J5331g' # beta 2
audioos '14.0' '18J5344d' # beta 3
audioos '14.0' '18J5354f' # beta 4
audioos '14.1' '18J6370e' # beta 5
audioos '14.1' '18J6379c' # beta 6
audioos '14.1' '18J6385b' # beta 7
audioos '14.1' '18J8394'
audioos '14.2' '18K5027e' # beta 1
audioos '14.2' '18K5036d' # beta 2
audioos '14.2' '18K5047f' # beta 3
audioos '14.2' '18K5057c' # beta 4
audioos '14.2' '18K60'
audioos '14.2.1' '18K75'
audioos '14.3' '18K5545e' # beta 1
audioos '14.3' '18K5556a' # beta 2
audioos '14.3' '18K5559a' # beta 3
audioos '14.3' '18K561' # RC 1
audioos '14.3' '18K563'
audioos '14.4' '18K5780c' # beta 1
audioos '14.4' '18K5793d' # beta 2
audioos '14.4' '18K802'
audioos '14.5' '18L5149j' # beta 1
audioos '14.5' '18L5173f' # beta 3
audioos '14.5' '18L5186a' # beta 4
audioos '14.5' '18L5193a' # beta 5
audioos '14.5' '18L5200a' # beta 6
audioos '14.5' '18L5203a' # beta 7
audioos '14.5' '18L203'
audioos '14.6' '18L5546f' # beta 1
audioos '14.6' '18L5555c' # beta 2
audioos '14.6' '18L5565a' # beta 3
audioos '14.6' '18L569'
audioos '14.7' '18M5523d' # beta 1
audioos '14.7' '18M5533c' # beta 2
audioos '15.0' '19J5268r' # beta 1
fi;
# ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
macOS_device=();
macOS_model=();
macOS_version=();
macOS_build=();
mac() # device model
{
macOS_device+=("$1");
macOS_model+=("$2");
}
macos() # version build
{
macOS_version+=("$1");
macOS_build+=("$2");
}
mac 'ADP3,1' 'J273AP'
mac 'ADP3,2' 'J273aAP'
mac 'iProd99,1' 'T485AP'
mac 'Macmini9,1' 'J274AP'
mac 'MacBookAir10,1' 'J313AP'
mac 'MacBookPro17,1' 'J293AP'
mac 'iMac21,1' 'J456AP'
mac 'iMac21,2' 'J457AP'
mac 'iBridge2,1' 'J137AP'
mac 'iBridge2,3' 'J680AP'
mac 'iBridge2,4' 'J132AP'
mac 'iBridge2,5' 'J174AP'
mac 'iBridge2,6' 'J160AP'
mac 'iBridge2,7' 'J780AP'
mac 'iBridge2,8' 'J140kAP'
mac 'iBridge2,10' 'J213AP'
mac 'iBridge2,11' 'J230AP'
mac 'iBridge2,12' 'J140aAP'
mac 'iBridge2,13' 'J214AP'
mac 'iBridge2,14' 'J152fAP'
mac 'iBridge2,15' 'J230kAP'
mac 'iBridge2,16' 'J214kAP'
mac 'iBridge2,19' 'J185AP'
mac 'iBridge2,20' 'J185fAP'
mac 'iBridge2,21' 'J223AP'
mac 'iBridge2,22' 'J215AP'
macos '0' '0'
if $incr; then
macos '11.0' '20A5299w' # beta 1
macos '11.0' '20A5323l' # beta 3
macos '11.0' '20A5343i' # beta 4
macos '11.0' '20A5354i' # beta 5
macos '11.0' '20A5364e' # beta 6
macos '11.0' '20A5374g' # beta 7
macos '11.0' '20A5374i' # beta 8
macos '11.0' '20A5384c' # beta 9
macos '11.0' '20A5395g' # beta 10
macos '11.0.1' '20B5012d' # beta 1
macos '11.0.1' '20B5022a' # RC 1
macos '11.0.1' '20B28' # RC 2
macos '11.0.1' '20B29'
macos '11.1' '20C5048k' # beta 1
macos '11.1' '20C5061b' # beta 2
macos '11.1' '20C69'
macos '11.2' '20D5029f' # beta 1
macos '11.2' '20D5042d' # beta 2
macos '11.2' '20D53' # RC 1
macos '11.2' '20D62' # RC 2
macos '11.2' '20D64'
macos '11.2.1' '20D74'
macos '11.2.2' '20D80'
macos '11.2.3' '20D91'
macos '11.3' '20E5172i' # beta 1
macos '11.3' '20E5186d' # beta 2
macos '11.3' '20E5196f' # beta 3
macos '11.3' '20E5210c' # beta 4
macos '11.3' '20E217a' # beta 5
macos '11.3' '20E5224a' # beta 6
macos '11.3' '20E5229a' # beta 7
macos '11.3' '20E5231a' # beta 8
macos '11.3' '20E232'
macos '11.3.1' '20E241'
macos '11.4' '20F5046g' # beta 1
macos '11.4' '20F5055c' # beta 2
macos '11.4' '20F5065a' # beta 3
macos '11.4' '20F71'
macos '11.5' '20G5023d' # beta 1
macos '11.5' '20G5033c' # beta 2
macos '11.5' '20G5042c' # beta 3
macos '11.5' '20G5052c' # beta 4
macos '11.5' '20G5065a' # beta 5
macos '11.5' '20G70' # RC 1
macos '11.5' '20G71'
macos '11.5.1' '20G80'
macos '11.5.2' '20G95'
macos '12.0' '21A5248p' # beta 1
macos '12.0' '21A5268h' # beta 2
macos '12.0' '21A5284e' # beta 3
macos '12.0' '21A5294g' # beta 4
macos '12.0' '21A5304g' # beta 5
macos '12.0' '21A5506j' # beta 6
fi;
# ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
# AssetAudiences:
# 01c1d682-6e8f-4908-b724-5501fe3f5e5c iOS release
# ce9c2203-903b-4fb3-9f03-040dc2202694 iOS internal (not publicly accessible)
# b7580fda-59d3-43ae-9488-a81b825e3c73 iOS 11 beta
# ef473147-b8e7-4004-988e-0ae20e2532ef iOS 12 beta
# d8ab8a45-ee39-4229-891e-9d3ca78a87ca iOS 13 beta
# 84da8706-e267-4554-8207-865ae0c3a120 iOS 14 developer beta
# dbbb0481-d521-4cdf-a2a4-5358affc224b iOS 14 public beta
# c724cb61-e974-42d3-a911-ffd4dce11eda iOS 14 security updates
# ce48f60c-f590-4157-a96f-41179ca08278 iOS 15 developer beta
# 356d9da0-eee4-4c6c-bbe5-99b60eadddf0 tvOS release
# ebd90ea1-6216-4a7c-920e-666faccb2d50 tvOS 11 beta (returns 404)
# 5b220c65-fe50-460b-bac5-b6774b2ff475 tvOS 12 beta
# 975af5cb-019b-42db-9543-20327280f1b2 tvOS 13 beta
# 65254ac3-f331-4c19-8559-cbe22f5bc1a6 tvOS 14 beta
# 4d0dcdf7-12f2-4ebf-9672-ac4a4459a8bc tvOS 15 beta
# b82fcf9c-c284-41c9-8eb2-e69bf5a5269f watchOS release
# f659e06d-86a2-4bab-bcbb-61b7c60969ce watchOS 4 beta (returns 404)
# e841259b-ad2e-4046-b80f-ca96bc2e17f3 watchOS 5 beta
# d08cfd47-4a4a-4825-91b5-3353dfff194f watchOS 6 beta
# ff6df985-3cbe-4d54-ba5f-50d02428d2a3 watchOS 7 beta
# b407c130-d8af-42fc-ad7a-171efea5a3d0 watchOS 8 beta
# 0322d49d-d558-4ddf-bdff-c0443d0e6fac audioOS release
# b05ddb59-b26d-4c89-9d09-5fda15e99207 audioOS 14 beta
# 58ff8d56-1d77-4473-ba88-ee1690475e40 audioOS 15 beta
# 60b55e25-a8ed-4f45-826c-c1495a4ccc65 macOS release
# 215447a0-bb03-4e18-8598-7b6b6e7d34fd macOS 11 customer beta
# ca60afc6-5954-46fd-8cb9-60dde6ac39fd macOS 11 developer beta
# 902eb66c-8e37-451f-b0f2-ffb3e878560b macOS 11 public beta
# a3799e8a-246d-4dee-b418-76b4519a15a2 macOS 12 customer beta
# 298e518d-b45e-4d36-94be-34a63d6777ec macOS 12 developer beta
# 9f86c787-7c59-45a7-a79a-9c164b00f866 macOS 12 public beta
workers=();
running=0;
failed=0;
n=0;
all=0;
if [ "$filter" = 'all' ] || [ "$filter" = 'ios' ]; then
x=3;
if $legacy; then
x=$((x+5));
fi;
all="$((all + x*${#iOS_device[@]}*${#iOS_version[@]}))";
fi;
if [ "$filter" = 'all' ] || [ "$filter" = 'tvos' ]; then
x=2;
if $legacy; then
x=$((x+3));
fi;
all="$((all + x*${#tvOS_device[@]}*${#tvOS_version[@]}))";
fi;
if [ "$filter" = 'all' ] || [ "$filter" = 'watchos' ]; then
x=2;
if $legacy; then
x=$((x+3));
fi;
all="$((all + x*${#watchOS_device[@]}*${#watchOS_version[@]}))";
fi;
if [ "$filter" = 'all' ] || [ "$filter" = 'audioos' ]; then
x=2;
if $legacy; then
x=$((x+1));
fi;
all="$((all + x*${#audioOS_device[@]}*${#audioOS_version[@]}))";
fi;
if [ "$filter" = 'all' ] || [ "$filter" = 'macos' ]; then
x=8;
if $legacy; then
x=$((x+6));
fi;
all="$((all + x*${#macOS_device[@]}*${#macOS_version[@]}))";
fi;
printf '\r%d/%d' "$n" "$all" >&2;
waitfor() # pid
{
if ! wait "$1"; then
ret=$?;
if $fatal; then
echo "Pid $1 exited with status $ret";
exit 1;
else
failed=$((failed+1));
fi;
fi;
n="$((n+1))";
}
_dl() # type audience device model version build
{
extra='';
if ! [ -z "$version" ]; then
extra="$extra"', "RequestedProductVersion": "'"$version"'", "Supervised": true, "DelayRequested": false';
fi;
if ! a="$(curl --cacert "$dir/AppleCA.pem" -s -S -f --retry 3 -H 'Content-Type: application/json' -H 'Accept: application/json' 'https://gdmf.apple.com/v2/assets' --data '{"ClientVersion":2, "AssetType":"'"$1"'", "AssetAudience":"'"$2"'", "ProductType":"'"$3"'", "HWModelStr":"'"$4"'", "ProductVersion":"'"$5"'", "BuildVersion":"'"$6"'"'"$extra"'}')"; then
echo "Failed to fetch: $1 $2 $3 $4 $5 $6" >&2;
return 1;
fi;
a=("${(@s/./)a}");
a="$(tr '_' '/' <<<"${a[2]}" | tr '-' '+')";
while [ $((${#a} % 4)) -ne 0 ]; do
a="${a}=";
done;
a="$(base64 -d <<<"$a")";
jq '.Assets' <<<"$a" >"$dir/$2-$3-$(jq -r '.PallasNonce' <<<"$a").json";
}
dl() # type audience device model version build
{
while [ "${#workers[@]}" -ge $num_workers ]; do
waitfor "${workers[1]}";
workers[1]=();
done;
printf '\r%d/%d' "$n" "$all" >&2;
_dl "$@" &
workers+=("$!");
}
if [ "$filter" = 'all' ] || [ "$filter" = 'ios' ]; then
for ((i = 1; i <= ${#iOS_device[@]}; i++)); do
for ((j = 1; j <= ${#iOS_version[@]}; j++)); do
dl 'com.apple.MobileAsset.SoftwareUpdate' '01c1d682-6e8f-4908-b724-5501fe3f5e5c' "${iOS_device[$i]}" "${iOS_model[$i]}" "${iOS_version[$j]}" "${iOS_build[$j]}";
dl 'com.apple.MobileAsset.SoftwareUpdate' 'c724cb61-e974-42d3-a911-ffd4dce11eda' "${iOS_device[$i]}" "${iOS_model[$i]}" "${iOS_version[$j]}" "${iOS_build[$j]}";
if $legacy; then
dl 'com.apple.MobileAsset.SoftwareUpdate' 'b7580fda-59d3-43ae-9488-a81b825e3c73' "${iOS_device[$i]}" "${iOS_model[$i]}" "${iOS_version[$j]}" "${iOS_build[$j]}";
dl 'com.apple.MobileAsset.SoftwareUpdate' 'ef473147-b8e7-4004-988e-0ae20e2532ef' "${iOS_device[$i]}" "${iOS_model[$i]}" "${iOS_version[$j]}" "${iOS_build[$j]}";
dl 'com.apple.MobileAsset.SoftwareUpdate' 'd8ab8a45-ee39-4229-891e-9d3ca78a87ca' "${iOS_device[$i]}" "${iOS_model[$i]}" "${iOS_version[$j]}" "${iOS_build[$j]}";
dl 'com.apple.MobileAsset.SoftwareUpdate' '84da8706-e267-4554-8207-865ae0c3a120' "${iOS_device[$i]}" "${iOS_model[$i]}" "${iOS_version[$j]}" "${iOS_build[$j]}";
dl 'com.apple.MobileAsset.SoftwareUpdate' 'dbbb0481-d521-4cdf-a2a4-5358affc224b' "${iOS_device[$i]}" "${iOS_model[$i]}" "${iOS_version[$j]}" "${iOS_build[$j]}";
fi;
dl 'com.apple.MobileAsset.SoftwareUpdate' 'ce48f60c-f590-4157-a96f-41179ca08278' "${iOS_device[$i]}" "${iOS_model[$i]}" "${iOS_version[$j]}" "${iOS_build[$j]}";
done;
done;
fi;
if [ "$filter" = 'all' ] || [ "$filter" = 'tvos' ]; then
for ((i = 1; i <= ${#tvOS_device[@]}; i++)); do
for ((j = 1; j <= ${#tvOS_version[@]}; j++)); do
dl 'com.apple.MobileAsset.SoftwareUpdate' '356d9da0-eee4-4c6c-bbe5-99b60eadddf0' "${tvOS_device[$i]}" "${tvOS_model[$i]}" "${tvOS_version[$j]}" "${tvOS_build[$j]}";
if $legacy; then
dl 'com.apple.MobileAsset.SoftwareUpdate' '5b220c65-fe50-460b-bac5-b6774b2ff475' "${tvOS_device[$i]}" "${tvOS_model[$i]}" "${tvOS_version[$j]}" "${tvOS_build[$j]}";
dl 'com.apple.MobileAsset.SoftwareUpdate' '975af5cb-019b-42db-9543-20327280f1b2' "${tvOS_device[$i]}" "${tvOS_model[$i]}" "${tvOS_version[$j]}" "${tvOS_build[$j]}";
dl 'com.apple.MobileAsset.SoftwareUpdate' '65254ac3-f331-4c19-8559-cbe22f5bc1a6' "${tvOS_device[$i]}" "${tvOS_model[$i]}" "${tvOS_version[$j]}" "${tvOS_build[$j]}";
fi;
dl 'com.apple.MobileAsset.SoftwareUpdate' '4d0dcdf7-12f2-4ebf-9672-ac4a4459a8bc' "${tvOS_device[$i]}" "${tvOS_model[$i]}" "${tvOS_version[$j]}" "${tvOS_build[$j]}";
done;
done;
fi;
if [ "$filter" = 'all' ] || [ "$filter" = 'watchos' ]; then
for ((i = 1; i <= ${#watchOS_device[@]}; i++)); do
for ((j = 1; j <= ${#watchOS_version[@]}; j++)); do
dl 'com.apple.MobileAsset.SoftwareUpdate' 'b82fcf9c-c284-41c9-8eb2-e69bf5a5269f' "${watchOS_device[$i]}" "${watchOS_model[$i]}" "${watchOS_version[$j]}" "${watchOS_build[$j]}";
if $legacy; then
dl 'com.apple.MobileAsset.SoftwareUpdate' 'e841259b-ad2e-4046-b80f-ca96bc2e17f3' "${watchOS_device[$i]}" "${watchOS_model[$i]}" "${watchOS_version[$j]}" "${watchOS_build[$j]}";
dl 'com.apple.MobileAsset.SoftwareUpdate' 'd08cfd47-4a4a-4825-91b5-3353dfff194f' "${watchOS_device[$i]}" "${watchOS_model[$i]}" "${watchOS_version[$j]}" "${watchOS_build[$j]}";
dl 'com.apple.MobileAsset.SoftwareUpdate' 'ff6df985-3cbe-4d54-ba5f-50d02428d2a3' "${watchOS_device[$i]}" "${watchOS_model[$i]}" "${watchOS_version[$j]}" "${watchOS_build[$j]}";
fi;
dl 'com.apple.MobileAsset.SoftwareUpdate' 'b407c130-d8af-42fc-ad7a-171efea5a3d0' "${watchOS_device[$i]}" "${watchOS_model[$i]}" "${watchOS_version[$j]}" "${watchOS_build[$j]}";
done;
done;
fi;
if [ "$filter" = 'all' ] || [ "$filter" = 'audioos' ]; then
for ((i = 1; i <= ${#audioOS_device[@]}; i++)); do
for ((j = 1; j <= ${#audioOS_version[@]}; j++)); do
dl 'com.apple.MobileAsset.SoftwareUpdate' '0322d49d-d558-4ddf-bdff-c0443d0e6fac' "${audioOS_device[$i]}" "${audioOS_model[$i]}" "${audioOS_version[$j]}" "${audioOS_build[$j]}";
if $legacy; then
dl 'com.apple.MobileAsset.SoftwareUpdate' 'b05ddb59-b26d-4c89-9d09-5fda15e99207' "${audioOS_device[$i]}" "${audioOS_model[$i]}" "${audioOS_version[$j]}" "${audioOS_build[$j]}";
fi;
dl 'com.apple.MobileAsset.SoftwareUpdate' '58ff8d56-1d77-4473-ba88-ee1690475e40' "${audioOS_device[$i]}" "${audioOS_model[$i]}" "${audioOS_version[$j]}" "${audioOS_build[$j]}";
done;
done;
fi;
if [ "$filter" = 'all' ] || [ "$filter" = 'macos' ]; then
for ((i = 1; i <= ${#macOS_device[@]}; i++)); do
for ((j = 1; j <= ${#macOS_version[@]}; j++)); do
dl 'com.apple.MobileAsset.MacSoftwareUpdate' '60b55e25-a8ed-4f45-826c-c1495a4ccc65' "${macOS_device[$i]}" "${macOS_model[$i]}" "${macOS_version[$j]}" "${macOS_build[$j]}";
dl 'com.apple.MobileAsset.SFRSoftwareUpdate' '60b55e25-a8ed-4f45-826c-c1495a4ccc65' "${macOS_device[$i]}" "${macOS_model[$i]}" "${macOS_version[$j]}" "${macOS_build[$j]}";
if $legacy; then
dl 'com.apple.MobileAsset.MacSoftwareUpdate' '215447a0-bb03-4e18-8598-7b6b6e7d34fd' "${macOS_device[$i]}" "${macOS_model[$i]}" "${macOS_version[$j]}" "${macOS_build[$j]}";
dl 'com.apple.MobileAsset.SFRSoftwareUpdate' '215447a0-bb03-4e18-8598-7b6b6e7d34fd' "${macOS_device[$i]}" "${macOS_model[$i]}" "${macOS_version[$j]}" "${macOS_build[$j]}";
dl 'com.apple.MobileAsset.MacSoftwareUpdate' 'ca60afc6-5954-46fd-8cb9-60dde6ac39fd' "${macOS_device[$i]}" "${macOS_model[$i]}" "${macOS_version[$j]}" "${macOS_build[$j]}";
dl 'com.apple.MobileAsset.SFRSoftwareUpdate' 'ca60afc6-5954-46fd-8cb9-60dde6ac39fd' "${macOS_device[$i]}" "${macOS_model[$i]}" "${macOS_version[$j]}" "${macOS_build[$j]}";
dl 'com.apple.MobileAsset.MacSoftwareUpdate' '902eb66c-8e37-451f-b0f2-ffb3e878560b' "${macOS_device[$i]}" "${macOS_model[$i]}" "${macOS_version[$j]}" "${macOS_build[$j]}";
dl 'com.apple.MobileAsset.SFRSoftwareUpdate' '902eb66c-8e37-451f-b0f2-ffb3e878560b' "${macOS_device[$i]}" "${macOS_model[$i]}" "${macOS_version[$j]}" "${macOS_build[$j]}";
fi;
dl 'com.apple.MobileAsset.MacSoftwareUpdate' 'a3799e8a-246d-4dee-b418-76b4519a15a2' "${macOS_device[$i]}" "${macOS_model[$i]}" "${macOS_version[$j]}" "${macOS_build[$j]}";
dl 'com.apple.MobileAsset.SFRSoftwareUpdate' 'a3799e8a-246d-4dee-b418-76b4519a15a2' "${macOS_device[$i]}" "${macOS_model[$i]}" "${macOS_version[$j]}" "${macOS_build[$j]}";
dl 'com.apple.MobileAsset.MacSoftwareUpdate' '298e518d-b45e-4d36-94be-34a63d6777ec' "${macOS_device[$i]}" "${macOS_model[$i]}" "${macOS_version[$j]}" "${macOS_build[$j]}";
dl 'com.apple.MobileAsset.SFRSoftwareUpdate' '298e518d-b45e-4d36-94be-34a63d6777ec' "${macOS_device[$i]}" "${macOS_model[$i]}" "${macOS_version[$j]}" "${macOS_build[$j]}";
dl 'com.apple.MobileAsset.MacSoftwareUpdate' '9f86c787-7c59-45a7-a79a-9c164b00f866' "${macOS_device[$i]}" "${macOS_model[$i]}" "${macOS_version[$j]}" "${macOS_build[$j]}";
dl 'com.apple.MobileAsset.SFRSoftwareUpdate' '9f86c787-7c59-45a7-a79a-9c164b00f866' "${macOS_device[$i]}" "${macOS_model[$i]}" "${macOS_version[$j]}" "${macOS_build[$j]}";
done;
done;
fi;
for x in "${workers[@]}"; do
waitfor "$x";
printf '\r%d/%d' "$n" "$all" >&2;
done;
printf '\n' >&2;
if [ "$failed" -gt 0 ]; then
printf '\e[93m%u requests failed\e[0m\n' "$failed" >&2;
fi;
if [ "$failed" -ge "$n" ]; then
return 1;
fi;
# Need to cd because glob expansion will exceed arg length otherwise.
cd "$dir";
jq -r 'def pad(s;l): s|.+(" "*([1,l-(.|length)]|max)); .[] | (pad(.OSVersion;12) + pad(.Build;12) + pad(.PrerequisiteOSVersion;12) + pad(.PrerequisiteBuild;12) + pad(if has("SupportedDevices") then .SupportedDevices[] else "" end;24) + pad(.SupportedDeviceModels[];24) + .__BaseURL + .__RelativePath)' *.json | sort -u;
@blacktop

This comment has been minimized.

Copy link

@blacktop blacktop commented Jun 2, 2021

Hi @Siguza, how are you enumerating the AssetAudiences ? 🤔

@Siguza

This comment has been minimized.

Copy link
Owner Author

@Siguza Siguza commented Jun 2, 2021

@blacktop some can be extracted from binaries, others from beta profiles.

@blacktop

This comment has been minimized.

Copy link

@blacktop blacktop commented Jun 2, 2021

I do see the ones in XCode's mobileassetd and I do see the ones in the profile:

<dict>
    <key>DefaultsData</key>
    <dict>
        <key>MobileAssetAssetAudience</key>
        <string>dbbb0481-d521-4cdf-a2a4-5358affc224b</string>
        <key>MobileAssetSUAllowOSVersionChange</key>
        <false/>
        <key>MobileAssetSUAllowSameVersionFullReplacement</key>
        <false/>
        <key>MobileAssetServerURL-com.apple.MobileAsset.MobileSoftwareUpdate.UpdateBrain</key>
        <string>https://mesu.apple.com/assets/iOS14DeveloperSeed</string>
        <key>MobileAssetServerURL-com.apple.MobileAsset.SoftwareUpdate</key>
        <string>https://mesu.apple.com/assets/iOS14DeveloperSeed</string>
        <key>MobileAssetServerURL-com.apple.MobileAsset.SoftwareUpdateDocumentation</key>
        <string>https://mesu.apple.com/assets/iOS14DeveloperSeed</string>
    </dict>
    <key>DefaultsDomainName</key>
    <string>com.apple.MobileAsset</string>
</dict>

Thank you!!

Have you checked out: http --verify=no https://gdmf.apple.com/v2/pmv

    "AssetSets": {
        "iOS": [
            {
                "ProductVersion": "7.5",
                "PostingDate": "2021-05-24",
                "ExpirationDate": "2021-08-30",
                "SupportedDevices": [
                    "Watch3,1",
                    "Watch3,2",
                    "Watch3,3",
                    "Watch3,4",
                    "Watch4,1",
                    "Watch4,2",
                    "Watch4,3",
                    "Watch4,4",
                    "Watch5,1",
                    "Watch5,10",
                    "Watch5,11",
                    "Watch5,12",
                    "Watch5,2",
                    "Watch5,3",
                    "Watch5,4",
                    "Watch5,9",
                    "Watch6,1",
                    "Watch6,2",
                    "Watch6,3",
                    "Watch6,4"
                ]
            },
            {
                "ProductVersion": "14.6",
                "PostingDate": "2021-05-24",
                "ExpirationDate": "2021-08-30",
                "SupportedDevices": [
                    "AppleTV11,1",
                    "AppleTV5,3",
                    "AppleTV6,2",
                    "AudioAccessory1,1",
                    "AudioAccessory1,2",
                    "AudioAccessory5,1",
                    "iPad11,1",
                    "iPad11,2",
                    "iPad11,3",
                    "iPad11,4",
                    "iPad11,6",
                    "iPad11,7",

kinda cool, but sad no BoardIDs/SupportedDeviceModels 😞

@Siguza

This comment has been minimized.

Copy link
Owner Author

@Siguza Siguza commented Jun 2, 2021

@blacktop yes, I'm aware of that listing. But it's not all that useful, sadly. Pallas really doesn't support enumeration, but only lookup with known information. Usually the best place to obtain new device models and board IDs is an sqlite database inside XCode. For devices that Xcode doesn't target, you can usually find some strings inside the dyld shared cache of another device.

@blacktop

This comment has been minimized.

Copy link

@blacktop blacktop commented Jun 2, 2021

It seems like with something like Frida you could hook this to return true (or maybe just call the func with a test bin and use lldb to return true)

v17 = MGGetBoolAnswer(CFSTR("LBJfwOEzExRxzlAnSuI7eg"));

as well as set InternalBuild to true (that uses https://gdmf-staging-int.apple.com/v2/assets) and maybe pull down an internal OTA 😬

Maybe you would also need to set the DownloadAuthorizationHeader value?

It's so annoying that they are 403 Forbidden-ing the https://mesu.apple.com/assets/iOS14DeveloperSeed even though you can see it's still in the beta.profile 😭

@kejiweixun

This comment has been minimized.

Copy link

@kejiweixun kejiweixun commented Jun 11, 2021

Hi, what is this file used for? And how to use it? I try to sh pallas.sh but get no output.

I come across this file with google, it seems like it's what I am looking for, but don't know how to use it.

Thanks!

@Siguza

This comment has been minimized.

Copy link
Owner Author

@Siguza Siguza commented Aug 31, 2021

@kejiweixun should all be fixed now.

@blacktop

This comment has been minimized.

Copy link

@blacktop blacktop commented Oct 29, 2021

Are you actually able to ask for a specific version? Like ./pallas.sh 14.8.1 ?
I doesn't seem to be working for me, but I might be misunderstanding your cli arg options.

@Siguza

This comment has been minimized.

Copy link
Owner Author

@Siguza Siguza commented Oct 30, 2021

@blacktop yes, you can ask for a specific version - so long as that version has been the latest available one in the past 90 days.
Unfortunately some asset audiences return errors though, so you'll want to use -n too.

./pallas.sh -n ios 14.8.1 works for me (although 14.8.1 is considered the latest version on one asset audience already).

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