There's a chance to change the screen size and density of an already created genymotion machine by going to the machine on the genymotion launcher-> configure-> Screen size - Density.
I'd like to do this through a shell command, does this command exist? How can it be called if so?
For now it is not possible.
But we will soon release features related to continuous integration and automation. A command line tool will be included on these features. It allows you to do all what you can do with your mouse, but through the command line. And it will be available to paid licenses.
Editing the screen size and resolution is part of it.
Here is a demo we gave at Droidcon Paris
Related
I'm moving to my new laptop which has 4k screen (3840x2160, to be exact). As my OS of choice I have Linux, and all scaling I have set up for this is done via Gnome (scaling-factor in gnome tweaks is set to 2). Overall, setup looks perfect, except for Android AVD run in IntelliJ IDEA.
AVD is configured to use skin with 1920x1080 dimensions, and I've expected that it would be roughly the height of the screen, however for some reason AVD is scaled up, which obviously looks.. weird and unusable.
I've took a look at relevant questions here about scaling the emulator, but it seems that IntelliJ interface has changed, as there is no Emulator tab in Edit Configurations menu (and answers to questions I've seen said to use that option to downscale the emulator). So, question is: how do I scale it down (or, to put more correctly, how do I disable the scaling for emulator)?
Ok, I've found out what the issue was. UI scaling is handled by Qt in case of android emulator. It was set to: QT_DEVICE_PIXEL_RATIO=2 somewhere in my configs. This made emulator act weird. Cheers!
Just delete the environment variable and restart Android Studio to get the new env variables.
this may be a stupid question, but I've been doing Android Development for quite some time but just installed the new version of the SDK and ADT Eclipse plugin.
I've noticed that when I create a new AVD I can choose a specific device, I.e. Nexus 7 or Nexus Phone. I've selected the Galaxy Nexus but the emulator doesn't fit on the screen so I can't see the bottom of the device. At the moment I'm working on my Desktop which has a 21 inch monitor (1600 x 900) not the most highest spec in the world but I want to be able to fit the device on the screen. I also have a secondary screen which I usually keep the emulator on so I can see the code and the emulator, handy for debugging purposes, but this screen is much smaller and only has a resolution of 1280 x 800. At the moment, it would be impossible to press on the back and home buttons, and if I do development on my laptop, which is obviously a much smaller screen, probably wouldn't be able to see most of the device, as the AVD doesn't seem to scale to fit the screen.
Is there a way that this can be done. Below is a screen shot of how the device looks on my screen.
Right click your project -> Run Configuration -> select target -> in additional emulator command line option text box, type '-scale 0.75' and run your app
For those using Ionic CLI or other solutions, the following worked for me:
ionic run android -scale=0.75
In Android Studio, the option is set in the AVD Manager, under "Startup size and orientation".
I tried changing the screen resolution in build.prop file in system, but it requires re booting.
I need a solution for changing screen resolution on android devices without re booting.
Thanks,
Krishna
Unfortunately that is not possible. Everytime when Android boots, it will read the build.prop file and set parameters pointed by it accordingly. After it has booted, it will not access that file dynamically to change parameters. So for any change to take effect, a reboot is compulsary, you cannot escape it.
Set resolution (e.g. 1024x768):
$ am display-size 1024x768
Reset:
$ am display-size reset
Doesn't require a reboot. This works with Android 4.2. Solution for 4.3 is mentioned by LiTTle
There is also an App for that called NOMone Resolution Changer.
Android can change the screen resolution.
I think that you need Android 4.0 and above version.
Only things you need is terminal emulator and root access.
Reproduce the following steps:
1. Open the terminal emulator app.
2. Type su.
3. Type wm.
Read the help message appeared and you will understand...
In case you want an App take a look at this on Play Store or the source from Github.
I have built android ICS(4.0.3) for virtualBox. And it runs well with default resolution 800x600.
However, when I change the virtualbox resolution to non-default ones, say 1280x800.
Then I get error "Unfornately, System UI has stopped". And the system hangs there. In addition, I cannot even connect to this device to see the logs when resolution changes.
Would you please give me some help? Thanks.
BTW,
The way I change resolution is suggested by Buildroid ----
First add a “custom video mode” to .vbox configuration file : Add the line
< ExtraDataItem name=”CustomVideoMode1″ value=”1280x800x16″/>
just after the already present “ExtraDataItem” entries.
Modify the linux kernel options to replace the existing vga=xxx by a vga=ask
Then, choose the expected resolution.
Maybe you find solution in this wiki article: Android Emulation.
I spend many time testing orientation changes, going back, changing again etc etc..checking if fragment are loaded correctly..
has anyone think about a process to test that issues or use a tool for that?
thanks
Using Robotium, you can change the orientation by simply calling:
solo.setActivityOrientation(Solo.LANDSCAPE);
or in JUnit:
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
I'm not really aware of an existing method of automatically testing with several screen sizes, but it would be easy enough to manually run the test using a different AVD if you configure AVDs for each screen resolution you want to test with. You could probably start various emulators and run the tests all from the command line on each emulator using something like the following (if you're using a Unix like operating system or Cygwin):
for i in avd_1 avd_2 avd_3
do
emulator -avd $i &
PID=$!
adb wait-for-device
adb -e install path/to/your/app.apk
kill $PID
done
where avd_1, avd_2, etc. are replaced by your android virtual device names for the devices with the different screen resolutions.
You might want to have a look at the Spoon test runner. It will run your instrumentation tests on all connected devices and can also make screenshots during the test to help you see the results visually.
If you want to run your unit & HMI tests on multiples emulators with different Screen size and resolution, the best thing to do is to setup a Jenkins with the android emulator plugin.
It allows you to define matrix jobs and check if your tests are ok on several platforms:
It will be painfull to set up but the benefits are really great!