<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>iOS &#8211; Gary&#039;s &#8230;Lasamia</title>
	<atom:link href="https://garynil.tw/tag/ios/feed/" rel="self" type="application/rss+xml" />
	<link>https://garynil.tw</link>
	<description>🍎 📱 🖥 🔨 😄</description>
	<lastBuildDate>Sat, 16 Oct 2021 13:14:50 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.3</generator>

<image>
	<url>https://i0.wp.com/garynil.tw/wp-content/uploads/2017/01/cropped-Gary_v3.0.jpg?fit=32%2C32&#038;ssl=1</url>
	<title>iOS &#8211; Gary&#039;s &#8230;Lasamia</title>
	<link>https://garynil.tw</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">147732124</site>	<item>
		<title>[Tutorial / 教學] Get Electra (Multipath TCP) installed on iOS 11.2~11.3.1 / 安裝開發者版本的 Electra (iOS 11.2~11.3.1)</title>
		<link>https://garynil.tw/2018/07/814/tutorial-get-electra-multipath-tcp-installed/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tutorial-get-electra-multipath-tcp-installed</link>
					<comments>https://garynil.tw/2018/07/814/tutorial-get-electra-multipath-tcp-installed/#respond</comments>
		
		<dc:creator><![CDATA[Gary]]></dc:creator>
		<pubDate>Sat, 07 Jul 2018 07:34:57 +0000</pubDate>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Electra]]></category>
		<category><![CDATA[ios11]]></category>
		<category><![CDATA[Jailbreak]]></category>
		<category><![CDATA[越獄]]></category>
		<guid isPermaLink="false">https://garynil.tw/?p=814</guid>

					<description><![CDATA[<p>CoolStar just released Electra for iOS 11.2-11.3.1 today (2018.07.07). Electra for iOS 11.2-11.3.1 is now available! https://t.co/YxbYAmMkVK Note: First run will require rebooting. Make sure to re-run electra after the first reboot to continue jailbreak. — CoolStar (@coolstarorg) 2018年7月6日 This tutorial shows how to install Electra IPA (Multipath TCP version) on your device with paid Apple develop...</p>
<p>這篇文章 <a rel="nofollow" href="https://garynil.tw/2018/07/814/tutorial-get-electra-multipath-tcp-installed/">[Tutorial / 教學] Get Electra (Multipath TCP) installed on iOS 11.2~11.3.1 / 安裝開發者版本的 Electra (iOS 11.2~11.3.1)</a> 最早出現於 <a rel="nofollow" href="https://garynil.tw">Gary&#039;s ...Lasamia</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p><img data-recalc-dims="1" fetchpriority="high" decoding="async" class="aligncenter size-full" src="https://i0.wp.com/img.garynil.tw/images/2018/07/ANW.png?resize=700%2C394&#038;ssl=1" width="700" height="394" /></p>
<p><a href="https://twitter.com/coolstarorg/status/1015369667542564865">CoolStar</a> just released Electra for iOS 11.2-11.3.1 today (2018.07.07).</p>
<blockquote class="twitter-tweet" data-lang="zh-tw">
<p dir="ltr" lang="en">Electra for iOS 11.2-11.3.1 is now available! <a href="https://t.co/YxbYAmMkVK">https://t.co/YxbYAmMkVK</a><br />
<span id="more-814"></span></p>
<p>Note: First run will require rebooting. Make sure to re-run electra after the first reboot to continue jailbreak.</p>
<p>— CoolStar (@coolstarorg) <a href="https://twitter.com/coolstarorg/status/1015369667542564865?ref_src=twsrc%5Etfw">2018年7月6日</a></p></blockquote>
<p><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></p>
<p>This tutorial shows how to install Electra IPA (Multipath TCP version) on your device with paid Apple developer account. Make sure you have basic knowledge for this tutorial, you are fully doing this at your own risk, I’m not responsible for any damage or data losing&#8230; etc.<br />
此教學是教你安裝 iOS 11.2~11.3.1 的越獄工具 &#8211; Electra，前提是你擁有「付費的」開發者帳號及基本知識，意思是說手機爆炸我不管。</p>
<h2>1st. What you need / 必備工具</h2>
<ul>
<li><a href="https://coolstar.org/electra/">Electra ipa (Multipath TCP version)</a></li>
<li><a href="https://developer.apple.com/account/">Apple developer account</a>，you should login your Apple Developer account into Xcode first.</li>
<li>Resign tool，recommend <a href="https://dantheman827.github.io/ios-app-signer/">IOS Appsigner</a></li>
<li>ipa install tool, such as iFunbox..etc<br />
<img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/img.garynil.tw/images/2018/07/L7G.png?w=700&#038;ssl=1" alt="L7G.png" /></li>
</ul>
<p>And we start!</p>
<h2>2nd. Create a provision file only for Electra</h2>
<p>For supporting the requirement of Electra dev version &#8211; Multipath TCP service, you need to create a provision file with multipath TCP service enabled in your developer account.<br />
此次 Electra 開發者版本是使用 Multipath TCP 漏洞，因此我們需要使用一組開啟 Multipath TCP 功能的 provision profile。</p>
<p>Remind to add your device UDID to your account before you create provision file. You can check this <a href="https://www.wikihow.com/Add-a-New-Device-to-Your-Apple-Developer-Portal">Tutorial</a> if you don&#8217;t know how to add your device into your account.<br />
再開始之前，記得先將你的裝置 UDID 註冊到你的開發者帳號，可以參考<a href="https://www.wikihow.com/Add-a-New-Device-to-Your-Apple-Developer-Portal">教學</a></p>
<h3>2-1. Registering a new App ID in App ID page of Identifier section</h3>
<p>進入開發者帳號頁面後，我們選擇右側 Identifier → AppID → 並註冊一組新的 App ID<br />
<img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/img.garynil.tw/images/2018/07/S77.png?w=700&#038;ssl=1" alt="S77.png" /></p>
<h3>2-2. Fill in your custom bundle ID, for example, I used <code>tw.garynil.Electra1131</code></h3>
<p>填入 Bundle ID，建議用「你常用的名稱」+ Electra1131，例如我是 <code>tw.garynil.Electra1131</code><br />
<img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/img.garynil.tw/images/2018/07/X3C.png?w=700&#038;ssl=1" alt="X3C.png" /></p>
<h3>2-3. Enable Multipath TCP serivce for your provision file</h3>
<p>為此組 App ID 開啟 Multipath TCP 服務<br />
<img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/img.garynil.tw/images/2018/07/ed2.png?w=700&#038;ssl=1" alt="ed2.png" /></p>
<p>完成後，我們便創立了一組只為此次 JB 使用並有 Multipath TCP 服務的 AppID</p>
<h2>2-4. Then get into the Provision Profile section and create new iOS Provision Profile</h2>
<p>接下來我們將建立剛剛創立的 App ID 的 Provision Profile，我們先進入右側 Provision Profile 區塊並按+號<br />
<img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/img.garynil.tw/images/2018/07/iFJ.png?w=700&#038;ssl=1" alt="iFJ.png" /></p>
<h2>2-5. Choose the App ID we create previously.</h2>
<p>我們為此組欲建立的 Provision Profile 選擇剛剛創立的 App ID<br />
<img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/img.garynil.tw/images/2018/07/j5M.png?w=700&#038;ssl=1" alt="j5M.png" /></p>
<h2>2-6. Choose devices you would like to install.</h2>
<p>選擇你要適用的裝置<br />
<img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/img.garynil.tw/images/2018/07/ICH.png?w=700&#038;ssl=1" alt="ICH.png" /></p>
<h2>2-6. Finally, we can download the Provision Profile we created.</h2>
<p>將剛剛建立的 Provision Profile 下載至你的電腦<br />
<img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/img.garynil.tw/images/2018/07/kk6.png?w=700&#038;ssl=1" alt="kk6.png" /></p>
<h2>3rd. Extract resigned Electra ipa / 重簽名 ipa</h2>
<p>We open the Resign tool <a href="https://dantheman827.github.io/ios-app-signer/">IOS Appsigner</a> and selected：<br />
&#8211; Input file：the newest Electra ipa / 最新版 Electra ipa<br />
&#8211; Signing Certificate：Your iPhone Developer Certificate / 你的開發者帳號憑證，記得先於 Xcode 登入它才抓的到<br />
&#8211; Provisioning Profile：Download from apple developer page we created on last step. / 剛剛製作並下載的 Provisioning Profile<br />
<img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/img.garynil.tw/images/2018/07/Tu3.png?w=700&#038;ssl=1" alt="Tu3.png" /><br />
Press start then it will resign and extract the ipa for you.<br />
按下開始他便依照你的設定重簽名了</p>
<p>註：如果出現錯誤，檢查你的 ipa 內的 <code>Payload/Electra1131.app/embedded.mobileprovision</code> 是否有 multipath 這行，以及你的裝置的 udid。<br />
<img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/img.garynil.tw/images/2018/07/c1X.png?w=700&#038;ssl=1" alt="c1X.png" /></p>
<h2>4th. Install on your device / 在裝置上安裝 Electra ipa</h2>
<p>After these steps, you can install this ipa on your device by tools such as <a href="https://support.apple.com/zh-tw/apple-configurator">Apple Configurator</a>、<a href="http://www.i-funbox.com/">iFunbox</a>&#8230;etc<br />
用 <a href="https://support.apple.com/zh-tw/apple-configurator">Apple Configurator</a>、<a href="http://www.i-funbox.com/">iFunbox</a> 等工具安裝你剛剛建立的 ipa 吧！<br />
<img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/img.garynil.tw/images/2018/07/KX8.png?w=700&#038;ssl=1" alt="KX8.png" /></p>
<p>這篇文章 <a rel="nofollow" href="https://garynil.tw/2018/07/814/tutorial-get-electra-multipath-tcp-installed/">[Tutorial / 教學] Get Electra (Multipath TCP) installed on iOS 11.2~11.3.1 / 安裝開發者版本的 Electra (iOS 11.2~11.3.1)</a> 最早出現於 <a rel="nofollow" href="https://garynil.tw">Gary&#039;s ...Lasamia</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://garynil.tw/2018/07/814/tutorial-get-electra-multipath-tcp-installed/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">814</post-id>	</item>
		<item>
		<title>[教學] iOS 手動轉移 Walkr 紀錄及 Line 簡訊 (備份還原 App)</title>
		<link>https://garynil.tw/2018/04/734/%e6%95%99%e5%ad%b8-ios-%e6%89%8b%e5%8b%95%e8%bd%89%e7%a7%bb-walkr-%e7%b4%80%e9%8c%84-%e5%82%99%e4%bb%bd%e9%82%84%e5%8e%9f-app/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=%25e6%2595%2599%25e5%25ad%25b8-ios-%25e6%2589%258b%25e5%258b%2595%25e8%25bd%2589%25e7%25a7%25bb-walkr-%25e7%25b4%2580%25e9%258c%2584-%25e5%2582%2599%25e4%25bb%25bd%25e9%2582%2584%25e5%258e%259f-app</link>
					<comments>https://garynil.tw/2018/04/734/%e6%95%99%e5%ad%b8-ios-%e6%89%8b%e5%8b%95%e8%bd%89%e7%a7%bb-walkr-%e7%b4%80%e9%8c%84-%e5%82%99%e4%bb%bd%e9%82%84%e5%8e%9f-app/#respond</comments>
		
		<dc:creator><![CDATA[Gary]]></dc:creator>
		<pubDate>Sat, 28 Apr 2018 16:40:16 +0000</pubDate>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[App]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[ifunbox]]></category>
		<category><![CDATA[imazing]]></category>
		<category><![CDATA[itools]]></category>
		<category><![CDATA[plist]]></category>
		<category><![CDATA[walkr]]></category>
		<category><![CDATA[備份]]></category>
		<category><![CDATA[手動]]></category>
		<category><![CDATA[手機]]></category>
		<category><![CDATA[轉移]]></category>
		<category><![CDATA[還原]]></category>
		<guid isPermaLink="false">https://garynil.tw/?p=734</guid>

					<description><![CDATA[<p>因為重刷了手機，把記錄放在舊的 iTunes 備份中，又或者打算從 A 手機移到 B 手機又不靠 iTunes 的話，這時，沒有官方支援移轉設備的 walkr 便顯得頗為困擾 (雖然有綁定 SNS 帳號但也無法轉移記錄..)，因此簡單的紀錄要如何轉移 Walkr 的紀錄。 0429 補充研究出的 Line 訊息轉移方法 [注意] 此方法需要越獄 Walkr 步驟 1.備份原始 Walkr 紀錄，會呈現有以下檔案，記得備份前更新至最新版以防版本不相容 2.如果這時你透過 iTools 等方法直接將備份檔丟回去，便會變成這樣的結果.. App 卡在 LaunchScreen 畫面，或直接閃退 3.因此，在丟回 App 的備份記錄後，必須將 App 根目錄，也就是 /var/mobile/Containers/Data/Application/$App的根目錄資料夾 (也就是一串雜湊碼名稱的資料...</p>
<p>這篇文章 <a rel="nofollow" href="https://garynil.tw/2018/04/734/%e6%95%99%e5%ad%b8-ios-%e6%89%8b%e5%8b%95%e8%bd%89%e7%a7%bb-walkr-%e7%b4%80%e9%8c%84-%e5%82%99%e4%bb%bd%e9%82%84%e5%8e%9f-app/">[教學] iOS 手動轉移 Walkr 紀錄及 Line 簡訊 (備份還原 App)</a> 最早出現於 <a rel="nofollow" href="https://garynil.tw">Gary&#039;s ...Lasamia</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>因為重刷了手機，把記錄放在舊的 iTunes 備份中，又或者打算從 A 手機移到 B 手機又不靠 iTunes 的話，這時，沒有官方支援移轉設備的 walkr 便顯得頗為困擾 (雖然有綁定 SNS 帳號但也無法轉移記錄..)，因此簡單的紀錄要如何轉移 Walkr 的紀錄。</p>
<h3>0429 補充研究出的 Line 訊息轉移方法</h3>
<h3>[注意] 此方法需要越獄</h3>
<p><span id="more-734"></span></p>
<h1>Walkr</h1>
<h2>步驟</h2>
<p>1.備份原始 Walkr 紀錄，會呈現有以下檔案，記得備份前更新至最新版以防版本不相容<br />
<a href="//i1.wp.com/lh4.googleusercontent.com/nXZeeVdVOvoPJKJjXTe7Bsbq6MlWAa6tmktNZLBBABSTPbZuURizSmnXP2E" data-featherlight="image" ><img decoding="async" alt="2018-04-29 上午12.22.09.png" src="//i1.wp.com/lh4.googleusercontent.com/nXZeeVdVOvoPJKJjXTe7Bsbq6MlWAa6tmktNZLBBABSTPbZuURizSmnXP2E"></a></p>
<p>2.如果這時你透過 iTools 等方法直接將備份檔丟回去，便會變成這樣的結果.. App 卡在 LaunchScreen 畫面，或直接閃退</p>
<p><a href="//i0.wp.com/lh6.googleusercontent.com/MLjQgRwlHsxVQTQJr-6yWUBu8vjHWAKuULrGpoof_xpXLpm6afrWA3NGu2E" data-featherlight="image" ><img decoding="async" alt="" src="//i0.wp.com/lh6.googleusercontent.com/MLjQgRwlHsxVQTQJr-6yWUBu8vjHWAKuULrGpoof_xpXLpm6afrWA3NGu2E"></a></p>
<p>3.因此，在丟回 App 的備份記錄後，必須將 App 根目錄，也就是 <code>/var/mobile/Containers/Data/Application/$App的根目錄資料夾</code> (也就是一串雜湊碼名稱的資料夾，可以透過 Filza 等具備轉換目錄名稱的 App 來尋找)</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">chmod 755 /var/mobile/Containers/Data/Application/$App的根目錄名稱
chown -R mobile:mobile /var/mobile/Containers/Data/Application/$App的根目錄名稱</pre><p></p>
<p><a href="//i0.wp.com/lh5.googleusercontent.com/3hLJBDeVGcg9scoBE5HY4iVL_JSZ9-gMRz3RxLBoHP9iX_gjiqhlMquCPWE" data-featherlight="image" ><img decoding="async" alt="" src="//i0.wp.com/lh5.googleusercontent.com/3hLJBDeVGcg9scoBE5HY4iVL_JSZ9-gMRz3RxLBoHP9iX_gjiqhlMquCPWE"></a></p>
<p>於是這樣就不會閃退惹，記錄也正常轉移了！ﾟヽ(*´∀`)ﾉﾟ</p>
<h1>Line</h1>
<p>Line 原本是沒有透過 App Group 而僅將對話記錄存在 App 本身資料夾中 Library 下的某個 db 內，在某一版改版後把他移到了 App Group，因此步驟較為不一樣</p>
<p><a href="//i0.wp.com/lh5.googleusercontent.com/3vYtiK3jL_SHabN1JZwe9-TqgvAnqB0wIfp1ANJFZYqzNZNVDYYQo1LCHYc" data-featherlight="image" ><img decoding="async" alt="2018-04-29 下午12.16.53.png" src="//i0.wp.com/lh5.googleusercontent.com/3vYtiK3jL_SHabN1JZwe9-TqgvAnqB0wIfp1ANJFZYqzNZNVDYYQo1LCHYc"></a><br />
<a href="//i0.wp.com/lh4.googleusercontent.com/gQRUwz1PlYZ1Z4H2O8M2VN5uyazmcEdPtuSDAsto3mEaKY8T-SPALXFMxqc" data-featherlight="image" ><img decoding="async" alt="2018-04-29 下午12.16.50.png" src="//i0.wp.com/lh4.googleusercontent.com/gQRUwz1PlYZ1Z4H2O8M2VN5uyazmcEdPtuSDAsto3mEaKY8T-SPALXFMxqc"></a></p>
<p>我們可以看到 Line 本身 App 底下的資料大多為一些較不相關的紀錄，而再觀察 App Group 中的 <code>group.com.linecorp.line group.share.com.linecorp.line</code>資料夾，就可以找到新的對話記錄資料庫</p>
<p><a href="//i0.wp.com/lh3.googleusercontent.com/cf8pIpV5dY86ye3TRSNufmvkxvg4KdWGnnDrUXNGJ2FSjo1_n50yDS4JGHU" data-featherlight="image" ><img decoding="async" alt="2018-04-29 下午12.17.13.png" src="//i0.wp.com/lh3.googleusercontent.com/cf8pIpV5dY86ye3TRSNufmvkxvg4KdWGnnDrUXNGJ2FSjo1_n50yDS4JGHU"></a><br />
<a href="//i0.wp.com/lh3.googleusercontent.com/kTs9PVMvBQ_FGa9NNrw4tyoTbWFs8kI075QkdkWldT0phQ1_9yfDo8zD3yU" data-featherlight="image" ><img decoding="async" alt="2018-04-29 下午12.17.19.png" src="//i0.wp.com/lh3.googleusercontent.com/kTs9PVMvBQ_FGa9NNrw4tyoTbWFs8kI075QkdkWldT0phQ1_9yfDo8zD3yU"></a></p>
<h2>步驟</h2>
<p>1.備份 Line 本身及 App Group 中 Line 的資料，如果透過 iTunes 備份可以用 iMazing 去尋找會比較快，而備份本身的目的是如果你懶惰轉移帳號或登入 Line 的話可以直接覆蓋<br />
2.以信箱或手機登入 Line<br />
3.正常登入後，從多工列關閉 Line 並將 App Group 的 Line 資料 (也就是 <code>group.com.linecorp.line group.share.com.linecorp.line</code> 兩個資料夾)倒回<br />
4.透過 chmod 755 及 chown -R mobile:mobile 更動兩個倒回的資料夾，避免 App 無法正常讀取或寫入</p>
<p>大概這樣就能成功的將對話記錄恢復了，當然還是建議透過官方的雲端備份會更便利。</p>
<p>其實這個方法蠻萬用的，如果遇到你還原備份後 App 閃退、卡住，或者正常開啟後裡面的操作在關閉 App 後皆無效，大概就是權限設定錯了，而一般 App 的手動備份還原通用方法皆是如此..</p>
<p>這篇文章 <a rel="nofollow" href="https://garynil.tw/2018/04/734/%e6%95%99%e5%ad%b8-ios-%e6%89%8b%e5%8b%95%e8%bd%89%e7%a7%bb-walkr-%e7%b4%80%e9%8c%84-%e5%82%99%e4%bb%bd%e9%82%84%e5%8e%9f-app/">[教學] iOS 手動轉移 Walkr 紀錄及 Line 簡訊 (備份還原 App)</a> 最早出現於 <a rel="nofollow" href="https://garynil.tw">Gary&#039;s ...Lasamia</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://garynil.tw/2018/04/734/%e6%95%99%e5%ad%b8-ios-%e6%89%8b%e5%8b%95%e8%bd%89%e7%a7%bb-walkr-%e7%b4%80%e9%8c%84-%e5%82%99%e4%bb%bd%e9%82%84%e5%8e%9f-app/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">734</post-id>	</item>
		<item>
		<title>[知識] iOS 中一些重要路徑</title>
		<link>https://garynil.tw/2018/04/732/ios-%e4%b8%ad%e4%b8%80%e4%ba%9b%e9%87%8d%e8%a6%81%e8%b7%af%e5%be%91/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ios-%25e4%25b8%25ad%25e4%25b8%2580%25e4%25ba%259b%25e9%2587%258d%25e8%25a6%2581%25e8%25b7%25af%25e5%25be%2591</link>
					<comments>https://garynil.tw/2018/04/732/ios-%e4%b8%ad%e4%b8%80%e4%ba%9b%e9%87%8d%e8%a6%81%e8%b7%af%e5%be%91/#respond</comments>
		
		<dc:creator><![CDATA[Gary]]></dc:creator>
		<pubDate>Sat, 28 Apr 2018 10:21:24 +0000</pubDate>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Dev]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[App]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[callhistory]]></category>
		<category><![CDATA[Cydia]]></category>
		<category><![CDATA[db]]></category>
		<category><![CDATA[Health]]></category>
		<category><![CDATA[home]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[mobile document]]></category>
		<category><![CDATA[path]]></category>
		<category><![CDATA[reset]]></category>
		<category><![CDATA[resotre]]></category>
		<category><![CDATA[scheme]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[備份]]></category>
		<category><![CDATA[備份檔]]></category>
		<category><![CDATA[路徑]]></category>
		<category><![CDATA[還原]]></category>
		<category><![CDATA[重置]]></category>
		<category><![CDATA[重要路徑]]></category>
		<guid isPermaLink="false">https://garynil.tw/?p=732</guid>

					<description><![CDATA[<p>因為自己 iPhone 從上次備份還原後，iCloud 設定頁面登出按了就是沒反應，加上一堆系統不乾淨造成的神秘 bug，在這次重置 iPhone 時，透過提取 iTunes 備份檔手動還原各種 App (含系統層級的 App) 至 iPhone 上，也順便寫了這篇記錄一下 iOS 中常用到的路徑 那為什麼要這樣做呢？因為這些檔案往往是僅能透過 iTunes 備份而 iCloud 不備份的紀錄，如果今天你的 iTunes 前次備份很髒亂，就會想這樣手動還原了。 而通常可以如此方式瀏覽 iPhone 根目錄及各個系統層檔案夾往往是透過 Apple File Conduit 2、SSH、iFile、Filza 或者 FilzaJailed，當然一切大前提下都是越獄後的成果。 以 iOS 11.3.1 測試： 系統相關 一般系統 App 相關 往往都是在這資料夾下層： [crayon-6a782...</p>
<p>這篇文章 <a rel="nofollow" href="https://garynil.tw/2018/04/732/ios-%e4%b8%ad%e4%b8%80%e4%ba%9b%e9%87%8d%e8%a6%81%e8%b7%af%e5%be%91/">[知識] iOS 中一些重要路徑</a> 最早出現於 <a rel="nofollow" href="https://garynil.tw">Gary&#039;s ...Lasamia</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>因為自己 iPhone 從上次備份還原後，iCloud 設定頁面登出按了就是沒反應，加上一堆系統不乾淨造成的神秘 bug，在這次重置 iPhone 時，透過提取 iTunes 備份檔手動還原各種 App (含系統層級的 App) 至 iPhone 上，也順便寫了這篇記錄一下 iOS 中常用到的路徑</p>
<p>那為什麼要這樣做呢？因為這些檔案往往是僅能透過 iTunes 備份而 iCloud 不備份的紀錄，如果今天你的 iTunes 前次備份很髒亂，就會想這樣手動還原了。<br />
而通常可以如此方式瀏覽 iPhone 根目錄及各個系統層檔案夾往往是透過 <a href="https://cydia.saurik.com/package/com.saurik.afc2d/">Apple File Conduit 2</a>、SSH、iFile、Filza 或者 FilzaJailed，當然一切大前提下都是越獄後的成果。</p>
<p><span id="more-732"></span></p>
<p>以 iOS 11.3.1 測試：</p>
<h1>系統相關</h1>
<h2>一般系統 App 相關</h2>
<p>往往都是在這資料夾下層：</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">/var/mobile/Library</pre><p></p>
<h2>通話記錄 CallHistory</h2>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">/var/wireless/Library/CallHistory</pre><p></p>
<h2>iMessage 及簡訊</h2>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">/var/mobile/Library/SMS</pre><p></p>
<h2>Health Kit 資料 (備份需加密)</h2>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">/var/mobile/Library/Health</pre><p></p>
<h2>Home Kit 設定</h2>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">/var/mobile/Library/homed</pre><p></p>
<h2>iCloud Drive</h2>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">/var/mobile/Library/Mobile Documents</pre><p></p>
<h2>Safari 相關</h2>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">/var/mobile/Library/Safari</pre><p></p>
<h2>Watch OS 備份</h2>
<p>其實只是幾個 plist 設定，非常輕量</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">/var/mobile/Library/NanoBackup</pre><p></p>
<p>將整個資料夾覆蓋後改至對應的權限即可</p>
<h2>一般權限下可瀏覽的 User Folder</h2>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">/var/mobile/Media/</pre><p></p>
<p><a href="//i1.wp.com/lh6.googleusercontent.com/7_TV_RvMzQ2Ou4r9eVYamLSav6LWM1JfnMJptHW2y9dS0DLRooyp4pQ8DUY" data-featherlight="image" ><img decoding="async" alt="" src="//i1.wp.com/lh6.googleusercontent.com/7_TV_RvMzQ2Ou4r9eVYamLSav6LWM1JfnMJptHW2y9dS0DLRooyp4pQ8DUY"></a></p>
<h1>媒體類</h1>
<h2>相機膠卷</h2>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">/var/mobile/Media/DCIM 及 /var/mobile/Media/PhotoData</pre><p></p>
<p>非常肥大的兩個地方XD</p>
<h2>語音備忘錄</h2>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">/var/mobile/Media/Recordings</pre><p></p>
<h1>一般 App 記錄檔</h1>
<p>從 iOS 8 之後就更改至這新位置囉，不過我目前還是沒研究出怎麼從 hash 名稱資料夾找出對應 App 的方法</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">/var/mobile/Containers/Data/Application</pre><p></p>
<p>想看進一步教學可以察看：<a href="https://garynil.tw/2018/04/734/教學-ios-手動轉移-walkr-紀錄-備份還原-app/">[教學] iOS 手動轉移 Walkr 紀錄及 Line 簡訊 (備份還原 App)</a></p>
<h2>AppGroups</h2>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">/var/mobile/Containers/Shared/AppGroup</pre><p></p>
<h1>Cydia 相關</h1>
<h2>Tweak 設定</h2>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">/var/mobile/Library/Preferences</pre><p></p>
<h2>Dylib Path</h2>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">/Library/MobileSubstrate/DynamicLibraries/</pre><p></p>
<h2>Deb path (Electra JB)</h2>
<p>而 Cydia 安裝 Packages 後其實會將 deb 下載至一個暫存路徑再進行安裝：</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">/var/mobile/Library/Caches/com.saurik.Cydia/archives/</pre><p></p>
<h2>Cydia 設定 (包含軟體源)</h2>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">/var/mobile/Library/Preferences/com.saurik.Cydia.plist</pre><p></p>
<h1>還原步驟</h1>
<p>大概把以上這些備份起來，再加上其他 App 的資料就可以構成一個蠻完整的備份了 (你還可以擺脫噁心的系統垃圾和 bug。)<br />
那從 iTunes 備份提取這些資料 (可透過 <a href="https://imazing.com">iMazing</a> 之類的 App 或者直接檢視 <code>~/Library/Application\ Support/MobileSync/Backup/</code> 來獲取) 之後，該如何還原呢？</p>
<p>1.提取資料<br />
2.透過 ssh 等有寫入權限的方式還原至手機上的對應資料夾<br />
3.將還原後的資料夾更改至正確的權限 ( 755 及 mobile )，例如這個範例是 <code>/var/mobile/Media/DCIM/</code></p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">chmod 755 /var/mobile/Media/DCIM/
chown -R mobile:mobile /var/mobile/Media/DCIM/</pre><p></p>
<p>4.如果有遇到擁有 db 資料庫類的資料，記得刪除 .db-shm 跟 .db-wal 的快取檔案 (可參考：皮樂姐姐的<a href="https://hiraku.tw/2013/12/3310/">文章</a><br />
5. iMessage 需要 reboot，其他都可以直接關閉 App （後台）重開就可以生效了</p>
<p>另外 Respring 的指令是：</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">killall -9 SpringBoard</pre><p></p>
<p>本篇僅供學術研究使用(疑?)</p>
<p>這篇文章 <a rel="nofollow" href="https://garynil.tw/2018/04/732/ios-%e4%b8%ad%e4%b8%80%e4%ba%9b%e9%87%8d%e8%a6%81%e8%b7%af%e5%be%91/">[知識] iOS 中一些重要路徑</a> 最早出現於 <a rel="nofollow" href="https://garynil.tw">Gary&#039;s ...Lasamia</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://garynil.tw/2018/04/732/ios-%e4%b8%ad%e4%b8%80%e4%ba%9b%e9%87%8d%e8%a6%81%e8%b7%af%e5%be%91/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">732</post-id>	</item>
		<item>
		<title>[Tutorial] How to build Electra ( iOS 11 Jailbreak app ) with ldid2</title>
		<link>https://garynil.tw/2018/01/691/tutorial-build-electra-ios-11-jailbreak-app-ldid2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tutorial-build-electra-ios-11-jailbreak-app-ldid2</link>
					<comments>https://garynil.tw/2018/01/691/tutorial-build-electra-ios-11-jailbreak-app-ldid2/#comments</comments>
		
		<dc:creator><![CDATA[Gary]]></dc:creator>
		<pubDate>Fri, 26 Jan 2018 07:20:35 +0000</pubDate>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[Electra]]></category>
		<category><![CDATA[ios11]]></category>
		<category><![CDATA[Jailbreak]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Xcode]]></category>
		<category><![CDATA[越獄]]></category>
		<guid isPermaLink="false">https://garynil.tw/?p=691</guid>

					<description><![CDATA[<p>Coolstar has released a new beta version of Electra jailbreak toolkit for iOS 11 – iOS 11.1.2. The author also release the source code of the jailbreak toolkit on Github. I would like to try to find out how the toolkit work by building it on my own. So I wrote this guide for people (who may be a developer) can follow instructions and build Electra toolkit successfully. The most important of all, b...</p>
<p>這篇文章 <a rel="nofollow" href="https://garynil.tw/2018/01/691/tutorial-build-electra-ios-11-jailbreak-app-ldid2/">[Tutorial] How to build Electra ( iOS 11 Jailbreak app ) with ldid2</a> 最早出現於 <a rel="nofollow" href="https://garynil.tw">Gary&#039;s ...Lasamia</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="https://twitter.com/coolstarorg">Coolstar</a> has released a new beta version of <a href="https://coolstar.org/electra/">Electra</a> jailbreak toolkit for iOS 11 – iOS 11.1.2. The author also release the source code of the jailbreak toolkit on <a href="https://github.com/coolstar/electra">Github</a>. I would like to try to find out how the toolkit work by building it on my own. So I wrote this guide for people (who may be a developer) can follow instructions and build Electra toolkit successfully.</p>
<p><img decoding="async" src="https://i0.wp.com/lh3.googleusercontent.com/LUQPFWITqe-Tm6oW6rmpTgrB1KbOkKQhDWCJiPrHEVrmlMUAIwdvAvHk6P8" width="1600" height="1427" class="aligncenter size-full" /></p>
<p>The most important of all, before you start to read this guide, make sure you have the ability to handle the problem you meet. You are fully doing this at your own risk, I&#8217;m not responsible for any damage caused.</p>
<p>If you don&#8217;t know what this article is doing, you can download the released ipa on the author <a href="https://coolstar.org/electra/">website</a> resign by tools such as <a href="https://github.com/maciekish/iReSign">iResign</a> and install it to your iPhone without building it youself.</p>
<p><span id="more-691"></span></p>
<h4>Advantage of build the toolkit yourself</h4>
<ol>
<li>Know the structure of the code</li>
<li>Preventing if there were malicious code in toolkit.</li>
<li>Remove unused features. For example, in this toolkit, it will install Anemone tweak after you jailbreak. The last part in this tutorial will told you how to do it.</li>
<li>Keep the latest version, you can pull the latest version from Github and build it yourself.</li>
<li>You need to turn the SIP off of macOS before you did these instructions.</li>
</ol>
<h2>Clone repo</h2>
<p>You can access the Electra repo on <a href="https://github.com/coolstar/electra">Github</a>, which contain a Xcode project.<br />
Clone it to your ~/Desktop or any other path you like to work with.</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">git clone https://github.com/coolstar/electra.git</pre><p></p>
<p><a href="//i0.wp.com/lh3.googleusercontent.com/MjLpIWf3lGmh1pvhgDYZ3OSh2Up386AFRXHHF7ejUmnksTJDXGJGT63B1zI" data-featherlight="image"><img decoding="async" alt="Array" src="//i0.wp.com/lh3.googleusercontent.com/MjLpIWf3lGmh1pvhgDYZ3OSh2Up386AFRXHHF7ejUmnksTJDXGJGT63B1zI" width="811" height="600" scale="2"></a></p>
<h2>Build Xcode project</h2>
<p>Open the Xcode project then build. You will meet some error with the clean Xcode environment.</p>
<h2>ldid2 error</h2>
<p>After you build the project, you will meet a error. You will see this error:</p>
<p><a href="//i0.wp.com/lh5.googleusercontent.com/vZU-gDoh2jhgFA8eBncA2CFIBVkgO3Shf3kJ1iVUzIpYQE9CpgunWAQ7y0Y" data-featherlight="image"><img loading="lazy" decoding="async" alt="Array" src="//i0.wp.com/lh5.googleusercontent.com/vZU-gDoh2jhgFA8eBncA2CFIBVkgO3Shf3kJ1iVUzIpYQE9CpgunWAQ7y0Y" width="875" height="600" scale="2"></a></p>
<p>At the first test, I tried install ldid original version by</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">brew install ldid</pre><p></p>
<p>and the bin of the ldid would be at <code>/usr/local/Cellar/ldid/1.2.1</code>, then link it as ldid2 in <code>/usr/local/bin</code></p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">ln -s /usr/local/Cellar/ldid/1.2.1/bin/ldid /usr/local/bin/ldid2</pre><p></p>
<p><a href="//i0.wp.com/lh4.googleusercontent.com/s6XTUMGfpfA7ta-e3zueDiD6E66a1I8YJ9U5yEFdcAqyEfhNWoMP0QUMg4Y" data-featherlight="image"><img loading="lazy" decoding="async" alt="Array" src="//i0.wp.com/lh4.googleusercontent.com/s6XTUMGfpfA7ta-e3zueDiD6E66a1I8YJ9U5yEFdcAqyEfhNWoMP0QUMg4Y" width="837" height="600" scale="2"></a></p>
<p>With the ldid, it can work, and you can build the toolkit into your iPhone. However, the jailbreak won&#8217;t success and block on 2/3.</p>
<p>So I tried to find the solution on Github. I found <a href="https://github.com/xerub">xerub</a> make a <a href="ldid2">ldid2</a> with SHA256 support. However, this repo is not complete. The repo are lack of make code and wasn&#8217;t build.</p>
<h2>Add ldid2 to <code>/usr/local/bin/</code></h2>
<p>I completed the ldid2 project and put the binary in release version <a href="https://github.com/GaryniL/ldid/releases/tag/0.1-2">page</a>.<br />
<a href="https://github.com/GaryniL/ldid">Project Link</a></p>
<p><a href="https://github.com/GaryniL/ldid"><img loading="lazy" decoding="async" alt="Array" src="//i0.wp.com/lh6.googleusercontent.com/oEAPtGL4HQ1iq4EKW-VjfpSVeQoTkHU_O1yJZ0XB2kEcHWc6Y2Cmu-w7JqA" width="900" height="484" scale="2"></a></p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">curl https://raw.githubusercontent.com/GaryniL/ldid/master/ldid2 -o ldid2
sudo mv ldid2 /usr/local/bin/
chmod +x /usr/local/bin/ldid2</pre><p></p>
<p>Then rebuild the project, it will work.<br />
<a href="//i0.wp.com/lh3.googleusercontent.com/HuX8tRwjS2qGOvuRaQdHHw-_knyoBynGLGWemba1jNcauklvrsOrW5DCj-o" data-featherlight="image"><img loading="lazy" decoding="async" alt="Array" src="//i0.wp.com/lh3.googleusercontent.com/HuX8tRwjS2qGOvuRaQdHHw-_knyoBynGLGWemba1jNcauklvrsOrW5DCj-o" width="900" height="153" scale="2"></a><br />
<a href="//i0.wp.com/lh5.googleusercontent.com/B-TmX8yOe6Sd9u0HcBPzLwY_AVToPvguK0r5819RkDfBZmFoLX07xlbJjLU" data-featherlight="image"><img loading="lazy" decoding="async" alt="Array" src="//i0.wp.com/lh5.googleusercontent.com/B-TmX8yOe6Sd9u0HcBPzLwY_AVToPvguK0r5819RkDfBZmFoLX07xlbJjLU" width="277" height="600" scale="2"></a></p>
<h2>Remove Anemone</h2>
<p>Besides, you can remove the line for preventing installing Anemone tweak<br />
<a href="//i1.wp.com/lh3.googleusercontent.com/zymV2cO9wQeooRedfMGl6ceHlGRq-4KacyFSn2O3ljX6fXM0Uk1_4Y19PC4" data-featherlight="image"><img loading="lazy" decoding="async" alt="Array" src="//i1.wp.com/lh3.googleusercontent.com/zymV2cO9wQeooRedfMGl6ceHlGRq-4KacyFSn2O3ljX6fXM0Uk1_4Y19PC4" width="900" height="590" scale="2"></a></p>
<p>這篇文章 <a rel="nofollow" href="https://garynil.tw/2018/01/691/tutorial-build-electra-ios-11-jailbreak-app-ldid2/">[Tutorial] How to build Electra ( iOS 11 Jailbreak app ) with ldid2</a> 最早出現於 <a rel="nofollow" href="https://garynil.tw">Gary&#039;s ...Lasamia</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://garynil.tw/2018/01/691/tutorial-build-electra-ios-11-jailbreak-app-ldid2/feed/</wfw:commentRss>
			<slash:comments>11</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">691</post-id>	</item>
		<item>
		<title>Stylish &#8211; 恢復 iOS App 網頁版 view in iTunes 按鈕</title>
		<link>https://garynil.tw/2017/10/449/stylish-%e6%81%a2%e5%be%a9-ios-app-%e7%b6%b2%e9%a0%81%e7%89%88-view-itunes-%e6%8c%89%e9%88%95/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=stylish-%25e6%2581%25a2%25e5%25be%25a9-ios-app-%25e7%25b6%25b2%25e9%25a0%2581%25e7%2589%2588-view-itunes-%25e6%258c%2589%25e9%2588%2595</link>
					<comments>https://garynil.tw/2017/10/449/stylish-%e6%81%a2%e5%be%a9-ios-app-%e7%b6%b2%e9%a0%81%e7%89%88-view-itunes-%e6%8c%89%e9%88%95/#comments</comments>
		
		<dc:creator><![CDATA[Gary]]></dc:creator>
		<pubDate>Sun, 08 Oct 2017 05:53:11 +0000</pubDate>
				<category><![CDATA[OSX]]></category>
		<category><![CDATA[App]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[itunestore]]></category>
		<guid isPermaLink="false">https://garynil.tw/?p=449</guid>

					<description><![CDATA[<p>因為偉哉 Apple 新政策，於 iTunes 12.7 把所有 iOS Apps 相關功能及 App 商店頁面刪除了。透過皮樂姐姐的 iTunes 降級教學可以將 iTunes 降級到 12.6 並恢復這些功能。但偉大的 Apple 這幾天又將他們 iOS App 網頁版的 view in iTunes 的按鈕拔除了.. 例如 CPU Identifier 的頁面，原本應該是長這樣： 但這幾天 Apple 把 view in iTunes 的按鈕拔掉了，也就是你只能透過緩慢的 iTunes 內建 iOS App Store 去搜尋並下載 app.. 便研究了一下改動及做出了解決方案： 解決方法 步驟一：安裝瀏覽器外掛 Stylish Stylish 所提供功能主要是讓使用者可以使用自訂的 CSS 方法來取代網站原始的 CSS 設計，並可以達到改變網站樣式及設計的效用。而如果不懂 CSS ...</p>
<p>這篇文章 <a rel="nofollow" href="https://garynil.tw/2017/10/449/stylish-%e6%81%a2%e5%be%a9-ios-app-%e7%b6%b2%e9%a0%81%e7%89%88-view-itunes-%e6%8c%89%e9%88%95/">Stylish &#8211; 恢復 iOS App 網頁版 view in iTunes 按鈕</a> 最早出現於 <a rel="nofollow" href="https://garynil.tw">Gary&#039;s ...Lasamia</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>因為偉哉 Apple 新政策，於 iTunes 12.7 把所有 iOS Apps 相關功能及 App 商店頁面刪除了。透過<a href="https://hiraku.tw/2017/09/4661/">皮樂姐姐的 iTunes 降級教學</a>可以將 iTunes 降級到 12.6 並恢復這些功能。但偉大的 Apple 這幾天又將他們 iOS App 網頁版的 <strong>view in iTunes</strong> 的按鈕拔除了..<br />
例如 <a href="https://itunes.apple.com/tw/app/cpu-identifier/id1045029477?l=zh&amp;mt=8">CPU Identifier</a> 的頁面，原本應該是長這樣：</p>
<p><a title="螢幕快照_2017-10-08_上午1_19_51" href="https://www.flickr.com/photos/134033268@N03/37305289240/in/dateposted-public/" data-flickr-embed="true"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/farm5.staticflickr.com/4500/37305289240_d63f3d0bb2_b.jpg?resize=700%2C504&#038;ssl=1" alt="iTunes" width="700" height="504" /></a><script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script><br />
<span id="more-449"></span></p>
<p>但這幾天 Apple 把 <strong>view in iTunes</strong> 的按鈕拔掉了，也就是你只能透過緩慢的 iTunes 內建 iOS App Store 去搜尋並下載 app..<br />
便研究了一下改動及做出了解決方案：</p>
<h3>解決方法</h3>
<h5>步驟一：安裝瀏覽器外掛 Stylish</h5>
<p>Stylish 所提供功能主要是讓使用者可以使用自訂的 CSS 方法來取代網站原始的 CSS 設計，並可以達到改變網站樣式及設計的效用。而如果不懂 CSS ，Stylish 也有提供套用主題的或使用別人分享的客制主題的功能。這個插件除了 Safari 版本以外，也有 Chrome 及 Firefox 等等的瀏覽器版本。而我們主要是透過 CSS 覆寫這功能來恢復 iTunes 頁面將按鈕拔除的功能。</p>
<p>更多詳細教學：<a href="http://iphone4.tw/forums/showthread.php?t=194313">Safari外掛『Stylish』更換網站的模樣</a></p>
<p>載點：<a href="http://sobolev.us/stylish/">Safari</a>、<a href="https://chrome.google.com/webstore/detail/stylish-custom-themes-for/fjnbnpbmkenffdnngjfgmeleoegfcffe?hl=zh-TW">Chrome</a>、<a href="https://addons.mozilla.org/zh-TW/firefox/addon/stylish/">Firefox</a></p>
<h5>步驟二：開啟 Stylish 並新增一筆新的規則</h5>
<p>安裝完成後 Stylish 應該是會出現在工具列，打開並新增一筆如下的規則</p>
<ul>
<li>Title：隨意</li>
<li>CSS：將按鈕隱藏的 CSS 取代</li>
</ul>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">body.software #content #left-stack a.view-in-itunes {
    display: block;
}</pre><p></p>
<ul>
<li>Applies to：這裡將 iTunes 頁面的域名來當作觸發點，當瀏覽到 iTunes 頁面時會因為域名設定觸發此規則<br />
Domain: <code>itunes.apple.com</code></li>
</ul>
<p><a href="https://flic.kr/p/YdduUx"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/farm5.staticflickr.com/4460/36894215543_5f28c177ba_z.jpg?resize=640%2C301&#038;ssl=1" alt="螢幕快照 2017-10-08 下午1.46.47" width="640" height="301" /></a></p>
<p>如此設定便成功了，當你瀏覽 iOS App 於 iTunes 頁面時，隱藏的按鈕便會恢復～</p>
<p>這篇文章 <a rel="nofollow" href="https://garynil.tw/2017/10/449/stylish-%e6%81%a2%e5%be%a9-ios-app-%e7%b6%b2%e9%a0%81%e7%89%88-view-itunes-%e6%8c%89%e9%88%95/">Stylish &#8211; 恢復 iOS App 網頁版 view in iTunes 按鈕</a> 最早出現於 <a rel="nofollow" href="https://garynil.tw">Gary&#039;s ...Lasamia</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://garynil.tw/2017/10/449/stylish-%e6%81%a2%e5%be%a9-ios-app-%e7%b6%b2%e9%a0%81%e7%89%88-view-itunes-%e6%8c%89%e9%88%95/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">449</post-id>	</item>
		<item>
		<title>Yalu102 &#8211; App crash at launched after Jailbreak</title>
		<link>https://garynil.tw/2017/01/301/yalu102-app-crash-at-launched-after-jailbreak/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=yalu102-app-crash-at-launched-after-jailbreak</link>
					<comments>https://garynil.tw/2017/01/301/yalu102-app-crash-at-launched-after-jailbreak/#respond</comments>
		
		<dc:creator><![CDATA[Gary]]></dc:creator>
		<pubDate>Fri, 27 Jan 2017 16:52:28 +0000</pubDate>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iOS 10]]></category>
		<category><![CDATA[Jailbreak]]></category>
		<category><![CDATA[Resign]]></category>
		<category><![CDATA[Yalu]]></category>
		<guid isPermaLink="false">https://garynil.tw/?p=301</guid>

					<description><![CDATA[<p>After I use Yalu beta 1 on iOS 10.2 for jailbreaking my iPhone 6s &#38; 6s plus, as I mentioned in my previous paragraph：Yalu102 &#8211; iOS 10.2 Jailbreak, it works more stable then previous version. I tried to install some tweaks such as iFile、KeyBoard Accio and SwipeSelection to enhance the functionality of my phone. You can try to find out which tweak supported iOS 10.2 here and here I install...</p>
<p>這篇文章 <a rel="nofollow" href="https://garynil.tw/2017/01/301/yalu102-app-crash-at-launched-after-jailbreak/">Yalu102 &#8211; App crash at launched after Jailbreak</a> 最早出現於 <a rel="nofollow" href="https://garynil.tw">Gary&#039;s ...Lasamia</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>After I use <a href="https://yalu.qwertyoruiop.com/" target="_blank">Yalu beta 1</a> on iOS 10.2 for jailbreaking my iPhone 6s &amp; 6s plus, as I mentioned in my previous paragraph：<a href="https://garynil.tw/2017/01/295" target="_blank">Yalu102 &#8211; iOS 10.2 Jailbreak</a>, it works more stable then previous version.</p>
<p>I tried to install some tweaks such as iFile、KeyBoard Accio and SwipeSelection to enhance the functionality of my phone.<br />
You can try to find out which tweak supported iOS 10.2 <a href="http://www.ios10tweaks.com/p/ios-102-compatible-tweaks.html" target="_blank">here</a> and <a href="https://docs.google.com/spreadsheets/d/14e9GB-PNhDJuKI799InVFWrUQc-qn-Wd3zRJHKGkKr0/pubhtml#" target="_blank">here</a></p>
<p>I installed <strong>Cydia Substrate</strong> for supporting tweaks and <strong>iFile</strong> for debugging. However, after I respring in Cydia, at the next time I start using any other apps, the apps will crash at launch..</p>
<p>Including Yalu it self&#8230;.<br />
[fve]https://youtu.be/AaaNOYl273U[/fve]</p>
<p><span id="more-301"></span></p>
<p>Although system apps can launch normally eg.Preference. But user&#8217;s apps can&#8217;t, such as apps downloaded from AppStore.</p>
<p>And it works normally after rebooting, your phone wasn&#8217;t Jailbreak then due to Yalu is a semi-untethered jailbreak.</p>
<p>[fve]https://youtu.be/fwfNP0ILuxg[/fve]</p>
<p>First, I try to find out what is the problem if it was made by installing iFile or Cydia Substrate.</p>
<p>During testing time, I restore my 6s with ipsw of 10.2 (since SHSH of iOS 10.2 is opening now, I can restore it at anytime) for the purpose of prepainge a clean environment to test.</p>
<p>After testing, I found that if I try to install Cydia Substrate with other tweaks and respring, it caused the problem.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>But the result is incorrect.</strong></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>In previous testing, I tried to use the <a href="https://yalu.qwertyoruiop.com/yalu102_alpha.ipa" target="_blank">public version ipa</a> of Yalu which <a href="https://twitter.com/qwertyoruiopz" target="_blank">qwertyoruiop</a> released on <a href="https://yalu.qwertyoruiop.com/" target="_blank">his site</a>.</p>
<p>But at the first time I jailbreak my phone, I used the version builded by myself from the code qwertyoruiop released on <a href="https://github.com/kpwn/yalu102" target="_blank">Github</a>. Besides, I&#8217;ve tried two version of it (<a href="https://github.com/kpwn/yalu102/commit/04b574267e65c13682ecd8771cff5353732178a1" target="_blank">04b574267e65c13682ecd8771cff5353732178a1</a> &amp; <a href="https://github.com/kpwn/yalu102/commit/24723830b74aac9825d53a3cd38d53439f52ad57" target="_blank">24723830b74aac9825d53a3cd38d53439f52ad57</a>)</p>
<p>At last, I found out the problem is caused by the different version of Yalu (the recent version on Github will make apps can&#8217;t launch).</p>
<p>So here is the way to solve the problem (remove Yalu and install the previous version of Yalu102)</p>
<ul>
<li>Delete the old version of Yalu from your phone</li>
<li>Resign <a href="https://yalu.qwertyoruiop.com/yalu102_alpha.ipa" target="_blank">public version ipa</a> of Yalu (<a href="https://garynil.tw/2017/01/295" target="_blank">tutorial</a>)</li>
<li>Install it into your phone then reboot</li>
<li>Jailbreak your phone again, Cydia will works normally, if not, you can solve by <a href="https://www.reddit.com/r/jailbreak/comments/5jv0ag/tutorial_how_to_rejailbreak_your_device_after/" target="_blank">this way</a></li>
<li>Done</li>
</ul>
<p>[fve]https://youtu.be/CzL70D5FTgI[/fve]</p>
<p>這篇文章 <a rel="nofollow" href="https://garynil.tw/2017/01/301/yalu102-app-crash-at-launched-after-jailbreak/">Yalu102 &#8211; App crash at launched after Jailbreak</a> 最早出現於 <a rel="nofollow" href="https://garynil.tw">Gary&#039;s ...Lasamia</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://garynil.tw/2017/01/301/yalu102-app-crash-at-launched-after-jailbreak/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">301</post-id>	</item>
		<item>
		<title>Yalu102 &#8211; iOS 10.2 Jailbreak</title>
		<link>https://garynil.tw/2017/01/295/yalu-ios-10-jailbreak/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=yalu-ios-10-jailbreak</link>
					<comments>https://garynil.tw/2017/01/295/yalu-ios-10-jailbreak/#comments</comments>
		
		<dc:creator><![CDATA[Gary]]></dc:creator>
		<pubDate>Thu, 26 Jan 2017 14:49:18 +0000</pubDate>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Cydia]]></category>
		<category><![CDATA[iOS 10]]></category>
		<category><![CDATA[Jailbreak]]></category>
		<category><![CDATA[JB]]></category>
		<category><![CDATA[Lucas]]></category>
		<category><![CDATA[qwertyoruiopz]]></category>
		<category><![CDATA[Resign]]></category>
		<category><![CDATA[Yalu]]></category>
		<guid isPermaLink="false">https://garynil.tw/?p=295</guid>

					<description><![CDATA[<p>繼上次寫了 iOS 10.1.x 越獄 &#8211; Yalu beta 3 也快過了一個月，悲觀的 Lucas 終於釋出了新的 beta 1 版本。 這裡補充一下，請大家尊重一下開發者大大們，不要去騷擾拍打、催促他完成 Jailbreak。他是沒有義務要完成這些的，這些騷擾讓他的氫碘鈉化碳碎了..，也聲稱 10.2 版本釋出之後將不會再投入研究 在新版本中， Lucas 加入了對 MobileSubstrate 的相容性 (來源) 有比較深入研究，或者再追蹤 reddit 的人應該都知道在 10.1.x 時，Lucas 釋出的版本是不支援 MobileSubstrate 的 因為目前大部分的 tweak 都依賴 MobileSubstrate，當時大部分的 tweaks 是無法使用的。 &#160; 當時也有人推出 Substrate Fix (iOS 10) Source：http:...</p>
<p>這篇文章 <a rel="nofollow" href="https://garynil.tw/2017/01/295/yalu-ios-10-jailbreak/">Yalu102 &#8211; iOS 10.2 Jailbreak</a> 最早出現於 <a rel="nofollow" href="https://garynil.tw">Gary&#039;s ...Lasamia</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>繼上次寫了 <a href="https://garynil.tw/2016/12/234" target="_blank">iOS 10.1.x 越獄 &#8211; Yalu beta 3</a> 也快過了一個月，悲觀的 <a href="https://twitter.com/qwertyoruiopz" target="_blank">Lucas</a> 終於釋出了新的 <a href="https://yalu.qwertyoruiop.com/yalu102_alpha.ipa" target="_blank">beta 1</a> 版本。</p>
<p>這裡補充一下，請大家尊重一下開發者大大們，不要去騷擾<del datetime="2017-01-26T13:44:53+00:00">拍打</del>、催促他完成 Jailbreak。他是沒有義務要完成這些的，這些騷擾<del datetime="2017-01-26T15:14:31+00:00">讓他的氫碘鈉化碳碎了..</del>，也<a href="https://twitter.com/qwertyoruiopz/status/823293730857820160" target="_blank">聲稱</a> 10.2 版本釋出之後將不會再投入研究</p>
<p>在新版本中， Lucas 加入了對 MobileSubstrate 的相容性 <a href="https://twitter.com/qwertyoruiopz/status/824508945695997952" target="_blank">(來源)<br />
</a>有比較深入研究，或者再追蹤 reddit 的人應該都知道在 10.1.x 時，Lucas 釋出的版本是不支援 MobileSubstrate 的<br />
因為目前大部分的 tweak 都依賴 MobileSubstrate，當時大部分的 tweaks 是無法使用的。<br />
<span id="more-295"></span></p>
<p>&nbsp;</p>
<p>當時也有人推出 Substrate Fix (iOS 10) Source：<a href="cydia://url/https://cydia.saurik.com/api/share#?source=http://83.218.67.215/~ijapija00/cydia" target="_blank">http://83.218.67.215/~ijapija00/cydia</a><br />
但在當時我自己測試之下，是蠻不穩定的.. 不過目前 iOS 10.1.1 使用 Yalu beta 3 的人只能使用這套來支援 Cydia Substrate<br />
而使用 Yalu 102 新版的人，直接安裝 Cydia Substrate 即可，在 1 月底也有為了 iOS 10 釋出的 0.96301 的更新檔</p>
<p>&nbsp;</p>
<p>而此次 beta 1 版本，修正了這些不穩定性，就我自己使用上知道改正了以下錯誤：</p>
<ul>
<li>可以正常 Log 出錯誤訊息，NSLog 和 printf 正常使用</li>
<li>支援 MobileSubstrate</li>
<li><code>killall -9 Springboard</code> 在我的機器上是穩定的，這有待換到別的機器測試</li>
<li><code>killall -9 backboardd</code> 可以正常使用，不會讓手機重啟</li>
</ul>
<p>但透過 Yalu app 越獄失敗的情況還是存在，需要多嘗試一兩次才能成功</p>
<p><a href="https://flic.kr/p/RkDR2E"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/farm1.staticflickr.com/474/32383879132_986dccfb52_z.jpg?resize=640%2C418&#038;ssl=1" alt="螢幕快照 2017-01-26 下午7.41.25" width="640" height="418" /></a><br />
&nbsp;</p>
<p>================== 更新 ====================</p>
<p><strong>2017/02/01 更新</strong><br />
現在設備情況分為兩種：是 iPhone 7 以及非 iPhone 7 系列</p>
<ul>
<li>如果你是使用 iPhone 7 在 iOS 10.1.1 ，請使用<a href="https://garynil.tw/2016/12/234" target="_blank">這篇教學</a>配上 <a href="https://yalu.qwertyoruiop.com/mach_portal+yalu-b3.ipa" target="_blank">Yalu beta 3</a> (註：beta 4-1 作者沒有包好，也註明是損毀的，不要聽信網路傳言用 4-1 。)。</p>
</li>
<li>
<p>如果你是使用其他 64 bit 裝置並在 iOS 10，請使用 <a href="https://yalu.qwertyoruiop.com/yalu102_beta7.ipa" target="_blank">Yalu 102 beta 7</a>，詳請再參照此篇教學</a></p>
</li>
</ul>
<p><strong>2017/01/30 更新</strong><br />
推出 <a href="https://yalu.qwertyoruiop.com/yalu102_beta6.ipa" target="_blank">beta 6 版本</a><br />
現已支援所有 iOS 10 64 bit 的裝置除了 iPhone7, iPad Air 2 和 iPad Mini 4<br />
<em>fixes some issues some device/fw combos were having with the tfp0 / nonceEnabler patch</em></p>
<p>iPhone 7 可以使用 Yalu 舊版 <a href="https://yalu.qwertyoruiop.com/mach_portal+yalu-b3.ipa" target="_blank">beta 3</a></p>
<p>詳細更新項目可以參照<a href="https://yalu.qwertyoruiop.com" target="_blank">原始網頁</a></p>
<p><strong>2017/01/29 更新</strong><br />
推出 beta 5 版本<br />
<em>placebo effect</em></p>
<p><strong>2017/01/26 補充</strong><br />
我用兩台裝置 6s (iOS 10.2) 及 6s Plus (iOS 10.1.1) 做的測試<br />
在 6s Plus (iOS 10.1.1) 上使用 Yalu102 會出現幾個不能運作的情況：<br />
1.OpenSSH 無法運作，完全連不進去<br />
2.Log 失效</p>
<p>#註：後來證實是自己用 Github 上的版本 build 出來才會有問題，用官方版本是正常的</p>
<p>&nbsp;<br />
&nbsp;<br />
<del datetime="2017-02-04T14:39:21+00:00">但這些問題在 6s (iOS 10.2) 上一切正常<br />
而 OpenSSH 問題，只要透過 Yalu beta 3 就可以解決，但舊版又超不穩定..</del></p>
<p><strong>0127 補充</strong><br />
在 10.2 越獄之後，我有遇到裝完 iFile 和 Cydia Substrate 之後，除了系統 app 以外其他 app 點開馬上閃退的情況<br />
交叉測試之後發現：<br />
在第一次越獄之後，要先單獨安裝 Cydia Substrate，其他套件等此次安裝完 respring 之後在另外安裝<br />
便不會發升上述問題了<br />
&nbsp;</p>
<p>而進入文章重點，那此次 Jailbreak 要如何安裝使用呢？<br />
其實跟<a href="http://www.pangu.io" target="_blank">盤古 iOS 9 越獄</a> 一樣，是透過安裝一個 app 來觸發漏洞建立越獄環境<br />
當你每次重新啟動手機之後，是需要重新越獄的</p>
<p>而安裝 Yalu App 主要分為以下三個方法：</p>
<h3>方法1：透過 Cydia Impactor 和開發者帳號來安裝 (最簡易懶人)</h3>
<p>你需要準備的是作者編譯好的 <a href="https://yalu.qwertyoruiop.com/yalu102_alpha.ipa" target="_blank">ipa 安裝檔</a>以及 <a href="http://www.cydiaimpactor.com" target="_blank">Cydia Impactor</a><br />
然後使用 Cydia Impactor 將 ipa resign 後裝至你的手機<br />
詳細教學可以看我<a href="https://garynil.tw/2016/12/234" target="_blank">上次這篇</a></p>
<p>缺點就是因為 Apple 佛心讓大家可以成為開發者，但限制是你每 7 天要 resign 一次<br />
然後強烈建議不要使用自己的付費開發者帳號，他會將你 revoke ，之後在 Xcode 開發還要設定一次很麻煩..</p>
<h3>方法2：使用付費開發者帳號 Resign</h3>
<p>相信有付費開發者帳號的人有開發經驗會比較聰明，我也懶得截圖，就將步驟寫的簡易一點：<br />
主要的目的就是透過你的帳號將 ipa resign，</p>
<h1>以下這一小段可以略過，因為使用 Yalu 10.2 beta 1 不需要這麼做</h1>
<p>在 Yalu 第一版除了 ipa 本身以外，還要 resign 裡面的 dylib，先將 ipa 副檔名改為 zip 後打開找到以下檔案<br />
並透過 codesign指令，加上你的 iPhone Developer 描述檔及代號重新簽名<br />
這裡會發生問題有一種特殊情況，你必需要開一個在<a href="http://developer.apple.com/" target="_blank">開發者後台</a>去新增一個 APP ID 符合 ipa 的 bundle idintifier，才可以正常的 resign dylib</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">codesign -f -s "iPhone Developer: XXX (XXXXXXXXXX)" ./Frameworks/libswiftCore.dylib
codesign -f -s "iPhone Developer: XXX (XXXXXXXXXX)" ./Frameworks/libswiftCoreGraphics.dylib
codesign -f -s "iPhone Developer: XXX (XXXXXXXXXX)" ./Frameworks/libswiftCoreImage.dylib
codesign -f -s "iPhone Developer: XXX (XXXXXXXXXX)" ./Frameworks/libswiftDarwin.dylib
codesign -f -s "iPhone Developer: XXX (XXXXXXXXXX)" ./Frameworks/libswiftDispatch.dyli
codesign -f -s "iPhone Developer: XXX (XXXXXXXXXX)" ./Frameworks/libswiftFoundation.dylib
codesign -f -s "iPhone Developer: XXX (XXXXXXXXXX)" ./Frameworks/libswiftObjectiveC.dylib
codesign -f -s "iPhone Developer: XXX (XXXXXXXXXX)" ./Frameworks/libswiftQuartzCore.dylib
codesign -f -s "iPhone Developer: XXX (XXXXXXXXXX)" ./Frameworks/libswiftUIKit.dylib</pre><p></p>
<p>============================================</p>
<p>而 ipa resign 的部分可以透過 <a href="http://mac.softpedia.com/get/Developer-Tools/iModSign.shtml" target="_blank">iModSign</a> 或者 <a href="https://github.com/maciekish/iReSign" target="_blank">iResign</a> 有 GUI 的簽名工具完成<br />
你只需要導入你的開發者帳號的 Provisioning Profile，可以從 Xcode 的設定來尋找，要使用 Provisioning Profile:* 的那一個<br />
路徑在：<code>~/Library/MobileDevice/Provisioning\ Profiles</code></p>
<p><a href="https://flic.kr/p/Qhz9wh"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/farm1.staticflickr.com/519/31692656164_1740abae3a_z.jpg?resize=640%2C539&#038;ssl=1" alt="螢幕快照_2017-01-26_下午10_36_47" width="640" height="539" /></a></p>
<p>之後再透過 <a href="http://www.i-funbox.com" target="_blank">iFunbox</a> 之類的工具安裝 ipa 即可完成</p>
<h3>方法3：當你擁有了原始碼</h3>
<p>因為這次作者直接<a href="https://github.com/kpwn/yalu102">公開原始碼</a>，便可以用這種特殊的形式來操作</p>
<p>以 Xcode 開啟專案，</p>
<p>這裡會有個小問題，作者的 code 中會使用到 IOKit 這個 framework，正常開啟是會顯示失敗無法 build 的，我將解決方法寫在<a href="https://garynil.tw/?p=298" target="_blank">這篇 &#8211; Import IOKit framework into Xcode project</a></p>
<p>1.直接 Archive，Export for development 匯出成擁有你簽名的 ipa ，然後安裝、結束。<br />
2.接上手機直接 build 進去<br />
這方法好處是可以隨時 pull 作者 update 的新版本，隨時 build 保持最新版～</p>
<p><a href="https://flic.kr/p/QZD9rE"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/farm1.staticflickr.com/759/32157412680_c542db0aba_z.jpg?resize=640%2C466&#038;ssl=1" alt="螢幕快照_2017-01-26_下午11_09_13" width="640" height="466" /></a></p>
<p>這篇文章 <a rel="nofollow" href="https://garynil.tw/2017/01/295/yalu-ios-10-jailbreak/">Yalu102 &#8211; iOS 10.2 Jailbreak</a> 最早出現於 <a rel="nofollow" href="https://garynil.tw">Gary&#039;s ...Lasamia</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://garynil.tw/2017/01/295/yalu-ios-10-jailbreak/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">295</post-id>	</item>
		<item>
		<title>透過 USB 傳輸線 SSH 進入 iPhone 等 iDevice</title>
		<link>https://garynil.tw/2016/12/255/%e9%80%8f%e9%81%8e-usb-%e5%82%b3%e8%bc%b8%e7%b7%9a-ssh-%e9%80%b2%e5%85%a5-iphone-%e7%ad%89-idevice/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=%25e9%2580%258f%25e9%2581%258e-usb-%25e5%2582%25b3%25e8%25bc%25b8%25e7%25b7%259a-ssh-%25e9%2580%25b2%25e5%2585%25a5-iphone-%25e7%25ad%2589-idevice</link>
					<comments>https://garynil.tw/2016/12/255/%e9%80%8f%e9%81%8e-usb-%e5%82%b3%e8%bc%b8%e7%b7%9a-ssh-%e9%80%b2%e5%85%a5-iphone-%e7%ad%89-idevice/#respond</comments>
		
		<dc:creator><![CDATA[Gary]]></dc:creator>
		<pubDate>Sat, 31 Dec 2016 14:34:37 +0000</pubDate>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Dev Tool]]></category>
		<category><![CDATA[iDevice]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[USB]]></category>
		<guid isPermaLink="false">https://garynil.tw/?p=255</guid>

					<description><![CDATA[<p>有在開發或使用 SSH (Secure Shell) 登入 iPhone 等 iDevice 的人一定會遇到這些情況 出門在外，沒有 wifi 卻需要 SSH 登入 iPhone 有時將 iPhone 連上個不常使用的 Wifi 熱點，想要 SSH 登入時還要特地去設置然後找 IP 經過頗多步驟 這些等等等的情況，其實都有個簡單的方式可以解決， 就是透過你一定擁有的 iPhone 傳輸線，簡單的透過傳輸線將 iPhone 接到你的電腦的 USB port，就可以很方便的 SSH 進入 需求 iDevice 設備 具有資料傳輸功能的傳輸線 (接上電腦，iTunes可以正常偵測到你的 iDevice 即可) 具有 USB port 的電腦 (Type-C也可啦..XD) iDevice 上需要安裝 OpenSSH 而要透過什麼來完成這項目的呢？其實透過一套網路上的 Library：usbmux...</p>
<p>這篇文章 <a rel="nofollow" href="https://garynil.tw/2016/12/255/%e9%80%8f%e9%81%8e-usb-%e5%82%b3%e8%bc%b8%e7%b7%9a-ssh-%e9%80%b2%e5%85%a5-iphone-%e7%ad%89-idevice/">透過 USB 傳輸線 SSH 進入 iPhone 等 iDevice</a> 最早出現於 <a rel="nofollow" href="https://garynil.tw">Gary&#039;s ...Lasamia</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>有在開發或使用 SSH (Secure Shell) 登入 iPhone 等 iDevice 的人一定會遇到這些情況</p>
<ul>
<li>出門在外，沒有 wifi 卻需要 SSH 登入 iPhone</li>
<li>有時將 iPhone 連上個不常使用的 Wifi 熱點，想要 SSH 登入時還要特地去設置然後找 IP 經過頗多步驟</li>
</ul>
<p>這些等等等的情況，其實都有個簡單的方式可以解決，<br />
就是透過你一定擁有的 iPhone 傳輸線，簡單的透過傳輸線將 iPhone 接到你的電腦的 USB port，就可以很方便的 SSH 進入<br />
<span id="more-255"></span></p>
<h3>需求</h3>
<ul>
<li>iDevice 設備</li>
<li>具有資料傳輸功能的傳輸線 (接上電腦，iTunes可以正常偵測到你的 iDevice 即可)</li>
<li>具有 USB port 的電腦 (Type-C也可啦..XD)</li>
<li>iDevice 上需要安裝 OpenSSH</li>
</ul>
<p>而要透過什麼來完成這項目的呢？其實透過一套網路上的 Library：<a href="https://github.com/libimobiledevice/usbmuxd" target="_blank" rel="noopener">usbmuxd</a></p>
<p>安裝方式很簡單，下載來使用即可：<a href="http://pkgs.fedoraproject.org/repo/pkgs/usbmuxd/" target="_blank" rel="noopener">官方連結</a><br />
但有版本差異，最新 1.1.0 必須透過複雜的安裝方式，所以我是下載 <a href="http://pkgs.fedoraproject.org/repo/pkgs/usbmuxd/usbmuxd-1.0.6.tar.bz2/c8909cfd9253d8d1a5e26f2ff7e5908b/usbmuxd-1.0.6.tar.bz2" target="_blank" rel="noopener">1.0.6</a> 版本可以直接執行</p>
<p>透過 curl 指令下載<br />
<code>$ curl -OL http://pkgs.fedoraproject.org/repo/pkgs/usbmuxd/usbmuxd-1.0.6.tar.bz2/c8909cfd9253d8d1a5e26f2ff7e5908b/usbmuxd-1.0.6.tar.bz2</code></p>
<p>放置指定路徑然後解壓縮<br />
<code>$ tar jxvf usbmuxd-1.0.6.tar.bz2</code></p>
<p>移動至內部一個 pytohn-client 的資料夾內<br />
<code>$ cd ./usbmuxd-1.0.6/python-client</code></p>
<p>這裡要注意的是，要先將 tcprelay.py 這個檔案改權限並更動為可執行，一般使用者才可以正常執行<br />
<code>$ chmod +x tcprelay.py</code></p>
<p>然後就可以透過這串指令來開啟 USB port forward 了！<br />
<code>$ ./tcprelay.py -t 22:2222</code><br />
<img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="14293" data-permalink="https://garynil.tw/2016/12/255/%e9%80%8f%e9%81%8e-usb-%e5%82%b3%e8%bc%b8%e7%b7%9a-ssh-%e9%80%b2%e5%85%a5-iphone-%e7%ad%89-idevice/31854892682_79493a38df_z/" data-orig-file="https://i0.wp.com/garynil.tw/wp-content/uploads/2016/12/31854892682_79493a38df_z.jpg?fit=640%2C506&amp;ssl=1" data-orig-size="640,506" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="31854892682_79493a38df_z" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/garynil.tw/wp-content/uploads/2016/12/31854892682_79493a38df_z.jpg?fit=640%2C506&amp;ssl=1" src="https://i0.wp.com/garynil.tw/wp-content/uploads/2016/12/31854892682_79493a38df_z.jpg?resize=640%2C506&#038;ssl=1" alt="" width="640" height="506" class="aligncenter size-full wp-image-14293" /><br />
開啟之後，這時你就可以透過 SSH 來登入了！<br />
<code>ssh root@localhost -p 2222</code></p>
<p>當然，每次都要 cd 到指定位置然後執行一串指令非常麻煩<br />
所以可以簡化成一步驟</p>
<p>1.可以將以下這個路徑設置至你所使用預設 shell 內 (Bash 或 ZSH 等)，我是使用ZSH，因此是改動 ~/.zshrc</p>
<p><code>export USBPort=/你放置資料夾的路徑/usbmuxd/python-client/</code></p>
<p>之後你便可以在終端機內 使用 <code>$USBPort/tcprelay.py -t 22:2222</code> 這快速的捷徑路徑，不用在自己慢慢找</p>
<p>2.更偷懶可以透過 <a href="https://textexpander.com" target="_blank" rel="noopener">Text Expander</a> 然後快速輸入上面那串&#8230;</p>
<p>這篇文章 <a rel="nofollow" href="https://garynil.tw/2016/12/255/%e9%80%8f%e9%81%8e-usb-%e5%82%b3%e8%bc%b8%e7%b7%9a-ssh-%e9%80%b2%e5%85%a5-iphone-%e7%ad%89-idevice/">透過 USB 傳輸線 SSH 進入 iPhone 等 iDevice</a> 最早出現於 <a rel="nofollow" href="https://garynil.tw">Gary&#039;s ...Lasamia</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://garynil.tw/2016/12/255/%e9%80%8f%e9%81%8e-usb-%e5%82%b3%e8%bc%b8%e7%b7%9a-ssh-%e9%80%b2%e5%85%a5-iphone-%e7%ad%89-idevice/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">255</post-id>	</item>
		<item>
		<title>Prometheus 降級工具</title>
		<link>https://garynil.tw/2016/12/190/prometheus-%e9%99%8d%e7%b4%9a%e5%b7%a5%e5%85%b7/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=prometheus-%25e9%2599%258d%25e7%25b4%259a%25e5%25b7%25a5%25e5%2585%25b7</link>
					<comments>https://garynil.tw/2016/12/190/prometheus-%e9%99%8d%e7%b4%9a%e5%b7%a5%e5%85%b7/#comments</comments>
		
		<dc:creator><![CDATA[Gary]]></dc:creator>
		<pubDate>Thu, 29 Dec 2016 14:49:24 +0000</pubDate>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Cydia]]></category>
		<category><![CDATA[iOS 10]]></category>
		<category><![CDATA[Jailbrake]]></category>
		<guid isPermaLink="false">https://garynil.tw/?p=190</guid>

					<description><![CDATA[<p>12/29 早上預告了許久的 tihmstar 終於釋出降級工具 Prometheus 。 原本以為月底跨年時才會釋出的，有點小驚訝。加上下午手賤不小心把手邊的 6s 搞爆炸了。。便可以毫不猶豫的測試啦 (? [fve]https://www.youtube.com/watch?v=BIMx2Y13Ukc[/fve] Prometheus 將 &#8220;nonceenabler&#8221;、&#8221;futurerestore&#8221; 和 &#8220;img4tool&#8221; 等工具的功能整合在一起。而 Prometheus 主要有兩種升/降級方法： 1. 搭配 nonceenabler 和 futurerestore 在越獄環境下生成需要的 ApNonce，並透過這組 ApNonce 來升/降級 (快速很多) 2. 直接使用 futurerestore 來操作你的...</p>
<p>這篇文章 <a rel="nofollow" href="https://garynil.tw/2016/12/190/prometheus-%e9%99%8d%e7%b4%9a%e5%b7%a5%e5%85%b7/">Prometheus 降級工具</a> 最早出現於 <a rel="nofollow" href="https://garynil.tw">Gary&#039;s ...Lasamia</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>12/29 早上預告了許久的 <a href="https://twitter.com/tihmstar" target="_blank">tihmstar</a> 終於釋出降級工具 Prometheus 。<br />
原本以為月底跨年時才會釋出的，有點小驚訝。加上下午手賤不小心把手邊的 6s 搞爆炸了。。便可以毫不猶豫的測試啦 (?</p>
<p>[fve]https://www.youtube.com/watch?v=BIMx2Y13Ukc[/fve]</p>
<p>Prometheus 將 &#8220;nonceenabler&#8221;、&#8221;futurerestore&#8221; 和 &#8220;img4tool&#8221; 等工具的功能整合在一起。而 Prometheus 主要有兩種升/降級方法：</p>
<p>1. 搭配 nonceenabler 和 futurerestore 在越獄環境下生成需要的 ApNonce，並透過這組 ApNonce 來升/降級 (快速很多)<br />
2. 直接使用 futurerestore 來操作你的手機進入 Recovery Mode ，生成隨機 ApNonce，如果這組 ApNonce 是你所需要的，就成功 (簡單來說就是暴力破解，需要花費很長時間)</p>
<p>因為我手殘，不小心把 9.3.3 越獄弄炸升級到 10.2 了，所以目前我只能嘗試方法2了&#8230;</p>
<p><span id="more-190"></span></p>
<p>這次降級工具有蠻多要注意的事項：</p>
<ol>
<li>Prometheus 目前版本為沒有 GUI 的工具，只能透過終端機來操作</li>
<li>降級或升級是有條件的，這等等會說明</li>
<li>最重要的，想要進行這些步驟前，務必確認你很熟悉這些開發工具，當然後果自行負責啦～</li>
</ol>
<p>&nbsp;</p>
<p>那我們需要準備什麼呢？</p>
<ol>
<li><del datetime="2016-12-29T13:31:59+00:00">誠摯(不怕死)的心</del></li>
<li>想要降級至的版本的shsh2，如何備份可以參見 <a href="https://www.ptt.cc/bbs/iPhone/M.1481976290.A.A29.html" target="_blank">[越獄] iOS 10.1.1 JB現況&amp;SHSH2備份</a>，當然有追蹤<a href="https://www.facebook.com/hiraku.tw/" target="_blank">皮樂大大</a>的粉屍們，相信前陣子都備份好 iOS 10.1.1 的 SHSH2 啦<br />
至於備份下來的 SHSH2 會有很多個，那要選擇哪一個呢？我是拿 NONCE_random <strong>以外</strong>資料夾內其中一個對應版本號的 SHSH2 (14B150 -&gt; iOS 10.1.1)啦，目前也還沒成功，所以不確定是否會影響</li>
<p><a href="https://flic.kr/p/QG8Wxe"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/farm1.staticflickr.com/282/31959333955_d8719a4aab_z.jpg?resize=570%2C640&#038;ssl=1" alt="螢幕快照 2016-12-29 下午9.15.03" width="570" height="640" /></a></p>
<li><a href="https://www.dropbox.com/s/u474uytuh0rbowc/futurerestore_osx_1.0.zip" target="_blank">futurerestore_osx</a> (作者連結)：主要的降級工具</li>
<li><strong><a href="https://ipsw.me" target="_blank">ipsw</a></strong><br />
作者示範是由 9.3.5 降級至 9.3.3，因此需要 9.3.5 及 9.3.3 的ipsw<br />
而我自己是由 10.2 欲降級至 10.1.1，所以我要準備 10.2 和 10.1.1的ipsw<br />
至於為何是這樣選擇，主要是因為由於認證關閉的關係，你需要拿你要降/升版本距離最近且有開放的系統版本中的baseband和sep<br />
我是6s上的10.1.1，所以最近且有開放的是10.2，注意，iOS 10 -&gt; iOS 9這種跨大版本的baseband和sep是會有差別的，所以不同</li>
</ol>
<p>以下幾個到 10.2 (認證沒關的版本) 的ipsw，副檔名改為zip後在裡面拿取：</p>
<ol start="5">
<li><strong>BuildManifest.plist<br />
路徑為 <code>iPhone_4.7_10.2_14C92_Restore.zip/BuildManifest.plist</code> </strong></li>
<p>&nbsp;</p>
<li><strong>Baseband：bbfw檔<br />
路徑為 <code>iPhone_4.7_10.2_14C92_Restore.zip/dfu/Mav13-2.41.00.Release.bbfw</code><br />
這裡要注意的是，你需要到手機的 設定 -&gt; 一般 -&gt; 關於本機 -&gt; 數據機韌體 去確認自己的版號，拿取對應版本的韌體，我的就是2.41.00 </strong></li>
<p>&nbsp;</p>
<li><strong>Sep-Firmware：im4p檔<br />
路徑為 <code>iPhone_4.7_10.2_14C92_Restore.zip/Firmware/all_flash/all_flash.n71ap.production/sep-firmware.n71.RELEASE.im4p</code><br />
而在 ipsw 內，可能會看到好幾個版本的資料夾，這時候建議去查個你的機型代號，像 6s 就是 n71ap </strong></li>
</ol>
<p>&nbsp;</p>
<p>好，所以到這邊，你的資料夾內應該要有這些東西，可以確認一下<br />
<a href="https://flic.kr/p/QG8Wu8"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/farm6.staticflickr.com/5540/31959333775_a84622e7eb_z.jpg?resize=640%2C440&#038;ssl=1" alt="螢幕快照 2016-12-29 下午10.12.27" width="640" height="440" /></a><br />
準備好之後，便先移動至你準備的資料夾，打入以下指令：<br />
<code>$ ./futurerestore </code></p>
<p>如果你沒安裝過任何開發工具，這時候應該會提示你缺少一些 Library<br />
解決方法：<br />
請先安裝 <a href="http://brew.sh/index_zh-tw.html" target="_blank">Homebrew</a> ，按照網頁內指令操作便可完成，Homebrew是一套套件管理工具，我們將用他來安裝其他需要的 Library<br />
缺少的Library的安裝指令為以下</p>
<ol>
<li><code>$ brew install libplist</code>
<li><code>$ brew install libzip</code>
<li><code>$ brew install usbmuxd</code>
</ol>
<p>註：在reddit有看到有人出現 XCode 相關的其他錯誤：<br />
upgrade Xcode in the App Store and use &#8220;xcode-select &#8211;install&#8221; to install the Command Line Tools for Xcode if you encounter a bug relating to cryptography.</p>
<p>安裝完這些便可以正常操作了～</p>
<p><code>$ ./futurerestore -t shsh2檔名 -b bbfw檔名 -p BuildManifest.plist -s sep-firmware檔名 -m BuildManifest.plist -w 欲還原ipsw檔名</code></p>
<p>然後就會炸掉了。</p>
<p><a href="https://flic.kr/p/PpUB79"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/farm1.staticflickr.com/500/31119311424_43d8fbf8e3_z.jpg?resize=640%2C529&#038;ssl=1" alt="螢幕快照_2016-12-29_下午6_54_23" width="640" height="529" /></a></p>
<p><code>[TSSC] opening BuildManifest.plist</code><br />
<code>[TSSR] requesting ticket for iPhone7,2</code><br />
<code>Segmentation fault: 11</code></p>
<p>會出現這樣的錯誤訊息，看作者 <a href="https://twitter.com/tihmstar/status/814329918645538818" target="_blank">Twitter</a> 應該是他有地方沒寫好<br />
解決方法很簡單，將參數全部複製一遍貼上重複輸入就好，那你的指令會變成如此：<br />
<code>$ ./futurerestore -t shsh2檔名 -b bbfw檔名 -p BuildManifest.plist -s sep-firmware檔名 -m BuildManifest.plist -w 欲還原ipsw檔名 -t shsh2檔名 -b bbfw檔名 -p BuildManifest.plist -s sep-firmware檔名 -m BuildManifest.plist -w 欲還原ipsw檔名</code><br />
好，這時候你的裝置就會進入 Recovery Mode 然後開始生成 ApNonce 然後比對了，目前我試了兩個小時都還沒成功呢 &gt;_^</p>
<p><a href="https://flic.kr/p/QG8Wt6"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/farm1.staticflickr.com/661/31959333715_55c859d5de_c.jpg?resize=621%2C800&#038;ssl=1" alt="螢幕快照_2016-12-29_下午7_02_34" width="621" height="800" /></a></p>
<p>[fve]https://youtu.be/uCbCRKVNqC0[/fve]</p>
<p>當然有人會想，這樣不就我整天電腦和手機要掛在那邊？<br />
沒錯der&#8230;.</p>
<p>但是不用擔心，剛剛我親身測試過進入這 Recovery Mode 是不會更動你的系統，簡單來說，就是你可以放著等他成功，或者隨時退出繼續用你現行版本的系統，也不會更動到你的資料，但是以防萬一，使用前還是<strong>備份</strong>為佳<br />
至於退出 Recovery Mode 的方法，可以使用 <a href="http://www.cydiaos.com/wp-content/uploads/2014/04/RecBoot-2.2-Mac.zip" target="_blank">RecBoot</a> 來退出，重開機後變正常了～</p>
<p>01/02 更新，作者釋出 <a href="http://api.tihmstar.net/builds/futurerestore/futurerestore-latest.zip" target="_blank">v60 版本</a><br />
這版本會依賴 libcrypto 的套件<br />
解決方法是先用 <code>brew install openssl</code><br />
安裝完成之後自己手動 link 到作者指定的 path <code>/opt/local/lib/</code></p>
<p><code>mkdir /opt/local/</code><br />
<code>mkdir /opt/local/lib</code><br />
<code>ln -s /usr/local/Cellar/openssl/1.0.2j/lib/libcrypto.1.0.0.dylib /opt/local/lib/libcrypto.1.0.0.dylib</code></p>
<p>=============================================</p>
<p>12/31 更新<br />
根據<a href="https://twitter.com/tihmstar/status/815147198677716992" target="_blank">作者 Twitter</a>表示，網路上流傳都是造謠的，Prometheus 是可以使用且未被 Apple 和協。</p>
<p>12/30 更新<br />
根據 <a href="https://www.reddit.com/r/jailbreak/comments/5l0apl/discussion_prometheusfuturerestore_tool_by/">Reddit 網友</a>回報，Apple 似乎把Prometheus 擋掉了，針對它發送假的伺服器掛點訊息。在 iTunes 正常升級還原都不會遇到。。。</p>
<p>然後我測了 19 小時 (12/29 7:00 PM ~ 12/30 14:00) 目前都還是無法成功。。</p>
<p>這篇文章 <a rel="nofollow" href="https://garynil.tw/2016/12/190/prometheus-%e9%99%8d%e7%b4%9a%e5%b7%a5%e5%85%b7/">Prometheus 降級工具</a> 最早出現於 <a rel="nofollow" href="https://garynil.tw">Gary&#039;s ...Lasamia</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://garynil.tw/2016/12/190/prometheus-%e9%99%8d%e7%b4%9a%e5%b7%a5%e5%85%b7/feed/</wfw:commentRss>
			<slash:comments>21</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">190</post-id>	</item>
		<item>
		<title>iOS 9 App Transport Security 設定</title>
		<link>https://garynil.tw/2015/10/40/ios-9-app-transport-security-%e8%a8%ad%e5%ae%9a/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ios-9-app-transport-security-%25e8%25a8%25ad%25e5%25ae%259a</link>
					<comments>https://garynil.tw/2015/10/40/ios-9-app-transport-security-%e8%a8%ad%e5%ae%9a/#respond</comments>
		
		<dc:creator><![CDATA[Gary]]></dc:creator>
		<pubDate>Mon, 05 Oct 2015 14:01:18 +0000</pubDate>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[App]]></category>
		<category><![CDATA[Xcode]]></category>
		<guid isPermaLink="false">https://garynil1635.wordpress.com/?p=40</guid>

					<description><![CDATA[<p>最近因為OS X更新到了10.11，也將Xcode隨著更新到了第7版 剛好要改一個舊的Project，在連線功能卻出現了這個問題： [crayon-6a78295e9a214278029756/] 查了一下Document才知道 Apple在 WWDC 2015改變了一些東西：&#8220;What&#8217;s New in iOS 9&#8221; App Transport Security App Transport Security (ATS) enforces best practices in the secure connections between an app and its back end. ATS prevents accidental disclosure, provides secure default behavior, and is easy to a...</p>
<p>這篇文章 <a rel="nofollow" href="https://garynil.tw/2015/10/40/ios-9-app-transport-security-%e8%a8%ad%e5%ae%9a/">iOS 9 App Transport Security 設定</a> 最早出現於 <a rel="nofollow" href="https://garynil.tw">Gary&#039;s ...Lasamia</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>最近因為OS X更新到了10.11，也將Xcode隨著更新到了第7版<br />
剛好要改一個舊的Project，在連線功能卻出現了這個問題：</p><pre class="urvanov-syntax-highlighter-plain-tag">The resource could not be loaded because the App Transport 
Security policy requires the use of a secure connection</pre><p><img decoding="async" src="https://farm1.staticflickr.com/594/21780179060_8463a49233_h.jpg[" alt="" /></p>
<p>查了一下Document才知道 Apple在 WWDC 2015改變了一些東西：<a href="https://developer.apple.com/library/prerelease/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS9.html#//apple_ref/doc/uid/TP40016198-SW1" target="_blank">&#8220;What&#8217;s New in iOS 9&#8221;</a></p>
<p><span id="more-40"></span></p>
<h3 class="jump"></h3>
<h3 class="jump">App Transport Security</h3>
<p><em>App Transport Security (ATS) enforces best practices in the secure connections between an app and its back end. ATS prevents accidental disclosure, provides secure default behavior, and is easy to adopt; it is also on by default in iOS 9 and OS X v10.11. You should adopt ATS as soon as possible, regardless of whether you’re creating a new app or updating an existing one.</em></p>
<p><em>If you’re developing a new app, you should use HTTPS exclusively. If you have an existing app, you should use HTTPS as much as you can right now, and create a plan for migrating the rest of your app as soon as possible. In addition, your communication through higher-level APIs needs to be encrypted using TLS version 1.2 with forward secrecy. If you try to make a connection that doesn&#8217;t follow this requirement, an error is thrown. If your app needs to make a request to an insecure domain, you have to specify this domain in your app&#8217;s <code>Info.plist</code> file</em></p>
<p>簡單來說就是Apple因為安全性建議大家使用Https取代Http，未來版本不確定是否會強制規定使用Https，但目前可以以修改info.plist的方式來恢復舊有的方法。</p>
<p><strong style="color: red;">當然可以使用ATS當然是最好的，也是更安全的方式！</strong><br />
<code></code></p>
<p>而解決方法則是，在專案的info.plist加入以下的值：</p><pre class="urvanov-syntax-highlighter-plain-tag">&amp;lt;key&amp;gt;NSAppTransportSecurity&amp;lt;/key&amp;gt;
&amp;lt;dict&amp;gt;
  &amp;lt;key&amp;gt;NSExceptionDomains&amp;lt;/key&amp;gt;
  &amp;lt;dict&amp;gt;
    &amp;lt;key&amp;gt;你的域名或主機&amp;lt;/key&amp;gt;
    &amp;lt;dict&amp;gt;
      &amp;lt;!--Include to allow subdomains--&amp;gt;
      &amp;lt;key&amp;gt;NSIncludesSubdomains&amp;lt;/key&amp;gt;
      &amp;lt;true/&amp;gt;
      &amp;lt;!--Include to allow HTTP requests--&amp;gt;
      &amp;lt;key&amp;gt;NSTemporaryExceptionAllowsInsecureHTTPLoads&amp;lt;/key&amp;gt;
      &amp;lt;true/&amp;gt;
      &amp;lt;!--Include to specify minimum TLS version--&amp;gt;
      &amp;lt;key&amp;gt;NSTemporaryExceptionMinimumTLSVersion&amp;lt;/key&amp;gt;
      &amp;lt;string&amp;gt;TLSv1.1&amp;lt;/string&amp;gt;
    &amp;lt;/dict&amp;gt;
  &amp;lt;/dict&amp;gt;
&amp;lt;/dict&amp;gt;</pre><p>當然也會出現你沒辦法決定對哪些網址你要開放的狀況..<br />
那就如下面這樣全部開放：<br />
<code></code></p><pre class="urvanov-syntax-highlighter-plain-tag">&amp;lt;key&amp;gt;NSAppTransportSecurity&amp;lt;/key&amp;gt;
&amp;lt;dict&amp;gt;
  &amp;lt;!--Include to allow all connections (DANGER)--&amp;gt;
  &amp;lt;key&amp;gt;NSAllowsArbitraryLoads&amp;lt;/key&amp;gt;
      &amp;lt;true/&amp;gt;
&amp;lt;/dict&amp;gt;</pre><p>大致上這樣就可以正常使用了～<br />
當然比較安全也根本的方法是改變成 Https&#8230;</p>
<p>這篇文章 <a rel="nofollow" href="https://garynil.tw/2015/10/40/ios-9-app-transport-security-%e8%a8%ad%e5%ae%9a/">iOS 9 App Transport Security 設定</a> 最早出現於 <a rel="nofollow" href="https://garynil.tw">Gary&#039;s ...Lasamia</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://garynil.tw/2015/10/40/ios-9-app-transport-security-%e8%a8%ad%e5%ae%9a/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">40</post-id>	</item>
	</channel>
</rss>
