android Settings項目安裝 (模擬器版)

來源:互聯網
上載者:User

參考了網上的一些文章,現總結如下:

  1. 運行eclipse的debug,將自己的settings安裝到模擬器上會出現如下錯誤

    [2012-03-08 11:14:27 - Settings] Android Launch!
    [2012-03-08 11:14:27 - Settings] adb is running normally.
    [2012-03-08 11:14:27 - Settings] Performing com.android.settings.Settings activity launch
    [2012-03-08 11:14:27 - Settings] Automatic Target Mode: Preferred AVD 'Demo1' is available on emulator 'emulator-5554'
    [2012-03-08 11:14:27 - Settings] WARNING: Application does not specify an API level requirement!
    [2012-03-08 11:14:27 - Settings] Device API version is 8 (Android 2.2)
    [2012-03-08 11:14:27 - Settings] Uploading Settings.apk onto device 'emulator-5554'
    [2012-03-08 11:15:00 - Settings] Installing Settings.apk...
    [2012-03-08 11:15:31 - Settings] Installation error: INSTALL_FAILED_UPDATE_INCOMPATIBLE
    [2012-03-08 11:15:31 - Settings] Please check logcat output for more details.
    [2012-03-08 11:15:31 - Settings] Launch canceled!

    就是說你自己寫的settings簽名和系統內建的settings簽名不一致,要先卸載原settings

  2. 卸載seetings

  • 正常卸載adb uninstall com.android.settings會報Failure

    網上找的方法是 adb shell "cd /system/app;rm Settings.apk;"

    但是會報錯rm failed for Settings.apk, Read-only file system

  • 得先執行這句(adb 模式下直接就是root許可權)adb remount

    提示remount succeeded   (remount的作用大概就是提升讀寫權限,使之可以操作唯讀檔案)

  • 然後就可以執行 adb shell "cd /system/app;rm Settings.apk;"
  • 成功刪除之後,執行
    adb uninstall com.android.settings
  • 卸載成功!安裝自己的settings

參考http://blog.csdn.net/stonecao/article/details/6460116

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.