• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

P9 / Developer options / Smallest width 420dpi persistent after reboot?

Search This thread

ant0nwax

Senior Member
Jan 28, 2008
92
9
Hi friends,

I found a setting for my Huawei P9 (Unlocked, Rebranded and Upgraded AL10 with Oreo, rooted with Magisk) in the Developer options, that should be available anywhere on the last years Android devices.
When you enter the Developer options and scroll down to DRAWING, then at the P9 there is the Smalles width setting that has a default value of 360dpi, which imho is a little bit too big for my taste.

I tried a lot with build.prop and system.prop and did not successfully apply a boot persistent screen width that is different to the 360dpi default

At build.prop and system prop at various locations I tried with:
HTML:
ro.sf.lcd.density=420
hw.lcd.density=420

None of these settings, that are still inside my prop files, have any affect.

I switch my phone off every night, maybe that makes my phone "live" long and prosper :)

so I collected a logcat with a filter for 420 during applying the settings in Developer options (already after reboot), so maybe some lines are missing from the log, that don't contain the 420 but still are important for the setting change to take effect

I share the filtered logs with you and allow me to ask a question:
How could I get those settings automagically applied at each reboot?

Thanks for all kind of discussion about this topic...

HTML:
[08-22 07:38:16.922 9773:20532 D/Settings]
isCurrentDiaplalyModeValid()-->currentModeEx = 420

[08-22 07:38:16.922 9773:20532 D/Settings]
getAdaptedGivenDpiConfigs()-->curDpi = 420,dpiConfigs.size() = 9

[08-22 07:38:41.189 1072:7409 D/HwWindowManagerService]
setForcedDisplay and updateResourceConfiguration, mTempResourceConfiguration is: {0.85 216mcc30mnc [en_US] ldltr sw420dp w420dp h573dp 411dpi nrml port finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 1080, 1792) nonFullScreen=0 suim:4 s.12}

[08-22 07:38:41.269 1072:1100 I/ActivityManager]
Config changes=1c00 {0.85 216mcc30mnc [en_US] ldltr sw420dp w420dp h669dp 411dpi nrml port finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 1080, 1792) nonFullScreen=0 suim:4 s.13}

[08-22 07:38:41.321 1072:1100 I/ActivityManager]
Override config changes=1c00 {0.85 216mcc30mnc [en_US] ldltr sw420dp w420dp h669dp 411dpi nrml port finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 1080, 1792) nonFullScreen=0 suim:4 s.13} for displayId=0

[08-22 07:38:41.820 1350:1350 W/GoogleInputMethod]
onConfigurationChanged() : NewConfig = {0.85 216mcc30mnc [en_US] ldltr sw420dp w420dp h669dp 411dpi nrml port finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 1080, 1792) nonFullScreen=0 suim:4 s.13}

[08-22 07:38:42.009 1350:1350 I/ConfigNotification]
Get device mode by ui mode:1 and smallestScreenWidthDp:420

[08-22 07:38:42.010 1350:1350 I/ConfigNotification]
Get device mode by ui mode:1 and smallestScreenWidthDp:420

[08-22 07:38:44.790 1072:3020 I/ActivityManager]
Config changes=400 {0.85 216mcc30mnc [en_US] ldltr sw420dp w420dp h667dp 411dpi nrml port finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 1080, 1792) nonFullScreen=0 suim:4 s.14}

[08-22 07:38:44.806 1072:3020 I/ActivityManager]
Override config changes=400 {0.85 216mcc30mnc [en_US] ldltr sw420dp w420dp h667dp 411dpi nrml port finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 1080, 1792) nonFullScreen=0 suim:4 s.14} for displayId=0

[08-22 07:38:44.896 1350:1350 W/GoogleInputMethod]
onConfigurationChanged() : NewConfig = {0.85 216mcc30mnc [en_US] ldltr sw420dp w420dp h667dp 411dpi nrml port finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 1080, 1792) nonFullScreen=0 suim:4 s.14}

[08-22 07:38:44.912 1350:1350 I/ConfigNotification]
Get device mode by ui mode:1 and smallestScreenWidthDp:420

[08-22 07:38:44.912 1350:1350 I/ConfigNotification]
Get device mode by ui mode:1 and smallestScreenWidthDp:420
 
Last edited:
  • Like
Reactions: zgfg

ant0nwax

Senior Member
Jan 28, 2008
92
9
This settings i did not find in Magisk, not at Modules, not at settings, so i tried Kernel Auditor init.d, just the script i added and saved and worked in Kernel Auditor init.d does not stay there after reboot, it disappears.

so any idea if i have mixplorer in which file i could try to insert the wm density 411 line ?

thx
 

lo_ol

