I have installed the same application on
a device running Android 7.0 (not rooted) and
on a tablet running Android 4.4 (root),
but nevetheless I noticed that the application data (databases/files etc) is stored in different locations on each device:
On the tablet device the files are located at:
/storage/sdcard0/Android/data/com.packagename and can be easily manipulated (i.e copy, back up etc) but not on the smartphone which likely leaves the storage location being:
/data/data/com.packagename which I have no access to.
I understand that it is usually stored on
/data/data (protected internal app storage) or
/storage/sdcard0/Android/data (storage on user's internal storage partition), else on a SD card if present. In addition, a related question has been asked here: Where Android apps store data?
My biggest surprise is why is this happening on the same application (same version - sideloaded)?
This reference page also explains how a developer can configure the default location of application data. It would have been understandable if there were different versions of the application, but here I am only dealing with the same application (i.e
.apk file). Is there something I am missing here or things have changed in recent versions of Android?
My concern is that I can't access these files on
/data/data without root and since these are large files and I need to back them up just in case the app data is accidentally cleared (and I have already done that by mistake :(.
Most importantly I don't want to continuously download them over again.
Note: Both devices have no external storage attached.
From the look of things the biggest obstacle is not being able to access files on
/data/data (device 1), hence no backup possible...(I would appreciate if there is another reliable workaround to achieve this)
/data/data? Can you tell what location app data is being stored at? Do you know if the files are data files? Also how do you really know without root?
/sdcard/Android/data, in fact I just tried it on a certain app and it did so. Also, I think
/data/datahave different purposes. I've found that
/Android/datais used more for caches/files related to ads whereas
/data/datais more for private things (eg storing login info).