I have an android project that demonstrates how to write android test cases which can be executed on an emulator or a device. As a result of those test cases, data is populated in the device and the resultant SQLite *.db file can be downloaded from Android Studio's DDMS screen.
NOTE: I have already tried as a root user in adb shell. Problem I am facing in accessing *.db file is consistent from adb and DDMS in emulator with API 26.
Code is accessible here.
I have created 2 emulators (API 23 and API 26) in AVD Manager.
When I run the androidTest on both the emulators, all the test cases pass successfully.
Using Android Studio's DDMS ...
- On the emulator with
API 23, I am able to view the SQLite*.dbfile under/data/data/<package-name>/databases/weather.dband download it to my desktop and view it through http://inloop.github.io/sqlite-viewer/
- On the emulator with
API 26, the/datafolder is empty?? I do not see the same hierarchy for accessing the SQLite*.dbfile as on device withAPI 23.
The android app and androidTest both run successfully on emulator with API 26 which means data is saved somewhere in android emulator but what is the new location?
Is it new behavior after API 25/26 and do I need special permissions to access data in DDMS or adb shell?
If this is new behavior then where is the SQLite *.db file located after API 25/26?
I have googled about it on stack overflow and android documentation but didn't find anything concrete, let me know if I have missed anything.




