Tablet stuck in phone mode [SOLVED: bad DPI from manufacturer]

Nope, that’s not how Android works. there is real resolution and there is DPI, which tells you how big the tablet is in real life units (inches).

Think about my phone, which has considerably larger resolution than your tablet (it has 1440 x 2560), but is under 6 inches.

In the case of my phone, looking at pure resolution, the elements would be so small that they would be impossible to use.

You must take into account DPI when working with Android. In fact, everything in Android works with units called “dp”. It is defined at https://developer.android.com/guide/practices/screens_support.html

A virtual pixel unit that you should use when defining UI layout, to express layout dimensions or position in a density-independent way.

The density-independent pixel is equivalent to one physical pixel on a 160 dpi screen, which is the baseline density assumed by the system for a “medium” density screen. At runtime, the system transparently handles any scaling of the dp units, as necessary, based on the actual density of the screen in use. The conversion of dp units to screen pixels is simple: px = dp * (dpi / 160). For example, on a 240 dpi screen, 1 dp equals 1.5 physical pixels. You should always use dp units when defining your application’s UI, to ensure proper display of your UI on screens with different densities.

There is also something called Density DPI, so that every tablet and phone doesnt have wildly altering DPIs, and so that the tablet/phone manufacturer can take into account other aspects of the screen (curvature, how heavy it is and how far you hold it from your face), and then give it a “suggested dpi”, by which the entire Android UI is meant to run at.

In the case of that Lenovo Yoga in the other thread, the manufacturer decided that even through the screen is 1280x800, they want everything to be bigger, so they picked a Density DPI of 213 instead of the 160 that you want (pixel accurate, where 1dp == 1px, see formula above). Why did Lenovo do this? My guess is that they felt that people with bad eyes were buying that tablet and they needed bigger elements in the UI.

Try grabbing this app and posting a screenshot of your tablet’s specs:

https://play.google.com/store/apps/details?id=net.liverworks.getdisplaymetrics&hl=en

It’ll help us understand if you have the same issue as the Lenovo Yoga in the other thread, or a different issue.

Wow. Thanks! I hadn’t really absorbed the density DPI idea. And I didn’t realize it could be used in such a ,well, dumb way.

And you called it. 213. WTF.


Here’s the screenshot.

The tablet identifies itself as an AQT80. I doubt you’ll see many. But low-end, wonky tablets in general I suspect you’ll see lots of.

Last night, when I picked that tablet up, Roon started in tablet mode. Today, portrait. As if life isn’t hard enough already.

Can you try using the DPI changing method in the Lenovo thread and try to set it to 160?

Okeedokie! That took care of that!

I missed that you can do this without root privileges on the tablet.

Everything is smaller and sharper now and Roon starts repeatably in tablet mode. (about two dozen starts over three days now) I checked any apps that the change in DPI might have affected and nothing seems worse for the wear. If anything, video performance of UI animations might be a little improved. Movies are sharper (the tablet is now almost exactly 720p). I had to change some font sizes and and reload the wallpaper. All very painless. There some missing characters from time to time in the small type in Roon, but nothing life threatening.

For benefit of visitors from the planet Search Engine and archival integrity, the thread that Danny directed me to (Lenovo Yoga Stuck in portrait) links to http://www.androidbeat.com/2015/07/how-to-change-dpi-of-android-device-without-root/ which has all the particulars on using ADB. The ADB command I used was:

adb shell wm density "160” && adb reboot

Wherein you put the value you want where “160” is.

The command to back out of the change is:

adb shell wm size reset && adb reboot

Again, all the particulars are on that linked page and in Danny’s posts.

When it started looking like installing the ADB driver on my virtual Windows 7 machine might entail some work, I just grabbed the package android-tools on my Fedora Linux box. (You don’t have to install the drivers on most Linux distros, apparently.) With android-tools installed, you can issue ADB commands right in a normal terminal, as a normal user. It worked totally without drama.

@danny Thank you and feel free to link or move this post wherever you feel it might do the most good.

1 Like

Are there new links to the app and dpi change instructions? Both links are out of date by now. Thank you!

Hi @Stephen_Lee1,

We responded to your other thread on this issue. Closing for now.

1 Like