Resolution Changer works by using a hidden Android API called IWindowManager. Originally, Google restricted access to this API starting with Android Pie, however, they allowed developers to disable the API blacklist by tweaking a Secure Setting.
Resolution Changer first unlocks the blacklisted APIs, and then applies the requested resolution and display density.
If you do not specify a height or width, Resolution Changer will simply use the resolution that is currently set by the device.
If you do not specify a density, Resolution Changer will try to calculate a suitable density based on the diagonal screen size of the device.
WARNING:
If you specify a broken resolution and are unable to fix it, follow these steps:
1. Connect device to PC
2. Open CMD or Terminal (depending on OS)
3. Type these commands:
adb shell wm size reset
adb shell wm density reset