tags:

views:

80

answers:

2

How do you determine (programatically) if an Android device is: rooted Running a cracked copy of your software or rom.

I have some sensitive information in my database, and I would like to encrypt it when the phone is rooted aka the user has access to the database. How do I detect that?

A: 

The official licensing guide says:

A limitation of the legacy copy-protection mechanism on Android Market is that applications using it can be installed only on compatible devices that provide a secure internal storage environment. For example, a copy-protected application cannot be downloaded from Market to a device that provides root access, and the application cannot be installed to a device's SD card.

It seems that you would benefit from using that legacy cop-protection to prevent your application from being installed on rooted devices.

You might release a separate version that can be installed on rooted devices with an encrypted database.

Christian
+1  A: 

If the information is sensitive you should probably just encrypt it for all users. Otherwise a user could install your app unrooted, then root and read your database once the data's been written.

oli