Question Cannot access /sdcard/Android/data/<app> from ADB??

Search This thread

v44r

Member
Nov 28, 2020
30
16
In every android device I've owned I could access /sdcard/Android/data/ to get the files created by my own app. In the Galaxy Watch 5 I get:

Code:
heartbs:/ $ ls /sdcard/Android/data/                                                                  
ls: /sdcard/Android/data/: Permission denied

The permissions for the directory are the usual:

Code:
1|heartbs:/ $ ls -ld /sdcard/Android/data                                                              
drwxrws--x 11 media_rw ext_data_rw 3452 2023-03-14 18:06 /sdcard/Android/data

Shouldn't shell:

Code:
heartbs:/ $ whoami
shell
heartbs:/ $ groups
shell input log adb sdcard_rw sdcard_r net_bt_admin net_bt inet net_bw_stats readproc uhid

... belong to the ext_data_rw group too?? The OS build should not be older than this change: https://android.googlesource.com/platform/system/core/+/c3f71bc^!/

This is in my phone running LineageOS, for example:

Code:
surya:/ $ whoami                                                                                       
shell
surya:/ $ groups
shell input log adb sdcard_rw sdcard_r ext_data_rw ext_obb_rw net_bt_admin net_bt inet net_bw_stats readproc uhid readtracefs

Is there any other way to access files in the /sdcard/Android/data directory? Or will I have to give my app MANAGE_EXTERNAL_STORAGE permission and create them elsewhere?
 

adfree

Senior Member
Jun 14, 2008
10,321
6,034
Samsung Galaxy Watch 4
Samsung Galaxy S22
Not sure yet... never tried to access this folder...

Maybe give more details...

A

Exact Model Name...

Example...

SM-R920 or LTE... I have forgotten the funny petnames... heartbullS h..t

B

Firmware Version... Easiest for me the fully info...

Code:
*#1234#


No idea if you saw threads with System Shell Exploit...

What ever your plan is...

Best Regards
 

WoKoschekk

Senior Member
Feb 25, 2019
1,055
1
340
Cologne
Moto G6
Moto G6 Plus
NVM, I tried in an emulator image of Wear OS 3 and it's the same. I don't know if it's intended behavior or not, but definitely not a Galaxy Watch 5 thing. I assume it's a bug that did not get fixed before Wear OS 3, based on Android 11, released before this:

The security patch installed on Galaxy Watch 5 should be 01-01-2023, AndroidWatch 11 branch.

Find this repo and you will know.