Fastboot FOR Android - Android Q&A, Help & Troubleshooting

Hi ppl,
I was wondering if it's somewhat possible to have fastboot installed as an apk on my tablet (Android) in order to flash things on a smartphone plugged in that tablet.
Scenario is: wife wants my notebook; I want her tablet. If I could use adb and fastboot from the Android tablet, I could really do everything with it and the swap may happen
Thanks
Fabio

No way at all, I guess?

Android already has fastboot built in but you will need a OTG cable and a search in the manual to find out how to access.
On my tablet (Aishuo) it is menu and power up .
Do the swap man you wont regret it ( he says )
Keith

There is a binary called "flash_image" which you can run from terminal emulator, which can (as the name suggests) flash images in a similar fashion to fastboot. Google it

found it
Not sure if you already figured out yourself, but this thread is about fastboot and adb via otg
http://dl.xda-developers.com/attach...dd88a/1/5/4/2/6/7/1/ADB_FastbootInstaller.zip

Related

[Q] adb can't see bootloop Nexus 10 anymore

I have a rooted Google Nexus 10 tablet with Clockwork Mod and Android 4.4.2. The Google USB driver worked fine on my Windows 7 laptop and I was able to use adb to push files to my tablet. I foolishly let the automatic 4.4.3 OTA download and install. Now, my tablet is stuck in bootloop AND Windows has completely forgotten my Google USB driver and thus adb can't see the tablet, so I can't transfer over the 4.4.3 image or flash in Clockwork Mod via sideload. Yes, Clockwork Mod works great and I can boot into recovery mode. I've seen a thousand postings that all talk about stuff you do from Android like enabling USB debugging, etc, but this is all worthless when you can't boot Android. In retrospect, I wish I had kept a backup image on my SD card. So three questions:
1. How can I get the update image onto my tablet, either by sideload or adb push?
2. Is the factory image (4.4.3 (KTU84L) ) correct or since I'm rooted, am I supposed to use a modified one?
3. Would the manual update method be as simple as copying over the factory OTA to my SD Card ahead of time, booting into recovery mode and flashing?
Thanks in advance to anyone who can help.
Well, no response from anybody. I just saw this on another post: "Having USB Debugging ticked WHILE IN ANDROID has absolutely no effect on whether or not your computer can see the device WHILE IN RECOVERY OR FASTBOOT. "
This is very informative. I just wonder if "adb devices" ever shows anything if you're in recovery mode. I wonder also if the Windows 7 driver is supposed to work. I have a feeling this driver is based on communicating with Android itself, so of course it won't work. So maybe fastboot is the way to go? That's what I'll try next.
fastboot
This looks relevant - it has a ton of fastboot commands:
http://forum.xda-developers.com/showthread.php?t=2024259&page=3

HP 7 VoiceTab 1321RA Bricked without Recovery or Custom Recovery mode accessable

