Android Question How to protect or control the data access stored on a USB stick by code?

prbmjr

Active Member
Licensed User
Hello everyone,

I have to control the access to the data stored on a USB stick by code, the data could only be available for the app that I have to develop, I think a solution would be to use a USB stick with a protection already implemented (with fingerprints or password) and if possible, lock / unlock the access to the USB stick by code when my app has to access it ... Any suggestions? Has someone already done something similar?

Thanks!
 

MicroDrie

Well-Known Member
Licensed User
You face several challenges:
  • The first is that Android is introducing more and more restrictions that make it very difficult to access data outside the application environment. Personally, I think the interface to select a directory on your USB device can be difficult for beginners because of the device name.

  • Second, you don't say how the data must be stored, but if you use a database you can encrypt it with an access password. If you let the user choose a password, you can create a new database that you can only read with the password entered by the user. This avoids the problem of including a “hard-coded” password in your program that can be read back.

  • Third, you will have to take into account a stupid user who removes the USB stick while your program is not yet closed.

  • Without further details about your program, it is difficult to give possible solutions. In addition, encryption costs time and storage space. It has little added value to encrypt things you can find on the internet. And the question is what the impact is on any support, what can and must readable for support.
 
Upvote 0
Top