Media picker can't access screenshots after they have been edited by stock Gallery app
Phone : Pixel 6a GrapheneOS build 2024091900
Steps to reproduce :
- Make a screenshot (Vol Down + Lock button)
- Open stock Gallery app, edit the screenshot, save
- Open stock Vanadium app, go to x.com, start a post, clic on the button to add a picture
- the Media picker is started, on default tab "Photos", "Recent". The edited screenshot is missing.
- Clic on "Albums" tab, then on "Screenshots" album. The edited screenshot is still missing.
Verification 1 : Go to Settings / Apps, then "show system apps", choose "Media picker" All values are on default. Permissions say "Allowed : Notifications, Sensors". Not allowed : No permissions denied.
Verification 2 : Redo Steps 1 - 5, minus step 2. The (unedited) screenshot is both present in Photos / Recent and Albums / Screenshot (from Media picker)
"thestinger transferred this issue from GrapheneOS/os-issue-tracker" So the media picker is part of Vanadium ? Or it "inherits" permissions from the calling app ? I'm trying to understand.
It made me try to reproduce the problem with a different app : I have done again all steps, replacing Vanadium by "Contacts" stock app. And indeed the edited screenshot can be selected ! So it really looks like a Vanadium issue, despite my Vanadium app having "Always allow all" for the "Photos and Videos" permission.
It's a Chromium limitation Vanadium inherits from it from how it's using this.
We don't know the details but have seen it before. I don't see an existing issue but often things are reported in the chat rooms and forum rather than the issue trackers. It's also often not clear if something is a bug or by design. Chromium may be intended to work the way it does but we could change it slightly.
2 observations :
I reproduce the problem with thunderbird (which do not use chromium at all, right ?) when I try to send an edited picture, right after having edited it. But when I try later (5min ?), thunderbird can 'see' the edited picture. I can't tell exactly what I did during these 5min.
When I edit a picture with Gallery Editor, the permissions of the picture change from rwxrwx--- to rw-rw---- So the 'execution' permission is removed. It looks irrelevant for this problem, but I think that Gallery Editor is 'overstepping' a bit : it's not its job to mess with file permissions, right ?