Broken screen, Authorize ADB device for recovery - Xiaomi Mi 9 Questions & Answers

Hello,
I've got a Mi 9 that apparently works, but the screen is pretty much fully busted.
All black, it seems only parts of the touchscreen work, so it's not very reliable.
Thankfully it has ADB Debugging enabled, but without a screen I cannot authorize it when the authorization prompt comes up on the phone.
So when using ADB I get a Device Unauthorized error.
Apparently I can push a ADB Key to the phone using the command line, but I would have to put the phone in recovery mode.
The mode I've been able to access is Sideload mode (As detected by adb devices command) but I don't think I can push the ADB key using this mode.
This sideload mode came up after navigating using the hardware keys (Power + Volume up, then Volume Down twice, then Power)
This is apparently the "Connect to MiAssistant" Menu on the Recovery menu, but I'm not sure.
This phone has stock MIUI 12 or 13, I believe.
How can I enter Recovery mode/push the RSA key to the phone so that I can proceed with other recovery options, like scrcpy?

Eriolp said:
Hello,
I've got a Mi 9 that apparently works, but the screen is pretty much fully busted.
All black, it seems only parts of the touchscreen work, so it's not very reliable.
Thankfully it has ADB Debugging enabled, but without a screen I cannot authorize it when the authorization prompt comes up on the phone.
So when using ADB I get a Device Unauthorized error.
Apparently I can push a ADB Key to the phone using the command line, but I would have to put the phone in recovery mode.
The mode I've been able to access is Sideload mode (As detected by adb devices command) but I don't think I can push the ADB key using this mode.
This sideload mode came up after navigating using the hardware keys (Power + Volume up, then Volume Down twice, then Power)
This is apparently the "Connect to MiAssistant" Menu on the Recovery menu, but I'm not sure.
This phone has stock MIUI 12 or 13, I believe.
How can I enter Recovery mode/push the RSA key to the phone so that I can proceed with other recovery options, like scrcpy?
Click to expand...
Click to collapse
try power and volume down on powerup

Related

G1 refuses to enter boot mode

