Permission to read another app's data? - android

Is there a permission to allow one app to read the (private) data/data//files/... files of another application? If not, how do backup programs like MyBackup work?
C

On a side-note, in the unlikely event that you're the one who's writing both applications, you can make them share the same sandbox by signing them the same way.

Is there a permission to allow one app
to read the (private)
data/data//files/... files of another
application?
No.
If not, how do backup programs like
MyBackup work?
They backup and restore only things with public APIs. That includes some data from the operating system and some things from applications specifically integrated with them.

Related

How to disable file sharing in Android

I am using FileProvider and Intents to share content from our application to other applications. Using these components can also upload data from other applications to our application. For security reasons, we want to only disable sharing from our application to other applications. Is there a global solution to have this restriction put in place?
Thanks in advance.
FileProvider enables to share content from our application to other applications.
Only by having additional code in your app. FileProvider, on its own, does not do what you describe.
It also provides capabilities to upload data from other applications to our application.
Again, this only happens if you have have additional code in your app. FileProvider, on its own, does not do this.
Is there a global solution to have this restriction put in place?
Do not write the code that implements sharing from your application to other applications.
IIRC your app must "opt in" to sharing its own files on a case-by-case basis. Other applications request files from your application, which must then grant them (temporary) permission and pass them the access URI. Other applications don't get automatic access to your files without asking. If you don't implement the sharing functionality, there is no way for a sharing request to be granted.
If you do want limited sharing you can also set up a policy XML file to restrict which directories owned by your application are shareable.
https://developer.android.com/training/secure-file-sharing

Open up another application's database?

Let's say I make an app on Android, is there a way to access another app's database (in data/data/(other.app.package)/databases) with that app and read contents?
I have a rooted device.
The other app should allow you to do that by implementing ContentProvider.
Hitting another apps database directly is not the best idea.
Each application is executed with different UID, so if you will not have rooted phone it will be impossible to achieve.

Accessing database from a different application

How can i access a database which is in a different application. I want to access the data and use it for an other application how am i suppose to do it. I dont even have a clue how to access data from a different application please help.
Read this article:
"Application modularity – The Android system allows applications that are signed by the same certificate to run in the same process, if the applications so requests, so that the system treats them as a single application. In this way you can deploy your application in modules, and users can update each of the modules independently if needed."
"Code/data sharing through permissions – The Android system provides signature-based permissions enforcement, so that an application can expose functionality to another application that is signed with a specified certificate. By signing multiple applications with the same certificate and using signature-based permissions checks, your applications can share code and data in a secure manner. "
please use content provider for accomplishing the same
Do you know about content provider?, you can implement the above functionality by using this.
For example, Calendar, Contacts are doing the same.
Check:
Creating a Content Provider
Android SQLite Database and ContentProvider - Tutorial
in Android diff app can share the data with help of content provider
below will help you
http://about-android.blogspot.in/2010/04/content-provider-example-1.html
Stay smiling

Can other applications monitor/access my apps internal memory after rooting

I want to build a security related application. I would be storing some important information (files) in my Applications private memory.
Can a FileObserving application detect/access changes to my internal app section in case device is rooted?
I have looked here .In the question itself it seems that even after rooting , other applications wont be able to access my internal app data unless the user changes the access permissions on those files.
Can an application change file permissions of my app when rooted and access those files?
I can store the files in encrypted format but i just want to know how easy is to access my apps data after phone is rooted.
Yes #Alok. Private data of other apps can be seen on rooted phones.

How Android ensures security?

I am just starting on Android development. To my nascent knowledge, it seems that anybody can grab any personal info and modify it or phone it home. Like with ContactContentProvider. I know these(permissions) have to be specifically declared in application manifest and the user would be presented with this info during installation. But still how would you you know the application handling your private data is not going to go rouge on it?
Example:
Suppose I create an app with internet
and contact-reading permissions. It
claims that it will backup contacts on
a server specified by user. While
secretly it also copies them to your
own server.
It's no different than you developing an app that does it that runs on a PC, or something that uses your gmail login to see if there's others you know on the same site.
It's all about trust. Also the Apple approval process doesn't safeguard against any of this if you hide it and when found out malicious apps can be killed & uninstalled instantly.

Categories

Resources