I have an app on android that uses a Sqlite database. I want to make it impossible to access to the database without password. What is the easiest way to achieve that?
Asked
Active
Viewed 88 times
0
-
if the user has root, than this is not possible. Take a look at this, maybe it is an option: https://guardianproject.info/code/sqlcipher/ – Opiatefuchs Sep 09 '14 at 08:44
-
assuming the user has NO root, of course. – Lokomotywa Sep 09 '14 at 08:45
1 Answers
3
If you want to protect database file, add encryption to it with some password. There are some open source libraries are available. Most popular is SQLCipher
.
If you use SQLCipher
, even if somebody pulls out your application's .db file, he wont be able to read it (He can read file but in encrypted format). Only entities from application can read/write to it.

Harry
- 422
- 3
- 11