I press and hold the [home] and [power] keys and it boots to nothing, even tried the [camera] and [power] keys on my G1, nothing. Current rom/SPL posted below, is it possible there's a changed key setting for the rom?
Rom: CaNNoN202-CompleteEclair-v2.0
SPL: Danger
Firmware version 2.1
Baseband Version 62.50S.20.17U_2.22.19.26I
Kernel 2.6.29.6-bfs-Firerat
Build Complete Eclair 2.0
Try reflashing the recovery image via terminal
$su
#flash_image recovery /sdcard/recovery.img "assuming your recovery image is n root of sdcard and you renamed the recovery image as recovery.img"
#reboot recovery
See if that boots to recovery
How can you get to the terminal if the phone won't boot past the first screen?
camera+power goes to the first screen, home + power goes to the first screen, trackball + power doesn't load a screen, but turns a blue led on.
I have adb. How can I do it using that??
techn0crat said:
How can you get to the terminal if the phone won't boot past the first screen?
camera+power goes to the first screen, home + power goes to the first screen, trackball + power doesn't load a screen, but turns a blue led on.
I have adb. How can I do it using that??
Click to expand...
Click to collapse
Does adb see your device?
At cmd prompt type
adb devices
If it shows up type
adb remount
If that works...
adb shell
You will have
#
Type the commands in the post above after putting a recovery image on your sd card.
If the first step does not work, you may be bricked.
techn0crat said:
How can you get to the terminal if the phone won't boot past the first screen?
camera+power goes to the first screen, home + power goes to the first screen, trackball + power doesn't load a screen, but turns a blue led on.
I have adb. How can I do it using that??
Click to expand...
Click to collapse
Just to clarify, the phone does boot up, and is fully functional aside from the [home] key working. I assume if I follow those directions, I could possibly use the android default img, and restore that, and unroot the phone for return possibilities?
rootlinuxusr said:
Just to clarify, the phone does boot up, and is fully functional aside from the [home] key working. I assume if I follow those directions, I could possibly use the android default img, and restore that, and unroot the phone for return possibilities?
Click to expand...
Click to collapse
From cmd prompt type
adb reboot recovery
See what it does.
I tried to type that and now my E, and R keys are dead...I even tried purchasing Better Terminal Emulator on the news that I can use the virtual keyboard and/or copy paste text. While this works, it allows SU, but when I type
PHP:
adb reboot recovery
it says "sh: adb: not found" So what I figured I'm stuck doing is to restore it to non-root status, or is there a way I can run commands on it from my laptop? The phone itself works great, makes calls, sends txt messages, just won't let me press the [home] key, and now apparently the E, and R keys.
EDIT:
I installed JDK, and the ADB packages, and can get it to the recovery screen from that menu, but I've run into another issue in regards to installing any update.zip through the cyanogen recovery menu. That being that you have to press [home] to confirm you want to do any action...
rootlinuxusr said:
I tried to type that and now my E, and R keys are dead...I even tried purchasing Better Terminal Emulator on the news that I can use the virtual keyboard and/or copy paste text. While this works, it allows SU, but when I type
PHP:
adb reboot recovery
it says "sh: adb: not found" So what I figured I'm stuck doing is to restore it to non-root status, or is there a way I can run commands on it from my laptop? The phone itself works great, makes calls, sends txt messages, just won't let me press the [home] key, and now apparently the E, and R keys.
EDIT:
I installed JDK, and the ADB packages, and can get it to the recovery screen from that menu, but I've run into another issue in regards to installing any update.zip through the cyanogen recovery menu. That being that you have to press [home] to confirm you want to do any action...
Click to expand...
Click to collapse
adb is ran from your computer, not terminal.
and yes, your home key not working means you won't be flashing a new rom through recovery anytime soon.
Once I figure out how to push an update package(rc33) and upgrade to cupcake/donut, will it be effectively unrooted(for purposes of sending it back)?
rootlinuxusr said:
Once I figure out how to push an update package(rc33) and upgrade to cupcake/donut, will it be effectively unrooted(for purposes of sending it back)?
Click to expand...
Click to collapse
you don't push it. and you don't technically "upgrade" to cupcake. you downgrade.
however, yes, it will be ok to send back.
here's how:
http://forum.xda-developers.com/showthread.php?t=491350

need help, installing ota zip to my nexus 6

