Programmatically Set Minimum Width in Developer Options
4
votes
0
answers
1933
views
How do I programmatically set the
Minimum Width
in Android's Developer Options from Llamalab's Automate app?
I use Your Phone on Windows 10 to view my phone's screen. I maximize the window to get the full size of my monitor. With a minimum width of 1500, the phone is kind of like a tablet. I would like to set the Minimum Width to 1500 when viewing the screen on my monitor and 486 (the default?) when viewing the screen on my phone.
Using the "Settings finder" flow from the Community, it told me the following:
Category: secure
Name: display_density_forced
Value: 188
I then used a System setting set
block in Automate. This threw an exception because Automate does not write permissions.
I connected my phone to my PC via USB and ran the following command to grant write permissions to Automate:
adb shell pm grant com.llamalab.automate android.permission.WRITE_SECURE_SETTINGS
Now the System setting set
block does not throw an exception. However, changing the setting via the block does nothing to the UI.
If I run the following command on my PC, then the UI changes.
adb shell wm density 188
Asked by Nathan
(327 rep)
Sep 29, 2020, 04:48 PM
Last activity: Feb 19, 2024, 09:34 AM
Last activity: Feb 19, 2024, 09:34 AM