How to enable Google Photos integration in Android's Photo Picker
Added 2023-12-16 00:35:50 +0000 UTC
Earlier today, I published an article about a feature I've been waiting a long time for: Google Photos integration in Android's Photo Picker. If you haven't read that article yet, I highly recommend you do so for context.
Normally, I don't share my methods for activating these features, since they require root access which not many people have. However, in this case, enabling Google Photos as a cloud media provider in Android's Photo Picker requires just two simple ADB commands (three if you want the flags to persist), which is why I've decided to share them with you all (with permission from the Android Authority editors of my article).
To enable this feature, run these two ADB commands:
adb shell cmd device_config put mediaprovider cloud_media_feature_enabled true
adb shell cmd device_config put mediaprovider allowed_cloud_providers "com.google.android.apps.photos.cloudpicker"
And to make it persist, run this command:
adb shell cmd device_config set_sync_disabled_for_tests persistent
The first command enables the cloud media picker feature in the MediaProvider app (the system app that contains the Photo Picker feature), while the second command adds Google Photos' cloud media provider to MediaProvider's allowlist. Finally, the third command stops Google Play Services from overwriting your previous changes to the DeviceConfig flags. (Google uses the DeviceConfig API for making server-side changes in Android system apps, so I wouldn't recommend disabling sync forever. It might be nice if there was an app to manage DeviceConfig flag changes, but I digress.)
These commands worked on three devices I tested: a Google Pixel 8 Pro running Android 14 QPR1, a Google Pixel 6a running Android 14 QPR2 Beta 2, and a OnePlus Open running Android 13. All three devices had Google Photos v6.64 installed and the November 2023 Google Play System Update. I don't know exactly which versions of the Google Photos app and MediaProvider module are required, so YMMV. MediaProvider has had cloud picker integration for a while now, but Google Photos only recently properly implemented the CloudMediaProvider API necessary for this to work.
(I initially thought this method would require root, since Google Photos' CloudMediaProvider is disabled by default in version 6.64 of the app, with the android:enabled attribute being set to @bool/photos_cloudpicker_cloud_provider_enabled which is false. But it looks like Photos just sets this to true when the first command is sent, enabling the provider.)
---
Sorry for the lack of exclusive posts lately! As you may have read on Twitter/Threads/Mastodon/Telegram, I took a two week break to visit family recently. I have a lot of posts to get through in my backlog, so you can look forward to hearing a lot more from me soon (and thanks for your continued support!)