Hello,
We're working on Android S in a virtualized environment (Running via QEMU emulator).
How do we change the resolution from the source code ? .
Also, how does
wm size AxB (where A and B are resolution numbers) work in the background from the adb shell ?
Click to expand...
Click to collapse
Which place in the source code do we look for to change the resolution ?
The host is an Ubuntu Setup, and we're using QEMU 6.
Attached screenshot is how we run the Android VM.
You change Android's screen resolution and/or density by editing it's "build.prop" file.
Example:
Code:
adb shell wm size 1080x1920
and then
Code:
adb shell wm density 390
BTW:
Resolution is defined as the following on Google's developer portal:
The total number of physical pixels on a screen. When adding support for multiple screens, applications do not work directly with resolution; applications should be concerned only with screen size and density, as specified by the generalized size and density groups.
And screen density:
The quantity of pixels within a physical area of the screen; usually referred to as dpi (dots per inch). For example, a "low" density screen has fewer pixels within a given physical area, compared to a "normal" or "high" density screen. For simplicity, Android groups all actual screen densities into six generalized densities: low, medium, high, extra-high, extra-extra-high, and extra-extra-extra-high.
xXx yYy said:
"build.prop"
Click to expand...
Click to collapse
what's the build.prop value ?
xXx yYy said:
You change Android's screen resolution and/or density by editing it's "build.prop" file.
Example:
Code:
adb shell wm size 1080x1920
and then
Code:
adb shell wm density 390
BTW:
Resolution is defined as the following on Google's developer portal:
The total number of physical pixels on a screen. When adding support for multiple screens, applications do not work directly with resolution; applications should be concerned only with screen size and density, as specified by the generalized size and density groups.
And screen density:
The quantity of pixels within a physical area of the screen; usually referred to as dpi (dots per inch). For example, a "low" density screen has fewer pixels within a given physical area, compared to a "normal" or "high" density screen. For simplicity, Android groups all actual screen densities into six generalized densities: low, medium, high, extra-high, extra-extra-high, and extra-extra-extra-high.
Click to expand...
Click to collapse
I can change the resolution, while running the image.
with
adb shell > wm size 1920x1080 or something like that.
but, what i want to achieve is, writing a C/C++ code, which can help me change the resolution to whatever i feel like within the minResolution and maxResolution limits of the screen.
something like,
./screen_reso 1920 1080 (passing 1920 1080 as command line arguments or even inside the code)
Related
LCD Density is a tweak I like to make due to my eye sight (or lack thereof). There are a few apps that will change this setting for you provided you have root access. The problem I've run into is the dreaded "your device is not compatible" on the Play Store (Android Market). The reason behind this was due to an awkward setting. 2 out of 3 apps I've used in the past had pre-set configurations. Usually the settings to choose from were 240 (default) 260, 280. On the smaller side were 220, 200, and 180. What I found out recently is 256 is the native PPI. So do yourself a favor and find an app that has a sliding scale in increments of 1 PPI and set your Atrix2 to 256 if you'd like a bit larger images and text. Its helped me feel comfortable using my phone and I no longer incur the Play Store (Google please change the name back) error. Otherwise I'd have to readjust the LCD density, reboot, clear data for the Store and THEN go get the app. Then change the density BACK...reboot. you get the idea. It was painful. So to make a short story long, LCD density at 256 for the farsighted people like me. Whew! Didn't mean for that to be so long. Hope it helps.
Sent via Tapatalk with VictoryRom_v1.1
WARNING: secondary display REPORTED NOT WORKING
using ADB (Go to about--) build (press 7 times) ---) USB debug (Allow) ---)Using SDK on PC to push adb commands.
Original
adb shell wm size 1440x2560 (if you are using adb then adb shell)
adb shell wm density 640
adb shell wm size 720x1280
adb shell wm density 320
adb shell wm size 1080x1920
adb shell wm density 450
(Try this out)
adb shell wm size 900x1600
adb shell wm density 380
the default android density values are: 240(HDPI)/280/320/360(XHDPI)/400/440/480(XXHDPI)/520/560/600/640(XXXHDPI)/680/720)
return both values to default with the following commands:
wm size reset
wm density reset
If someone can helping fixing secondary display by leaving scale the same and changing only the main screen.
This gives a better life battery lasting for 1 day moderate use and 5 hours full time working screen ( with 1080p scale).
No root required.
Original thread
( https://forum.xda-developers.com/ne...nexus-6p-to-scale-to-1080p-t3298620?nocache=1 ).
All thanks goes to Chord_Hugo87
How can we do this as root without computer
I've just tried it,
tried scaling to 720P (Battery life is so important to me, and this phone isn't a good one) but did't like the scaling (everything so large) and felt like loosing alot of the experience
I've scaled to 1080P and it's fine for now, will try it for few days, hopefully it would perform better
Hope to remember to feed you back on the result
SpiritStealer said:
I've just tried it,
tried scaling to 720P (Battery life is so important to me, and this phone isn't a good one) but did't like the scaling (everything so large) and felt like loosing alot of the experience
I've scaled to 1080P and it's fine for now, will try it for few days, hopefully it would perform better
Hope to remember to feed you back on the result
Click to expand...
Click to collapse
You need change DPI when change resolution.
SpiritStealer said:
I've just tried it,
tried scaling to 720P (Battery life is so important to me, and this phone isn't a good one) but did't like the scaling (everything so large) and felt like loosing alot of the experience
I've scaled to 1080P and it's fine for now, will try it for few days, hopefully it would perform better
Hope to remember to feed you back on the result
Click to expand...
Click to collapse
Copy this 2 line and you will get a good look.
adb shell wm size 900x1600
adb shell wm density 380
panda968 said:
How can we do this as root without computer
Click to expand...
Click to collapse
it annoyed me that no one answered.
through terminal on your phone, type "su" then enter, then type the same commands just without "adb shell"
I've tried some resolutions, but I see that part of the screen becomes black. I wish there was a way to preserve all pixels, but with a real rescale and no losing screen. Some help? :')
davidomin97 said:
I've tried some resolutions, but I see that part of the screen becomes black. I wish there was a way to preserve all pixels, but with a real rescale and no losing screen. Some help? :')
Click to expand...
Click to collapse
Actually, I answered the question myself. What happens with this unique smartphone is that the wm takes in count the secondary display as the physical resolution. If you write adb shell wm size, it will tell you the physical resolution and the resolution you are rescaling at. I did that and I found that the physical resolution is 1440x2720, which means that, in order to maintain every pixel active, you need to take in count those 160 extra pixels. So the actual correct resolution for 1080p is 1080x2040. If someone has the same problem, I hope that this solution helps him/her
davidomin97 said:
Actually, I answered the question myself. What happens with this unique smartphone is that the wm takes in count the secondary display as the physical resolution. If you write adb shell wm size, it will tell you the physical resolution and the resolution you are rescaling at. I did that and I found that the physical resolution is 1440x2720, which means that, in order to maintain every pixel active, you need to take in count those 160 extra pixels. So the actual correct resolution for 1080p is 1080x2040. If someone has the same problem, I hope that this solution helps him/her
Click to expand...
Click to collapse
my ./adb shell wm size shown 1440x2560
As the title says, you can use the adb wm size command to change the resolution, higher.
On most phones the resolution shipped is the highest available.
The RM3&3S ship stock 1080p but easily go up much higher.
Personally i recommend 1440x3120
wm size 1440x3120
In an su terminal or adb by pc.
This brings the display up to current phones resolution! (2k)
Enjoy!
As for performance and battery life, there is no noticeable NEGATIVE impact. However, when screen recording or streaming your screen, it can lag if your connection cant support the higher resolution. Native screen recording should be unaffected.
SilentDevGuy said:
As the title says, you can use the adb wm size command to change the resolution, higher.
On most phones the resolution shipped is the highest available.
The RM3&3S ship stock 1080p but easily go up much higher.
Personally i recommend 1440x3120
wm size 1440x3120
In an su terminal or adb by pc.
This brings the display up to current phones resolution! (2k)
Enjoy!
As for performance and battery life, there is no noticeable NEGATIVE impact. However, when screen recording or streaming your screen, it can lag if your connection cant support the higher resolution. Native screen recording should be unaffected.
Click to expand...
Click to collapse
wow nice
anyone has tested this ?
I have downloaded the DevCheck app and under HARDWARE tab > Graphics > Resolution, it is shown as 2340 x 1080. Does it mean that on adb I have to type wm size 3120x1440 instead ?
Thank you
SilentDevGuy said:
As the title says, you can use the adb wm size command to change the resolution, higher.
On most phones the resolution shipped is the highest available.
The RM3&3S ship stock 1080p but easily go up much higher.
Personally i recommend 1440x3120
wm size 1440x3120
In an su terminal or adb by pc.
This brings the display up to current phones resolution! (2k)
Enjoy!
As for performance and battery life, there is no noticeable NEGATIVE impact. However, when screen recording or streaming your screen, it can lag if your connection cant support the higher resolution. Native screen recording should be unaffected.
Click to expand...
Click to collapse
I have tried changing the resolution yes the screen changed to a smaller icon etc but the problem is the below area is not responding to touch for example, the soft button; back, home and app manager does not work when touched.
On mine
lius90 said:
I have tried changing the resolution yes the screen changed to a smaller icon etc but the problem is the below area is not responding to touch for example, the soft button; back, home and app manager does not work when touched.
Click to expand...
Click to collapse
On mine it works without issue at all and I can touch all the way up to 5k no problem, can you tell me your device model and rom?
Not to be rude or offend you but it is 100% user error on your side, the resolutions are accepted, and tested on A11 and A10 multiple devices. Also the icons smaller and all that is just based on DPI, resolution is the resolving power.
lius90 said:
wow nice
anyone has tested this ?
I have downloaded the DevCheck app and under HARDWARE tab > Graphics > Resolution, it is shown as 2340 x 1080. Does it mean that on adb I have to type wm size 3120x1440 instead ?
Thank you
Click to expand...
Click to collapse
No, use 1440x3120 it matters what order the numbers are in.
Thankyou
Thank you. For the display to work properly, you also need to change the pixel density. We enter three commands in adb:
wm size 1440x3120
wm density 640
reboot
Increased clarity even in games! See screenshots...
Source: https://lumpics.ru/how-change-screen-resolution-on-android/#helpgood
Disable nubia red magic 3 animated boot splash screen on phone boot and reboot, save your zip, download my zip and replace via total commander
bootanimation.zip
shutdownanimation.zip
File path:
system/media/theme/bootup
system/media/theme/shutdown
Here is a program Easy DPI Changer root for those who have root rights:
Easy DPI Changer [Root] - Apps on Google Play
Make your screen yours
play.google.com
In the "Density" field, enter the DPI, and in the "Resolution" field, enter the width and length. After changing each parameter, click "Apply" in its block to save the new values. They will apply after a reboot.
I played around with this screen resolution and returned to standard resolution!
Hello,
I am visually impaired and I want to use a tablet as a phone, because everything looks bigger on a big screen.
But some apps look different on a tablet than on a smartphone.
They show more content on one screen if you use a tablet than if you use a smartphone.
If you then set large fonts and an enlarged display, elements overlap in the display.
Is it possible to use a tablet as a phone and make the app believe, that it is a smartphone when it is a tablet?
My smartphone is rootet and I have already tried some things.
I have changed ro.build.characteristics=tablet to "phone" (build.prop)
But that did not help.
Andreas
Change DPI. Lower means bigger. You can adjust that in developer settings, in the "smallest width". Play with that number until you find the good value. Keep in mind, every restart will reset that value to default.
Note that the Android's window size and the device's screen size are not the same. . For example, the area within the window that is used by an app can change if the window becomes too big to fit on the screen.
Read here:
Android: How to use "adb shell wm" to simulate other devices
So I bought a Nexus 10 for development and was super excited by the prospect of being able to simulate other devices using the "adb shell wm" command, with its size, density, and overscan subcomman...
stackoverflow.com
BTW:
Smartphones usually have a screen measuring between 3.5 – 4.3 inches. The screens of tablets measure between 7 – 10.5 inches, they look like a large smartphone but with additional capabilities
xXx yYy said:
Smartphones usually have a screen measuring between 3.5 – 4.3 inches. The screens of tablets measure between 7 – 10.5 inches, they look like a large smartphone but with additional capabilities
Click to expand...
Click to collapse
That is right. Tablets look like a large smartphone. The screen of my tablet has three times the space of the screen of my smartphone. This could mean, that everything is three times as big as on my smartphone. But that is unfortunately not the case.
If you then set large fonts and an enlarged display, elements overlap on the display.
I would like to have a tablet, that behaves identical to a smartphone and everything on the screen looks exactly like on the smartphone, only three times as big.
The tablet knows the physical size of the screen. Otherwise it would not know the ppi-Value. Does anybody know in which file this information is?
Maybe the tablet knows the physical size of its screen ( screen size ), but that's absolutely not of any interest in your case: it's Android's window size ( viewpoint - resolution ) what matters.
You have to find the suitable combo of PPI related to resoulution ( window size ). Both values
wm size
wm density
can get set in Android's system file
/data/data/com.android.providers.settings/databases/settings.db
what is a SQL database
I've looked all over the web but I can't seem to find a way to change the screen size of Android TV without magisk, my screen is too stretched and I already tried my normal TV settings, no luck. Is there any other way for me to do so?
dopinder running Lineageos 20
Endex said:
I've looked all over the web but I can't seem to find a way to change the screen size of Android TV without magisk, my screen is too stretched and I already tried my normal TV settings, no luck. Is there any other way for me to do so?
dopinder running Lineageos 20
Click to expand...
Click to collapse
Resolution changing
connect your phone with pc and start adb prompt in CMD
type:
adb shell
then you can do is :
to change the resolution:
=========================
type:
wm size *your preferred resolution from the list
like:
wm size 720x1560
*here put small letter 'x' in between the resolution
to change the dpi:
==================
type:
wm density *your preffred dpi from the list
like:
wm density 269
*REBOOT phone
example:
==========
wm size 1080x2340
wm density 420
*RBOOT phone
list:
=======
Defaultu Resolution: 1080x2340 at 420 dpi
step down 1: 960x2080 (*add your desired dpi)
step down 2: 864x1872 (*add your desired dpi)
step down 3: 768x1664 (*add your desired dpi)
step down 4: 720x1560 at 269 dpi