NokiMo
MishaalRahman
MishaalRahman

patreon


How to enable Google Photos integration in Android's Photo Picker

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!)

Comments

Google announced in a blog post earlier this week that this feature is "currently rolling out with the February Google System Update to devices running Android 12 and above" https://android-developers.googleblog.com/2024/02/cloud-photos-now-available-in-android-photo-picker.html So you SHOULD get it officially soon...but you know how things are when it comes to Google and server-side updates. "Currently rolling out" could mean you get it today or next week or in a month. FWIW, I haven't seen it on any of my devices yet without this flag.

Do you know if this now the default for Pixel 8 phones? If so, I will start syncing DeviceConfig flags with GMS again. I really like this feature, so I don't want to start syncing yet, if it's not the default.

WhatsApp and Telegram don't use Android's new Photo Picker, they use their own custom media picker

Thanks for sharing. I just set the 3 commands on my one plus open using ladb app successfully. I tried testing on Whatsapp and telegram image picker and it doesn't show up. Am I doing anything wrong here

Run this command: adb shell cmd device_config set_sync_disabled_for_tests none This restarts syncing DeviceConfig flags with GMS.

You mentioned "Google uses the DeviceConfig API for making server-side changes in Android system apps, so I wouldn't recommend disabling sync forever." How would you re-enable this down the road?


Related Creators