Broken display. How to unlock the smartphone and recover the data? - Xiaomi Mi 9 SE Questions & Answers

Hello everyone,
I would like to recover the data from my Xiaomi Mi 9 SE (stock and non-rooted OS), including photos, videos, and email accounts. However, the display is completely broken (it does not display anything) and I cannot access the internal memory through ADB because I cannot unlock the display. Is there a way to unlock it via ADB or other software? In the worst case, can I buy a cheap display (not the original one because it costs about 200 euros) and connect it to the smartphone mainboard? I don't know if there are differences among display connectors or they use a specific standard.
Thanks in advance for any suggestions!

Try using a Usb-C to HDMI adapter to connect it to a Display. But then you need to connect a mouse...maybe there is a single to connect 2 usb devices.I'm not sure

vetaclon said:
Try using a Usb-C to HDMI adapter to connect it to a Display. But then you need to connect a mouse...maybe there is a single to connect 2 usb devices.I'm not sure
Click to expand...
Click to collapse
This is also a good advice, thanks. I will look for a cheap "external" touch display, Thanks!

mcampana said:
Hello everyone,
I would like to recover the data from my Xiaomi Mi 9 SE (stock and non-rooted OS), including photos, videos, and email accounts. However, the display is completely broken (it does not display anything) and I cannot access the internal memory through ADB because I cannot unlock the display. Is there a way to unlock it via ADB or other software? In the worst case, can I buy a cheap display (not the original one because it costs about 200 euros) and connect it to the smartphone mainboard? I don't know if there are differences among display connectors or they use a specific standard.
Thanks in advance for any suggestions!
Click to expand...
Click to collapse
You may try (if you didn't already) to enter unlock pin/password via ADB - didn't test, not sure if it works on MIUI:
https://stackoverflow.com/questions/29072501/how-to-unlock-android-phone-through-adb
Edit: See the next post

mcampana said:
Hello everyone,
I would like to recover the data from my Xiaomi Mi 9 SE (stock and non-rooted OS), including photos, videos, and email accounts. However, the display is completely broken (it does not display anything) and I cannot access the internal memory through ADB because I cannot unlock the display. Is there a way to unlock it via ADB or other software? In the worst case, can I buy a cheap display (not the original one because it costs about 200 euros) and connect it to the smartphone mainboard? I don't know if there are differences among display connectors or they use a specific standard.
Thanks in advance for any suggestions!
Click to expand...
Click to collapse
The following works for me to unlock the screen by ADB, but:
- ADB must be already enabled on the phone
- PC you are using must be already granted ADB
- Phone must be rooted
- ADB must be already granted root access
(Otherwise e.g. Magisk pops up to grant root-access to ADB but screen is still locked and you cannot confirm)
First, verify ADB, enter the shell and su mode
Code:
adb wait-for-device devices
adb shell
su
At this point press Power button (if screen is ok, it would light up).
By the first command you swipe the screen (if screen is ok, you would see popup to enter the unlock pin/pass)
By the second command you enter your unlock pin/password
Code:
input touchscreen swipe 930 880 930 380
input text <your-screen-unlock-pin-password>
At the end, exit su and shell:
Code:
exit
exit
So, I have two SIM cards (both locked by pin) and lock screen (all the same).
Keyevent 66 means Ok.
The following worked for me to unlock the phone on reboot:
Code:
adb wait-for-device devices
adb shell
su
input text 1234
input keyevent 66
input text 1234
input keyevent 66
input touchscreen swipe 930 880 930 380
input text 1234
exit
exit

zgfg said:
The following works for me to unlock the screen by ADB, but:
- ADB must be already enabled on the phone
- PC you are using must be already granted ADB
- Phone must be rooted
- ADB must be already granted root access
(Otherwise e.g. Magisk pops up to grant root-access to ADB but screen is still locked and you cannot confirm)
First, verify ADB, enter the shell and su mode
Code:
adb wait-for-device devices
adb shell
su
At this point press Power button (if screen is ok, it would light up).
By the first command you swipe the screen (if screen is ok, you would see popup to enter the unlock pin/pass)
By the second command you enter your unlock pin/password
Code:
input touchscreen swipe 930 880 930 380
input text <your-screen-unlock-pin-password>
At the end, exit su and shell:
Code:
exit
exit
So, I have two SIM cards (both locked by pin) and lock screen (all the same).
Keyevent 66 means Ok.
The following worked for me to unlock the phone on reboot:
Code:
adb wait-for-device devices
adb shell
su
input text 1234
input keyevent 66
input text 1234
input keyevent 66
input touchscreen swipe 930 880 930 380
input text 1234
exit
exit
Click to expand...
Click to collapse
Thanks but, unfortunately, my phone is not rooted.

mcampana said:
Thanks but, unfortunately, my phone is not rooted.
Click to expand...
Click to collapse
Btw, I just tested on my unrooted Huawei Mate 9 (EMUI 9.1, Android 9) and it works without root, hence without su command
But on Xiaomi (mine is Mi 9T with MIUI 11, Android 10) it requires root and su command
You may try without su command on your Mi 9SE, but probably it won't work without the root and that su command

mcampana said:
This is also a good advice, thanks. I will look for a cheap "external" touch display, Thanks!
Click to expand...
Click to collapse
Did it worked?
I'm having the same problem, broken screen and no image, everything else is fine. But I have unlocked bootloader.
Just delivered an adapter type-c to hdmi+usb, so I can connect to a display and use a mouse. I'll give it a try

Related

[APP] ADB enhanced Putty (replacement for "adb shell" command)

We all know that running "adb shell" from the command line is pretty crap, and when using a latter busybox version which has coloring support it's ultimately crap. One workaround was usually to start a telnet server on the phone, and use putty to connect to that telnet server. Actually there is a more easier way to do that which also works for non rooted phones.
Actually the Android Debug Bridge has a terminal connection feature (roughly speaking), which will be enabled after you connect to the adb server in "0006shell:" mode. You can actually use the putty to connect to this interface always, by setting the following things:
- Turn off line discipline in settings
- Use RAW mode to connect to localhost:5037
- Enter "0012host:transport-usb" (without quotes)
- Enter "0006shell:" (without quotes)
Now you've got a full fledged connection to your device. The main drawback is that it's tedious to repeat the above all the time, so I've made some modifications to the putty binary that adds a new type of connection, called "Adb"
To use the enhanced putty (via USB):
- Select Adb from the connection type list
- Enter "transport-usb" in the host (or any other connection string, check the adb socket interface documentation if you need something else than connecting via usb)
- Enter 5037 as port, if it's not already set there.
- Connect and enjoy (you might also save this connection, so next time you only have to double-click on the settings)
To use this via wireless adb:
- Connect to wireless adb using a command shell: "adb connect IPORT" (substitute ip and port for the real values)
- Enter "transport-any" in the host
- Enter 5037 as port if it's not already set there
- Connect and enjoy
To use this via the android emulator:
- Enter "transport-local" in the host. Everything else is the same
If you have multiple devices (for example multiple devices connected to usb and/or wileressly)
- Enter "transport:serial-number" in the host, where you substitute "serial-number" with the serial of the device you get by using "adb devices". Everything else is the same.
DL and source: http://github.com/sztupy/adbputty/downloads
Thanks
Great job
Love to use putty.
If this do what your say it's good buy adb shell!!
i am using putty for a long time, and i just tried urs, it looks great but i failed to connect coz i'm connecting to 2 devices....
so how can i add the -s param to specify which phone i'm gonna connect?
thx
EDIT: wow!!! i removed one of my devices and connected to it now!! ctrl-U now works!!!! THANK YOU!!!
EDIT2: quick question. if i use a normal putty, where to type in 0012transport-usb and 0006shell: ? i typed them in the term but it closed after 0006shell
Thanks. It works, but any idea how to get the up and down arrow keys to work on Putty? They work on the windows adb shell.
ykk_five said:
i am using putty for a long time, and i just tried urs, it looks great but i failed to connect coz i'm connecting to 2 devices....
so how can i add the -s param to specify which phone i'm gonna connect?
thx
EDIT: wow!!! i removed one of my devices and connected to it now!! ctrl-U now works!!!! THANK YOU!!!
EDIT2: quick question. if i use a normal putty, where to type in 0012transport-usb and 0006shell: ? i typed them in the term but it closed after 0006shell
Click to expand...
Click to collapse
The complete specification is here: http://android.git.kernel.org/?p=pl...T;hb=f41986bbc79055a4feed7266cac5c1b540296daf
This is what you can use:
- transport-any (either usb or local emulator)
- transport-usb (the only usb device)
- transport-local (the only emulator)
- transport:SERIALNUMBER (the concrete device with the appropriate serial number)
so in your case you have to use the latter.
For the second question, you need to ensure that all of the things are present:
- You are using RAW mode (connecting to localhost:5037)
- Line discipline is on "Force OFF" (in the terminal settings dialog)
- You make some pause between writing the two commands
- You don't press enter/backspace or any other key while entering the commands (the easiest way is to write the commands in eg. notepad, copy them, and paste them into putty by pressing ****+RIGHT MOUSE BUTTON)
hardcore said:
Thanks. It works, but any idea how to get the up and down arrow keys to work on Putty? They work on the windows adb shell.
Click to expand...
Click to collapse
The up and down arrow keys were actually handled by cmd.exe, which is non existent in putty. Instead it's now the responsibility of the shell to do the hard work. The included sh in the phone's sotfware (toolbox sh) is mostly useless here, but if you have busybox installed, you might want to run "busybox sh" after connecting (some rooted phones have busybox's sh as default, on them it should work out of the box).
Busybox's sh can not only handle the up and down arrows, but other things like tab completion works too.
sztupy said:
The up and down arrow keys were actually handled by cmd.exe, which is non existent in putty. Instead it's now the responsibility of the shell to do the hard work. The included sh in the phone's sotfware (toolbox sh) is mostly useless here, but if you have busybox installed, you might want to run "busybox sh" after connecting (some rooted phones have busybox's sh as default, on them it should work out of the box).
Busybox's sh can not only handle the up and down arrows, but other things like tab completion works too.
Click to expand...
Click to collapse
Use the ash.
edit:
Btw, thank you for this adb-putty.
sztupy said:
The complete specification is here: http://android.git.kernel.org/?p=pl...T;hb=f41986bbc79055a4feed7266cac5c1b540296daf
This is what you can use:
- transport-any (either usb or local emulator)
- transport-usb (the only usb device)
- transport-local (the only emulator)
- transport:SERIALNUMBER (the concrete device with the appropriate serial number)
so in your case you have to use the latter.
For the second question, you need to ensure that all of the things are present:
- You are using RAW mode (connecting to localhost:5037)
- Line discipline is on "Force OFF" (in the terminal settings dialog)
- You make some pause between writing the two commands
- You don't press enter/backspace or any other key while entering the commands (the easiest way is to write the commands in eg. notepad, copy them, and paste them into putty by pressing ****+RIGHT MOUSE BUTTON)
Click to expand...
Click to collapse
thx for u reply, but all i got in the log:
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2010.10.09 13:10:54 =~=~=~=~=~=~=~=~=~=~=~=
0012transport-usb
0006shell:
FAIL0012device offline (x)
with adb turned on and working
sztupy said:
The up and down arrow keys were actually handled by cmd.exe, which is non existent in putty. Instead it's now the responsibility of the shell to do the hard work. The included sh in the phone's sotfware (toolbox sh) is mostly useless here, but if you have busybox installed, you might want to run "busybox sh" after connecting (some rooted phones have busybox's sh as default, on them it should work out of the box).
Busybox's sh can not only handle the up and down arrows, but other things like tab completion works too.
Click to expand...
Click to collapse
Yes and it will be great if busybox can handle history like linux
ADB over wireless ?
Hi, thanks for your great work
I'm using ADB Wireless
The first step is to connect first with
Code:
adb.exe connect 192.168.6.14:5555
And then the standard procedure
Is it possible for you to include these two phases directly inside Putty ?
So we just have to enter the IP address of the phone and here we go
PS : to disconnect, we have to do
Code:
adb.exe disconnect 192.168.6.14:5555
but that's not an obligation
seems to be a windows/putty problem because adb shell works wonderful on ubuntu with the default shell ...
btw. you can also easily get a sshd (dropbear) running. then you can ssh onto the device over wifi ... i can provide the binary+explanation if anybody is interested.
I'm very interested in that !
Sent from my GT-I9000 using XDA App
virus found
mathieumeuh said:
I'm very interested in that !
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
here is the explanation how to set it up (cyanogenmod wiki):
http://wiki.cyanogenmod.com/index.php?title=Howto:_Connect_to_Device_with_SSH
basically you have to create the keys on your pc and copy them onto the device. then you can connect via key-auth. if you want dropbear to autostart @boot you could add it to playlogos1 ...
and here are the binary's you need (including the missing dropbear-keygen) and a bash binary:
http://www.multiupload.com/B0L9FDQHPB
bash is optional of course but it's very nice to have tab-completion and the other improvements bash offers over sh. to replace sh with bash do the following:
Code:
cp bash /system/bin/
chmod 0755 /system/bin/bash
mv /system/bin/sh /system/bin/sh_OLD
ln -s /system/bin/bash /system/bin/sh
the chmod is really important. i forgot it once and then was unable to get shell access even over adb. was a pain in the ass to fix it again
jodue said:
seems to be a windows/putty problem because adb shell works wonderful on ubuntu with the default shell ...
btw. you can also easily get a sshd (dropbear) running. then you can ssh onto the device over wifi ... i can provide the binary+explanation if anybody is interested.
Click to expand...
Click to collapse
You seem to miss the point of this development. First, your method is mentioned as one of the possible workarounds in the first post. Second you need to have some kind of telnet/ssh server running on the phone, which you don't need, if using adb.
Meanwhile you don't even need a rooted phone or busybox or anything to get this thing working.
The main problem with adb shell under windows, that it uses the standard cmd.exe to run, and uses the standard cmd.exe's "readline" support, which only supports the up and down keys for history (and even that it only supports that within one session).
Putty is mainly the only good (xterm compatible) terminal emulator for windows (msys's or cygwin's rxvt is good too, but "adb shell" was programmed in a way that makes it kinda useless under rxvt too). There are two ways to fix this. One is to make adb.exe more comptible with rxvt, the other is to skip adb.exe entirelly and communicate with the adb server without it. This project utilises the latter.
But what is the advantage compared to "normal" ABD
But what is the advantage compared to "normal" ADB ?
Thank you!
DirkStorck said:
But what is the advantage compared to "normal" ABD
Click to expand...
Click to collapse
It has a real xterm compatible terminal emulator. Is you use busybox >= 1.17.1 you've got coloring, tab completion, resize events, keyboard events (applicatios like vi is working), etc.
This is the reason I recommend a faulty device: without the problems with the SGS the developments would go much slower Thank you for this putty, i have it connecting to the bash. Color coding and keys work perfectly.
Thanks for this Sztupy!
I hated using windows cmd.exe to access a linux shell

What's up with my display?

I purchased a new screen for my X9076 from Ali Express. However, the display is very odd - see pics. Is this an indication of incorrect resolution? I made sure i ordered a 2560x1440 screen. Also, notice the capacitive buttons don't light up.
Thanks in advance.
Try setting the DPI back to 480, 400, or 320, mate.
Tried that via Texdroider DPI, but now my display has disappeared altogether! So the phone is totally useless. The best i can do is get to fastboot. Can i reset the device using adb?
boot up to the black screen, if you can still have ADB then:
adb root
adb shell wm size 1440x2560 (or try 1080x1920, you may have the incorrect 1080p panel somehow)
adb shell wm density 640 (you can bump it up to 720, 800 or take it down 560, 480, and see how it goes)
adb reboot
if nothing works, reflash the ROM.
Good luck, mate
Thanks. I tried every combination (including 1080x1920), and the resolution does change, but the display is still split in two (as in the pics). Does it sound like a faulty screen, or something else?
Im no expert but i guess your best bet now is to revert everything to stock. Reflast the stock coloros rom. That should probably do the trick.
I'd be worried that this is a hardware issue. If multiple ROMs are doing this split-screen thing, it's probably defective hardware.
aciduzzo said:
Thanks. I tried every combination (including 1080x1920), and the resolution does change, but the display is still split in two (as in the pics). Does it sound like a faulty screen, or something else?
Click to expand...
Click to collapse
Oh i see, the layout somehow starts right from the middle of the screen, didnt notice that from the picture.
This command may fix it:
adb shell wm overscan reset
Or you can set the margins precisely by:
adb shell wm overscan 0,0,1440,2560 (or 0,0,1080,1920 on 1080p display)
I've gone back to stock ColorOS now, so can't do the adb changes any more. Also, now, after booting the rom, the split screen appears, but, after the display light turns off, i can no longer bring the display back without rebooting. Whereas, normally, i would just press the power button and the display would light up.
Is there anyway of knowing for sure whether it is a hardware or screen issue?
adb always works, you just have to enable USB debugging in Developer Options.
Zeus Hai said:
adb always works, you just have to enable USB debugging in Developer Options.
Click to expand...
Click to collapse
My bad! I *assumed* stock roms didn't have that option. Anyway, just tried both your 'overscan' commands. Neither works.
aciduzzo said:
My bad! I *assumed* stock roms didn't have that option. Anyway, just tried both your 'overscan' commands. Neither works.
Click to expand...
Click to collapse
Well, if you didnt forget to do the command "adb root" before the "overscan" one, then I can safely say that the display is defective
Yep, tho it took a while to get adb root to work, i. e. had to install Chainfire's adb insecure tool. With that adb root worked and i was able to use adb to change the dpi settings fine, but the overscan commands had no effect whatsoever.
aciduzzo said:
Yep, tho it took a while to get adb root to work, i. e. had to install Chainfire's adb insecure tool. With that adb root worked and i was able to use adb to change the dpi settings fine, but the overscan commands had no effect whatsoever.
Click to expand...
Click to collapse
You can try shifting it back or forward half screen horizontally
adb root
adb shell wm overscan -720,0,720,2560
adb shell wm overscan 720,0,2160,2560
or with 1080p:
adb shell wm overscan -540,0,540,1920
adb shell wm overscan 540,0,1620,1920
Thanks for the additional suggestions. Shifting it back or forward results in a blank screen, as does setting the margins manually. See pics.

Pocket Mode

Dear Community,
Greetings,
I have been using the mate 20 x for a while now, and very happy with it, what is missing from the phone (and the mate 20 pro too) is the pocket mode in the settings of the dialer app. I had this option on my old Huawei P9.
When having the phone in my pocket, and a phone call starts ringing, the ringtone volume starts increasing, and this doesn't look good when I'm at work or in a meeting.
Is there any ADB command to bring the option to the settings (I used the ADB commands on P9 to show the Font Styles which was missing from the phone).
Regards,
Pocket mode gone
Hi I have the same problem,
latest with EMUI 9.0.0 the pocket mode setting cannot be found via dialer > three dot menu anymore.
Regardless of volume settings (except for vibrate only) the ring tone volume keeps increasing to embarrassing loudness levels when the phone is in my briefcase.
Is there any change to disable the pocket mode "feature" when you cannot access it anymore?
Regards,
MaeSiuS
Finally, a solution to missing pocket mode option
Hello,
I have finally solved it, I tried it and it works perfectly.
Here are the steps:
1- Install settings database editor by 4A from Google Play store
2- Allow developer options in your phone's settings
3- Allow USB debugging
4- Install platform tools ADB on your PC
5- Connect your phone to PC
6- Make sure your phone is recognized by ADB, type command: adb devices
7- if the ADB console list your device number, type the command:
adb shell pm grant by4a.setedit22 android.permission.WRITE_SECURE_SETTINGS
8- On your phone, open the application Setedit
9- Go to the Secure Table from the top right menu
10- Find the line "Hide_Pocket_Mode", select the value, change it from 1 to 0.
11- Restart your phone, and you'll find the option in the dialer options, More settings.
Hope I helped, it took me time and some research, but it was worth it. lots of embarrassment caused by high ringtone in the office.
Hash_droid said:
Hello,
I have finally solved it, I tried it and it works perfectly.
Here are the steps:
1- Install settings database editor by 4A from Google Play store
2- Allow developer options in your phone's settings
3- Allow USB debugging
4- Install platform tools ADB on your PC
5- Connect your phone to PC
6- Make sure your phone is recognized by ADB, type command: adb devices
7- if the ADB console list your device number, type the command:
adb shell pm grant by4a.setedit22 android.permission.WRITE_SECURE_SETTINGS
8- On your phone, open the application Setedit
9- Go to the Secure Table from the top right menu
10- Find the line "Hide_Pocket_Mode", select the value, change it from 1 to 0.
11- Restart your phone, and you'll find the option in the dialer options, More settings.
Hope I helped, it took me time and some research, but it was worth it. lots of embarrassment caused by high ringtone in the office.
Click to expand...
Click to collapse
Does this solution works on a Huawei P30 too?
There is the same problem.
flummi19200p said:
Does this solution works on a Huawei P30 too?
There is the same problem.
Click to expand...
Click to collapse
Most probably, yes.
download the setedit application, and make sure you have the secure table, and there is a line "hide_pocket_mode".
Let me know if it works.
Hash_droid said:
Most probably, yes.
download the setedit application, and make sure you have the secure table, and there is a line "hide_pocket_mode".
Let me know if it works.
Click to expand...
Click to collapse
Is the procedure with adb Shell, conecting to PC and the adb console on a PC not necessary?
flummi19200p said:
Is the procedure with adb Shell, conecting to PC and the adb console on a PC not necessary?
Click to expand...
Click to collapse
It is necessary since it will grant permission to the setedit app to modify the secure table, without ADB, setedit won't work.
Hash_droid said:
Hello,
I have finally solved it, I tried it and it works perfectly.
Here are the steps:
1- Install settings database editor by 4A from Google Play store
2- Allow developer options in your phone's settings
3- Allow USB debugging
4- Install platform tools ADB on your PC
5- Connect your phone to PC
6- Make sure your phone is recognized by ADB, type command: adb devices
7- if the ADB console list your device number, type the command:
adb shell pm grant by4a.setedit22 android.permission.WRITE_SECURE_SETTINGS
8- On your phone, open the application Setedit
9- Go to the Secure Table from the top right menu
10- Find the line "Hide_Pocket_Mode", select the value, change it from 1 to 0.
11- Restart your phone, and you'll find the option in the dialer options, More settings.
Hope I helped, it took me time and some research, but it was worth it. lots of embarrassment caused by high ringtone in the office.
Click to expand...
Click to collapse
Oh man, this is so great! I have a P8 Lite from work which has pocket mode visible, but I also just bought a P Smart 2019 which doesn't have it visible. Or should I say HAD, because thanks to Hash_Droid I now have Pocket mode visible and disabled. I can't begin to tell you how you made my day. Thanks a lot!
Hash_droid said:
Hello,
I have finally solved it, I tried it and it works perfectly.
Here are the steps:
1- Install settings database editor by 4A from Google Play store
2- Allow developer options in your phone's settings
3- Allow USB debugging
4- Install platform tools ADB on your PC
5- Connect your phone to PC
6- Make sure your phone is recognized by ADB, type command: adb devices
7- if the ADB console list your device number, type the command:
adb shell pm grant by4a.setedit22 android.permission.WRITE_SECURE_SETTINGS
8- On your phone, open the application Setedit
9- Go to the Secure Table from the top right menu
10- Find the line "Hide_Pocket_Mode", select the value, change it from 1 to 0.
11- Restart your phone, and you'll find the option in the dialer options, More settings.
Hope I helped, it took me time and some research, but it was worth it. lots of embarrassment caused by high ringtone in the office.
Click to expand...
Click to collapse
Thank's a lot for this. It works perfectly on P30 Pro :good: :highfive:
It's hard to understand and unlogic why manufacturers like Huawei hide options like Pocket mode in their software. Most users, even the simpliest, surely are interested to customize ring tone options.
Thank you very much Hash_droid, works on P20 pro. :highfive:
Hash_droid, works perfectly on a Mate 10 Pro (I had the same issue) . Thanks a lot.
Thanks, confirming also for Mate 9, EMUI 9.1, not rooted (BL locked).
Btw, I've also enabled virtual HD sound - not sure if the call quality is better
This works on Mate 20 pro. But, if your ADB doesnt recognise your phone, install Huaweis HiSuite. Only so ADB listed my phone.
However, person at Huawei who decided that removing option to disable pocket mode should ne fired. Also, who ever designed the diler app. Huawei, just copy Samsungs dialer, or at least use google phone app. My galaxy S6 had 10x better dialer then my Mate 20 pro now has. At least I have google phone now.
Hash_droid said:
Hello,
I have finally solved it, I tried it and it works perfectly.
Here are the steps:
1- Install settings database editor by 4A from Google Play store
2- Allow developer options in your phone's settings
3- Allow USB debugging
4- Install platform tools ADB on your PC
5- Connect your phone to PC
6- Make sure your phone is recognized by ADB, type command: adb devices
7- if the ADB console list your device number, type the command:
adb shell pm grant by4a.setedit22 android.permission.WRITE_SECURE_SETTINGS
8- On your phone, open the application Setedit
9- Go to the Secure Table from the top right menu
10- Find the line "Hide_Pocket_Mode", select the value, change it from 1 to 0.
11- Restart your phone, and you'll find the option in the dialer options, More settings.
Hope I helped, it took me time and some research, but it was worth it. lots of embarrassment caused by high ringtone in the office.
Click to expand...
Click to collapse
Thanks! This guide worked also for Huawei P40 Pro (emui 10.1.0.154) :good:

[MOD]No notch ? Welcome to the immersive mode ! Remove the notification bar

Hi,
Our Xiaomi MI 9T is splendid with its great AMOLED full screen without any notch or hole.
However, the web browsers like Chrome (and others apps) doesn't propose the possibility in the settings to remove the notification bar and to get a true immersive full screen mode.
No problem, adb is there!
No need to root the smartphone.
EDIT: I have tested "Immersive Manager Application" from Google Play Store and it's perfect. Very simple and it works even when you reboot your phone.
No more need to type adb commands below except at least few adb commands to grant the Secure Settings permission to the app. This is well explained by the application when you launch it the first time.
I let the adb commands below for information in case we had some "purists" who prefer adb than an immersive app.
1/ Enable the Developper mode
Go to Parameters/ About the phone
Click many times (at least 10) on the MIUI Version to activate the Developper mode
2/ Enable USB Debugging
Go to Parameters/... Others parameters/Developper options
Click on USB debugging
Click on Install via USB => You will have to connect to your MI account
Click on USB debugging (security parameters)
3/ Launch adb on your PC
Get adb.exe on the net (very easy)
Put it in a folder of your PC (for instance C:/adb)
Connect your smartphone to the PC
Launch a DOS command window
Go to the adb folder => cd /adb
To check if your smartphone is ready, type:
Code:
adb devices
If it's the first time, there will be a popup on your smartphone to authorize the adb commands
Then, normally your device will appear after typing "adb devices"
4/ Get the list of applications installed on your smartphone
Code:
adb shell pm list packages
Retrieve the name of the application(s) you want to remove the notification bar.
5a/ For instance, hide the notification bar only for Chrome and Google Photos
Code:
adb shell settings put global policy_control immersive.status=com.android.chrome,com.google.android.apps.photos
Note: Each time you enter this command, you cancel the previous one. You need to type only one command with all the apps you want to remove the notification bar (names of app are separated by a comma ,).
5b/ For instance, if you want to hide the notification bar for all the applications
Code:
adb shell settings put global policy_control immersive.status=*
6/ If you want to cancel this setting and put back the notification bar
Code:
adb shell settings put global policy_control null*
Enjoy your brillant full screen mainly when you are in dark mode.
:good:
Pls the screen..
Redmi K20 cihazımdan Tapatalk kullanılarak gönderildi
pidobeuliou said:
Hi,
Our Xiaomi MI 9T is splendid with its great AMOLED full screen without any notch or hole.
However, the web browsers like Chrome (and others apps) doesn't propose the possibility in the settings to remove the notification bar and to get a true immersive full screen mode.
No problem, adb is there!
No need to root the smartphone.
1/ Activate the Developper mode
Go to Parameters/ About the phone
Click many times (at least 10) on the MIUI Version to activate the Developper mode
2/ Activate USB Debugging
Go to Parameters/... Others parameters/Developper options
Click on USB debugging
Click on Install via USB => You will have to connect to your MI account
Click on USB debugging (security parameters)
3/ Launch adb on your PC
Get adb.exe on the net (very easy)
Put it in a folder of your PC (for instance C:/adb)
Connect your smartphone to the PC
Launch a DOS command window
Go to the adb folder => cd /adb
To check if your smartphone is ready, type:
Code:
adb devices
If it's the first time, there will be a popup on your smartphone to authorize the adb commands
Then, normally your device will appear after typing "adb devices"
4/ Get the list of applications installed on your smartphone
Code:
adb shell pm list packages
Retrieve the name of the application(s) you want to remove the notification bar.
5a/ For instance, hide the notification bar only for Chrome and Google Photos
Code:
adb shell settings put global policy_control immersive.status=com.android.chrome,com.google.android.apps.photos
Note: Each time you enter this command, you cancel the previous one. You need to type only one command with all the apps you want to remove the notification bar (names of app are separated by a comma ,).
5b/ For instance, if you want to hide the notification bar for all the applications
Code:
adb shell settings put global policy_control immersive.status=*
6/ If you want to cancel this setting and put back the notification bar
Code:
adb shell settings put global policy_control null*
Enjoy your brillant full screen mainly when you are in dark mode.
:good:
Click to expand...
Click to collapse
Thanks for the instructions bro... I like the immersive mode on all the apps but i do not in instagram app, What is the command to get the immersive mode on all the apps but not in some specifics one?
The setting is reset on reboots. How can it be persisted?
salzzz said:
The setting is reset on reboots. How can it be persisted?
Click to expand...
Click to collapse
Do you have root permissions? If the asnwer is "yes" you can do this:
Install terminal emulator from google play store. Open it and writte "su"
now writte this:
settings put global policy_control immersive.status=*
Tachan! you have immensive mode active. Only save the command in a note app. Always you reboot your phone the only thing you have to do is open terminal, su and paste your command.
A lot more easy and fast than do it with adb. the only "problem" is you need root.
If someone knows how to add an exception, please say so.
How do you show it on lock screen? Any ideas?
"Permission denial: writing to settings requires:android.permission.write_security_settings"
ramsyst said:
"Permission denial: writing to settings requires:android.permission.write_security_settings"
Click to expand...
Click to collapse
Did you manage to overcome this getting same error here
NVM, fixed it
ralphoberholzer said:
Did you manage to overcome this getting same error here
NVM, fixed it
Click to expand...
Click to collapse
Still getting the same error, how did u get around it ?
ramsyst said:
Still getting the same error, how did u get around it ?
Click to expand...
Click to collapse
Enable USB debugging (security settings) under developer options.
I used SystemUI Tuner as it allows for blacklisting apps (sucha as whatsapp) that don´t manage full screen well.
ralphoberholzer said:
Enable USB debugging (security settings) under developer options
Click to expand...
Click to collapse
Thank you! It worked, but as stated above, it reset after phone restart.
Maybe running a tasker command at boot might fix it ?
Edit: Use the Immersive Manager app (thank me later!)
ramsyst said:
Thank you! It worked, but as stated above, it reset after phone restart.
Maybe running a tasker command at boot might fix it ?
Edit: Use the Immersive Manager app (thank me later!)
Click to expand...
Click to collapse
Worked great, Thanks
pidobeuliou said:
Hi,
Our Xiaomi MI 9T is splendid with its great AMOLED full screen without any notch or hole.
However, the web browsers like Chrome (and others apps) doesn't propose the possibility in the settings to remove the notification bar and to get a true immersive full screen mode.
No problem, adb is there!
No need to root the smartphone.
1/ Activate the Developper mode
Go to Parameters/ About the phone
Click many times (at least 10) on the MIUI Version to activate the Developper mode
2/ Activate USB Debugging
Go to Parameters/... Others parameters/Developper options
Click on USB debugging
Click on Install via USB => You will have to connect to your MI account
Click on USB debugging (security parameters)
3/ Launch adb on your PC
Get adb.exe on the net (very easy)
Put it in a folder of your PC (for instance C:/adb)
Connect your smartphone to the PC
Launch a DOS command window
Go to the adb folder => cd /adb
To check if your smartphone is ready, type:
Code:
adb devices
If it's the first time, there will be a popup on your smartphone to authorize the adb commands
Then, normally your device will appear after typing "adb devices"
4/ Get the list of applications installed on your smartphone
Code:
adb shell pm list packages
Retrieve the name of the application(s) you want to remove the notification bar.
5a/ For instance, hide the notification bar only for Chrome and Google Photos
Code:
adb shell settings put global policy_control immersive.status=com.android.chrome,com.google.android.apps.photos
Note: Each time you enter this command, you cancel the previous one. You need to type only one command with all the apps you want to remove the notification bar (names of app are separated by a comma ,).
5b/ For instance, if you want to hide the notification bar for all the applications
Code:
adb shell settings put global policy_control immersive.status=*
6/ If you want to cancel this setting and put back the notification bar
Code:
adb shell settings put global policy_control null*
Enjoy your brillant full screen mainly when you are in dark mode.
:good:
Click to expand...
Click to collapse
I am sorry friend, bootloader unlocked ?
wilmerwils said:
I am sorry friend, bootloader unlocked ?
Click to expand...
Click to collapse
No, it's not necessary to unlock the bootloader.
You have just to activate the developper mode as I indicate it.
ramsyst said:
Thank you! It worked, but as stated above, it reset after phone restart.
Maybe running a tasker command at boot might fix it ?
Edit: Use the Immersive Manager app (thank me later!)
Click to expand...
Click to collapse
Yes, it's true. Each time you reboot the phone, you should loose the setting.
And good point, thank you Ramsyst, I didn't check on Google Play Store the myriad of immersive mode applications!!
I have tested "Immersive Manager Application" and it's perfect. Very simple and it works even when you reboot your phone. :good::good:
I had previously created a task with Tasker and AutoTools (paid version) to change the immersive mode with the "Custom Setting" feature. But knowing that there are many apps (free and paid version) doing that better than AutoTools, it's not usefull to describe how I did it.
pidobeuliou said:
Yes, it's true. Each time you reboot the phone, you should loose the setting.
And good point, thank you Ramsyst, I didn't check on Google Play Store the myriad of immersive mode applications!!
I have tested "Immersive Manager Application" and it's perfect. Very simple and it works even when you reboot your phone. :good::good:
I had previously created a task with Tasker and AutoTools (paid version) to change the immersive mode with the "Custom Setting" feature. But knowing that there are many apps (free and paid version) doing that better than AutoTools, it's not usefull to describe how I did it.
Click to expand...
Click to collapse
Thank you too! I didn't know this immersive mode was possible until i stumbled on your thread. Now, we can all enjoy that beautiful screen 100%!
No devices / emulator found ... Please help. I instal drivers do all on this topic
ramsyst said:
Thank you! It worked, but as stated above, it reset after phone restart.
Maybe running a tasker command at boot might fix it ?
Edit: Use the Immersive Manager app (thank me later!)
Click to expand...
Click to collapse
With Tasker you already have an option to make all apps you want to go immersive! There is no need to use any other command or app.
I believe everybody in the world should buy tasker
Is the best Android app. It may looks hard in the begining, but your imagination is the limit to do whatever you want.
Hi how can i used this on split screen but in full screen mode with status bar and navigation?
MrYuu said:
Hi how can i used this on split screen but in full screen mode with status bar and navigation?
Click to expand...
Click to collapse
You're right. I had never tested the split screen function. The notification bar is not hidden on split screen mode even when immersive mode is activated. The result is a bit weird as there is a mix of notification bar and app on the top of the screen.
"Google search" indicates that you are not the first one to face this issue... but apparently no solution has been found so far.
If somebody can help.

How To Guide [GUIDE] How to fix Quick Unlock bug on Android 12 (constant vibrate at lock screen, impossible to log in)

PROBLEM:​Under certain scenarios, enabling Quick Unlock on the OnePlus 9 Pro with Android 12 causes semi-bricked phone: the phone will vibrate OVER and OVER again and it is impossible to log in!
If your phone is in this state, here's three possible fixes:
Spoiler: Possible Solution #1
POSSIBLE SOLUTION #1:​
Thanks to Caligastia's post, here's another option to resolve.... (quoting from his post)[/B]
Just use the adb command...
Code:
locksettings clear --old [PASSWORD]
And that should do the trick.. Make sure to untoggle the quick unlock option if you set a new password
Click to expand...
Click to collapse
Spoiler: Possible Solution #2
POSSIBLE SOLUTION #2:​
Revert to settings_system.xml.fallback file. Do not follow this guide UNLESS your phone is in this vibrate over and over / impossible to login state.
Note: This only works if you have USB debugging enabled on your computer with root enabled. This will not work if you haven't performed adb shell as root before ( com.android.shell ). Doesn't hurt to try!
Boot up phone to system/normal mode.
Type the following in command prompt:
Code:
adb shell
su
ls /data/system/users/0/settings_system.xml
If it says:
Code:
/data/system/users/0/settings_system.xml
Then this fix should work! Otherwise, this probably won't work.
Finally, type...
Code:
mv /data/system/users/0/settings_system.xml /data/system/users/0/settings_system.xml.old
cp /data/system/users/0/settings_system.xml.fallback /data/system/users/0/settings_system.xml
reboot
Your phone will reboot and the issue should be fixed!
By applying this method you may lose a few recently changed system settings, but nothing major.
Spoiler: Possible Solution #3
POSSIBLE SOLUTION #3:​
Go to bootloader/fastboot mode on your phone.
Type
Code:
fastboot --set-active=a
fastboot reboot
if it doesn't boot right still, go back to bootloader/fastboot and type
Code:
fastboot --set-active=b
fastboot reboot
There are no settings on the 9Pro A12 called quick unlock. What are you referring to?
I'm referring to the setting called Quick Unlock.
Password and Security > Lock Screen Password.
But what this option do ? ( Quick unlock )
asheroto said:
PROBLEM:​Enabling Quick Unlock on the OnePlus 9 Pro with Android 12 causes semi-bricked phone: the phone will vibrate OVER and OVER again and it is impossible to log in!
DO NOT ENABLE QUICK UNLOCK!
Click to expand...
Click to collapse
On my LE2123 OnePlus 9 Pro I do not face this issue with quick unlock. I made a test now once and no issue. Just FYI. I an not rooted.
K1nsey6 said:
There are no settings on the 9Pro A12 called quick unlock. What are you referring to?
Click to expand...
Click to collapse
This option appears if you select Alphanumeric password, using the regular keyboard instead of number pad. Quick unlock will unlock your phone immediately once you enter the password without having to press the enter key.
Interesting, I have the LE2125 with alphanumeric enabled.
I edited the original post to say "Under certain scenarios".
I just updated to Android 12 on my OnePlus 8 and tried out this setting. Now it is impossible to log in to my phone and it constantly vibrates, just like described above.
I cannot connect through ADB (shows as unauthorized) so I cannot complete the steps outlined above. Any ideas what I could do?
blxyy said:
I just updated to Android 12 on my OnePlus 8 and tried out this setting. Now it is impossible to log in to my phone and it constantly vibrates, just like described above.
I cannot connect through ADB (shows as unauthorized) so I cannot complete the steps outlined above. Any ideas what I could do?
Click to expand...
Click to collapse
Unfortunately you have to allow the host (your computer), but you can't do that unless you can tap on the popup.
Can you get in with TWRP or anything else? If so you could edit the file that way. Otherwise, try booting to the other slot.
How to check the current slot:
How to Check if You're on Partition Slot A or Slot B? - KrispiTech
Android phones can now have an A and a B partition system for the OS and we can use this fastboot command to check and see which slot is currently active.
krispitech.com
How to change the active slot:
adbcommand.com - adbcommand Resources and Information.
adbcommand.com is your first and best source for all of the information you’re looking for. From general topics to more of what you would expect to find here, adbcommand.com has it all. We hope you find what you are searching for!
adbcommand.com
I cannot connect through ADB (shows as unauthorized) so I cannot complete the steps outlined above. Any ideas what I could do?
Click to expand...
Click to collapse
@bixyy
Just saw this, hope i'm not too late to help.
If adb shows "unauthorized" it just means that usb debugging permission was revoked between your phone and computer. here's what to do: (assuming you're on windows)
-Unplug your phone from pc. Disable Usb debugging and turn off "disable timeout"
-on your pc, go to C:/users/<username>/.android (it's a hidden folder) and delete adbkey.
-reboot both phone and pc to make sure it takes effect.
-plug your phone again, turn on usb debugging and you should get a new prompt to allow authorization.
adb devices should return your serial number now.
Added possible alternate solution
I ran into the same issue, OP was very helpful.
A bit more info here:
OnePlus Community
Introducing our new OnePlus Community experience, with a completely revamped structure, built from the ground-up.
forums.oneplus.com
Finally fixed it! Very simple solution it turns out. Since the setting is only for alpha numeric passwords once you erase the pass the phone stops acting up.
Just use the adb command
locksettings clear --old [PASSWORD]
And that should do the trick.. Make sure to untoggle the quick unlock option if you set a new password
Caligastia said:
Finally fixed it! Very simple solution it turns out. Since the setting is only for alpha numeric passwords once you erase the pass the phone stops acting up.
Just use the adb command
locksettings clear --old [PASSWORD]
And that should do the trick.. Make sure to untoggle the quick unlock option if you set a new password
Click to expand...
Click to collapse
Thanks for that man! I updated the original post to include your solution and linked to your post for credits!
I had the same issue on my OnePlus Nord, and finally managed to fix it too!
Thanks to @asheroto for your initial guide and @Caligastia for your last comment that gave me the idea of trying with digits only!
Here is how I did it:
After rebooting my phone in recovery mode to activate the USB debugging, I connected to it using adb shell
The locksettings clear --old [PASSWORD] command wasn't allowed on my phone.
==> I'm guessing it was due to some security settings enforced by the enterprise work profile I had installed on my device.
So instead of trying to clear the password, I tried to change it to a PIN code using the command:
locksettings set-pin --old [PASSWORD] [PIN_CODE_HERE]
The command succeeded and after a few seconds of waiting, a digit keyboard finally shown up on my previously bugged lock screen, allowing me to unlock my phone!
I then disabled in the system settings the "Quick Lock" feature and restore my previous password.
_147 said:
I had the same issue on my OnePlus Nord, and finally managed to fix it too!
Thanks to @asheroto for your initial guide and @Caligastia for your last comment that gave me the idea of trying with digits only!
Here is how I did it:
After rebooting my phone in recovery mode to activate the USB debugging, I connected to it using adb shell
The locksettings clear --old [PASSWORD] command wasn't allowed on my phone.
==> I'm guessing it was due to some security settings enforced by the enterprise work profile I had installed on my device.
So instead of trying to clear the password, I tried to change it to a PIN code using the command:
locksettings set-pin --old [PASSWORD] [PIN_CODE_HERE]
The command succeeded and after a few seconds of waiting, a digit keyboard finally shown up on my previously bugged lock screen, allowing me to unlock my phone!
I then disabled in the system settings the "Quick Lock" feature and restore my previous password.
Click to expand...
Click to collapse
can you help me i cant seem to get adb to recognize my phone
Hi,
Is there any possible solution for us who don't have USB-Debugging enabled?
The goal is to not have to wipe the whole phone and loose all data.
Possible solution #1 fails: Wont work because USB debugging is disabled which prevents us from getting adb-shell and run the "
locksettings clear --old [PASSWORD]" command. When trying to figure out how to enable USB debugging from remote it seems to require some fastboot option which would wipe the phone.
Possible solution #2: Same - requires shell, and we cant enable usb debugging because of the bug
Possible solution #3: I can access fastboot but not run the specific commands:
fastboot getvar current-slot
current-slot: b
Finished. Total time: 0.000s
fastboot --set-active=a
Setting current slot to 'a'
FAILED (remote: 'Slot Change is not allowed in Lock State')
fastboot: error: Command failed
Unlocking boot to install TWRP and enable debugging to use ADB shell would wipe the phone as I understand it.
Any suggestions please?
Is your phone locked when you're doing that?
asheroto said:
Is your phone locked when you're doing that?
Click to expand...
Click to collapse
Developer options enabled
OEM bootloader unlock enabled
USB debugging enabled
Default USB Configuration file transfer
Non-TMO variant = boot to bootloader, then fastboot OEM unlock...wipes device. No other way. Unlock bootloader will wipe device period.

Categories

Resources