Senior Member
Mar 15, 2013
56
18
Create a script in /sbin/.magisk/modules/.core/service.d
#!/system/bin/sh
sleep 30
wm density 411
And set permissions to 755
If it still gets executed too early, increase sleep 30 to 40 or 60 etc. It'll work eventually
 
  • Like
Reactions: ant0nwax

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hi friends,

    I found a setting for my Huawei P9 (Unlocked, Rebranded and Upgraded AL10 with Oreo, rooted with Magisk) in the Developer options, that should be available anywhere on the last years Android devices.
    When you enter the Developer options and scroll down to DRAWING, then at the P9 there is the Smalles width setting that has a default value of 360dpi, which imho is a little bit too big for my taste.

    I tried a lot with build.prop and system.prop and did not successfully apply a boot persistent screen width that is different to the 360dpi default

    At build.prop and system prop at various locations I tried with:
    HTML:
    ro.sf.lcd.density=420
    hw.lcd.density=420

    None of these settings, that are still inside my prop files, have any affect.

    I switch my phone off every night, maybe that makes my phone "live" long and prosper :)

    so I collected a logcat with a filter for 420 during applying the settings in Developer options (already after reboot), so maybe some lines are missing from the log, that don't contain the 420 but still are important for the setting change to take effect

    I share the filtered logs with you and allow me to ask a question:
    How could I get those settings automagically applied at each reboot?

    Thanks for all kind of discussion about this topic...

    HTML:
    [08-22 07:38:16.922 9773:20532 D/Settings]
    isCurrentDiaplalyModeValid()-->currentModeEx = 420
    
    [08-22 07:38:16.922 9773:20532 D/Settings]
    getAdaptedGivenDpiConfigs()-->curDpi = 420,dpiConfigs.size() = 9
    
    [08-22 07:38:41.189 1072:7409 D/HwWindowManagerService]
    setForcedDisplay and updateResourceConfiguration, mTempResourceConfiguration is: {0.85 216mcc30mnc [en_US] ldltr sw420dp w420dp h573dp 411dpi nrml port finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 1080, 1792) nonFullScreen=0 suim:4 s.12}
    
    [08-22 07:38:41.269 1072:1100 I/ActivityManager]
    Config changes=1c00 {0.85 216mcc30mnc [en_US] ldltr sw420dp w420dp h669dp 411dpi nrml port finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 1080, 1792) nonFullScreen=0 suim:4 s.13}
    
    [08-22 07:38:41.321 1072:1100 I/ActivityManager]
    Override config changes=1c00 {0.85 216mcc30mnc [en_US] ldltr sw420dp w420dp h669dp 411dpi nrml port finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 1080, 1792) nonFullScreen=0 suim:4 s.13} for displayId=0
    
    [08-22 07:38:41.820 1350:1350 W/GoogleInputMethod]
    onConfigurationChanged() : NewConfig = {0.85 216mcc30mnc [en_US] ldltr sw420dp w420dp h669dp 411dpi nrml port finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 1080, 1792) nonFullScreen=0 suim:4 s.13}
    
    [08-22 07:38:42.009 1350:1350 I/ConfigNotification]
    Get device mode by ui mode:1 and smallestScreenWidthDp:420
    
    [08-22 07:38:42.010 1350:1350 I/ConfigNotification]
    Get device mode by ui mode:1 and smallestScreenWidthDp:420
    
    [08-22 07:38:44.790 1072:3020 I/ActivityManager]
    Config changes=400 {0.85 216mcc30mnc [en_US] ldltr sw420dp w420dp h667dp 411dpi nrml port finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 1080, 1792) nonFullScreen=0 suim:4 s.14}
    
    [08-22 07:38:44.806 1072:3020 I/ActivityManager]
    Override config changes=400 {0.85 216mcc30mnc [en_US] ldltr sw420dp w420dp h667dp 411dpi nrml port finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 1080, 1792) nonFullScreen=0 suim:4 s.14} for displayId=0
    
    [08-22 07:38:44.896 1350:1350 W/GoogleInputMethod]
    onConfigurationChanged() : NewConfig = {0.85 216mcc30mnc [en_US] ldltr sw420dp w420dp h667dp 411dpi nrml port finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 1080, 1792) nonFullScreen=0 suim:4 s.14}
    
    [08-22 07:38:44.912 1350:1350 I/ConfigNotification]
    Get device mode by ui mode:1 and smallestScreenWidthDp:420
    
    [08-22 07:38:44.912 1350:1350 I/ConfigNotification]
    Get device mode by ui mode:1 and smallestScreenWidthDp:420
    1
    sleep 30
    wm density 411
    in a magisk service.d script should do
    1
    Create a script in /sbin/.magisk/modules/.core/service.d
    #!/system/bin/sh
    sleep 30
    wm density 411
    And set permissions to 755
    If it still gets executed too early, increase sleep 30 to 40 or 60 etc. It'll work eventually