Hi!
First off let me say thanks to R_a_z_v_a_n for redirecting me and hope that I'll find my answer here ^^
So I Have this device called HP 7 VoiceTab 1321RA (not with Slate just HP 7 Voicetab), wanting to have a custom recovery then I tried to flash a CWM Custom Recovery for HP Slate 7 VoiceTab because I thought it was the same and ends up bricking my phone. It ends up in a bootloop which only shows HP sign for a few seconds and dead. But I managed to find out that I can access the recovery menu (or so I thought it is), but the options was choosing between Fastboot Mode, Normal Boot, Recovery Mode, and VART Mode.
I tried to enter Fastboot Mode before and tried to access it via PC but somehow I can't find the device by entering adb devices and fastboot devices. Anyways, I have downloaded a stock update.zip for it but not the original KitKat one which I get from the first time I bought it but rather the JB ones. I think by flashing this would help me recover the device but the only problem is I don't know which method should I use to Flash it. Since I don't have the Stock Recovery or ANY kind of recovery at all, I guess I'm stuck. And it won't start to the home page so I can't set the USB debugging options. Please guide me through this >.<
Thanks a lot!
Been fighting with it for 2 days now and still no result came.
So here's the update so far....
I tried on my other device in order to understand how my PC reads ADB and now I kinda gets it. But the problem is now can't get the device to enable USB Debugging because I can't access options at all.
Secondly, since I left it on for the night because charging seems to trigger the bootloop too, now I can't access the fastboot mode like I was last night. And it constantly repeating this sequence: [battery scene with the "charging battery" symbol] > [HP Powered by Android screen] repeated for 2-3 times > [low battery need charging screen] > repeat. And once I tried to connect to the PC, it goes to the same sequence too. When I tried to access the boot options (the screen which displays Fastboot Mode, Normal Boot, Recovery Mode, and UART Mode which I mention in Thread Starting post), it shows the low battery need charging scene and then repeating the same sequence as mentioned above.
I seem to figure out how to fix this but I still can't manage to access the fastboot mode yet. Will give update once I can try to.
Anyone can help me on this?
Thanks a lot!
Update!
Somehow with a little tweaking and stripping the device, I managed to solve the charging problems. Will update on this once my problem finished.
Jump out from the frying pan and into the fire so they say, I ran into another problem. Finally managed to get into fastboot mode, the devices manager reads it as an Android Device>ROMaster ADB device like the other device I tried to connect while in ADB mode and fastboot mode, but somehow CMD cannot read the device as an ADB device or a Fastboot device like the other device did. I tried to uninstall and reinstall the driver and still nothing happens. I tried to find the usb_driver on the internet and it directs me to the update.zip instead. Trying to update the driver via Computer Management but it says the driver is up to date. Now thinking about making an emulator device based on the HP 7 VoiceTab 1321RA but I really have no idea how to make one. Any one have any idea of what should I do next or can guide me through this? At least until the CMD can read the fastboot.
Thanks a lot!
I found my self in a deadlock!
PLEASE HELP :crying:
Could you unbrick yours
What service centre says about that problem i also ran in this problrm but i m trying to go to service centre for that
first off install drivers in your PC as admin
then use the official flashtool to flash ur stock firmware by entering fastboot or flashmode simple as that
@Sunderesh, thanks for the suggestion, however, couldnt get any official flashtool for hp voicetab. Can you suggest one please?
jithinraj said:
@Sunderesh, thanks for the suggestion, however, couldnt get any official flashtool for hp voicetab. Can you suggest one please?
Click to expand...
Click to collapse
Dude urs is a mtk device so sp flash tool should do the trick.... Just don't forget to install correct drivers....run both drivers and flash tool as admin..... Tell me when it's solved k
jithinraj said:
@Sunderesh, thanks for the suggestion, however, couldnt get any official flashtool for hp voicetab. Can you suggest one please?
Click to expand...
Click to collapse
That is what im trying. To tell you urs is a mediatek device the official flashtool is sp flashtool
rikicchi said:
Update!
Somehow with a little tweaking and stripping the device, I managed to solve the charging problems. Will update on this once my problem finished.
Jump out from the frying pan and into the fire so they say, I ran into another problem. Finally managed to get into fastboot mode, the devices manager reads it as an Android Device>ROMaster ADB device like the other device I tried to connect while in ADB mode and fastboot mode, but somehow CMD cannot read the device as an ADB device or a Fastboot device like the other device did. I tried to uninstall and reinstall the driver and still nothing happens. I tried to find the usb_driver on the internet and it directs me to the update.zip instead. Trying to update the driver via Computer Management but it says the driver is up to date. Now thinking about making an emulator device based on the HP 7 VoiceTab 1321RA but I really have no idea how to make one. Any one have any idea of what should I do next or can guide me through this? At least until the CMD can read the fastboot.
Thanks a lot!
Click to expand...
Click to collapse
try to push the update.zip via adb sideload (Choose "update via ADB sideload" on recovery mode)using adb terminal on PC,as long as your tab can access the recovery mode.remember to backup all your data before u do it.
have a try it's 100% work on me
where I can download update.zip file? anyone can help?
rikicchi said:
Update!
Somehow with a little tweaking and stripping the device, I managed to solve the charging problems. Will update on this once my problem finished.
Jump out from the frying pan and into the fire so they say, I ran into another problem. Finally managed to get into fastboot mode, the devices manager reads it as an Android Device>ROMaster ADB device like the other device I tried to connect while in ADB mode and fastboot mode, but somehow CMD cannot read the device as an ADB device or a Fastboot device like the other device did. I tried to uninstall and reinstall the driver and still nothing happens. I tried to find the usb_driver on the internet and it directs me to the update.zip instead. Trying to update the driver via Computer Management but it says the driver is up to date. Now thinking about making an emulator device based on the HP 7 VoiceTab 1321RA but I really have no idea how to make one. Any one have any idea of what should I do next or can guide me through this? At least until the CMD can read the fastboot.
Thanks a lot!
Click to expand...
Click to collapse
can you explain how did you managed to charge the device??? please its a request......jst help me out :crying::crying:

Trekstor Surftab breeze 9.6 quad root

