5
我如何檢查Android設備是植根與否?我正在使用以下代碼:如何檢查android設備是否爲Rooted設備?
Process proc = Runtime.getRuntime().exec ("su");
當我在設備上運行它時,出現以下異常。
Causes by:Permission denied
但是,在模擬器上運行不會產生任何異常。
我正在使用另一種方式來檢查。在模擬器表彰行中輸入adb shell
返回#,但對於設備寫入adb shell
提供了以下錯誤:
[email protected]:/ $ su
su
/system/bin/sh: su: not found
127|[email protected]:/ $
所以,我怎麼能檢查設備是否是植根與否。
在此先感謝。