How to enable USB debugging via TWRP in MIUI (Poci F1) ? - Xiaomi Poco F1 Questions & Answers

The title says it all.
Already tried:
I tried to pull build.prop and default.prop from the phone and edit them to enable debugging but that results in a bootloop. Also tried another method which requires to unpack a boot.img and edit files in the ramdisk but the ramdisk folder is empty after unpacking boot.img.
Why ?
Ans. I messed up my resolution and DPI and i think i can reset it via adb shell.
Thread here :
https://forum.xda-developers.com/poco-f1/help/help-messed-screen-resolution-dpi-t3945921

Try this:
Pull the file "settings_global.xml" from "/data/system/users/0/"
Search for attribute "development_settings_enabled" and change the "value" and "defaultValue" to 1.
Search for the attribute "adb_enabled" and change the "value" and "defaultValue" to 1.
It should enable the USB Debugging.

gaurav.5125 said:
Try this:
Pull the file "settings_global.xml" from "/data/system/users/0/"
Search for attribute "development_settings_enabled" and change the "value" and "defaultValue" to 1.
Search for the attribute "adb_enabled" and change the "value" and "defaultValue" to 1.
It should enable the USB Debugging.
Click to expand...
Click to collapse
Edited and Replaced the file as per your suggestions but adb isn't still enabled on boot. Also, when i pulled the file back, only the "development_settings_enabled" attribute had stick to "1" whereas "adb_enabled" was still "0"
Any more suggestions as to how to enable it ?
or do you know where the display size and density settings reside in the form of a file so that i can replace them with the correct one .
Fyi i need to enable adb t reset display size and density .
More info here:
https://forum.xda-developers.com/poco-f1/help/help-messed-screen-resolution-dpi-t3945921
I am in real distress. I don't want to lose my apps and settings :crying::crying:

MasterFURQAN said:
Fyi i need to enable adb t reset display size and density .
Click to expand...
Click to collapse
Try this:
Pull the file "settings_secure.xml" from "/data/system/users/0/" and change the value and default vaule for the attribute "display_density_forced" to 375

gaurav.5125 said:
Try this:
Pull the file "settings_secure.xml" from "/data/system/users/0/" and change the value and default vaule for the attribute "display_density_forced" to 375
Click to expand...
Click to collapse
I don't know what I did but I somehow made it work. I was about to give up when I accidentally restored back the nandroid backup and I thought "I might as well give it a last shot". I did a lot of things including copying some of the props and XML files and many more things and it booted without any problems except that it wasn't accepting my lockscreen password which is quite easy to fix. Thanks to you for bearing this with me.
After all of this, I think it isn't possible to enable USB debugging via recovery (or by editing props) on MIUI or maybe it's because I'm still encrypted.

Related

Edit settings.db and replacing into file system

Hello guys
I need your help, i'm working on a mod and a friend said me to modify the file: settings.db located in data/data/com.android.providers.settings/databases/settings.db
I only have to change "1" to "0" in the "secure" tab
for this I used Sql Lite browser for windows 7.
So i did it and saved the database, and then with root explorer replaced with the original settings.db but ....
I entered in a boot loop, why ?
I know for sure the "0" is a secure value, because used in a stock old rom
Why bootloop so? Have I to changed permissions to file?
Can please help me to do it without a new bootloop?
Thanks
hello
please i need to know if to change the permissions like that of original file prevent me to enter in a boot loop.
Noone have never edited settings.db file and replaced it?
If i am in wrong section, please, move the thread in the correct one.
I've done it before to modify wifi timeout. Here's the instructions I used:
http://forum.xda-developers.com/showthread.php?t=774507
polobunny said:
I've done it before to modify wifi timeout. Here's the instructions I used:
http://forum.xda-developers.com/showthread.php?t=774507
Click to expand...
Click to collapse
Did you change file permissions?
maRRRco89 said:
hello
please i need to know if to change the permissions like that of original file prevent me to enter in a boot loop.
Noone have never edited settings.db file and replaced it?
If i am in wrong section, please, move the thread in the correct one.
Click to expand...
Click to collapse
I bet you replaced the settings.db file with the edited version using ADB? If so you likely stamped the file with shell as the owner... This might have been the problem if the original file had different permissions / owner.
polobunny said:
I've done it before to modify wifi timeout. Here's the instructions I used:
http://forum.xda-developers.com/showthread.php?t=774507
Click to expand...
Click to collapse
THX
I have to crack the password for 9650108725

