Changing screen resolution on android devices without re booting - android

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.

Related

Change screen size of Genymotion programatically

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

Android emulator shuts down after it starts

Hi!
I have a problem getting my android emulator to work. After i run my android application project, the emulator starts, but instead of showing my application, it says the following : "Power off. Shutting down..." and then the screen goes black. I'm unable to launch my application or do anything in the emulator.
What might be the problem? My target SDK is 1.5, and the device i chose is Nexus One. Thank you
did it work before?
did try to wipe user data? (avd-launch option)
//edit:
I think Fuad is wrong:
if you change the ramSize to 1024M or 1024MB, the virtual device's amount of RAM is just set to 256MB
I had problem at first some thing like this for using android SDK...check this maybe helps you :
(YourWindowsDrive)C:\Users\YourLoginName(mine is Fuad) \ .android\avd\App.avd(This App.avd is a folder the name what I have used for my avd)
then in folder U see "config.ini". open it and change "hw.ramSize=1024" (mine is 1024 and maybe yours is different) to :
hw.ramSize=1024M

Change resolution(screen size) on Android ICS virtualbox issue

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.

How to test android application for different screen sized?

I have finished my application, but I have only 1 real device, and I need to test my application for different screen sizes. So, please, tell me, which emulator configurations should I use for diffrent screen sizes in order to I will be sure that my application will work on each configuration? Thank you.
there are more than 20 target devices are available in android developer website.
you can download few of them and load those devices in your emulator...
there is option in eclipse to select your target device before running your application...
Even by using the ADT plugin, in the layout editor, we can select the desired type of the phone, resolution, orientation and can check immediately with different types of resolutions..

android automate testing orientation change

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!

Categories

Resources