Android 11 permission error

1,050 views
Skip to first unread message

AR2000

unread,
Jun 4, 2021, 6:54:16 AM6/4/21
to Automate
Hi,

Just jump from Android 7 to Android 11 and one of my flow stoped working.

I get a img uri from the get content block and put it in the set wallpaper but it get a permission error.

Automate have all it's permission INCLUDING adb granted permissions (non root).

Any idea how to fix it ?

Henrik "The Developer" Lindqvist

unread,
Jun 4, 2021, 9:33:19 AM6/4/21
to Automate
if the wallpaper is stored on secondary external storage, e.g. a removable SD card, then ensure to grant access to it in Settings, External storage.

What's the error?

Rémi Audrézet

unread,
Jun 4, 2021, 10:00:11 AM6/4/21
to Automate
I don't have a SD card :) And I gave access to the internal storage the same way you give access to the external one

the error is  : 06-04 12:42:53.307 F 4538@6: java.lang.SecurityException: Permission Denial: reading com.android.externalstorage.ExternalStorageProvider uri content://com.android.externalstorage.documents/document/primary%3ADCIM%2FCamera%2FIMG_20210604_124223.jpg from pid=27249, uid=10268 requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs

flow and complete log can be found here https://drive.raudrezet.synology.me/d/f/623751597402403823 

Henrik "The Developer" Lindqvist

unread,
Jun 5, 2021, 1:00:54 PM6/5/21
to Automate
How did you get the Image URI, from the Content pick block, or by simply clicking the field then picking the image?

Did you reboot the device since picking it?

If you use the Content pick block, ensure to enable the "persistent" option.

Rémi Audrézet

unread,
Jun 7, 2021, 2:10:27 AM6/7/21
to Automate
I use the content pick AND content shared blocks.
The "persistent" option is checked.
Picking ghe image directly from the field works.

Rebooting doesn't break working pictures.

Henrik "The Developer" Lindqvist

unread,
Jun 7, 2021, 7:39:45 AM6/7/21
to Automate
It might be caused by the sharing app, through the Content pick/shared block, not granting a "persistent" URI permission.

I've also noticed that "accepting" URI permissions, as granted by other apps, sometimes doesn't work the first time.
I suspect it's caused by Automate running its UI (dialogs) and the Service executing flows in different CPU processes, so the URI permission "synchronization" is delayed.
As a test, try using a short Delay between the Content pick/shared block an any block actually using the URI.

Rémi Audrézet

unread,
Jun 7, 2021, 7:51:33 AM6/7/21
to Automate
The URI is saved in a json file and used later (other flow starting point).🖼️ Change wallpaper.png

Rémi Audrézet

unread,
Jun 7, 2021, 7:58:17 AM6/7/21
to Automate
Sorry for the broken link : my firewall only allow connection from french IPs.
Just tell me in which country you are and I will add you to the firewall rules (or you can use a VPN if you have one).

Henrik "The Developer" Lindqvist

unread,
Jun 7, 2021, 8:09:05 AM6/7/21
to Automate
As a test, please try a simple flow, which uses the Image URI immediately...
  1. Flow beginning
  2. Content pick or shared
  3. (Delay) optional
  4. Wallpaper set

Henrik "The Developer" Lindqvist

unread,
Jun 7, 2021, 8:09:24 AM6/7/21
to Automate
Sorry i have no idea where the Google Group servers are located.

Rémi Audrézet

unread,
Jun 7, 2021, 8:20:27 AM6/7/21
to Automate
I will test it later in the day (18:00 CEST).

If you can't open it it is because of my firewall. It's my private drive. The link point to a fine with the .flo file and the corresponding log file.

Rémi Audrézet

unread,
Jun 7, 2021, 12:31:18 PM6/7/21
to Automate
I tryed with a simple flow but it gave me the same error.

Sara Clothes

unread,
Jun 7, 2021, 2:51:23 PM6/7/21
to automa...@googlegroups.com
Hello team how i send whatsapp business messages schedule plz help me

--
You received this message because you are subscribed to the Google Groups "Automate" group.
To unsubscribe from this group and stop receiving emails from it, send an email to automate-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/automate-user/af10d6c6-19f6-4e45-bc08-22ba9d799e51o%40googlegroups.com.

Henrik "The Developer" Lindqvist

unread,
Jun 8, 2021, 7:46:09 AM6/8/21
to Automate
Indeed inaccessible. Just use the "Add attachment" button when posting here on Google Groups.

Rémi Audrézet

unread,
Jun 8, 2021, 9:11:51 AM6/8/21
to Automate
I can't join the .flow
flow-171.log
Reply all
Reply to author
Forward
0 new messages