Hey Everybody!
I am new to this forum, looking for a way to root my trekstor Surftab breeze 9.6 Quad. I already tried out the recommended tools, unfortunately none of them worked out. Is anyone of you aware of a method rooting the tab? Or did anyone already rooted it?
First ofall I am looking for a way to move files and apps to the external sd and delete pre-installed apps. Farther, if possible and available, a custom rom would be pretty amazing.
I'm only familiar to nexus root toolkit on my old nexus 4, otherwise I'm a newbie in rooting.
Maybe there's some of you able to help me. If necessary, I will look up more information on the tablet.
Lucas
Maybe as an Update:
Trying to build a working adb connection using the andorid sdk tools, the surftab is not listed as a device in "adb devices"
Anyone out there who can help me with the tablet?
Alright, new update for today.
I was able to get a driver running and the root-toolkits like KingoRoot, KingRoot, One Click root etc. noticed the device, I even was able to start the rooting, but all of those tools said "Root failed" or "Your device is soild to root".
Looks like those one click solution aren't able to root the surftab. I also tried towelroot and framaroot, both without any success.
I am still looking for help
If you are still interested, I successfully dumped whole eMMC memory from this tablet, so I can send you, for example, the boot partition. You can try patch it with Magisk
The magic
Yes, if it's not difficult for you, you can share the firmware. I will be grateful
Hi!
I attached xz-compressed stock boot.img for you!
Also, I have full eMMC dump, but:
recovery partition data are not usable (overwritten by uncompatible recovery image during mine tests)
no data partition
no platform bootloader partitions mmc0boot0 and mmc0boot1
Trekstor-Surftab-Breeze-9.6-ST96416-1-emmc-dump.dd.xz [1.12 GB]
Decompress and use kpartx tool (need force to ignore omitted data partition)
I have this tablet rooted now, so you can ask me for anything about it.
With love for all open source,
petabeda
Just one thing: fastboot boot is not supported here, so If you are afraid, flash modified boot.img to recovery partition with fastboot flash recovery boot.img for test (adb reboot and then adb reboot recovery
You will lost your recovery, but, at least, no bricked device in case of error (recovery is actually second boot partition)
petabeda said:
Just one thing: fastboot boot is not supported here, so If you are afraid, flash modified boot.img to recovery partition with fastboot flash recovery boot.img for test (adb reboot and then adb reboot recovery
You will lost your recovery, but, at least, no bricked device in case of error (recovery is actually second boot partition)
Click to expand...
Click to collapse
I have two surftab tablets. One version of the SIM card is fully functional. Another wifi version will not load. When loading, the orange logo at the moment of "collection" freezes. If there is, you can go into recovery even factory reset.
But nothing changes. I believe that the EMMC resource has been exhausted and therefore this behavior.
and to be honest, I don’t know how to write the partition. Since only the adb sideload command is available in recovery mode. Apparently, it is impossible to overwrite the firmware except through the programmer.
Until that time, I could not even pull out the firmware. Since there was no root access
Thank you for your help. As a thank you, I will give you a link to a tool to repair the Nexus 7 bootloader. Through a vulnerability in the tegra cpu. As I understand it, I use this method to hack the nintendo switch. I personally bought 4 nexus 2012 on the secondary market and one of them was able to restore in this way. They of them had a damaged eMMC other power controller. And even with a soldering station, I could not replace it because there is no suitable frame for the reball. In general, nexus are not bad, but there is very little disk space for installing google services and GAPPS are useless. And it is difficult to change partition. And it makes no sense because of the available firmware.
I see, you can''t unlock bootloader, because your device is not bootable at all. So, there is no way to get into fastboot mode?
We are anti e-waste fighters giving second chances!
The first photo is the available recovery menu. Where after choosing a factory reset, nothing changes. And through the adb update, only sideload mode is available.
The factory partition is not corrupted as the restore completes successfully. But the download fails. And not just does not occur, but freezes as in the screenshot above. Most likely a hardware problem eMMC.
Earlier, I saw something similar, for example, in Asus Zenpad, if turn off or connect the camera incorrectly, then the download stops. But here animation is stuck.
I don't know how to check eMMC exactly.
logs files is empty
And with recovery, no commands are available (like adb or fasboot)
There is a one way how to diagnose/repair/have fun with that Trekstor tablet - If you could and want to disassemble it:
have your tablet powered off
disassemble the tablet
carefully disconnect FFC cables (display and digitizer)
remove mainboard screws
at back side in the center of the board, there are three testpoints.......yes you are thinking right, these are actually 1.8V UART signals and GND
Connect these signals to your serial converter (in my case, Raspberry Pi), be careful and talk with the same loundnesses
Don''t power on the tablet, only plug usb cable, tablet will try boot and run healthd (charging mode with battery animation)
Your console will show you the magic (PBL/SBL) bootloader messages and Linux log and event, maybe, the console (though no root), lalalal (/dev/ttyFIQ0)
Wish you luck
After that, if everything goes well, you should be able to use reboot fastboot command to get fastboot mode !

Locked Password

Not sure if this is the proper place for this question; if not, please move. I picked up an Irulu Expro No. X9 Android tablet on eBay. It seems to work fine, except I can't get past the login screen. I tried many times the various key combinations to get it into recovery mode but none worked. Other suggestions had me putting it in debug mode first, but how to do that if you can't get logged in? I'm not concerned about saving any data, I would just like to be able to use it. I would appreciate any help to solve my problem. Thanx.
@jrockow
Have you ever tried to check whether the device is accessable by means of ADB?
Code:
adb devices
If it's accessable then you easily can remove the password lock. You do this by launching Android Settings via ADB as shown next:
Code:
adb devices
adb shell am start -a android.settings.SETTINGS
jwoegerbauer said:
@jrockow
Have you ever tried to check whether the device is accessable by means of ADB?
Code:
adb devices
If it's accessable then you easily can remove the password lock. You do this by launching Android Settings via ADB as shown next:
Code:
adb devices
adb shell am start -a android.settings.SETTINGS
Click to expand...
Click to collapse
Thanx for your quick reply.
adb devices doesn't list anything.
I thought you needed to enable USB debugging for ADB to work?
Don't know how to do that if I can't log in.
jrockow said:
Thanx for your quick reply.
adb devices doesn't list anything.
I thought you needed to enable USB debugging for ADB to work?
Don't know how to do that if I can't log in.
Click to expand...
Click to collapse
OK, so I'm somewhat of a rookie when it comes to ADB and FASTBOOT.
I'm not sure I have everything correct. I'm using an app called "Minimal ADB and Fastboot".
I have another tablet, same as the one I can't access, and I have turned on the developer options.
Even with that, I still can't see any devices when I run ADB.
FYI: When I look at devices in my PC it shows up as X9, which I believe is correct.
With my no password tablet, I can actually see all the directories of my Android on my PC.
If I try that with the other one don't see any directories.
jrockow said:
With my no password tablet, I can actually see all the directories of my Android on my PC.
Click to expand...
Click to collapse
Android's USB in that case is set to MTP mode, not ADB mode. MTP operates at the file level. Your Android device doesn’t expose its entire storage device to Windows computer. Instead, when you connect a device to your computer, the computer queries the device and the device responds with a list of files and directories it offers.
When Andoid's USB is in ADB mode, device can completely get controlled from Windows computer.
jrockow said:
I'm using an app called "Minimal ADB and Fastboot".
Click to expand...
Click to collapse
Serious Android device owners use the USB-driver ( AKA ADB ) as provided by device's OEM/Carrier.
jwoegerbauer said:
Android's USB in that case is set to MTP mode, not ADB mode. MTP operates at the file level. Your Android device doesn’t expose its entire storage device to Windows computer. Instead, when you connect a device to your computer, the computer queries the device and the device responds with a list of files and directories it offers.
When Andoid's USB is in ADB mode, device can completely get controlled from Windows computer.
Serious Android device owners use the USB-driver ( AKA ADB ) as provided by device's OEM/Carrier.
Click to expand...
Click to collapse
I was incorrect in my earlier post, when I said I turned on the developer mode on my "good" tablet and I still couldn't access it thru ADB.
I found out I really didn't have it turned on, and when I did I was able to execute the ADB commands.
That gets me back to my earlier post about not being able to turn on the developer mode on my "bad" tablet if I can't log in.
I would think with all the guys working on this stuff someone has come up with a way to get around a lost password?
I remind you, I tried the power+volume sequence many times, many ways, so I need a different approach; if there is one?
Thanx.
@jrockow
Because the tablet can't connect with PC via ADB then wondering why you don't contact seller of the tablet? Unlock Screen Password always can be done with Google Account Android device initially was bound to.
jwoegerbauer said:
@jrockow
Because the tablet can't connect with PC via ADB then wondering why you don't contact seller of the tablet? Unlock Screen Password always can be done with Google Account Android device initially was bound to.
Click to expand...
Click to collapse
I have already reached out to the seller. However, he knows nothing of the history of the tablet. He's just a guy who collects tons of electronics and sells them on eBay.
What really frustrates me is I can quite easily get my "good" tablet to enter recovery mode with the power+vol combination. I have tried many, many times to duplicate the same combo on the "bad" tablet and it just jumps over the recovery mode and boots to the logon screen.
Is it possible someone made some change to the tablet that won't allow it to go into recovery?
jrockow said:
I have already reached out to the seller. However, he knows nothing of the history of the tablet. He's just a guy who collects tons of electronics and sells them on eBay.
What really frustrates me is I can quite easily get my "good" tablet to enter recovery mode with the power+vol combination. I have tried many, many times to duplicate the same combo on the "bad" tablet and it just jumps over the recovery mode and boots to the logon screen.
Is it possible someone made some change to the tablet that won't allow it to go into recovery?
Click to expand...
Click to collapse
So, I've come to the conclusion that what I'm asking for just can't be done.
Can't enter reset with any key combo I've tried; can't use ADB because debugging not on; can't go to Google because I don't know who owned the phone before me.
If this were a PC device, there are multiple apps available to get around a lost password. I've done it many times.
I was really hoping there would be some Android genius out there who could help.
What a shame to realize that a perfectly good working device might as well be thrown in the trash.
jrockow said:
So, I've come to the conclusion that what I'm asking for just can't be done.
Can't enter reset with any key combo I've tried; can't use ADB because debugging not on; can't go to Google because I don't know who owned the phone before me.
If this were a PC device, there are multiple apps available to get around a lost password. I've done it many times.
I was really hoping there would be some Android genius out there who could help.
What a shame to realize that a perfectly good working device might as well be thrown in the trash.
Click to expand...
Click to collapse
If you know that the phone basically supports ADB, if the phone has a slot for external SD-card, if you can boot into Recovery Mode, if the Recovery Mode allows you to "apply update from sd-card" then you by means of an OTA can enable USB-debugging, then you can access the phone via ADB.
Currently I'm working on such an UPDATE.ZIP and will, if it's bug free, it publish here on XDA.
Personally don't own a phone what supports ADB: it's a HUAWEI Y7 2019. If you are willing to become a tester let me know it. I'll then PM you the link to the UPDATE.ZIP.
jwoegerbauer said:
If you know that the phone basically supports ADB, if the phone has a slot for external SD-card, if you can boot into Recovery Mode, if the Recovery Mode allows you to "apply update from sd-card" then you by means of an OTA can enable USB-debugging, then you can access the phone via ADB.
Currently I'm working on such an UPDATE.ZIP and will, if it's bug free, it publish here on XDA.
Personally don't own a phone what supports ADB: it's a HUAWEI Y7 2019. If you are willing to become a tester let me know it. I'll then PM you the link to the UPDATE.ZIP.
Click to expand...
Click to collapse
If I could boot into Recovery Mode my problem would be solved.

ADB unauthorized on Xiaomi MI 9T Pro with black screen

Hi to everybody,
my MI 9T Pro has black/broken screen so I need to access it and/or replicate the screen by using the ADB facility.
It has the USB Debug enabled, but I cannot authorize the access from my laptop due to the black screen and broken touch, there is any possibility to bypass the authorization process?
I have already tried to connect a mini-docking station in order to replicate the screen via the USB-C to HDMI feature, but nothing appears on the external display.
Any suggestion?
Many thanks
Roberto
P.S.: the phone works, it receives call, it is connected to the wifi network and, if it is connected via USB to the laptop, the "adb devices" command returns its serial number followed by a sad unauthorized status...
Tamagnun said:
Any suggestion?
Click to expand...
Click to collapse
Hello and good afternoon, Roberto.
Welcome to XDA! I hope you'll always get the support you require.
However, prior to your next posting please read the guidances that are stuck on top of every forum like
Note: Questions go in Q&A Forum
If you are posting a Question Thread post it in the Q&A forum. Technical discussion of Android development and hacking. No noobs, please. Device-specific releases should go under the appropriate device forum...
forum.xda-developers.com
and the others. I've moved your thread to Android Q&A.
Thanks for your cooperation!
Regards
Oswald Boelcke
Senior Moderator
Thank you Oswald, sorry for my wrong posting, I chose that thread because it was referred to ADB.
Kind Regards
Roberto
Don't know if it'll help, but the unauthorized message means a mismatch between pc and phone.
You can do this:
Go to C:/Users/<your username>/.android and delete a file called "adb key"
It's a hidden folder so activate that in folder options.
However, this will only trigger a new authorization message on the phone again.
The Android usb debugging notification gives you the option to switch the connection to be controlled from the phone to the PC side but it won't help if you can't see it.
IamTheBRAVE said:
Go to C:/Users/<your username>/.android and delete a file called "adb key"
Click to expand...
Click to collapse
Thank you very much for the useful tip!!
In this folder I found two files with the same timestamp:
- adbkey (without extension)
- adbkey.pub
Do you think it's better to delete both, isn't it?
Any idea to connect to the smartphone the USB-C data cable AND an external keyboard at the same time, using an OTG adaptor?
I need to use the data cable for ABD because I'm afraid I didn't activate the wireless debug option on the phone AND the keyboard in order to try to grant the authorization when the popup "appears" (ehm... it cannot, but if it should be possible it woold appear!! )
Anyway, many many thanks for this first step!!
Tamagnun said:
Thank you very much for the useful tip, in that directory I found two files,with the same timestamp:
- adbkey (without extension)
- adbkey.pub
Do you think it's better to delete both, isn't it?
Click to expand...
Click to collapse
Both is ok.
Any idea to connect to the smartphone the USB-C data cable AND an external keyboard, via OTG adaptor?
I need to use the data cable for ABD because on the phone I'm afraid I didn't activate the wireless debug option AND the keyboard in order to try to grant the authorization when the popup "appears" (ehm... it cannot, but if possible it wuold appear!! )
Click to expand...
Click to collapse
I don't know, maybe a wireless keyboard ? Or an usb hub like this:
https://www.amazon.com/TargetGo-Splitter-Extender-Ultra-Slim-Microphone/dp/B0957JKBHZ
So you can plug both the keyboard and the phone cable. Not sure if it would work...
Good luck
Hi Iam,
I'm performing some tests with an old phone (Note 4) in order to check your suggestion: unfortunately it's not possible to connect a keyboard (using an OTG cable, the phone is the "host" and devices are "clients") and to use ADBat the same time, because the standard data cable sets the phone like "client" and the PC like "host".
In fact in the OTG cable the pin 4 in the micro-USB connector is closed to GND, in standard data/charge cable the PIN 4 is not connected.
The idea to use a wireless keyboard is good, but with the black screen I cannot control BT connection or other.
In addition, I verified that the grant popup appears only if the phone is unlocked and also this is very hard with the black (and dead) screen.
I read in another thread (that I'm not able to find now...) that by copying the adbkey file from the PC .android folder to an internal android directory on th phone (something similiar to /data/adb/keys, but I don't remember well...) the smartphone authorizes the PC to connect via adb, do you now if this method could be a way to bypass the manual grant operation ?
Do you know a method to copy a file from PC to the phone by starting it in recovery mode?
Fastboot can help in this operation?
Thank you
Transferring files can only be done with adb push command.
I am not aware of a directory in the phone with the adbkey in it. So can't help you there...
Edit: found this
Storage location of "adb_keys"
I have a Galaxy s3 (I9300) that has a broken touch screen (display is fine). I therefore can not click the authorization dialog that pops up when I try to access the device via adb on any ROMs above
android.stackexchange.com
Hope it helps a little.
Hi Iam, thank you for your help!
On GitHub I found the cmd to copy RSA key from the PC to the smartphone, it is:
adb push %userprofile%/.android/adbkey.pub /data/misc/adb/adb_keys
but the author wrote that it works only with rooted phones... and my broken one is not!!
Anyway I'll try and I'll write here the result of the test in order to share my experience.
Nothing to do, it doesn't work...
The phone is switched on because if I connect it to the data cable on the PC I get this result:
C:\Users\rober>adb devices
List of devices attached
598261c1 unauthorized
and it is in RECOVERY MODE because I cannot find its IP address on the wifi router, but I cannot push the adbkey file:
C:\Users\rober>adb push C:\Users\rober\.android\adbkey.pub /data/misc/adb/adb_keys
adb: error: failed to get feature set: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
I don't have any idea to bypass the unauthorized state, due the host/client state it isn't possible to connect an external keyboard and the data cable at the same time, wireless keyboard cannot be paired without accessing the display so I dont' know how to proceed... sigh...
If someone has a suggestion I'll really appreciate it!
Found this. Can you try it?
Android - Enable ADB from recovery
Android - Enable ADB from recovery. GitHub Gist: instantly share code, notes, and snippets.
gist.github.com
What do you have for a screen lock? Swipe? Pattern? Numbers?
You need to tap and swipe the screen to get things done.
A plugged in mouse could do that if you only knew what you were doing.
If you have a digitizer (Wacom tablet) you can use that to do anything the screen can do.
Also, are you quite sure that the screen isn't responsive? It could be black but responsive.
I did a project to swipe patterns using a separate, rooted Android.
It works like a charm, but it's kind of a pain to set up.
See: https://forum.xda-developers.com/t/accessing-my-phone-with-a-dead-screen.4542763/post-88013171
Hmm, it's actually more complicated.
I plug in a device and the authorization popup appears.
But, if I pull the plug, the popup disappears after a second.
You won't be able to get a USB digitizer working.
You'd need a Bluetooth digitizer, but that would have to be enabled too.
So you'd need the USB digitizer to enable the BT digitizer.
(By "digitizer" I mean any absolute pointing device.)
If there is an internal UART (hardware console) you might be able to simply type in the adb_keys.
this script claims to by-pass the adb authorization by patching stock boot.img and resign with google test keys. it might work on locked bootloader (untested)
https://github.com/bkerler/android_universal
I don't know how it works, but you can hopefully write/flash partitions in EDL mode with this loader (untested)
https://forum.xda-developers.com/t/...r-qualcomm-based-phones.4368989/post-88041131
there is also a linux executeable to reboot into EDL mode from fastboot
https://github.com/bkerler/edl
Code:
$ fastboot devices
$ ./fastpwn oem edl
to install the loader
Code:
$ python3 edlclient/Tools/fhloaderparse path/to/FHLoaderDir Loaders
if you don't have linux you can try the re_livedvdV4.iso from pendrive.
there is also executeable for windows to reboot EDL and another EDL tool for windows (credits: @Renate)
the downside of this, once you rebooted phone you cannot get back to its currently (AFU) unlocked state, which means all your files are no longer decrypted (BFU). you can install apps remotely only as long as the phone is decrypted and online, so maybe there is a better way (vysor?)
alecxs said:
there is also a linux executeable to reboot into EDL mode from fastboot
Click to expand...
Click to collapse
I see that the "fastpwn" is 12 MB. Seems a bit large. No idea what's in there.
Some abl's may support fastboot commands for getting to EDL.
I've never seen it clearly listed which do have that.
The standard fastboot filters all commands except for "oem".
Code:
fastboot tickle me elmo // will not even be sent because "tickle" is not on the command list
fastboot oem ridiculous command // will be sent since oem commands get a free pass
So if your device uses an oem command to get to edl it will work with the stock fastboot.
If it uses a special "first tier" command you will have to use a modified, lenient fastboot.
IamTheBRAVE said:
Found this. Can you try it?
Android - Enable ADB from recovery
Android - Enable ADB from recovery. GitHub Gist: instantly share code, notes, and snippets.
gist.github.com
Click to expand...
Click to collapse
Hi Iam, I found a similar page on GitHub and I tried to input the adb pull command (see my previous msg), but because the PC is not authorized there is no way to write anything on the phone by using abd.
Many thank for your tentative to help me.
Renate said:
What do you have for a screen lock? Swipe? Pattern? Numbers?
You need to tap and swipe the screen to get things done.
A plugged in mouse could do that if you only knew what you were doing.
If you have a digitizer (Wacom tablet) you can use that to do anything the screen can do.
Also, are you quite sure that the screen isn't responsive? It could be black but responsive.
I did a project to swipe patterns using a separate, rooted Android.
It works like a charm, but it's kind of a pain to set up.
See: https://forum.xda-developers.com/t/accessing-my-phone-with-a-dead-screen.4542763/post-88013171
Hmm, it's actually more complicated.
I plug in a device and the authorization popup appears.
But, if I pull the plug, the popup disappears after a second.
You won't be able to get a USB digitizer working.
You'd need a Bluetooth digitizer, but that would have to be enabled too.
So you'd need the USB digitizer to enable the BT digitizer.
(By "digitizer" I mean any absolute pointing device.)
Click to expand...
Click to collapse
Hi Renate,
it is not possible to connect at the same time a USB keyboard (phone is the server by using an OTG cable) and a data cable (phone is the client in this situation) and as you have verified, when the data cable is disconnected, the grant message disappears...
I have a BT keyboard, but it is not possible to pair it to the smartphone working on a black screen, even if it was responsive.
Finally, I thing there isn't a way to bypass the grant message and authorize the phone "regularly", I think.
Renate said:
If there is an internal UART (hardware console) you might be able to simply type in the adb_keys.
Click to expand...
Click to collapse
Where the UART should be present? Inside the phone? Uhhmmmm.... Even if I found it your idea would be to wire it by soldering directly on the mainboard? Too much difficult for my poor experience, sorry!
Many thanks for your answer.
Before to start with replies, dear Alexc and Renate please let's apologize me because I'm absolutely newbie about these new devices, in order to clarify to you my (un)knowledge condition, let's consider that my last fw update was performed using the Odin tool on very old Samsung devices!
Thanks to your suggestions, now I know what is the fastboot and EDL (I read something on XDA and other sites), but I haven't understood if it is possible to read the userdata from one of these two boot states... anyway, I try to reply you, if you would want to continue to help me I'll be very grateful for this!
alecxs said:
this script claims to by-pass the adb authorization by patching stock boot.img and resign with google test keys. it might work on locked bootloader (untested)
https://github.com/bkerler/android_universal
Click to expand...
Click to collapse
It is written that it is tested only up to Android 10, so I prefer to avoid to test this method on a smartphone that hasm't a working screen, it isn't possible to understand what happens on it.
https://github.com/bkerler/android_universal
alecxs said:
I don't know how it works, but you can hopefully write/flash partitions in EDL mode with this loader (untested)
https://forum.xda-developers.com/t/...r-qualcomm-based-phones.4368989/post-88041131
Click to expand...
Click to collapse
I downloaded the firehose file for the chipset 855 but I'm not interested to flash a new firmware or similar...
alecxs said:
there is also a linux executeable to reboot into EDL mode from fastboot
https://github.com/bkerler/edl
Code:
$ fastboot devices
$ ./fastpwn oem edl
Click to expand...
Click to collapse
OK, the previous is clear for me: now the smartphone is booted in fastboot mode and the utility can access it:
Code:
C:\Users\rober>fastboot --version
fastboot version 34.0.0-9570255
Installed as C:\Android-Recovery\platform-tools\fastboot.exe
C:\Users\rober>fastboot devices
598261c1 fastboot
Is the fastboot utility version the right one to operate on my smartphone?
Please let's explain me: if I'll reboot the phone to EDL (using fastpwn utility, fastboot oem command or another utility or method) I risk to lose my userdata ?
alecxs said:
to install the loader
Code:
$ python3 edlclient/Tools/fhloaderparse path/to/FHLoaderDir Loaders
Click to expand...
Click to collapse
Sorry for the stupid question, but why I have to install a loader on the phone?
alecxs said:
if you don't have linux you can try the re_livedvdV4.iso from pendrive.
Click to expand...
Click to collapse
My Surface has Win10 and Ubuntu (I never use it but I have prepared a dual boot for any needs...).
alecxs said:
there is also executeable for windows to reboot EDL and another EDL tool for windows (credits: @Renate)
Click to expand...
Click to collapse
I would prefer to use Windows utilities, but it is not mandatory...
Before to try to switch to EDL I need to understand if this operation will destroy my data or not, and what I can do from this EDL boot mode, I know it is posisble to flash the phone from scratch, but is it possible to read data by mounting phone partitions or similar?
For example, I listed the fastboot options and I found the possibility to FETCH a partition from the phone and copy it to the PC, this can help to access my data?
Maybe they are encrypted?
Do you have a schema or a list of all available partitions inside a MIUI 13 device? (I need to learn something before to proceed...)
alecxs said:
the downside of this, once you rebooted phone you cannot get back to its currently (AFU) unlocked state, which means all your files are no longer decrypted (BFU). you can install apps remotely only as long as the phone is decrypted and online, so maybe there is a better way (vysor?)
Click to expand...
Click to collapse
So, the previous message is the reason I'm very carefull before to switch to EDL boot mode: is it enough to switch the phone to EDL in order to lock all data because they'll become definitively encrypted ??
Please let's try to clarify me your suggestions and how to proceed...
Many many thanks for your patience
Update: with the cmd fastboot getvar all I obtained the entire partions list, I tried to fetch one of this and the result is:
Code:
C:\Users\rober>fastboot fetch limits cache.ext4
fastboot: error: Unable to get max-fetch-size. Device does not support fetch command.
Not good, but at least I have answered to a couple of questions by myself... sigh...
@alexc: two years and seven months ago you helped someone to retrieve userdata from a bricked MI 4C by suggesting the followiing process, can i do something similar on my MI 9T PRO?
1 Obtain a programmer
To successfully acquire all of the data from EDL you need programmer.
For Mi 4c it is prog_emmc_firehose_8992_ddr.mbn that can be obtained in (first?) official image of OS. I got it from file Xiaomi_Mi_4C_V8.1.3.0.LXKCNDI_20161213_China_5.1_XFT.zip on some random site. You can find it in the archive under folder Firmware/images/.
The full path in archive would be Firmware/images/prog_emmc_firehose_8992_ddr.mbn.
2 Get working Firehorse​I have got mine from repository: https://github.com/bkerler/edl.
Proceed with all instructions mentioned in the repository. (I personally used Ubuntu 20.04 as all of the stuff is easier to make work.)
3 Connect to EDL​Boot phone to fastboot. In case of Mi 4c that is my case it is pushing volume down during boot.
When you enter fastboot and you can see your device with fastboot:
fastboot devices
In case of Mi 4c you can directly boot to EDL with command:
fastboot oem edl
4 Acquire data through EDL​When device enters EDL state you can test connection with programmer (in my case prog_emmc_firehose_8992_ddr.mbn). In loader parameter you are entering path to this file.
./edl.py --loader=prog_emmc_firehose_8992_ddr.mbn printgpt
When it outputs all of the partition then you are golden!
On my phone there is one partition named userdata:
userdata: Offset 0x00000000c4000000, Length 0x0000000683bfbe00, Flags 0x00000000, UUID 07c2b899-1574-564c-2f46-e26a6378bdd8, Type 0x1b81e7e6
To acquire the partition use command:
./edl.py --loader=examples/prog_emmc_firehose_8992_ddr.mbn r userdata userdata.bin
The copy of user data just needs to be read.
5 Reading user data (userdata.bin)​Luckily for the phone Mi 4c you can directly mount the dump in Linux. For some other phones the process might not be so straightforward and you might need simg2img. But I am not 100% sure.
sudo mkdir /media/userdata
sudo mount -t ext4 -o loop userdata.bin /media/userdata/
To read the data you will need to get root rights as the data belong to non-existing or different existing users and you won't get access with your user.
sudo mkdir userdata
sudo cp -r /media/userdata/media/0/* userdata/
The path to the your data might be different so take your time to look around.
Done! All the data are now completely accessible.
Click to expand...
Click to collapse
What is the "programmer"?
As I wrote before, I downloaded the file prog_ufs_firehose_sdm855_ddr.elf but it is the firehose, not the programmer, isn't it ?
Many thanks, I spent all the night to try to acquire some knowledge, but I have too many dubts again...
When your Android boots it goes PBL (in ROM) -> xbl -> abl -> Android.
A Firehose loader is a custom replacement for xbl that it can load live.
Instead of loading all the rest of the stuff it just sits on USB and awaits commands.
Firehose, programmer, loader, .bin, .elf, .mbn can all be the same things.
Using EDL will not hurt your system or data (unlike fastboot unlock).
If you read back your userdata it will still be encrypted (if it was).
One thing that you can do is read back your entire image.
Then you will in any case be able to restore your device to exactly how it is right now.

Categories

Resources