Reputation: 265
I am calling getSupportedPreviewSizes to get a list of resolutions for a few Android devices. Is there a way to get this information without running an app? Not much is available in the documentation.
Upvotes: 2
Views: 11854
Reputation: 265
I figured it out. On Samsung devices (or maybe other devices as well), you need to have the Camera open before you can run dumpsys with media.camera. I basically ran through the following:
adb shell am start -a android.media.action.STILL_IMAGE_CAMERA --ei android.intent.extras.CAMERA_FACING 1
adb shell dumpsys media.camera
Now i can see all the available resolutions.
Thanks for your help Droidman
Upvotes: 4
Reputation: 11608
run the following adb command:
adb shell dumpsys media.camera > info.txt
Which will produce a file named info.txt
in the directory you did run the command from. It will contain a lot of information, I guess you are looking for those lines (output from Nexus 5 2013):
android.scaler.availableProcessedSizes (d0006): int32[34]
[3264 2448 3200 2400 ]
[2592 1944 2048 1536 ]
[1920 1080 1600 1200 ]
[1280 960 1280 768 ]
[1280 720 1024 768 ]
[800 600 800 480 ]
[720 480 640 480 ]
[352 288 320 240 ]
[176 144 ]
or (pretty much the same for this particular device)
android.scaler.availableJpegSizes (d0003): int32[34]
[3264 2448 3200 2400 ]
[2592 1944 2048 1536 ]
[1920 1080 1600 1200 ]
[1280 960 1280 768 ]
[1280 720 1024 768 ]
[800 600 800 480 ]
[720 480 640 480 ]
[352 288 320 240 ]
[176 144 ]
Upvotes: 1