How To Guide [No root] Disply always in 4k mode

Search This thread
Oh no, I didn't make those. These are the ones I'm aware off but never installed. The last update is a bit old (may). and the lack of instructions...

So you're using a GSI?

Maybe I should look in GSI's instead, being so common support is much better. Did you flash A11 firmware or is this no longer necessary? Or maybe different, could you link me to the instructions you used?
Yep, that's the GSI I'm using. No need to flash Android 11 first. I went from the latest official 12 firmware to that GSI. I also flashed the latest binaries from Sony's website (fastboot flash oem filename.img) but I have no idea if that was necessary.
 

FiDra

Senior Member
Jul 30, 2010
315
89
Sony Xperia 1
Sony Xperia 5 II
riceDroid custom ROM has an option to switch to 4k resolution. You can give it a try if you want something different from stock fw.

I'm using riceDroid with Kirisakura kernel for my daily use. It smooth and lots of customizations.
 

jeffreyo

Member
Feb 1, 2015
17
4
Xperia XZ2
It looks like the phone reports a physical size of 1096x2560 regardless of what is playing. Even with Cinema Pro playback in 4K.

So, whatever Sony is doing, it's probably passing the video through the upscaler while shutting off the upscaling so that it displays in 4K natively?
 

phailyoor

Senior Member
May 17, 2012
173
56
www.hiddencreeksoftware.com
Working on getting this working on the IV on a13 and crossposting here. If anyone knows how to find the maxuiwidth config override that would be useful
 
  • Like
Reactions: MK73DS

MK73DS

Senior Member
Dec 25, 2014
228
46
25
Asus ZenFone 2
Samsung Galaxy S7
Made a mod here for the IV: https://forum.xda-developers.com/t/high-resolution-mod-for-xperia-1-iv.4517435/post-88762821

Not sure if it works on III, but probably doesn't hurt to give it a shot.
It doesn't work, but it's close. You have to replace `0x7f070010` by `0x7f070013` in the public.xml values. Then `wm size 1644x3840; wm density 630` works perfectly!

I was making a Magisk module after I saw your first post but you beat me at it. Anyways, here's mine working for the Xperia 1 III. Note that I'm *not* an expert when it comes to Magisk modules so I don't take *any* responsibility if something wrong happen with your device (it shouldn't since the module doesn't do much, but still, you've been warned).

Edit: works on the Xperia Pro-I as well. Thanks to @ragu24 for testing.
 

Attachments

  • fix4k_magisk.zip
    5.7 KB · Views: 37
  • Screenshot_20230717-123622.png
    Screenshot_20230717-123622.png
    39.7 KB · Views: 49
Last edited:
  • Like
Reactions: phailyoor
It doesn't work, but it's close. You have to replace `0x7f070010` by `0x7f070013` in the public.xml values. Then `wm size 1644x3840; wm density 630` works perfectly!

I was making a Magisk module after I saw your first post but you beat me at it. Anyways, here's mine working for the Xperia 1 III. Note that I'm *not* an expert when it comes to Magisk modules so I don't take *any* responsibility if something wrong happen with your device (it shouldn't since the module doesn't do much, but still, you've been warned).
Anyone tried this on thier xperia 1 iii with a13 and does it work ?
 

ragu24

Senior Member
Apr 10, 2016
102
33
Sony Xperia Pro-I
Yes, me. After flashing the module and rebooting, just do
Code:
# wm size 1644x3840
# wm density 630
(in adb or a rooted shell)
It also persists during reboots.
It doesn't work, but it's close. You have to replace `0x7f070010` by `0x7f070013` in the public.xml values. Then `wm size 1644x3840; wm density 630` works perfectly!

I was making a Magisk module after I saw your first post but you beat me at it. Anyways, here's mine working for the Xperia 1 III. Note that I'm *not* an expert when it comes to Magisk modules so I don't take *any* responsibility if something wrong happen with your device (it shouldn't since the module doesn't do much, but still, you've been warned).
What would it take for it to work on Pro-I, assuming I wanted to also cross modify it for us??
 

MK73DS

Senior Member
Dec 25, 2014
228
46
25
Asus ZenFone 2
Samsung Galaxy S7
What would it take for it to work on Pro-I, assuming I wanted to also cross modify it for us??
You need to extract the system app android.platform.overlay and decompile it. Search in public.xml (in res/values) for the value of the field named config_maxUiWidth (it should be a hex value not far from 0x7f070013)

Note: you could probably get the result easier using idmap2 but I didn't manage to do it and the decompilation method is pretty quick as well.

If the value is 0x7f070013, then you don't need to do anything and the Xperia 1 III Magisk module should work on the Pro-I. Otherwise, go in the Magisk module and decompile the apk file found in the system folder (there's a chain of single folders with the apk file at the end). Go to public.xml and update the value with what you found. Then recompile the apk, sign the apk, and put it back in the Magisk zip module.

