4

Possible Duplicate:
Determine if running on a rooted device

On Launch of the application, I want to detect if the device running is rooted. Is there proper way of detecting it?

I don't think trying to write a file to '\data' to see if rooted is a good solution. (Since even rooted devices may have that path unprivileged)

4

2 に答える 2

5

結局のところ、あなたはできません。ルート化されたデバイスは任意の方法で変更される可能性があるため、必要なものを完全に隠すことができます。実際には、標準のルート ビルドのいくつかを調べて、それらが持つ機能や確認できる特性を見つけることができますが、何をしても「ルート化された」デバイスが実際に検出されることを保証する方法はありません。

于 2010-08-26T19:29:11.870 に答える
0

あなたはやろうとすることができます

Process proc = Runtime.getRuntime ().exec ( "su" );

それが例外をスローするか、proc が null の場合、ルートがありません

于 2010-08-26T16:23:20.233 に答える