Scale entire display down a couple pixels due to replacement screen?
There's a command called wm window manager, which can basically set the screen density, size and overlay. Now, to make sure if you have wm binary on your device, try opening a shell(android terminal or an adb shell) and then try typing wm. If it shows a bunch of helpful stuffs, then good news, you have that and probably can use it. Now, in your case, since things go out of screen limits, it's probably the screen size that needs to be customized here. Now before jumping into the main command, try seeing the screen ratio of your device first. Type wm size and it'll show your screen resolution. Now, for eg, if it says 800x480. You need to shrink the size a bit and adjust until you find the correct ratio, for eg to decrease, type in wm size 790x450, to resize the window resolution.
Now, just before applying all of these, if you're planning to do this from your Android terminal, you'll need root privillege, since for the moment you have no root privillege, adb shell could most definitely work. Hopefully this helps (: If you don't happen to have wm binary by any chance, maybe installing busybox would be a better idea.
This post might be helpful as well
https://stackoverflow.com/questions/18500611/android-how-to-use-adb-shell-wm-to-simulate-other-devices