2

If app has storage access, how to hide other installed app from it? App consists of files in different locations. Maybe somehow I can make them unaccessible for other app? If I didn't give root right for detecting app, the only location should be in "Android" folder?

2
  • scroll down to APPS SPACE USAGE every line with <pkg> may exist for your app, so every app with root access can look at this locations
    – alecxs
    Feb 16, 2020 at 10:55
  • Ok, thanks. Now I'm interested in way, how can I hide app from other app which doesn't have root access.
    – vasik9888
    Feb 16, 2020 at 11:08

1 Answer 1

1

If app has storage access, how to hide other installed app from it?

Without root access and without any permission (including Storage), any app can getInstalledApplications for current user/profile. You need a mod like XPrivacyLua to hide apps from other apps. Or isolate apps in user profiles (see Are multiple-users protected from each other differently than apps?).

App consists of files in different locations. Maybe somehow I can make them inaccessible for other app? If I didn't give root right for detecting app, the only location should be in "Android" folder?

If I understand correctly you mean that apps private files are already inaccessible to other apps. With Storage permission granted apps can only see files created by other apps in shared storage (/sdcard and physically external SD card). So if an app creates it's private directory in /sdcard/Android/, it does indicate its presence on device. But hiding the private directory won't be helpful as explained earlier. You have to stop the app from using getInstalledApplications first.

After that, if you have to grant Storage permission because the app refuses to start otherwise, you can disable Storage access using appops:

~$ appops set <pkg> READ_EXTERNAL_STORAGE ignore
~$ appops set <pkg> WRITE_EXTERNAL_STORAGE ignore

If that doesn't work you have to go for a root solution like XPrivacyLua's BlockGuardOs.open hook or Storage Redirect (it's paid app). I've no affiliation with either. Also Scoped Storage on Android 10+ provides better storage isolation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .