Development High Resolution Mod for Xperia 1 IV

Search This thread

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
6,026
20,799
Hey everyone,

before the official Android 12 release from Sony it was possible to force the display to render at full 4K resolution via "wm size" command.
With the release of Android 12 this behaviour changed and it´s no longer possible to force 4K resolution that way.

I looked into quite a few ways go get full 4K rendering back and discovered that even for supported apps, where the kernel switches to timings for 4k resolution, the actual rendering for the displayed content is upscaled 2k.
That means there unfortunately is no way, that I was able to find, to force full 4k rendering on the device as of now.

The best I could do, is to force the default 4k mode where kernel panel timings are at 4k, but content is upscaled 2k for regular usage. The result is the following: Every app, except the ones you add to game optimizer app, will be rendered like apps that sony enabled 4k resolution for.
That´s the best I can do at the moment.

This mod might impact battery life, smoothness and other things, as more resources are needed.
However I didn´t have any problems during my usage.


The difference is not huge, but it´s visible if you look for it. For example the fonts at the bottom of Google Fotos app, like Fotos, Search etc are way more crisp.

You can check in logcat if high-resolution config is used via:
Code:
adb logcat | grep "high resolution"

While having this mod flashed, the following line means high-resolution mode (panel running at 4k, content is upscaled 2k at 120fps) is enabled:
Code:
11-11 18:56:49.801  1475  1758 D SDM     : HWCDisplay::SetActiveConfigWithConstraints: Setting to a high resolution config: 1

While having this mod flashed, the following line means high-resolution mode (panel running at 4k, content is upscaled 2k at 60fps) is enabled:
Code:
11-11 18:56:56.725  1475  1761 D SDM     : HWCDisplay::SetActiveConfigWithConstraints: Setting to a high resolution config: 0


Requirements:
- Sony Xperia 1 IV running on A13, with at unlocked bootloader
- fastboot method does not require root
- method via kernel managers does require root
- backup your current dtbo.img or make sure you have a copy of the same (EXKM can backup dtbo.img, or you can grab it from xperifirm)

Installation:

1. Download the attached newdtbo.img
Please note: This mod is made for Android 13 firmware, it will not work on Android 12 firmware

2. Do either 2a
or 2b!

2.a Boot to fastboot and flash via:

Code:
fastboot flash dtbo newdtbo.img


2.b Flash newdtbo.img via EXKM or any app that allows flashing dtbo.img

3. reboot
 

Attachments

  • newdtbo.img
    1.1 MB · Views: 52
Last edited:
Just flashed it and it seems to work pretty well so far, can notice a slight difference in sharpness of text and stuff with the new dtbo image flashed vs stock, only side effect was the boot animation being corrupted but it's fine once booted into Android.

A question though, should this be safe to flash for future Android 13-based firmware versions? Or is this specific to only the initial Android 13 firmware? (64.1.A.0.851)
 
Last edited:

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
6,026
20,799
Just flashed it and it seems to work pretty well so far, can notice a slight difference in sharpness of text and stuff with the new dtbo image flashed vs stock, only side effect was the boot animation being corrupted but it's fine once booted into Android.

A question though, should this be safe to flash for future Android 13-based firmware versions? Or is this specific to only the initial Android 13 firmware? (64.1.A.0.851)
Yes, boot animation can get scrambled up indeed.

It depends on changes done to future firmware updates. Can't foresee the future, but it's unlikely there are much changes.
It's easy to either backup dtbo.img before flashing the modded one or simply reflash Stock extracted from Xperiafirm/unsin tool though.
 
  • Like
Reactions: OhayouBaka
No Bootloader unlock needed. Still.

service call SurfaceFlinger 1035 i32 x
(x=0,1,2,3)

1. 1096x2560x60x397132cmd
2. 1644x3840x120x397108cmd
3. 1644x3840x60x397108cmd
4. 1096x2560x120x397132cmd

Google changed the behavior for native Resolution switches in the Android Settings. Just like Samsung has it since YEARS. Thanks for the alternative tho
 

joeminati

Senior Member
Dec 23, 2009
391
58
Also note that some apps do not work with an unlocked bootloader, for security standards requires a locked bootloader.

All throughout the internetz, people have had issues with apps like banking/finance apps, Google proprietary finance apps like Wallet or Google pay, or apps store like Google play.
 
