media.camera count? - Google Pixel 4 XL Questions & Answers

For those with fully functioning Pixel 4XL, how many camera devices does adb shell dumpsys media.camera indicate it has?
I'm working with one with known bad front camera, but camera devices show only 1. I would have expected 2 for the two back facing cameras, and 3 total for functioning front camera. Thanks for sharing any adb info from your phone.

== Service global info: ==
Number of camera devices: 3
Number of normal camera devices: 2
Number of public camera devices visible to API1: 2
Device 0 maps to "0"
Device 1 maps to "1"
Active Camera Clients:
[]
Allowed user IDs: 0

Related

[Q] Accessing the front-facing camera

Hi,
has anybody been able to access the front-facing camera properly?
After "breaking" the camera by fuzzing it with different camera parameters I got at least a (complete?) list with available parameters so that I could access the ffc and get a camera preview. However, the problem is, that the preview size is different from the actual picture size which ends in having only one half of the preview size captured on a picture.
Here are the parameters I got from the device through the Log:
Code:
sharpness-max=4;
anti-shake=0;
sharpness-min=0;
digi-zoom=0;
metering=center;
sharpness=2;
contrast=2;
whitebalance=auto;
scene-mode=auto;
jpeg-quality=100;
preview-format-values=yuv420sp;
rotation=0;
jpeg-thumbnail-quality=100;
beauty-shot=0;
preview-format=yuv420sp;
preview-size=800x600;
focal-length=2.78;
iso=auto;
slow_ae=off;
camera-id=2;
flash-mode-values=off,on,auto,torch;
preview-frame-rate-values=30;
chk_dataline=0;
preview-frame-rate=30;
focus-mode-values=auto,macro;
jpeg-thumbnail-width=320;
scene-mode-values=auto,portrait,landscape,night,beach,snow,sunset,fireworks,sports,party,candlelight;
vtmode=0;
jpeg-thumbnail-size-values=400x240,320x240,0x0;
video_recording_gamma=off;
preview-size-values=800x600,1024x600;
picture-size-values=2048x1536,1600x1200,800x600,2048x1232,1600x960,1024x600;
contrast-min=0;
AppShutterSound=0;
min-exposure-compensation=-2;
antibanding=auto;
saturation-min=0;
contrast-max=4;
vertical-view-angle=42.1;
blur=0;
horizontal-view-angle=54.4;
mode=0;
brightness=4;
jpeg-thumbnail-height=240;
focus-mode=auto;
I tried accessing the ffc with this code snippet:
Code:
Camera camera = Camera.open();
Camera.Parameters params = camera.getParameters();
params.setPictureSize(800, 600);
params.setPreviewSize(800, 600);
params.set("camera-id", 2); // using front-cam (2) instead of back-cam (1)
params.set("exifOrientation", 90);
Thanks in advance for some hints.

Android Resize Resolution / Calibrate Screen Height & Position

