Android KK後為何原廠模式下無法adb 無法重新啟動機器 ?

來源:互聯網
上載者:User

標籤:otto   進程   關機   keyword   ext   mod   未定義   模式   .net   

前言
         歡迎大家我分享和推薦好用的程式碼片段~~
聲明
         歡迎轉載,但請保留文章原始出處:
         CSDN
http://www.csdn.net
         雨季o莫憂離:http://blog.csdn.net/luckkof

本文

 

KK 以後 為何原廠模式下無法adb reboot ?

正常情況下adb reboot 能夠重新啟動。


[Keyword]
adb reboot, factory mode, 原廠模式, 原廠模式無法重新啟動

[版本號碼約束]
android 4.4,  KK 或者KK 以後版本號碼
[Solution]
KK 以後 Google 將關機/重新啟動的最後轉移到了init 進程上運行。 其它Process 通過system property sys.powerctl 通知init 運行。


sys.powerctl 的配置在init.rc 其中,能夠參考

on property:sys.powerctl=*
   powerctl ${sys.powerctl}
   
然後運行system/core/init/builtins.c#do_powerctl 函數。call android_reboot 重新啟動或者關機。為何原廠模式下無法adb reboot ?

正常情況下adb reboot 能夠重新啟動, 其關鍵就是由於mediatek/config/{platform}factory_init.rc 中未定義
on property:sys.powerctl=*
   powerctl ${sys.powerctl}
   
假設要加入此功能,僅僅有在factory_init.rc 中加入這兩行就可以

Android KK後為何原廠模式下無法adb 無法重新啟動機器 ?

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.