Access odk data folder on android 11 device

I am trying to access "/Android/data/org.odk.collect.android/" folder on android 11. However, android permission restrictions are preventing me to do so.

Is there a way of accessing this folder using another android app?

Is it possible to configure ODK collect to dump its files to another folder rather than the, " /Android/data/org.odk.collect.android/", folder?

1 Like

I have the same issue. Have you figured this out yet?

In Android 11+, there is no way to directly access the ODK folder from another app or change where ODK stores data.

Some access is possible through the content providers that Collect exports. Please describe your end goals (eg what your external app does) and someone may be able to help.

2 Likes

I have an app that acts as a wrapper to access odk instances/forms.
When you click on a record on recycler view, you are basically copying a payload that is being used to create an ODK instance and populate it with data.

Basically, my app creates odk XML forms and dumps them where ODK keeps its data(/Android/data/org.../).

Not yet. So far i have just restricted app spec to android 10 below, while working on long-term solution

This is not something you will be able to do in Android 11+. You can read through Collect will need to stop using /sdcard/odk for files for more context.

1 Like

Hi ,I would like to know if, from Android 11, there is a way to retrieve the payload of a form instance from an external Android app using the content provider for example. But as gar as i know, the content provider doesn't provide the content of the form instance. And it will be no longer accessible with the instanceFilePath..
Is is something you are working on ?
Do you already have a workaround ?

Thanks

Due to the restrictions, I decided to take an alternative approach. I integrated an intent in the ODK Collect form to retrieve the payload from the database through an Android app. As a result, I set the exported attribute of my activity to true in the Android manifest, effectively solving the issue.

This approach allows us to conduct studies where participants can provide repeated observations/followups

1 Like

Hi,
on my Android v12, I manage to access and modify the contents of the /Android/data/org.odk.collect.android folder via applications:

I specify that my phone is not rooted.

My goal being in the context of development to rename the folder and the .xml file of an instance in order to return my data without having to re-enter a test form. Even to copy a .mbtiles file but I rather do this manipulation with the explorer of a pc.

If it can help someone...

2 Likes