Hello guys,
i was following this article, from yahoo, i cannot post it
and reached the point of
The fastboot menu will appear and you should see Start in the top right. Press Volume Up till it changes to Recovery. Press the Power button to select it.
You will see an Android with a red exclamation point icon, press and hold the Power key, then press the Volume up key to show the Recovery Menu.
You will get a new menu. Navigate to apply update from adb and select it by pressing the Power button.
but it says this in the cmd
device <null> NOT attached.
the phone is still connected, what do i do now?
please help
hendyanto said:
Hello guys,
i was following this article, from yahoo, i cannot post it
and reached the point of
The fastboot menu will appear and you should see Start in the top right. Press Volume Up till it changes to Recovery. Press the Power button to select it.
You will see an Android with a red exclamation point icon, press and hold the Power key, then press the Volume up key to show the Recovery Menu.
You will get a new menu. Navigate to apply update from adb and select it by pressing the Power button.
but it says this in the cmd
device <null> NOT attached.
the phone is still connected, what do i do now?
please help
Click to expand...
Click to collapse
Where does it say this and at what point? Your phone is 100% stock then, correct? You set up adb correctly?
We'll need more information than supplied. You should walk us through step by step
hendyanto said:
Hello guys,
i was following this article, from yahoo, i cannot post it
and reached the point of
The fastboot menu will appear and you should see Start in the top right. Press Volume Up till it changes to Recovery. Press the Power button to select it.
You will see an Android with a red exclamation point icon, press and hold the Power key, then press the Volume up key to show the Recovery Menu.
You will get a new menu. Navigate to apply update from adb and select it by pressing the Power button.
but it says this in the cmd
device <null> NOT attached.
the phone is still connected, what do i do now?
please help
Click to expand...
Click to collapse
I was having the exact same problem last night, following the same instructions. I still could not figure out how to sideload the OTA, so I ended up just flashing the update and starting from fresh. Wish I had the answer for you.
Here was my thread asking pretty much the same thing: http://forum.xda-developers.com/nexus-6/help/disconnects-computer-entering-bootloader-t3230705
danarama said:
Where does it say this and at what point? Your phone is 100% stock then, correct? You set up adb correctly?
We'll need more information than supplied. You should walk us through step by step
Click to expand...
Click to collapse
100% Stock, yes! 1 week old.
Yes i have set up ADB
I have followed the instruction until this part (i cannot post any link sorry, not authorized by xda)
The following ADB commands are for Windows machines. If you’re using a Mac, just add “./” before each command, for example: “./adb reboot bootloader”.
Assuming you device is already connected to your computer via USB and USB Debugging is enabled, you need to re-start it in fastboot mode. Follow one of the two methods below. Option A may be preferable because it’s another confirmation that your computer recognizes your Nexus device.
A) Type “adb reboot bootloader”
B) Turn your device off, then turn it back on while holding down the relevant key combinations for your device. For many devices it’s Volume Up + Volume Down + Power. You can see what your device’s key combinations are here.
The fastboot menu will appear and you should see Start in the top right. Press Volume Up till it changes to Recovery. Press the Power button to select it.
You will see an Android with a red exclamation point icon, press and hold the Power key, then press the Volume up key to show the Recovery Menu.
You will get a new menu. Navigate to apply update from adb and select it by pressing the Power button.
In the command window — make sure you are in the directory where ADB and Fastboot reside — type: “adb sideload [the full name of the file].zip” without the brackets around the file name.
The update will install and reach 100 percent.
Reboot and enjoy the latest version of Android Marshmallow.
Click to expand...
Click to collapse
(red arrow) and then the cmd says the null error, i am trying this now
I had the same problem. Turned MTP on and then it worked. You're told to turn it off but don't... Its in Settings-Storage-touch the ... Menu top right corner, USB settings and turn ON MTP mode. It worked well for me. I also used the Nexus Root Toolkit - makes things much easier!
Click to expand...
Click to collapse
My phone is able to rebooot (the options comes out sometimes after i did not do anything) and now optimising app (like it usually did after an OTA update)
hendyanto said:
100% Stock, yes! 1 week old.
Yes i have set up ADB
I have followed the instruction until this part (i cannot post any link sorry, not authorized by xda)
(red arrow) and then the cmd says the null error, i am trying this now
My phone is able to rebooot (the options comes out sometimes after i did not do anything) and now optimising app (like it usually did after an OTA update)
Click to expand...
Click to collapse
There are lots of additional steps in that guide and not always the simplest way of doing it.
First thing to do is boot into recovery.
- Turn off the phone.
- Hold volume down + power
- At the bootloader screen, use volume keys to navigate to recovery and press power to select#
- At the Red warning triangle, hold power then press volume up.
At this stage, type "adb devices" in your command prompt and see if it returns your serial number or not. If it does, you can follow the steps to use adb to flash the update.
Please note, the guide talks about USB debugging. This only works in android. Nothing you need to do needs to be done via android so this is nonsense. Also the MTP option only works in android, so setting this in settings as a fix is also nonsense.
danarama said:
There are lots of additional steps in that guide and not always the simplest way of doing it.
First thing to do is boot into recovery.
- Turn off the phone.
- Hold volume down + power
- At the bootloader screen, use volume keys to navigate to recovery and press power to select#
- At the Red warning triangle, hold power then press volume up.
At this stage, type "adb devices" in your command prompt and see if it returns your serial number or not. If it does, you can follow the steps to use adb to flash the update.
Please note, the guide talks about USB debugging. This only works in android. Nothing you need to do needs to be done via android so this is nonsense. Also the MTP option only works in android, so setting this in settings as a fix is also nonsense.
Click to expand...
Click to collapse
I cannot get my windows to detect the phone during recovery mode, it always disconnected at that point.
I'll try again when i have the time, thank you all.
hendyanto said:
I cannot get my windows to detect the phone during recovery mode, it always disconnected at that point.
I'll try again when i have the time, thank you all.
Click to expand...
Click to collapse
Could be a driver issue. You'll need to check device manager. Perhaps uninstall the existing drivers and let it auto detect.
Failing that, install the Naked driver from my adb and fastboot thread (Nexus 6 general > Sticky roll-up thread > Adb and fastboot. What is it?)
I had the same issue with you until i did the following: I used wugfresh's nexus utility. Then I downloaded the respective file from XDA and saved it in the same folder as the Wugfresh's tool. Restarted in Recovery mode and chose 'update from adb'. Connected the phone with the usb having USB debugging on from before going to recovery. Started the CMD window from Wugfresh's tool (Advanced Utilities -> Launch) and check that the phone is connected (I think "adb devices") . Then "adb sideload xxxx.zip" and waited for the process to finish.
Instruction here: androidpolice 2012/11/13/android-4-2-build-jop40c-rolling-out-to-the-nexus-7-now-manual-download-link-available/
You do not have to install the full Android utility. Just use wugfresh;s cmd screen. Good luck!
danarama said:
Could be a driver issue. You'll need to check device manager. Perhaps uninstall the existing drivers and let it auto detect.
Failing that, install the Naked driver from my adb and fastboot thread (Nexus 6 general > Sticky roll-up thread > Adb and fastboot. What is it?)
Click to expand...
Click to collapse
qwerty1gr said:
I had the same issue with you until i did the following: I used wugfresh's nexus utility. Then I downloaded the respective file from XDA and saved it in the same folder as the Wugfresh's tool. Restarted in Recovery mode and chose 'update from adb'. Connected the phone with the usb having USB debugging on from before going to recovery. Started the CMD window from Wugfresh's tool (Advanced Utilities -> Launch) and check that the phone is connected (I think "adb devices") . Then "adb sideload xxxx.zip" and waited for the process to finish.
Instruction here: androidpolice 2012/11/13/android-4-2-build-jop40c-rolling-out-to-the-nexus-7-now-manual-download-link-available/
You do not have to install the full Android utility. Just use wugfresh;s cmd screen. Good luck!
Click to expand...
Click to collapse
Thank you guys! But after this "happy"night, i woke up to the OTA for marshmallow arrived on my phone, so see you guys on the rooting section instead, Thank you thank you for the help