[Q] How do I fix this

I edited the build.prob file change lcd density to 720. now I can't access phone
If you know how to use adb, and have USB Debugging or a custom recovery set up, you might be able to pull the build.prop, edit it on your computer, push it back, change permissions, and reboot to resolve. You aren't able to access your apps or anything like that, I suppose?
es0tericcha0s said:
If you know how to use adb, and have USB Debugging or a custom recovery set up, you might be able to pull the build.prop, edit it on your computer, push it back, change permissions, and reboot to resolve. You aren't able to access your apps or anything like that, I suppose?
Click to expand...
Click to collapse
Am try to that, using DroidExplorer but after editng the build.prop the changes are not being saved. I thing usb debugging mode is disabled and I cant access anything in my phone. my device doesnt show in" fastboot devices"command when I use the ADB
fastboot devices only works in fastboot/bootloader mode and adb works when booted (with USB Debugging enabled) or via most custom recoveries. Did you install a custom recovery or just root? If just root, it might just be easier to return the device to stock and reroot.
3CPO_R2D2 said:
I edited the build.prob file change lcd density to 720. now I can't access phone
Click to expand...
Click to collapse
If you are running any custom rom..extract that zip...copy that build.prop to sd card...now using Root Explorer on your phone copy it and head on to /system...delete the build.prop and paste the new one..and Reboot.
P.S.:Remember to Mount R/W before pasting it.
theprakhar said:
If you are running any custom rom..extract that zip...copy that build.prop to sd card...now using Root Explorer on your phone copy it and head on to /system...delete the build.prop and paste the new one..and Reboot.
P.S.:Remember to Mount R/W before pasting it.
Click to expand...
Click to collapse
Don't think he can use his phone well enough to make that work. according to the way the pictures look, which is why I didn't suggest that one. All apps are going to be like that and it's not something you can scroll around in like you would if you zoomed in on the browser or something similar.
es0tericcha0s said:
Don't think he can use his phone well enough to make that work. according to the way the pictures look, which is why I didn't suggest that one. All apps are going to be like that and it's not something you can scroll around in like you would if you zoomed in on the browser or something similar.
Click to expand...
Click to collapse
Opz..my bad...i forgot that this is only his problem......yup...but still one other option left...he can install the zip of the rom which he is currently using WITHOUT formatting or wiping...just over-writing...It might work..

[Q] Change a system setting missing from the UI directly?

I have a Lenovo S939 (Android 4.2.2, rooted) and the setting to change the default notification sound is missing. Is there a good app that can be used to browse all system settings and make changes directly (something like regedit in Windows)? Or can this setting be changed in the file system by editing some preferences file? If so, how can I find it?
James Bond 007 said:
I have a Lenovo S939 (Android 4.2.2, rooted) and the setting to change the default notification sound is missing. Is there a good app that can be used to browse all system settings and make changes directly (something like regedit in Windows)? Or can this setting be changed in the file system by editing some preferences file? If so, how can I find it?
Click to expand...
Click to collapse
No settings to change that? That's crazy...I've worked on 100s of phones and have never seen that... But the build.prop found in /system typically has the "code" that points to which file to use for the default sounds.
Thanks, checked the file and found this line: ro.config.notification_sound=HeavenNearby.ogg
If changed, will this be picked up on reboot?
James Bond 007 said:
Thanks, checked the file and found this line: ro.config.notification_sound=HeavenNearby.ogg
If changed, will this be picked up on reboot?
Click to expand...
Click to collapse
Yes. Make sure to make a backup of your build.prop first and that the permissions are still 0644 before you reboot or you'll have to restore the entire phone.
I have changed it to another sound file in the same directory and rebooted, but the sound stayed the same, unfortunately.
Edit: I have "fixed" it by copying the desired sound file over the default one.

Tethering[mod] "build prop edit"vs985

