2

I want to automate the creation of virtual android devices (using Android x86 and QEMU/KVM on Linux), the device settings includes screen resolution and density. The common way to set these settings is through adb shell wm size and adb shell wm density but it requires the device to be running, while changing /system/build.prop doesn't, I can mount the virtual disk and make changes there.

0

1 Answer 1

2

Since you are open to modifying virtual disk you can edit the file settings_global.xml located under /data/system/users/0/ directory. Among other things, look for these two keys in that file:

  • display_size_forced
  • display_density_forced

These keys correspond to wm size WxH and wm density DPI respectively. Change their values to your desirable WidthxHeight and density.

Save it. That's it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .