May be this problem is solved but for future reference I will post this two options
1 - push the original build.prop via adb when on TWRP plug the device to your PC
Open a CMD or a terminal (depends on your OS) Write this commands
adb kill-server
adb root
adb remount
adb push original-build.prop /system/build.prop
Or 2 / you can grab the current build.prop edit the density and then push it back
Commands
adb pull /system/build.prop /path/to/build.prop
Edit the build prop and then push it back
adb kill-server
adb root
adb remount
adb push edited-build.prop /system/build.prop