hello fellow xda junkies!
HERE IS A SIMPLE WAY TO GET DATA TETHERING THROUGH BUILD.PROP EDIT
NOTE:MESSING WITH BUILD.PROP COULD MESS YOUR PHONE UP BE CAREFUL
Step 1.) download a text editor.i suggest 920 text editor.
Step 2.) you will also need an root explorer so download that also.
Step 3).open up your root explorer and navigate to system/build.prop. and copy that file to another directory. i.e example sdcard/download.then rename
original build.prop file to build.prop.bak
Step 4).open up your text editor and navigate to the directory where you copied the build.prop file
Step 5.)look for this line [they are both close to the end of the build.prop file] "net.tethering.nonprovisioning=true" [once you find it change the true
to false] so it reads "net.tethering.nonprovisioning=false" NOTEDO NOT TYPE THE QUOTATION MARKS!!!
Step 6.) " look for line "persist.data.tethering_oc=1" change the variable 1 to 0 so it reads "persist.data.tethering_oc=0
Step 7.) move the build.prop file that you copied and edited from location you placed it in to its rightful spot in system/.change permissions to rw--r--r
reboot phone and your good to go!works on my vs985 LIKE A CHAMP.
deathsquad737 said:
hello fellow xda junkies!
HERE IS A SIMPLE WAY TO GET DATA TETHERING THROUGH BUILD.PROP EDIT
NOTE:MESSING WITH BUILD.PROP COULD MESS YOUR PHONE UP BE CAREFUL
Step 1.) download a text editor.i suggest 920 text editor.
Step 2.) you will also need an root explorer so download that also.
Step 3).open up your root explorer and navigate to system/build.prop. and copy that file to another directory. i.e example sdcard/download.then rename
original build.prop file to build.prop.bak
Step 4).open up your text editor and navigate to the directory where you copied the build.prop file
Step 5.)look for this line [they are both close to the end of the build.prop file] "net.tethering.nonprovisioning=true" [once you find it change the true
to false] so it reads "net.tethering.nonprovisioning=false" NOTEDO NOT TYPE THE QUOTATION MARKS!!!
Step 6.) " look for line "persist.data.tethering_oc=1" change the variable 1 to 0 so it reads "persist.data.tethering_oc=0
Step 7.) move the build.prop file that you copied and edited from location you placed it in to its rightful spot in system/.change permissions to rw--r--r
reboot phone and your good to go!works on my vs985 LIKE A CHAMP.
Click to expand...
Click to collapse
You know there is already a flash for this and an apk.
Yes i do know this but some like to do it on there own.but hey nice to meet ya!
deathsquad737 said:
Yes i do know this but some like to do it on there own.but hey nice to meet ya!
Click to expand...
Click to collapse
Just checking.
I'm a tinkerer also which is how I figured out the thermal throttling.
Nice to met you.
tech_head said:
Just checking.
I'm a tinkerer also which is how I figured out the thermal throttling.
Nice to met you.
Click to expand...
Click to collapse
Thermal daemon mitigation?is that what you are referring too?
A.L.B/E.B.B
deathsquad737 said:
Thermal daemon mitigation?is that what you are referring too?
A.L.B/E.B.B
Click to expand...
Click to collapse
Actually not.
Instead of trying to stop the thermal mitigation from working I did just the opposite, I changed the parameters on how it operates.
The file /system/etc/thermal-engine-8974.conf.
This file controls what happens to cpu speed at various temperatures.
That is what you tweak and it just works.
I also used ROM Toolbox to change the governor.
tech_head said:
Actually not.
Instead of trying to stop the thermal mitigation from working I did just the opposite, I changed the parameters on how it operates.
The file /system/etc/thermal-engine-8974.conf.
This file controls what happens to cpu speed at various temperatures.
That is what you tweak and it just works.
I also used ROM Toolbox to change the governor.
Click to expand...
Click to collapse
Wow that's heavy I don't know if I have a high enough pay grade to do that lol
A.L.B/E.B.B
deathsquad737 said:
Wow that's heavy I don't know if I have a high enough pay grade to do that lol
A.L.B/E.B.B
Click to expand...
Click to collapse
I can always get you a copy of the file.
tech_head said:
I can always get you a copy of the file.
Click to expand...
Click to collapse
Yes please I pm you
A.L.B/E.B.B
Thank you but...
First of all, thanks for the post. Although I appreciate the helpful post, my phone is now stuck in boot loop . I hate to be the one to open up an old thread but I'm freaking out at the moment due to brick fever :crying: My current setup was a rooted LG G3 VS98512b. My goal was simple, I didn't want to do anything crazy, I just wanted to enable wifi tether now I'm afraid I've lost everything... Is there a way I can get back into the storage of my phone and delete the modified build.prop, remove the ".bak" from the original and be back to the good life? Any assistance is greatly appreciated, this seemed like such a simple modification that led to such a big headache.
It sounds like you might have used an editor on your build.prop that could not handle the file size, resulting in your editted build.prop being truncated. Otherwise, maybe your permissions were left wrong. Either of these will cause your phone to bootloop.
Sent from my VS985 4G using Tapatalk
trent999 said:
It sounds like you might have used an editor on your build.prop that could not handle the file size, resulting in your editted build.prop being truncated. Otherwise, maybe your permissions were left wrong. Either of these will cause your phone to bootloop.
Sent from my VS985 4G using Tapatalk
Click to expand...
Click to collapse
Thanks for the reply. I used the editor recommended in the tutorial, 920 text editor. I followed the instructions word for word, I don't know what the problem is. Maybe its because I have the newest update and this mod was for 10b???As far as the permissions, the phone asked automatically if I wanted to change the permissions. The original build.prop is still there... is there a way I can delete the modified build.prop and replace it with the original? I really wish I would not have followed this tut, it didn't seem like a popular method. There has to be a way to delete the modified build.prop right?
soundmasterx said:
Thanks for the reply. I used the editor recommended in the tutorial, 920 text editor. I followed the instructions word for word, I don't know what the problem is. Maybe its because I have the newest update and this mod was for 10b???As far as the permissions, the phone asked automatically if I wanted to change the permissions. The original build.prop is still there... is there a way I can delete the modified build.prop and replace it with the original? I really wish I would not have followed this tut, it didn't seem like a popular method. There has to be a way to delete the modified build.prop right?
Click to expand...
Click to collapse
Yes you can reflash the firmware or if you don;t want to restore to stock you can use ADB to fix the files and restore your .bak
Digital_MD said:
Yes you can reflash the firmware or if you don;t want to restore to stock you can use ADB to fix the files and restore your .bak
Click to expand...
Click to collapse
Again, thank you for the response. Do you recommend a specific method or tutorial for trying restore the original build.prop? I did search however, because this scenario is so specific I'm not sure there is an exact solution to my problem.
Again, just in case someone else can chime in, I followed the instructions on the first post of this thread (see first post for detailed info). I copied the original build.prop then changed the name of the original build.prop, edited the copy, moved it to the original directory and restarted the phone. Now my phone doesn't make it to the Verizon screen (I think it is stuck in boot loop), the screen stays black and the small led on the left corner flashes blue and green. If I can just get access to the storage I can replace the modified build.prop with the original that is still in the same directory just renamed. It seems like such an easy task but, I just don't know how to go about it I'm a somewhat of an old school tinker, I'm just now getting back into the swing of Android... Thanks in advance!!
Bump
Bump please
This is crazy... I changed 2 values in build.prop for tethering and my phone wont boot now... I didnt install a ROM, change DPI, or make any major changes WTF???
Do you have a custom recovery (twrp)?
Can you connect to your phone with adb?
If you have twrp, search the board for the startup hardware key sequence to reach twrp, else from adb do a reboot recovery.
In twrp, you can select to mount system, then go to advanced - file manager. You can delete the bad build.prop, rename the good one, then set the permissions on the good one. If your good copy of build.prop is on a PC, put it on a flash drive, and use twrp's file manager to get it into your phone.
If you have a saved copy of build.prop on your PC, you can also use adb's push command. (You may also want to look at the adb shell command. The sequence might be to open a shell, delete the bad build. prop, get the right build.prop into the right directory, then chmod the right build.prop so it has the proper permissions.)

Hi xda . I need urgent help !

i installed build prop editor and i saw the option change pixel density
i changed it to 360 and i rebooted the phone and when it rebooted i get force closes and i cant do anything on my phone now...
Any help???Any fix without loosing my apps? cuz i dont want to loose my apps... i have some important things in there...
@gabiabrudan7: you only may reduce dpi, lower 320! So try to restore the old build.prop: if there's a bak-file, you can rename it in TWRP's file manager - otherwise use ADB (if there's access from PC) to move build.prop to PC, change it with an editor, which stores in UNIX-format and move back.
rp158 said:
@gabiabrudan7: you only may reduce dpi, lower 320! So try to restore the old build.prop: if there's a bak-file, you can rename it in TWRP's file manager - otherwise use ADB (if there's access from PC) to move build.prop to PC, change it with an editor, which stores in UNIX-format and move back.
Click to expand...
Click to collapse
thanks for the reply but i already fixed it ... i flashed lollipop mirror and i have no problem now!
thanks anyway!

Categories

Resources