Hello, i have the 1cm dead touchscreen zone in the top and bottom, not good for the android taskbar...
Can we recalibrate the resolution / screen parameter to reduce a little the screen height to fix the problem ??
Thank you.
same problem here .. heeeelp
yeeeeeeeeeeeee .. after month or more looking for solution and tried everything on web i finally found it broo
download from the play store NOmone resolution changer and use it
our default settings is 1024 768 160
u just change the first number i use 880 768 160
as i have 2 cm below of dead touchscreen :S
i hope this works for u
I7V said:
yeeeeeeeeeeeee .. after month or more looking for solution and tried everything on web i finally found it broo
download from the play store NOmone resolution changer and use it
our default settings is 1024 768 160
u just change the first number i use 880 768 160
as i have 2 cm below of dead touchscreen :S
i hope this works for u
Click to expand...
Click to collapse
Than You, i had no success with NOMONE Resolution Changer, impossible to install for me tough Play Store (not allowed in my country) and the multiple apk found on the net was not good, an error 'probleme with parsing installer' something like this.
I found "Resolution Changer Pro" who work very well, the perfect resolution for me is : 970 x 768.
Or even easier, use a simple adb debug shell command:
Code:
adb shell
wm overscan 0,300,0,400
For this to work, you must have adb installed on your pc/mac and usb-debugging activated on your android device.
The above command will shrink the useful screen area with 300px from top and 400px from bottom.
Feel free to experiment those parameters to find the best fit for your situation.
Hi guys! I start to thank you a lot for your suggestions but before making any disaster i should be really grateful if you could give me an help.
I need to resize the screen of my Nexus 7 (2013) in order to fit with the car-dash enclosure where i'm willing to install it.
The enclosure i bought was supposed to fit for the nexus display but regrettably whilst the latter is of abt 15.3cm wide x 9.5 cm "tall" (sorry for my english) the enclosure has a window of 15.3 cm wide but only 8.7 cm tall which would make impossible the access to the softkeys.
In view of the above and considering also that there is no space available to enlarge the window of the enclosure i thought and hoped it would have been easier to resize the screen.
Now the question is: considering that the measures reported are relevant to the device in landscape mode may i kidly ask you the command variables that i have to amend to cut off the 0.8 cm on the bottom side of the screen (again landscape mode).
Thanks a lot in advance for your help!
Hello, Please i need help. I have a Dead Touch Zone (at the bottom 30% aprox.), i installed and i resized screen with ADB (adb shell wm overscan 0,0,0,600) BUT... I can´t use some apps (google play, whatsaap, etc) because it shows like they are behind backgroud.. Check pics attached for understanding.
eric_thefool said:
Hi guys! I start to thank you a lot for your suggestions but before making any disaster i should be really grateful if you could give me an help.
!
Click to expand...
Click to collapse
Did you solve the problem?
davis_llb26 said:
Hello, Please i need help. I have a Dead Touch Zone (at the bottom 30% aprox.), i installed and i resized screen with ADB (adb shell wm overscan 0,0,0,600) BUT... I can´t use some apps (google play, whatsaap, etc) because it shows like they are behind backgroud.. Check pics attached for understanding.
Click to expand...
Click to collapse
Did u get through with this problem..??
i too have the same problem but mine is 25% of the screen so i can use whats app and all other app but the plain box is disturbing me too...
Confirm the adb route works without root!
silvake said:
Or even easier, use a simple adb debug shell command:
Code:
adb shell
wm overscan 0,300,0,400
For this to work, you must have adb installed on your pc/mac and usb-debugging activated on your android device.
The above command will shrink the useful screen area with 300px from top and 400px from bottom.
Feel free to experiment those parameters to find the best fit for your situation.
Click to expand...
Click to collapse
A long time since the original post and answers, but I thought it should be noted that this method works well. Thanks silvake.
My Mecer tablet stopped responding in the top 2-3cm after many years of loyal service. Could have been a drop or simply age. It is still useful and wish to give it to someone in need. So searching around and several different sites yielded some results. Note this is not a mainstream device so rooting was not an option nor attempted. Indeed drivers and any info is sparse for this device.
For anyone attempting this, I will outline my method and steps.
1. Enable USB debugging. There are many tutorials. Settings->About->Build number(tap x 7); Developer Options->USB debugging
2. Connect device with USB Cable. Give permission on device. You will need to make sure that windows installs drivers. At first windows failed to install all drivers. Not sure how it managed, but it connected eventually.
3. Download adb: https://android.izzysoft.de/downloads.php. I used https://android.izzysoft.de/downloads.php?file=adb-binaries-windows-29.0.4.zip. Decompress to desired folder. Open cmd to the folder.
4. Run adb.exe with 'adb devices' and confirm device is listed. First attempt showed:
D:\Downloads\Apps\adb-binaries-windows-29.0.4>adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
0123456789ABCDEF unauthorized
I had to give permission on the device. Reconnected USB.
D:\Downloads\Apps\adb-binaries-windows-29.0.4>adb devices
List of devices attached
0123456789ABCDEF device
Success! Device is now connected.
Next get the current display stats:
Type 'adb shell'
Confirm connection. Mine showed: [email protected]:/ #
Type: ‘dumpsys display | grep mBaseDisplayInfo’
Below is the capture of the operation:
D:\Downloads\Apps\adb-binaries-windows-29.0.4>adb shell
[email protected]:/ # dumpsys display | grep mBaseDisplayInfo
mBaseDisplayInfo=DisplayInfo{"Built-in Screen", app 800 x 1280, real 800 x 1280, largest app 800 x 1280, smallest app 800 x 1280, 55.84 fps, rotation0, density 190 (190.0 x 190.0) dpi, layerStack 0, type BUILT_IN, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS}
This is not really required but helps to determine the current stats to make a guess on the number of pixels to adjust the screen by.
Next is the command to adjust the screen. The 4 numbers are the coordinates. Since mine was the top area I adjusted only that.
Type: wm overscan 0,50,0,0
The update is live and you should see the screen drop 50 pixels from the top.
This was not enough for me so repeat until the pull down of the status bar starts working again.
Here is the whole list to adjust the screen until everything is working again:
D:\Downloads\Apps\adb-binaries-windows-29.0.4>adb shell
[email protected]:/ # wm overscan 0,50,0,0
[email protected]:/ # wm overscan 0,70,0,0
[email protected]:/ # wm overscan 0,80,0,0
[email protected]:/ # wm overscan 0,100,0,0
[email protected]:/ # wm overscan 0,200,0,0
[email protected]:/ # wm overscan 0,120,0,0
[email protected]:/ # wm overscan 0,140,0,0
[email protected]:/ # wm overscan 0,150,0,0
[email protected]:/ # wm overscan 0,160,0,0
[email protected]:/ # wm overscan 0,170,0,0
[email protected]:/ # wm overscan 0,180,0,0
[email protected]:/ # wm overscan 0,190,0,0
[email protected]:/ # wm overscan 0,195,0,0
[email protected]:/ # exit
So I had to move the screen 195 pixels down until the dead touchscreen area was excluded.
Screen is obviously smaller but the frustration of having to rotate the device 180 to be able to pull down the status bar is removed. Much worth it.
Now a child in need of education can still learn and we have saved the device from landfill and reduced the carbon footprint.
You might have to adjust the pixel density to compensate for the loss, but I left it untouched. Your results will vary so I cannot assist.
Excerpt from another site:
"Additionally decreasing the density through the settings (Display & lights > screen > LCD density) or the wm command helped compensating for the lost display area:
wm density 360"
Hope this helps someone as it helped me.
T
Hello amazing people,
I am looking for your guide/advice for solving a screen resolution issue.
I am using a 4:3 ratio screen with a LCD driver on Radxa Zero.
the poblem is that the screen looks stretched laterally. I think its due to aspect ratio becuase the lcd is of 4:3 aspect ratio.
can anyone help me how can I change the aspect ratio using adb?
I have worked with size and density but failed to produce any results.
Many thanks to this amazing community.
the side of may cellphone is not working