Just flashed it and it seems to work pretty well so far, can notice a slight difference in sharpness of text and stuff with the new dtbo image flashed vs stock, only side effect was the boot animation being corrupted but it's fine once booted into Android.

A question though, should this be safe to flash for future Android 13-based firmware versions? Or is this specific to only the initial Android 13 firmware? (64.1.A.0.851)
Figured out a more elegant method that doesn't corrupt the boot animation and should work on any future firmware updates. Simply flash this Magisk Module, which contains the commands that @Miustone provided. Yes, this does still require a bootloader unlock as you are only able to apply this command with root privileges or a Magisk script.

You should also be able to use this on other devices as well running Android 12 or newer, by following these steps to edit the Magisk module .zip provided:

Just run:
Code:
adb shell
Code:
su
Code:
dumpsys SurfaceFlinger | grep hwcId
Pick your id number according to resolution/refresh rate you desire from the list.
Here is an example output from Xperia 1 IV:
Code:
{id=0, hwcId=0, resolution=1096x2560, refreshRate=60.00 Hz, dpi=428.28x427.79, group=0}
{id=1, hwcId=1, resolution=1096x2560, refreshRate=120.00 Hz, dpi=428.28x427.79, group=0}
{id=2, hwcId=2, resolution=1644x3840, refreshRate=60.00 Hz, dpi=642.42x641.68, group=0}
{id=3, hwcId=3, resolution=1644x3840, refreshRate=120.00 Hz, dpi=642.42x641.68, group=0}
Edit the service.sh file inside the Magisk module zip
Code:
service call SurfaceFlinger 1035 i32 3
At this line, replace the number at the end with the id number you grabbed from the earlier adb commands
 

Attachments

  • Xperia 1 IV Force 4K 120Hz Mode.zip
    4.4 KB · Views: 84
Last edited:
  • Like
Reactions: ra13x and Miustone
Figured out a more elegant method that doesn't corrupt the boot animation and should work on any future firmware updates. Simply flash this Magisk Module, which contains the commands that @Miustone provided. Yes, this does still require a bootloader unlock as you are only able to apply this command with root privileges or a Magisk script.

You should also be able to use this on other devices as well running Android 12 or newer, by following these steps to edit the Magisk module .zip provided:

Just run:
Code:
adb shell
Code:
dumpsys SurfaceFlinger | grep hwcId
Pick your id number according to resolution/refresh rate you desire from the list.
Here is an example output from Xperia 1 IV:
Code:
{id=0, hwcId=0, resolution=1096x2560, refreshRate=60.00 Hz, dpi=428.28x427.79, group=0}
{id=1, hwcId=1, resolution=1096x2560, refreshRate=120.00 Hz, dpi=428.28x427.79, group=0}
{id=2, hwcId=2, resolution=1644x3840, refreshRate=60.00 Hz, dpi=642.42x641.68, group=0}
{id=3, hwcId=3, resolution=1644x3840, refreshRate=120.00 Hz, dpi=642.42x641.68, group=0}
Edit the service.sh file inside the Magisk module zip
Code:
service call SurfaceFlinger 1035 i32 3
At this line, replace the number at the end with the id number you grabbed from the earlier adb commands
Was about to do a Module. Thanks for sharing the Details!
 

raven213

Senior Member
Apr 12, 2011
833
107
Figured out a more elegant method that doesn't corrupt the boot animation and should work on any future firmware updates. Simply flash this Magisk Module, which contains the commands that @Miustone provided. Yes, this does still require a bootloader unlock as you are only able to apply this command with root privileges or a Magisk script.

You should also be able to use this on other devices as well running Android 12 or newer, by following these steps to edit the Magisk module .zip provided:

Just run:
Code:
adb shell
Code:
dumpsys SurfaceFlinger | grep hwcId
Pick your id number according to resolution/refresh rate you desire from the list.
Here is an example output from Xperia 1 IV:
Code:
{id=0, hwcId=0, resolution=1096x2560, refreshRate=60.00 Hz, dpi=428.28x427.79, group=0}
{id=1, hwcId=1, resolution=1096x2560, refreshRate=120.00 Hz, dpi=428.28x427.79, group=0}
{id=2, hwcId=2, resolution=1644x3840, refreshRate=60.00 Hz, dpi=642.42x641.68, group=0}
{id=3, hwcId=3, resolution=1644x3840, refreshRate=120.00 Hz, dpi=642.42x641.68, group=0}
Edit the service.sh file inside the Magisk module zip
Code:
service call SurfaceFlinger 1035 i32 3
At this line, replace the number at the end with the id number you grabbed from the earlier adb commands
Thanks for this also I just found out you can add the script to fkm so you can easily switch between all resolution :)

