[Xiaomi Poco F3 / Xiaomi Mi 11X / Redmi K40] Johnn78:
Hello. I was using some resolution changer app (https://play.google.com/store/apps/details?id=com.draco.resolutionchanger&hl=en_US) to my Poco F3 to change resolution so that in mirroring in my TV to be in Full screen. In the latest time, I wrote by mistake the 1920 as value in the resolution & in DPI field instead only to resolution & I apllied it (default values is 440 in DPI). Then the mobile's screen was frozen and after restarting (this value is NOT reverted automatically to default value after rebooting) will stuck in logo of MIUI and after bootloop in normal mode, or if I make safe-mode from default recovery (no custom recovery) which has it as option, it appears only homescreen without any app (due to high value of DPI - density) and can't do anything.

This is the problem. To refer that my Poco F3 is rooted with unlocked bootloader and as recovery has TWRP installed. I have read many solutions but none of them worked. I have tried the below methods:

1st Printscreen (it can boot ONLY in Safe Mode & appear as enlarge a small piece of normal homescreen)

1. I tried via ADB to run the below commands "adb shell wm size reset adb shell wm density reset" and all other variations like "adb shell wm density reset" or "wm density reset" but returns error. I want to note the below. In boatloader when I run the "Adb devices" then in list supported devices it doesn't show any device. All the "Adb shell..." coammnds return error "no device/emulator error" and the "wm..." commands return as error " 'vw' is not recognised as an internal or external commands". The same happens if instead CMD, I use Powershell. Does this mean that the USB-debugging option from developers options is NOT enabled & for this reason my device is not recognised ? I remember that this option was enabled before the problem with high DPI value occured but I don't know if the dirty-flash rom which I have done, reverts the option usb-debugging to disabled & if it exists any method to check or to enable the usb-debugging option.

If I go in terminal of twrp then ALL the adb commands like adb devices, adb shell... etc.. & vw commands gives error adb/vw: inassesible or not found but the getprop (which return the build.prop file) works properly.

If I am in twrp (no in terminal) & I use the ADB of pc then the "adb devices" command detects my mobile in listed of devices and also works the "Adb shell..." commands but the "vw..." commands (which is to revert the DPI to default) appears the "/system/bin/sh: wm: not found". Tell me if someone knows that if this command is for running it when mobile is in normal boot or in bootloader or in twrp. As I understand the TWRP (recovery) works better than boatloader in adb comannds because works overmore the "ADB Shell..." commands. Someone wrote that had also "/system/bin/sh: wm: not found" and tried the "adb shell am display-density 440" but didn't work for me. I don't know if for Poco F3 is some other related command.

2. other method which I have tried is to find the appropriate file which the system reads the Resolution & the DPI (density) so that to revert them to default value. Many writes to find build.prop file on System path & it will exists something like "ro.sf.lcd_density=1920" & by editing to make in default value (440). I found many build.prop files but not one of them was on system path. The main build.prop file may be on Vendor path but not any build.prop file has the "ro.sf.lcd_density" to change it or something related with density or resolution. For this reason I edit the build.prop file (Vednor path) & in beginning I added the "ro.sf.lcd_density=440" (for fixing DPI) & "persist.sys.display-size=1080x2400" (for fixing resolution) but after rebooting, the mobiles boots only to boatloader (either I was trying to boot in recovery or normal boot all direct to bootloader). I want to refer two things which I don't know if they causes the problem to boot only in boatloader. I edited the build.prop file via TWRP while in forums say to edit this file via pc & at the end to make chmod/chmod 644/chmod 755 command to the build.prop file and after to place it on the mobile. Althought the TWRP has chmod & chmod 755 option, I didn't make any of them because if I have understand well, the chmod commands are related with the permission of file & is needed only if you encourate problem in saving the changes (correct me if I am wrong). The second thing is that while I added the "ro.sf.lcd_density=440" & "persist.sys.display-size=1080x2400" when I opened the file again before making the final reboot then the resolution command was as I have added but the denisty command has been made "ro.sf.lcd_density=400nano "/vendor/build.prop" " and has added another one line with " nano "/vendor/build.prop" ". I don't know if these two things causes the booting only to boatloader.

Futhermore, except from build.prop file, I have read that in /data/system/users/0 exist the settings_global.xml file in which you can edit & change the "display_size_forced" (for resolution) and also in settings_secure.xml, you can edit & change the "display_density_forced" (for DPI). In first file, I can find the "display_size_forced" & if I change its value then the resolution changes (it works!) but in second file doesn't exist the "display_density_forced" to change it (also I tried it to add it manually without any result. For this case I mind the below & I don't know if it will be correct or not. My default resolution is 1080x2400 with DPI 440 but the current resolution is 1080x1920 with DPI 1920 while I have found only way to change the resolution. Also if I flash the default recovery (No Twrp) then via Safe Mode (I don't know if it exists and as ADB command the Safe Mode) I can boot (printscreen) but not any app is appeared because is very enlarge (440 DPI -> 1920 DPI). If I enlarge accordingly and the resolution so that to keep the default ratio between Resoluion/DPI then can the homescreen to be FULL SCREEN (it may have a very small icons due to high resolution) as result to install again the Resolution Changer & at this time to put the corrects values or I will mess up worse my mobile ? I forgot to say that via TWRP I have unistalled the Resolution Changer with its data but didn't fix the problem. Also, may anyone know which system file is that which keep the DPI so that to change it ?

3. The last method which I have tried, is to make dirty flash rom but didn't fix the issue. 2-3 times my flashing didn't completed sucessfully by apearing errors like "error flash timeout 1424" (due to getting over 700 secs) or "flash super error - FAILED..." as result to boot only in fastboot mode (2nd printscreen) but fortunately I managed to make it as it was before via new dirty-flashing (with operational boatloader & recovery but with bootloop in normal boot). I tried and the TWRP Rom flashing & via "MiFlash20220507" but none of them fixed the issue of DPI. I have read from other similar situation that if I make clean flash then it will fix the problem. But what is the different between dirty & clean flash ? According with *.bat file, the clean flash except from locking boatloader, it wipes the userdata partiton. May the userdata partition NOT keep only our personal files but has and system files ? To note that I have already got my personal files to my pc but I don't want to proceed in full format because I will need to install all my apps from the beginning. I think that the the personal data & the installed apps are saved in different Partition. The personal data may be in Data partition (userdata.img) and the installed apps are saved to the Internal Storage (correct me if I make any mistake).

ANY KIND SOLUTION IS ACCEPTABLE ! ! !