Camera Development

Hey guys,
did any of you already had success in accessing the two cameras on the back? Using the camera app that Huawei provides I can select either the colour or the monochromatic camera (putting your finger over one of the cameras verifies that you can switch between both sensors), but when I try to access them through Java (using Android Studio) I am only able to access the colour camera. Even when I change to mono output (captureRequestBuilder.set(CaptureRequest.CONTROL_EFFECT_MODE, CameraMetadata.CONTROL_EFFECT_MODE_MONO);) I only get a monochromatic picture from the colour camera, not from the mono camera. I want to be able to switch between both cameras in my app.
Thanks in advance!
I found that the camera supports the following scene modes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 15, 33, and 34. According to developer.android.com/reference/android/hardware/camera2/CameraMetadata.html only modes from 1 through 18 are documented. I assume that mode 33 or 34 could be the monochromatic camera, but I do not know how I switch to this mode. I am trying to switch with the following code, but somehow it does not work:
captureRequestBuilder.set(CaptureRequest.CONTROL_MODE, CameraMetadata.CONTROL_MODE_USE_SCENE_MODE);
captureRequestBuilder.set(CaptureRequest.CONTROL_SCENE_MODE, 33);
Checking with captureRequestBuilder.get(CaptureRequest.CONTROL_SCENE_MODE) confirms that the mode is 33, but I do not see any difference on my screen. Any ideas? Thanks!

