<?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>mobile document &#8211; Gary&#039;s &#8230;Lasamia</title>
	<atom:link href="https://garynil.tw/tag/mobile-document/feed/" rel="self" type="application/rss+xml" />
	<link>https://garynil.tw</link>
	<description>🍎 📱 🖥 🔨 😄</description>
	<lastBuildDate>Wed, 23 Jan 2019 17:45:55 +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>mobile document &#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>[知識] 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-6a786...</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>
	</channel>
</rss>