Edit: Actually I think you can only run 2 res at a time 4k @120/60 or 1080 @120/60
 
Last edited:

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
6,026
20,799
No Bootloader unlock needed. Still.

service call SurfaceFlinger 1035 i32 x
(x=0,1,2,3)

1. 1096x2560x60x397132cmd
2. 1644x3840x120x397108cmd
3. 1644x3840x60x397108cmd
4. 1096x2560x120x397132cmd

Google changed the behavior for native Resolution switches in the Android Settings. Just like Samsung has it since YEARS. Thanks for the alternative tho
Figured out a more elegant method that doesn't corrupt the boot animation and should work on any future firmware updates. Simply flash this Magisk Module, which contains the commands that @Miustone provided. Yes, this does still require a bootloader unlock as you are only able to apply this command with root privileges or a Magisk script.

You should also be able to use this on other devices as well running Android 12 or newer, by following these steps to edit the Magisk module .zip provided:

Just run:
Code:
adb shell
Code:
dumpsys SurfaceFlinger | grep hwcId
Pick your id number according to resolution/refresh rate you desire from the list.
Here is an example output from Xperia 1 IV:
Code:
{id=0, hwcId=0, resolution=1096x2560, refreshRate=60.00 Hz, dpi=428.28x427.79, group=0}
{id=1, hwcId=1, resolution=1096x2560, refreshRate=120.00 Hz, dpi=428.28x427.79, group=0}
{id=2, hwcId=2, resolution=1644x3840, refreshRate=60.00 Hz, dpi=642.42x641.68, group=0}
{id=3, hwcId=3, resolution=1644x3840, refreshRate=120.00 Hz, dpi=642.42x641.68, group=0}
Edit the service.sh file inside the Magisk module zip
Code:
service call SurfaceFlinger 1035 i32 3
At this line, replace the number at the end with the id number you grabbed from the earlier adb commands
Thanks for this also I just found out you can add the script to fkm so you can easily switch between all resolution :)

Edit: Actually I think you can only run 2 res at a time 4k @120/60 or 1080 @120/60
nice, thanks for the information. Much appreciated!
Wasn´t aware of this command or this way to set the ID.

One thing I noticed. This way basically breaks refresh rate switching though. E.G. if a different FPS is set for any app via game enhancer that will break for some reason.
I use this little trick to set 60hz mode for video apps for example as colours and gamma are way better on 60fps, and it´s unnecessary to drive the phone at 120hz during 60fps videos.

Had a small hope this would circumvent the upscaled 2k content despite running 4k panel mode, but it´s still the same.
 
Last edited:

wednesyao

