Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android-How to protect a file from copying or seeing by users

I'm working on an application that it took me about 2 whole month to collect data. how can I protect my database and files? because of a big size of database, I zipped it (with password) and put it in asset folder. I can unzip it.

2 questions:

  1. where I can extract it that no one can access it even though they have a rooted device ?
  2. after extracting my database from zipfile ,I want to copy it to my application database . is there anyway users can access the database ?
like image 912
user3657105 Avatar asked Oct 28 '25 01:10

user3657105


1 Answers

Depends on how smart an attacker you're expecting. If you're expecting the average user, don't worry about it- just put it in your data directory, they'd have to root the phone to see it. From a power user you can encrypt the files. From a determined hacker that won't work- he'll decompile the apk and find the key. You can pass the key from a website, but a good hacker will run it under a debugger and find the key in memory. The best way to secure most of the data would be not to have it in the app but only download what you need via webservice as you need it, but that will cost money and time.

like image 184
Gabe Sechan Avatar answered Oct 30 '25 16:10

Gabe Sechan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!