I am making a small database of ttyUSB devices plugged in on an android device. To that extent, I made android ueventd write into a file to save some information like: vid, pid, serial and device path (e.g. /dev/ttyUSB0). I would like this file to be accessible by any android apps.
-
Is there a directory in android FS accessible/readable by any app? Preferrably one that does not need special permissions. In which I could put my file?
-
Is there a security risk in making a usb device’s serial number accessible this way to android apps?
Why? Do you think the user wants this data “to be accessible by any android apps”? What does the user gain by your disclosing this data?
External storage is accessible by all apps, but it will require a permission to read from in future versions of Android. There is no other place accessible by all apps.
Possibly. There may be a privacy risk.
Please keep the file protected, and create a
ContentProviderthat you secure via a permission. That way, when users install apps that wish to access your data, the user gets to decide if that can happen or not.Also, bear in mind that the ueventd stuff that you are doing is beyond the scope of the Android SDK. If you are doing this in some ROM mod that you are creating, fine. If you are trying to play games with ueventd on arbitrary hardware, bear in mind that ueventd behavior may vary by device.