[APP]ResUI Resolution Changer

YayYouFixedIt

Senior Member
Nov 21, 2012
538
66
0
APP FOR 4.3+ ONLY

I put together this app to easily switch between 3 resolution modes. Optionally hit the backup button to copy to /sdcard/tmp

For each mode it just runs a script like this.

#!/system/bin/sh
wm size 1920x1200
wm density 240
# mounting system as rw
mount -o remount,rw /system
export DENSITY=`cat /system/build.prop|grep ro.sf.lcd_density`
sed -i s/$DENSITY/ro.sf.lcd_density=240/g /system/build.prop
mount -o remount,ro /system

its replaces the line in the build.prop so things like the keyboard scale properly. Let me know if it doesnt work. Just hit the reboot button after you change it. USE AT YOUR OWN RISK.

https://www.dropbox.com/s/mvtn50s0mrxplcu/ResUI.apk
https://github.com/YayYouFixedIt/resui
 
Last edited:

AngryDinosaur

Senior Member
Jan 23, 2011
2,174
478
0
Boston
if you are not on 4.3 this will not work for you i believe.

the wm command is specifically for 4.3+. forgot what 4.1 uses i think its am command

---------- Post added at 10:35 PM ---------- Previous post was at 10:34 PM ----------

dpi doesnt change for 1280x720? swiftkey doest scale correctly on 720p.

---------- Post added at 10:49 PM ---------- Previous post was at 10:35 PM ----------

ya DPI doesnt change, it stays at 240, which will be look big for 1600P or too small for 720P
 

sbdags

Inactive Recognized Contributor
Jun 24, 2007
12,753
15,556
0
Kenilworth, Coventry
if you are not on 4.3 this will not work for you i believe.

the wm command is specifically for 4.3+. forgot what 4.1 uses i think its am command

---------- Post added at 10:35 PM ---------- Previous post was at 10:34 PM ----------

dpi doesnt change for 1280x720? swiftkey doest scale correctly on 720p.

---------- Post added at 10:49 PM ---------- Previous post was at 10:35 PM ----------

ya DPI doesnt change, it stays at 240, which will be look big for 1600P or too small for 720P
I'm pretty sure wm ignores the build.prop DPI value. It does on mine anyway. It saves its setting to dB in /data/data somewhere. com.android.preferences/ inside that I think.
 
  • Like
Reactions: AngryDinosaur

YayYouFixedIt

Senior Member
Nov 21, 2012
538
66
0
im running cm11 4.4.2 though atm.
It might be that its targeting 4.4.2.
For me that build.prop value has to be changed. Or something else does.
There might be a problem with that apk...ill look at it again.
ill put the source up so you can fix it up and feel free to include it in your rom as a bells and whistles option haha
 
Last edited:
  • Like
Reactions: pelago and sbdags

sbdags

Inactive Recognized Contributor
Jun 24, 2007
12,753
15,556
0
Kenilworth, Coventry
im running cm11 4.4.2 though atm.
It might be that its targeting 4.4.2.
For me that build.prop value has to be changed. Or something else does.
There might be a problem with that apk...ill look at it again.
ill put the source up so you can fix it up and feel free to include it in your rom as a bells and whistles option haha
OK it might be that certain apks use the build.prop to calculate the screen size? Let me look at the source.

Try locking the DPI to 160 once the user gets down to 1280. The way I calculate the DPI is take the length of the screen and divide by 8.

1280 is 160
1600 is 200
1920 is 240
2560 is 320

Etc ;)
 
  • Like
Reactions: YayYouFixedIt

YayYouFixedIt

Senior Member
Nov 21, 2012
538
66
0
can u include a reset script in the app to reset everything to stock settings, and revert build prop line.

Thanks
OK I added backup and restore to the app. Seems to be working.

Backup does this:
#!/system/bin/sh
mkdir -p /sdcard/tmp
cp -f /system/build.prop /sdcard/tmp

Restore does this:
#!/system/bin/sh
wm size 2560x1600
wm density 320
mount -o remount,rw /system
cp -f /sdcard/tmp/build.prop /system/
mount -o remount,ro /system

Let me know if that's not correct
 
Last edited:
  • Like
Reactions: AngryDinosaur

sbdags

Inactive Recognized Contributor
Jun 24, 2007
12,753
15,556
0
Kenilworth, Coventry
OK I added backup and restore to the app. Seems to be working.

Backup does this:
#!/system/bin/sh
mkdir -p /sdcard/tmp
cp -f /system/build.prop /sdcard/tmp

Restore does this:
#!/system/bin/sh
wm size 2560x1600
wm density 320
mount -o remount,rw /system
cp -f /sdcard/tmp/build.prop /system/
mount -o remount,ro /system

Let me know if that's not correct
That's great! I think restore should do this:

wm size reset
wm density reset

;)
 

YayYouFixedIt

Senior Member
Nov 21, 2012
538
66
0
so dies it work with cm 11 or the only custom rom on the forum?
I'm using cm11. It works well. I haven't used it with cromi but it look like it should work fine. I'm using thumb keyboard and it scales fine. The game shadowrun actually looks bigger at the lower resolution. More playable. Characters were too small.
 
Last edited:

YayYouFixedIt

Senior Member
Nov 21, 2012
538
66
0
Is it possible with the tf700 too`? I want to change the resolution to 1.366 x 768 for some experiments
On the nexus 7 2012 I have, the wm command works. You can just modify the app to what you need. What. Itll do if you try to set it to 2560*1600 320 I don't know. If you want to modify the app you just need to:

1. Add a script to the raw folder like the others
2. Add a button to the xml layout
3. Set the button to launch the script it in the apps main activity.