Android File Security

Is it possible to protect applications for files ?. I want the file to be accessed only from the desired application, and not from others.

+3
source share
3 answers

I assume that you have files stored on the SD card, since files stored in the internal file system are protected by default.

The only way to protect your data from other applications is to use some kind of encryption.

Android , Linux , . , , Android.

, , sd-card, Android FAT, Windows. , FAT , , SD-, . (, SD-, .)

( Android. SD-, . SD- -, .)

+3

, AndroidManifest.xml. Android:.

, , , , :

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.me.app.myapp" >
    <permission android:name="com.me.app.myapp.permission.DEADLY_ACTIVITY"
        android:label="@string/permlab_deadlyActivity"
        android:description="@string/permdesc_deadlyActivity"
        android:permissionGroup="android.permission-group.COST_MONEY"
        android:protectionLevel="dangerous" />
    ...
</manifest>

-, , , , .

: .

0

Yes. A simple solution is to generate a random cryptographic key using the application /dev/urandomduring installation, save the key in local storage (and not on the SD card), and then encrypt the files stored on the SD card with this key. This will prevent other applications from reading other files.

Of course, one of the consequences of this approach is that the user will not be able to remove the SD card, put it on his computer and copy these files to his computer.

0
source

Source: https://habr.com/ru/post/1789665/


All Articles