Skip to content Skip to sidebar Skip to footer

How To Use Adb Shell To Display A Local Image

I want to use adb shell to tell my device to display an image on its SD card. I thought this command would work: adb shell am start -a android.intent.action.MAIN -n com.android.br

Solution 1:

This should work, however it's dependant on the apps you have installed:

$ adb shell am start -t image/* -d file:///mnt/sdcard/myfile.jpg

Interestingly, it doesn't work if you select Gallery in Complete action using..., but works if you select Crop picture. Also works with Astro Image Viewer.

Solution 2:

The quickest workaround I have for my requirement is to just pull the file off the device and test it on my local machine:

adb pull /storage/sdcard0/Android/data/<mypackage>/files/myfile.jpg ~/Downloads

Post a Comment for "How To Use Adb Shell To Display A Local Image"