[SOLVED] Can't enter safe mode

The phone doesn't start after installing EdXposed and the Riru Core Magisk module.
I want to enter Safe mode, but it doesn't work. I somehow managed to enter safe mode previously out of pure coincidence (no idea what I did, I pressed some buttons and i got there during a boot sequence, but it was nothing like the tutorial that Google gives you on how to do it properly).
So, I read you can do it like this:
https://support.google.com/pixelphone/answer/2852139?hl=en
However, this doesn't work for me, here's my boot process:
Power on
Unlocked bootloader warning (I skip it)
Google logo shows up
Screen color calibration changes slightly
Google animation starts (i press volume down)
Google animation ends
Normal Google logo stays there for a few seconds
Loading bar appears
Loading bar stayed there overnight (phone doesn't get hot or anything)
Is there any way to:
Enter safe mode properly
Start a terminal in recovery mode (like TWRP) to use the mm module to disable Magisk
Have an on device file manager (like TWRP) to manually delete the app
Delete files using adb
Get a normal adb shell (not sideload)
EDIT 1:
Starting "rescue mode" via fastboot shows the bootloader warning again, then the Google logo and then it's stuck (no color shift, no animation). Same for "recovery mode".
I cannot connect via adb/fastboot while the Logo is showing.
EDIT 2:
I managed to start "rescue mode" by doing the following:
Press power button
Press power button again (Entry selected: "Start")
Press both volume buttons and don't release them (I'm getting desperate here lol)
Bootloader warning (not skipped)
Rescue mode shows up (opened up Android, says "No command")
I can connect via adb, but "adb shell" or any other useful command says "error: closed"
EDIT 3:
Wtf, I got an adb shell by doing the following inside rescue mode:
"adb shell" -> Error
"adb pull /system/" -> Error
"adb pull /etc/hosts" -> Error
Phone restarted
Bootloader warning (skipped it)
Google logo, Animation & loading bar
adb connected
EDIT 4:
I entered the adb shell and used "setprop persist.sys.safemode 1" (source) (which registered correctly), but after rebooting, the phone still loads forever.
EDIT 5:
Turns out Safe mode didn't work because of Magisk/Riru/EdExposed or whatever, so I disabled Magisk by "touch /cache/.disable_magisk" (source) and now I successfully booted into safe mode.
Can you type up a more coherent guide to what you did? I'm facing the same problem and hoping to fix it without having to wipe my phone again! Thanks!
cubsrule93 said:
Can you type up a more coherent guide to what you did? I'm facing the same problem and hoping to fix it without having to wipe my phone again! Thanks!
Click to expand...
Click to collapse
Using this will most likely get you booted up to fix what you need...
https://forum.xda-developers.com/pixel-4-xl/themes/magisk-modules-disabler-booting-magisk-t3990557
cubsrule93 said:
Can you type up a more coherent guide to what you did? I'm facing the same problem and hoping to fix it without having to wipe my phone again! Thanks!
Click to expand...
Click to collapse
Where are you stuck?