Need help No front camera found.

When I using GoogleCamera, some warnings appear:
HTML:
2020-06-02 14:10:23.108 8949-8949/com.google.android.GoogleCamera W/CAM_CameraHWManager: No front camera found on this device!
2020-06-02 14:10:23.108 8949-8949/com.google.android.GoogleCamera W/CAM_FacingController: No OneCameraCharacteristics found for: FRONT
I use this command to dump my camera hardware info
HTML:
adb shell dumpsys media.camera
HTML:
Number of camera devices: 3
Number of normal camera devices: 3
Device 0 maps to "0"
Device 1 maps to "1"
Device 2 maps to "2"
Active Camera Clients:
[]
== Camera HAL device [email protected]/legacy/0 (v3.3) static information: ==
Resource cost: 100
Conflicting devices: None
API1 info:
Has a flash unit: true
Facing: Back
Orientation: 90
== Camera HAL device [email protected]/legacy/1 (v3.3) static information: ==
Resource cost: 100
Conflicting devices: None
API1 info:
Has a flash unit: false
Facing: Back
Orientation: 90
== Camera HAL device [email protected]/legacy/2 (v3.3) static information: ==
Resource cost: 100
Conflicting devices: None
API1 info:
Has a flash unit: true
Facing: Back
Orientation: 90
You can see there are 3 cameras on my phone:
HTML:
Camera 0: flash unit: true, facing: BACK, so this is a back camera.
Camera 1: flash unit:false, facing: BACK, I think this is a FRONT camera because of no flash unit
Camera 2: flash unit: true, facing: BACK, so this is a back camera.
I have tries many camera apps, no app can open FRONT camera.
ROM used: P-MR3-RC002-RZR-200226.3141

Question Any open source camera alternatives that support Note 10 Pro lenses

