Reputation: 1
I found information that you can change the camera resolution in AVD using these parameters:
hw.camera.maxHorizontalPixels
hw.camera.maxVerticalPixels
But I didn't find these parameters anywhere, maybe this feature is not available in 2024? Please, tell me in which file these parameters are located or tell me a working variant as it is possible to make the camera resolution in android emulator 1920x1080, maybe it is possible to use some popular android emulators and flash them to change the camera resolution to 1080P? Thank you all who responded :)
I've spent a lot of time searching for these parameters and haven't found anything anywhere ((
Additionally, I was able to change these settings using Visual Studio, but these values are not applied and the camera resolution remains 720x1280 instead of 1080x1920.
These values remain the same, no difference whether I use Visual Studio or Android Studio.
My AVD configuration file (config.ini
) is as follows:
disk.dataPartition.size=6G
fastboot.chosenSnapshotFile=
fastboot.forceChosenSnapshotBoot=no
fastboot.forceColdBoot=no
fastboot.forceFastBoot=yes
hw.accelerometer=yes
hw.arc=no
hw.audioInput=yes
hw.battery=yes
hw.camera=yes
hw.camera.back=webcam0
hw.camera.front=webcam0
hw.camera.maxHorizontalPixels=1080
hw.camera.maxVerticalPixels=1920
hw.cpu.ncore=4
hw.dPad=no
hw.gps=yes
hw.gpu.mode=auto
hw.initialOrientation=portrait
hw.keyboard=yes
hw.lcd.density=560
hw.lcd.height=3120
hw.lcd.width=1440
hw.mainKeys=no
hw.ramSize=9000
hw.sdCard=yes
hw.sensors.orientation=yes
hw.sensors.proximity=yes
hw.trackBall=no
runtime.network.latency=none
runtime.network.speed=full
sdcard.size=512M
skin.dynamic=yes
skin.name=pixel_6_pro
Upvotes: 0
Views: 74
Reputation: 322
You are using hardware camera (webcam0
) for both cameras. I'm not sure about Windows, but for Linux this way does not work. Try to specify different camera devices for back and front emulator cameras, or use emulated source for some of them
hw.camera.maxHorizontalPixels
hw.camera.maxVerticalPixels
must be set to resolution that real camera supports. Please check that your web camera has 1080p resolution
In Linux the best way to change resolution for camera provides v4l2loopback
virtual device. For Windows you may try to use OBS camera or some driver-based UVC camera emulator if OBS camera is not detected by emulator. But all of that must be started before emulator and you need to feed them with continuous stream
Upvotes: 0