Revisiting key combinations, and getting to fastbootD

[Sorry, this belongs in the Q & A area, but there's no option to delete or move it.]
Here are the hardware button combinations that work on my OnePlus 6T:
[volume up + power] hold until you see the red dot logo, then release theyour phone will boot to system.
[volume down + power] hold for a few seconds until the black and white keyboard appears (maybe the keyboard is only if you have a login PIN set up?) this will boot the phone to recovery mode.
[volume up + volume down + power] hold for a few seconds until you see the Fastboot label then release. This will put the in bootloader mode.
Starting with the phone powered off and NOT connected to your computer, press and hold [volume up + volume down] as you plug the phone into your computer. This will put the phone into EDL mode, which is required in order to use the MSM tool. The screen of the phone will be black but if you followed the procedure the Qualcomm device should appear under the Ports section of Windows Device Manager.
I was unable to get to FastbootD. Here's what happened when I tried various commands:
1.) when in regular fastboot (bootloader) mode and connected to my PC via USB, from a command prompt I typed "fastboot reboot fastboot" the phone only rebooted to the operating system and not to the fastbootD screen.
2.) when in bootloader, as above, I typed "fastboot reboot bootloader", the phone rebooted to the regular fastboot screen. However, I suspected this was not the same thing as "fastboot reboot fastboot" because why would there be 2 identical commands?
3.) the "adb reboot" command would not work when I was in bootloader mode. Duh! I needed to be in ADB mode for ADB commands to work. In bootloader mode I needed to use a Fastboot command. Still, I had downloaded and unzipped the latest adb/fastboot tools and set up the Windows PATH to point to the unzipped folder. Also, I checked the version numbers of both from the command prompt but still [fastboot reboot fastboot] only rebooted my phone to system. What the heck!?
4.) this all seemed to happen after booting into EDL mode the day before. I booted into EDL mode so I could check if I had the proper Qualcomm driver installed (incase I had to use the MSM tool --yes the driver was installed and functioning). I didn't actually need to use the MSM tool at that time so I didn't ever run it but I'd had some difficulty getting the phone to reboot to system so I assumed my trouble with fastbootD originated with that. Wrong!
SOLUTION: It turned out to be a hidden instance of outdated adb/fastboot that kept running in lieu of the newly downloaded copies, in spite of my having correctly set up the Windows PATH. (more on this below in my reply of Jan 9, 2022).
So adb reboot recovery
And
adb reboot bootloader
Dosent work?
Kenora_I said:
So adb reboot recovery
And
adb reboot bootloader
Dosent work?
Click to expand...
Click to collapse
adb reboot recovery does work. Weirdly, adb reboot bootloader will work ONCE then if I try to issue the command a second time, adb can't see my device. If I unplug the phone from USB, restart the phone then plug it back in, I can again use adb once.
Fastboot logo is showing?
Kenora_I said:
Fastboot logo is showing?
Click to expand...
Click to collapse
what would a fastboot logo look like?
The words fastboot. Will be shown
Kenora_I said:
The words fastboot. Will be shown
Click to expand...
Click to collapse
I can get to fastboot. Just not by using the volume up + power combo and I can't re-enter fastboot by using [fastboot reboot fastboot] from the command line. The command line issue is of more importance, ultimately, but I think it's reasonable to assume the root cause of both is the same since they happened at the same time.
Can you check if System>Developer Options>Advanced Reboot is enabled?
FakeGemstone said:
I can get to fastboot. Just not by using the volume up + power combo and I can't re-enter fastboot by using [fastboot reboot fastboot] from the command line. The command line issue is of more importance, ultimately, but I think it's reasonable to assume the root cause of both is the same since they happened at the same time.
Click to expand...
Click to collapse
It changed at some point and OP never updated their docs. (I think it changed when A10 hit).
To get into fastboot mode. You now have to make sure you're not connected to USB and hold vol+, vol-, and power and that will launch fastboot mode.
Also maybe semi related if it's not launching at all, is to do a factory reset from within the OS. I had a really odd issue recently with recovery mode and it not booting into recovery from fastboot, adb, or key combo press. Factory reset from within the OS somehow fixed it.
psychen6 said:
Can you check if System>Developer Options>Advanced Reboot is enabled?
Click to expand...
Click to collapse
Yes, I have this option enabled. Using this method is one of the ways I am able to get to fastboot. I am just not able to get to fastboot using [fastboot reboot fastboot] from a command prompt (used to work just fine) and I am not able to get to fastboot by holding the [volume up + power] (this also used to work just fine).
hartleyshc said:
It changed at some point and OP never updated their docs. (I think it changed when A10 hit).
To get into fastboot mode. You now have to make sure you're not connected to USB and hold vol+, vol-, and power and that will launch fastboot mode.
Also maybe semi related if it's not launching at all, is to do a factory reset from within the OS. I had a really odd issue recently with recovery mode and it not booting into recovery from fastboot, adb, or key combo press. Factory reset from within the OS somehow fixed it.
Click to expand...
Click to collapse
I don't know about that. A few days ago volume up + power used to work just fine. Also a few days ago, I also used to be able to issue fastboot reboot fastboot from a command line and have it work fine.
Now what happens when issue the command fastboot reboot fastboot is that my phone appears to begin the reboot cycle. A message in the command window appears, "rebooting into fastboot" then on the next line, "< waiting for any device >" and meanwhile my phone just boots into the Oxygen OS. If at that point I select "bootloader" from the advanced power button menu, the phone reboots into fastboot and the message in the command window reads, "fastboot: error: failed to boot into userspace fastboot; one or more components might be unbootable."
If I then issue the command, fastboot reboot bootloader, that reboots promptly into fastboot, but I don't believe "bootloader fastboot" is the same thing as "userspace fastboot", although the states look identical on the screen.
After revisiting this issue again and reading every post I could find I realized the only explanation was outdated fastboot, and since they're packaged together, adb also. This time I did a extra thorough search of all the drives and sure enough there was a super old instance of adb.exe & fastboot.exe in a place I'd never thought to look. So I deleted those files and now adb and fastboot work as expected.
I know, it seems obvious now. But there were references to those old files in windows system settings that took precedence over my PATH setting that I didn't realize were there. Ive since deleted those other references but I wanted to mention this in case other people are wondering why the PATH they set up isn't working.

Question Hi Not working fastboot mode on Oppo reno 5 (CPH2159)

What's on the buttons, all buttons are in working order
oem-unlock & usb debugging included
no password on the phone
holding the power button and sound -, I get into recovery, I don't need to go there
holding down the power button and sound +, some **** the system is loaded
================================================== ==============
On the command line:
adb devices - it shows up as (9cd64a6d device)
adb reboot bootloader - a picture appears (fastboot mode. To exit, pull out the battery or hold it off for 6-10 seconds) for a quarter of a second and reboot into the system.
What have I not done yet to enter fastboot mode?
If you need to install Deep Testing / in-depth test / deep scanning, then it cannot be installed, the application is not installed
Are you solved your problem
Are you solved your problem? Please answer me.

Categories

Resources