Member
Aug 11, 2017
29
2
First thanks for this mod. But 4k 120hz is sooooo hot although my room's temp is 9°C .... Fxxk 8gen1 that's why I want to buy s23ultra
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    Hey everyone,

    before the official Android 12 release from Sony it was possible to force the display to render at full 4K resolution via "wm size" command.
    With the release of Android 12 this behaviour changed and it´s no longer possible to force 4K resolution that way.

    I looked into quite a few ways go get full 4K rendering back and discovered that even for supported apps, where the kernel switches to timings for 4k resolution, the actual rendering for the displayed content is upscaled 2k.
    That means there unfortunately is no way, that I was able to find, to force full 4k rendering on the device as of now.

    The best I could do, is to force the default 4k mode where kernel panel timings are at 4k, but content is upscaled 2k for regular usage. The result is the following: Every app, except the ones you add to game optimizer app, will be rendered like apps that sony enabled 4k resolution for.
    That´s the best I can do at the moment.

    This mod might impact battery life, smoothness and other things, as more resources are needed.
    However I didn´t have any problems during my usage.


    The difference is not huge, but it´s visible if you look for it. For example the fonts at the bottom of Google Fotos app, like Fotos, Search etc are way more crisp.

    You can check in logcat if high-resolution config is used via:
    Code:
    adb logcat | grep "high resolution"

    While having this mod flashed, the following line means high-resolution mode (panel running at 4k, content is upscaled 2k at 120fps) is enabled:
    Code:
    11-11 18:56:49.801  1475  1758 D SDM     : HWCDisplay::SetActiveConfigWithConstraints: Setting to a high resolution config: 1

    While having this mod flashed, the following line means high-resolution mode (panel running at 4k, content is upscaled 2k at 60fps) is enabled:
    Code:
    11-11 18:56:56.725  1475  1761 D SDM     : HWCDisplay::SetActiveConfigWithConstraints: Setting to a high resolution config: 0


    Requirements:
    - Sony Xperia 1 IV running on A13, with at unlocked bootloader
    - fastboot method does not require root
    - method via kernel managers does require root
    - backup your current dtbo.img or make sure you have a copy of the same (EXKM can backup dtbo.img, or you can grab it from xperifirm)

    Installation:

    1. Download the attached newdtbo.img
    Please note: This mod is made for Android 13 firmware, it will not work on Android 12 firmware

    2. Do either 2a
    or 2b!

    2.a Boot to fastboot and flash via:

    Code:
    fastboot flash dtbo newdtbo.img


    2.b Flash newdtbo.img via EXKM or any app that allows flashing dtbo.img

    3. reboot
    2
    No Bootloader unlock needed. Still.

    service call SurfaceFlinger 1035 i32 x
    (x=0,1,2,3)

    1. 1096x2560x60x397132cmd
    2. 1644x3840x120x397108cmd
    3. 1644x3840x60x397108cmd
    4. 1096x2560x120x397132cmd

    Google changed the behavior for native Resolution switches in the Android Settings. Just like Samsung has it since YEARS. Thanks for the alternative tho
    2
    Just flashed it and it seems to work pretty well so far, can notice a slight difference in sharpness of text and stuff with the new dtbo image flashed vs stock, only side effect was the boot animation being corrupted but it's fine once booted into Android.

    A question though, should this be safe to flash for future Android 13-based firmware versions? Or is this specific to only the initial Android 13 firmware? (64.1.A.0.851)
    Figured out a more elegant method that doesn't corrupt the boot animation and should work on any future firmware updates. Simply flash this Magisk Module, which contains the commands that @Miustone provided. Yes, this does still require a bootloader unlock as you are only able to apply this command with root privileges or a Magisk script.

    You should also be able to use this on other devices as well running Android 12 or newer, by following these steps to edit the Magisk module .zip provided:

    Just run:
    Code:
    adb shell
    Code:
    su
    Code:
    dumpsys SurfaceFlinger | grep hwcId
    Pick your id number according to resolution/refresh rate you desire from the list.
    Here is an example output from Xperia 1 IV:
    Code:
    {id=0, hwcId=0, resolution=1096x2560, refreshRate=60.00 Hz, dpi=428.28x427.79, group=0}
    {id=1, hwcId=1, resolution=1096x2560, refreshRate=120.00 Hz, dpi=428.28x427.79, group=0}
    {id=2, hwcId=2, resolution=1644x3840, refreshRate=60.00 Hz, dpi=642.42x641.68, group=0}
    {id=3, hwcId=3, resolution=1644x3840, refreshRate=120.00 Hz, dpi=642.42x641.68, group=0}
    Edit the service.sh file inside the Magisk module zip
    Code:
    service call SurfaceFlinger 1035 i32 3
    At this line, replace the number at the end with the id number you grabbed from the earlier adb commands
    1
    Just flashed it and it seems to work pretty well so far, can notice a slight difference in sharpness of text and stuff with the new dtbo image flashed vs stock, only side effect was the boot animation being corrupted but it's fine once booted into Android.

    A question though, should this be safe to flash for future Android 13-based firmware versions? Or is this specific to only the initial Android 13 firmware? (64.1.A.0.851)
    Yes, boot animation can get scrambled up indeed.

    It depends on changes done to future firmware updates. Can't foresee the future, but it's unlikely there are much changes.
    It's easy to either backup dtbo.img before flashing the modded one or simply reflash Stock extracted from Xperiafirm/unsin tool though.