I've looked into this before, but curious if anybody's found any decent open source, or free, camera alternatives with support for the Note 10 Pro lenses. Not the decompiled ports of gcam, anxcamera, or leica camera.
There's Open Camera, but it doesn't support the lenses. The only one I've found so far that supports the lenses is FreeDCam, though the lenses are just numbered Front 1, and Back 0 - Back 6. And if you choose Back 6, it hangs.
david003 said:
I've looked into this before, but curious if anybody's found any decent open source, or free, camera alternatives with support for the Note 10 Pro lenses. Not the decompiled ports of gcam, anxcamera, or leica camera.
There's Open Camera, but it doesn't support the lenses. The only one I've found so far that supports the lenses is FreeDCam, though the lenses are just numbered Front 1, and Back 0 - Back 6. And if you choose Back 6, it hangs.
Click to expand...
Click to collapse
I have been using open camera and it does support all cameras in my device. They are indeed just numbered, and there are a few glitches, but it does work and takes great shots.
Make sure you have enabled camera2 api in settings.
I've installed OpenCamera again and selected camera2 api (I've tried that before, too). But I still don't see the lenses. Where do you select them?
A while ago i've used Snap Camera. Found it quite useful und extremely customizable.
Snap Camera HDR - Apps on Google Play
A Fast, Full Featured HDR Camera App, Gallery and Photo Editor.
play.google.com
I dont know if there is a free version available, since I thought this after testing it.
Does it support the extra lenses on the Note 10 pro?
I'm testing LineageOS now, and Open Camera does show the extra lenses with it, which I couldn't see with xiaomi.eu. It has a button to cycle through the lenses, though it still hangs on the last lens. I'll try using it for now, since I've used Open Camera before on my Note 4x, so I'm familiar with it.
From what I can see, these are the cameras/lenses available on the Redmi Note 10 pro that are exposed to Open Camera.
0 Main Back Camera
1 Front Camera
2 Depth Sensor (B&W) - not useful
3 Macro
4 Ultra Wide
5 Main Back Camera Better Quality Photos
6 unusable
7 unusable
8 unusable
Both 0 & 5 are the main back camera, but ID 5 produces significantly better photos. I'm not sure, but I suspect when accessed through ID 5 there's some internal pixel binning happening. ID 5 won't work for videos, though.
I was able to modify the source code to ignore ID's 2, 6, 7, 8 and change the order the cameras are cycled. So it cycles in this order when the multi-camera button is pressed:
0 Main Back Camera
5 Main Back Camera Better Quality Photos
3 Macro
4 Ultra Wide
The front/back camera toggle button still works as usual (and resets the back camera to 0, as usual).
This was the change I made to MainActivity.java. It requires Android Studio to change, build, and generate a new apk.
$ diff MainActivity.java MainActivity.java.new
402c402,415
< for(int i=0;i<n_cameras;i++) {
---
> int i=0;
> switch( preview.getCameraControllerManager().getFacing(i) ) {
> case FACING_BACK:
> back_camera_ids.add(i);
> break;
> }
> i=5;
> switch( preview.getCameraControllerManager().getFacing(i) ) {
> case FACING_BACK:
> back_camera_ids.add(i);
> break;
> }
> for(i=0;i<n_cameras;i++) {
> if(i != 0 && i != 2 && i < 5) {
413a427
> }
I did some more testing with Open Camera and cameras 0 & 5. I'm still not sure what the difference is, but camera 5 has a longer exposure in auto mode, and results in a brighter picture that seems to have less noise. But the lighting/exposure is not always accurate. It can be much brighter than the actual scene. It does work well for night shots, though (better than HDR).
I also found "Photon Camera" that is open source and does nice HDR shots.
[APP][CAMERA][ANDROID 8.0+][ARM64] PhotonCamera - Enhanced algorithms camera
PhotonCamera is ongoing alpha project what developed by our team including Urnyx05, Savitar and others developers. It is aimed at making advanced algorithms for photos available and able to be modified. Description: Shooting opportunities: -This...
forum.xda-developers.com
It was crashing at times, but setting the battery to unrestricted seems to be helping, so far. It has some sort of "Unlimited" mode that crashes, and I'm not sure what that's supposed to be. There is a video mode, but it's fixed on 4k resolution in portrait with no way to change it that I can find. Also, there's no way to set the storage to the SD card.
It does have access to the different lenses on the Redmi Note 10 pro.
I'll attach some comparisons: Open Camera ID 0, ID 5, and Photon Camera. The Photon Camera lighting is most realistic compared to the actual lighting in the room.
Here's a few shots at night with Open Camera. You can see the dramatic difference between camera id 0 and id 5. Camera id 5 is better at night; even better than using hdr. Maybe id 5 is an internal night mode?
Just wanted to add: I tried adjusting the exposure compensation in Open Camera, currently to -1.00 EV, and it makes a big improvement. By default photos seem over exposed. Maybe it's just a sensor configuration with the Note 10 pro, and it needs to be adjusted with this setting.
With exposure compensation, comparison to Photon Camera HDR usually favors the Open Camera shot.
Using a camera2 api app, I found some more information about the cameras in the Note 10 pro.
Camera ID 5 reports as a "LOGICAL_MULTI_CAMERA" for physical camera ID's 0 and 2. So it's the main back camera that is also using the Depth Sensor (id 2). If I manually focus on a certain spot, it does produce a nice bokeh effect. The depth sensor also seems to help with night shots.
Interestingly, Camera ID 6 also reports as a "LOGICAL_MULTI_CAMERA" for physical camera ID's 0 and 4, which would combine the main camera with the Ultra Wide camera. I haven't been able to get that one to work with Open Camera, though, and not sure of it's purpose. There are also others, not sure of their purpose, but they also don't work with Open Camera.
I'll attach the text report with the camera2 api info.

Categories

Resources