I think I have a similar issue to Can't use chmod to alter permissions on emulated phone but the emulation is happening on the android device itself via the TwinApps feature, which allows you to use multiple copies of an app that doesn't support multiple accounts (in this case, WhatsApp).
I would like to copy a photo to overwrite the profile photo of one of the accounts into the directory. Unfortunately trying to open the folder on the device itself or via adb, the app's folders in media are Permission Denied. No matter what I try I cannot get into the folder.
Here is interesting output of ls -la (I made a tmp folder which I was able to rm later)
total 6 drwx--S--- 2 u0_a228 media_rw 3452 2022-04-15 14:53 test drwx--S--- 3 u2357_a228 media_rw 3452 2022-04-03 13:08 com.whatsapp
This 'u2357_a228' user is likely the emulated app user, and I have no idea how to become it to mess with the folder inside. Like I said, chmod and chown just fail silently.
Any tips on what I can do are appreciated.