For a quick explanation of what this does (and I must thank @phailyoor for his posts in the Xperia 1 IV forum) is that you can overwrite some ressources values in recent versions of Android, in a process called RRO. Here, we're overwriting the config_maxUiWidth from 1096 (the full HD we're stuck with) from the FrameworkRes.apk to 0, disabling the limit and allowing wm size to go past 1096p.
 
  • Love
Reactions: ragu24

ragu24

Senior Member
Apr 10, 2016
102
33
Sony Xperia Pro-I
You need to extract the system app android.platform.overlay and decompile it. Search in public.xml (in res/values) for the value of the field named config_maxUiWidth (it should be a hex value not far from 0x7f070013)

Note: you could probably get the result easier using idmap2 but I didn't manage to do it and the decompilation method is pretty quick as well.

If the value is 0x7f070013, then you don't need to do anything and the Xperia 1 III Magisk module should work on the Pro-I. Otherwise, go in the Magisk module and decompile the apk file found in the system folder (there's a chain of single folders with the apk file at the end). Go to public.xml and update the value with what you found. Then recompile the apk, sign the apk, and put it back in the Magisk zip module.

For a quick explanation of what this does (and I must thank @phailyoor for his posts in the Xperia 1 IV forum) is that you can overwrite some ressources values in recent versions of Android, in a process called RRO. Here, we're overwriting the config_maxUiWidth from 1096 (the full HD we're stuck with) from the FrameworkRes.apk to 0, disabling the limit and allowing wm size to go past 1096p.
Ayooo it's a match!! I also got the same value then!!

Thank you!!

EDIT: Just wanted to add this app here is excellent to interface the resolution and does work as good as ADB command, except at the press of a button!!

 

Attachments

  • Screenshot_20230720-122537.png
    Screenshot_20230720-122537.png
    954.9 KB · Views: 40
  • Screenshot_20230720-162815.png
    Screenshot_20230720-162815.png
    238.1 KB · Views: 38
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    IMPORTANT: This no longer works after the update to Android 12. 'wm size' resets itself to default immediately after you change it. If you know (or at least have an idea) of a possible fix - please reply, so far I'm clueless.

    I'll edit the post again if anything is found.
    If you have already updated like me you can run 'wm density reset' so your phone looks normal again.


    So the phone by default runs in 1096x2560 and only in select apps with appropriate content in 4k. XZ Premium did the same thing and it is possible to make always run in 4k. I've decided to try the same on 1 III and it works!
    How to:
    1. Enable USB debugging in developer settings
    2. Download and run ADB, you phone should provide the driver automatically. If not, it can be downloaded from here.
    3. Run the following commands
    Code:
    adb shell
    wm size 1644x3840
    wm density 630
    Done! Exit ADB shell by typing exit there.

    From my testing this works flawlessly with any app and the 120hz mode. My device didn't get too warm from this, battery now is at 35°C and CPU at 40. No lagging or freezes whatsoever either, everything runs smoothly in 120 fps. The only thing I noticed is that when using always-on display the phone unlock can be a bit slow sometimes, but only when unlocking with said display lit up.

    How to undo - the same as before but with these commands:
    Code:
    adb shell
    wm size reset
    wm density reset
    Please report how's your experience and battery life if you try this.
    3
    Sounds good. I'll def try it when I get my 1 iii. Does it persist between reboots?
    Yes it does. Even the reboot screen is a little bit messed up because their animation is not 4k.
    2
    Not working on A13 as well, any updates guys?
    I hope we'll get a working fix one day but I'm losing hope...
    2
    Chiming in my 2cents here. Also confirming it does not work on Android 12.

    So far Android 12 is proving a real pain is the ass.

    My advice - dont bother - stay on 11 until changes are made or workarounds are resolved


    A poke to ask about Android 12 and 4k any more info?
    I'm hesitant to upgrade if Android 12 does not support 4k mode...
    2
    So one problem I found - setting the display to 4k all the time seems to skew the wireless charging targeting instructions that come up
    I hope they will fix this soon, and even add a built-in always 4k mode (fixing all the small bugs like the one you pointed out or the AoD not working properly).

    The difference between 1080p and 4k is noticeable in everyday use, especially in text. Maybe this is because I was used to a 1440p display for the past 6 years (and going back to 1080p is noticeable) but still, this phone has all these pixels, why not have an option to always use them.

    I attached some pictures taken in both modes. The filenames are self-explanatory but I am sure you will be able to find which one is 1080p and which one is 1644p. Diagonal lines especially suffer a lot at 1080p, like for example the letter 'w'. Overall, text looks very soft at 1080p compared to 1644p.