透過 adb 呼叫 package manager 可以設定程式安裝模式
adb shell pm setInstallLocation [0/auto] [1/internal] [2/external]
比如要強制啟用 Application Move to SD card 的功能, 則輸入
adb shell pm setInstallLocation 2
那麼所有的程式都可以被使用者強制搬移到 SD card 上, 如果想還原, 輸入
adb shell pm setInstallLocation 0
讓 Android 自行判斷該程式是否有指定 support. 至於被搬到 SD card 上的程式放在哪呢 ? 在 SD card 的 .android_secure 目錄, 會以 *.asec 的加密檔案形式存在, 只有原加密手機方可使用.
另外切記 ! 不是所有的程式都可以放在 SD card 上跑喔 ! 請參考官方網站的說明: Services, IME, Live Folder/Wallpaper, Widget 等等都不能放上去, 否則嚴重會造成.. Force close 產生. 所以除非你頭腦清醒, 或者心臟夠大, 否則別輕易嘗試喔 ! :D
This content is published under the Attribution-Noncommercial-Share Alike 3.0 Unported license.
[...] http://blog.23corner.com/2010/05/23/froyo-強制啟用-application-move-to-sd-card-的功能/ [...]