Recovering UserData from a Working but Unusable Phone - Moto G Q&A, Help & Troubleshooting

My Moto G (1st Gen XT1033) began to have issues 3 months back, I havent been able to fix it yet.
The phone boots up fine (usually), displays "Android is Upgrading" message each time, then shows the lock screen which still functions fine.
Once unlocked, the phone does not display the Home screen, nor am I able to open the Apps Drawer, I can access Settings though.
It shows the same missed call notification each time, even if I dismiss the notification and force restart the phone, it will still show up again.
I can see that my files are still around by navigating from the Storage section under settings.
If I try to take a screenshot using Power+VolDown keys, it will say screenshot captured in the notification bar, but I dont think that it is able to actually save the screenshot, since the count of files in Screenshot folder from the Storage section remains same.
Unable to open any apps since I can only access settings. Modifying any setting here has no effect and is lost again on reboot.
When connected to PC, it does not mount properly even though I have the drivers installed.
ADB pull also does not work, even though I had enabled USB debugging long before it stopped functioning properly. I no longer get the authorize dialog.
I repeatedly get "xxxx stopped/stopped working" error dialog.
While I am able to mount an OTG usb drive, I am unable to use it since I can only open it from Total Command and it seems to be unable to open it in Read-Write mode. I am unable to open it from ES Explorer since I cant open any of the apps..
I tried to go to recovery mode and clear cache, but it has issues booting into recovery. Earlier post here.
Here's a recording of how the phone behaves after rebooting.
Unfortunately I had not setup a backup process and now I need to badly recover my data from the UserData partition.
How do I go about recovering my data from the UserData partition?
Another Noob Question: Can I safely run "fastboot erase cache" or "mfastboot erase cache" command from bootloader(fastboot mode) without having to unlock the bootloader?

assuming you have a locked bootloader, there is nothing you can do (like salvaging userdata, which require root privileges)
unlocking the bootloader will reset the phone, and you will lose all you user data/apps.

Related

[Q] Soft Bricked Nexus S 4G - Save the Baby Photos!

I've spent 4-6 hours researching and trying things and have become quite familiar with rooting, fastboot, adb, sideload, and various other tools and have many installed & working, so if I make a noob comment or mistake, go easy on me. I did my best to do my own due diligence.
Here's the situation:
Nexus S 4G - stock from Sprint
Android 4.1 as pushed from Sprint
Not Rooted
Debugging Mode not enabled
Launcher, UI, Settings, Apps, etc fail ("has stopped") if they use the UI
Things not requiring UI do start and run
Android boots up normally to the lock screen (I have pattern lock). Apps start up in background fine (Locale, Alarm Clock Extreme, etc). Upon unlocking, I get "Unfortunately, Launcher has stopped." Repeatedly. It won't let me click any apps. I can, however, bring down the notification window. Selecting anything in the notification window fails, with "____ has stopped," including Settings, Messaging, Google Play, etc. When I plug in USB, I see the green Android with the "Turn on USB storage" button, but I can't click it before "System UI has stopped."
Unfortunately, most solutions warn "this will wipe all user data," and I don't have backups of a hundred or more photos and videos of my daughter's first year. So wiping data will be my LAST resort...and even then I may try forensic recovery from a dd image (I work in Computing Security, so have a fairly good technical background).
What I've tried, and result:
Reboot into recovery - I get dead Android with red exclamation
Wipe cache & reboot - no improvement (tried 5-10 times)
Reboot into Safe Mode - no improvement
Push 3rd party launcher - installs, but upon unlocking and selecting Launcher / Go Launcher (.e.g), I get "Go Launcher has stopped."
Fastboot - I get device listed/connected, but most commands cause wipe, so I haven't ventured much further
Calling Sprint and having Jellybean re-pushed to my device - it appeared to push (I saw update status message), but when I rebooted, no apparent difference (maybe it didn't push?)
Add/Remove apps via Play Store - works fine. I can remove apps (and have removed nearly all) and add apps, and they uninstall or install successfully (notification window confirms). But I can't access any newly installed apps due to the "stopped working" window.
Suggestions I can't try:
adb backup/shell/pull etc - my debugging mode is not on and I can't turn it on.
USB backup - can't enable USB Mode, and I don't have an automount capability
fastboot oem unlock - wipes phone
I want to try adb sideload <image>, but I haven't been able to confirm whether this truly wipes the user partition or not. If anyone can confirm, let me know. My phone enters sideload mode via:
1) boot to fastboot (power + vol up from OFF)
2) select recovery
3) at dead android with red exclamation, again press power + vol up and release. Menu appears only after you release.
4) 2nd option is "Apply update from ADB" which puts phone into special adb mode where the ONLY command accepted from your PC is "adb sideload."
Any suggestions on how I may be able to retrieve my photos and videos given this completely borked OS?
Thanks.
You could try this. It's Beta and buggy but might work.
http://forum.xda-developers.com/showthread.php?p=36499906
jayjay3333 said:
You could try this. It's Beta and buggy but might work.
http://forum.xda-developers.com/showthread.php?p=36499906
Click to expand...
Click to collapse
Thanks for the suggestion, but that requires Debugging Mode enabled. It's essentially a GUI for "adb backup." Unfortunately, I can't get debugging mode enabled in any way known to me yet.
Is anyone out there familiar with the adb sideload command? I'm really curious if sideloading an image into user partition in any way wipes data.
SOLVED - how I saved the baby photos
I thought I'd give a quick post on how I actually was able to recover my baby's photos. I was at my last resort and decided I'd just try to do a dd image of the card after I did a "wipe and factory reset." My hope was that a "wipe" did not actually write 0s over the entire internal SD card, but just erased the FAT. In that case, I figured, if I took a dd image, I could use a tool like Forensic Toolkit or similar file carving tool to carve out .MP4, .3GP and .JPG files.
So I selected the wipe and factory reset, but had my Linux system ready to do the dd IMMEDIATELY upon reboot. I had ALREADY plugged my USB connector into the Linux system. When the factory reset completed, the system booted directly to the "Enable USB Mode?" prompt. I enabled it, and performed a ~14 GB dump. I know this only catches the user partition, but I didn't care about the system partition, and hoped it would be re-allocated in roughly same location as previously (not stomping on my user data). After the dd was complete (about 3 hrs or so), I bit the bullet and just signed into my Google account and had Google Backup "restore settings."
Later, I was using ES File Explorer and noticed all JPGs were still in my DCIM folder. When I browsed with Gallery ALL PHOTOS AND MOVIES were still present! :victory:
I did not have any backup/recovery software installed to the best of my knowledge, except for Google's "settings backup." So my best explanation is that the wipe & factory reset DID NOT wipe my user data. This may be a fluke, or due to me having USB connected during the wipe & reset. Not sure.
Just to be sure we're all talking about the same "Factory Reset," on my stock Nexus S 4G running Android 4.1.1:
- power off phone
- press Vol Up and Power at same time -- you'll get the Bootloader
- select Recovery -- you'll get dead android with red exclamation after a few seconds
- press Vol Up and Power at same time again -- you'll get a secondary menu
- select "wipe data/factory reset"
- select "Yes" from a long list of "No" with one randomly-placed "Yes"
Hope this helps someone down the road...
I also wanted to note about the "ADB sideload" command. It can only be used to push incremental updates to the device--not full images needed to recover from a corrupted OS. I successfully sideloaded the 4.1.1 update (re-applied the 4.1.1 that I was currently running), which included "launcher2.apk" and a couple other launcher components that gave me hope. But when the 4.1.1 sideload completed successfully and I rebooted, launcher was still hosed. The 4.1.2 incremental update hasn't been released by Sprint yet.
That was hell of a read. The Samsung toolbox program you can do a temp boot and mount your SD card. But I'm too late to tell you now sorry.
Sent from my Nexus S using xda app-developers app
A few minutes googling would have told you that adb is set in the build.prop
Code:
persist.sys.usb.config=adb
OR adb with mount external
persist.sys.usb.config=mass_storage,adb
OR adb with mtp, but you need a kernel
persist.sys.usb.config=mtp,adb
Hi Can you tell us the dd command that you have used to dump the data?
My Case was little different. My friend had tried unlocking screen pattern and it got locked.
Wifi was not on neither was it rooted nor usb debugging mode enabled.
Solution:
I did a factory reset with my phone connected to PC.
once this is done during reboot a prompt came up asking whether to enable USB debugging need to be enabled.
I enabled it and I could see all my data from my PC.
I copied everything and continued with booting.
Hope this will help someone
Pavankumarvijapur said:
My Case was little different. My friend had tried unlocking screen pattern and it got locked.
Wifi was not on neither was it rooted nor usb debugging mode enabled.
Solution:
I did a factory reset with my phone connected to PC.
once this is done during reboot a prompt came up asking whether to enable USB debugging need to be enabled.
I enabled it and I could see all my data from my PC.
I copied everything and continued with booting.
Hope this will help someone
Click to expand...
Click to collapse
I wonder if this will work with a Nexus 7 on 4.3-4.4 ota soft brick
This is why rooting unlocking and a custom recovery is so important.
Sent from my XT897 using XDA Premium 4 mobile app

Please help to unbrick

Hi,
I am looking for some help as I did something stupid...
I came across some posting that explained that the moto has an unused partition under /cache that could be used for the dalvik-cache.
So I tried to move the dalvik-cache there and link /data/dalvik-cache to this new location.
Now the problem is that I get an "unfortunately the location-service has stopped" message all the time that makes the device unusuable (as soon as I press ok the same warning appears again).
When I try to boot into recovery I get a "dead android robot".
I can however access the device via adb, unfortunately I am not able to get a root shell. My device is rooted, but su in an adb-shell just hangs.
If I could only get a root-shell I could undo my changes and hopefully my device will work again, but I have to idea on what to try...
Can anone help me here?
morgonhed said:
Hi,
I am looking for some help as I did something stupid...
I came across some posting that explained that the moto has an unused partition under /cache that could be used for the dalvik-cache.
So I tried to move the dalvik-cache there and link /data/dalvik-cache to this new location.
Now the problem is that I get an "unfortunately the location-service has stopped" message all the time that makes the device unusuable (as soon as I press ok the same warning appears again).
When I try to boot into recovery I get a "dead android robot".
I can however access the device via adb, unfortunately I am not able to get a root shell. My device is rooted, but su in an adb-shell just hangs.
If I could only get a root-shell I could undo my changes and hopefully my device will work again, but I have to idea on what to try...
Can anone help me here?
Click to expand...
Click to collapse
The dead android bot is normal for stock recovery, if you didn't install a custom one. You can always flash a custom recovery using fastboot, and wipe the dalvik-cache and regular caches. Or, in the "dead android bot" screen, you can press the Vol+ key for about 15 secs, then tap the Power button, then scroll using the Vol buttons to something that says wipe cache. You might have to wipe dalvik-cache as well, if you can. I forget where the options are, since I haven't used the stock recovery in so long, sorry!
Ok, I managed to get beyond the "dead android" and from the menu I did a "wipe cache parition". That ran for some minutes, then it rebooted.
But after that I still have the same problem. The continuous "unfortunately the location-service has stopped" messages still persist.
Any other ideas?
Do you have an unlocked bootloader? If you do, the simplest solution may be to flash back to a stock ROM.
audit13 said:
Do you have an unlocked bootloader? If you do, the simplest solution may be to flash back to a stock ROM.
Click to expand...
Click to collapse
Yes my bootloader is unlocked. But I don't want to loose too much...
I believe the problem is only a permission-problem in my new /cache/dalvik-cache directory (/data/dalvik-cache now links there).
So all I would need is a way to get a root-shell (the device is rooted).
I can do a "adb shell" as normal user but that does not have the permissions to even look into /cache and for whatever reason when I type "su" I don't get an error nor do I become root but the command simply hangs...
The system as such still seems to work, e.g. my Moto still connects to my hotspot and I can ping it from there.
The even seems to be an "adb root" command, but that does not work on my adb. Is there a version of adb somewhere that would honor adb root?
Anyone with another idea on how to get a root-shell in my situation
Sorry, I don't know enough about adb commands to change the directory back to the default.
I assume you have usb debugging enabled and your computer is a trusted machine?
USB debugging is definitely enabled, whether or not I've set up my PC as trusted I don't remember.
If I didn't could that explain why I can get a shell but not as root or would you without a trusted computer not even get a shell?
Ok, issue resolved.
I've flashed clockworkmod recovery and cleared the dalvik-cache with that. That did the trick.
And moving my 300MB dalivk-cache to /cache seems to have worked and frees up memory for me, even better.
Finally the reason I could not get root in the adb shell was that when I type su in the adb-shell a superuser-request pops up on the phone that you have to acknowlege. But with constant warnings poping up I did not even see that...
Thanks for all support.
For the Developer options, look under Root access. Did you grant root access to ADB and apps?
When you type su, look at the phone's screen. Are you prompted to grant root access to ADB?

Bricked Idol 3, need help recovering

I installed the OTA update last night and it's just looping through the "alcatel one touch" and "smart move" screens. It's been like that for hours.
I need assistance in getting into recovery mode, and hopefully getting my files off the device.
I have downloaded android-studio and am about to install it to get adb and fastboot, and have downloaded the drivers for the idol 3. At this point when it's plugged in, my computer doesn't recognize the device.
If you did not have usb debugging enabled BEFORE the boot loop installing adb and fastboot now won't do you any good. Are you still able to get into recovery and is it twrp or the factory recovery? Without a direct way to get the phone into bootloader regretfully the only solution is to send it in for warranty repair (or replacement via your credit card if you paid that way under purchase protection)
Are you trying to remove the data to prevent access by others or because you need the data? Did you make any backups to external sd or copied to the pc?
I as well am stuck in bootloop. Was able to get into factory recovery and reset phone several times. Still no luck. I have a TWRP backup, but how to I do a temporary boot into it? Only option available in factory recovery was to sideload via ADB, but no luck using fastboot commands there. Phoned Alcatel and they have referred me back to Amazon. Amazon only wants to refund me, won't exchange! Of course I bought at the pre-order price. Any help would be greatly appreciated.
wrench588 said:
I as well am stuck in bootloop. Was able to get into factory recovery and reset phone several times. Still no luck. I have a TWRP backup, but how to I do a temporary boot into it? Only option available in factory recovery was to sideload via ADB, but no luck using fastboot commands there. Phoned Alcatel and they have referred me back to Amazon. Amazon only wants to refund me, won't exchange! Of course I bought at the pre-order price. Any help would be greatly appreciated.
Click to expand...
Click to collapse
The factory reset killed you....if you had usb debugging enabled prior and had not done a factory reset (which kills /data) you could have possibly gotten to an adb shell long enough to do an adb reboot bootloader. The problem is there's no way now to get you into bootloader....you can't get to it from recovery (factory).
If you purchased it by credit card you might see if their purchase protection (typically 60-90 days) allows a claim submission for a replacement....in this case they would cut you a check for the cost of a replacement after mailing in your old one. That's the only solution I see to remain at the $199 price.
You could also see if amazon will issue a $50 credit to your account in addition to return to allow for repurchase. Unlikely but possible.
Ok thanks for the input and advice. As a last ditch effort, is there a way to create or modify the twrp file as a "signed" zip file so that I could boot into it via stock recovery. This was how I rooted my old Galaxy S2, although it was a CWM recovery.
wrench588 said:
Ok thanks for the input and advice. As a last ditch effort, is there a way to create or modify the twrp file as a "signed" zip file so that I could boot into it via stock recovery. This was how I rooted my old Galaxy S2, although it was a CWM recovery.
Click to expand...
Click to collapse
Nothing so far has worked in that regard...in fact I created a update.zip using "zipme" to replace the build.prop that another user says the factory recovery refused to process.
Without a full factory rom to pull needed info in or the source code to compile one we can't do some of the things which would "save" the device.
wrench588 said:
...Only option available in factory recovery was to sideload via ADB, but no luck using fastboot commands there.
Click to expand...
Click to collapse
Strange ... the stock recovery of 6039y has an option for reboot to the bootloader.
petrov.0 said:
Strange ... the stock recovery of 6039y has an option for reboot to the bootloader.
Click to expand...
Click to collapse
Can you post a screenshot where the option is? I'm not doubting your word but perhaps he's looking in the wrong place? I'm back on TWRP so can't look in the stock recovery myself.
famewolf said:
Can you post a screenshot where the option is? I'm not doubting your word but perhaps he's looking in the wrong place? I'm back on TWRP so can't look in the stock recovery myself.
Click to expand...
Click to collapse
There is no option for screenshot while the phone is in the stock recovery. I need a camera to take a picture of the menu. I can do this later. The menu however looks like this:
Code:
reboot system now
apply update from ADB
apply update from sdcard
apply update from phone storage
wipe data/factory reset
wipe cache partition
reboot to bootloader
power down
view recovery log
petrov.0 said:
There is no option for screenshot while the phone is in the stock recovery. I need a camera to take a picture of the menu. I can do this later. The menu however looks like this:
Code:
reboot system now
apply update from ADB
apply update from sdcard
apply update from phone storage
wipe data/factory reset
wipe cache partition
reboot to bootloader
power down
view recovery log
Click to expand...
Click to collapse
If it's right off the main page like that then I can confirm it's not on the 6045. It's been one of the main issues with folks bricking their devices...if their rom gets messed up and they have factory recovery they have no way to get into bootloader to do anything to repair the device. Seems alcatel needs to add the reboot to bootloader to our recovery. I wonder where we could report that.
Is there a way to "lock" recovery so the updates cannot replace twrp? TWRP allows adb access and reboot to bootloader.
famewolf said:
If it's right off the main page like that then I can confirm it's not on the 6045. It's been one of the main issues with folks bricking their devices...if their rom gets messed up and they have factory recovery they have no way to get into bootloader to do anything to repair the device. Seems alcatel needs to add the reboot to bootloader to our recovery. I wonder where we could report that.
Is there a way to "lock" recovery so the updates cannot replace twrp? TWRP allows adb access and reboot to bootloader.
Click to expand...
Click to collapse
This is a snapshot from the recovery menu of 6039y.
The short answer of your question regarding the "lock" is ... no. If a longer explanation is needed ... this is from the update file, a link to which was provided by you:
Code:
if ! applypatch -c EMMC:/dev/block/bootdevice/by-name/recovery:18393344:f9062580503eb61b315a5d12c5c6b3bb133aa4b2; then
....etc.
what it does is to check the sha1 sum of the recovery partition and if the sha1 sum doesn't match to f9062580503eb61b315a5d12c5c6b3bb133aa4b2 will continue with an overwriting of the recovery partition and then will apply a patch. It can't be changed because the whole update will fail.
yep no bootloader
I've got reboot to boatloader on main page from stock recovery on my 6045k
Sent from hell
famewolf said:
Is there a way to "lock" recovery so the updates cannot replace twrp? TWRP allows adb access and reboot to bootloader.
Click to expand...
Click to collapse
Back to the "lock" question. Probably it is possible the OTA update to be slightly modified and then to be flashed through the TWRP recovery (there is an option in TWRP to skip the signature verification ... the verification will fail if the zip file is modified). But I prefer to wait for the OTA update of the 6039y, as I want to perform some tests with the upgrade.
ractar28 said:
I installed the OTA update last night and it's just looping through the "alcatel one touch" and "smart move" screens. It's been like that for hours.
I need assistance in getting into recovery mode, and hopefully getting my files off the device.
I have downloaded android-studio and am about to install it to get adb and fastboot, and have downloaded the drivers for the idol 3. At this point when it's plugged in, my computer doesn't recognize the device.
Click to expand...
Click to collapse
I am in the same boat as OP re the state my Idol 3 (6045i) is currently in. I also unchecked superuser but did not unroot completely before installing the update. I have not yet done a data wipe through recovery though. Unfortunately, back when I rooted the phone I did NOT check the box telling the phone to remember the computer/RSA key for future use. As a result, now when the phone is stuck at the white/animated Alcatel boot logo I can see the phone under adb devices, but it shows as unauthorized.
One thing that did seem odd, was browsing through stock recovery when trying to browse to apply an update from either phone storage or the SD card, no files are showing up at all. All it is showing is the folder root ( /.. ) in both instances and nothing else. Even after I attempted loading several system update and twrp images (in .zip and .img formats) on the SD card from my computer, once loaded in the phone none of the files show up through stock recovery. Is this SD card not compatible/formatted wrong or is something else going on?
Is there any current method to gaining access to the phone via adb manupulating the adbkey files in the $User$/Home/.android folder? I do currently have the adbkey files on my Mac from connecting the phone previously. I'm assuming these files are uniquely generated hashes?
That is ridiculous if the 6045k has bootloader access from recovery and 6045i does not. What would be the reasoning for this?
Nikola Jovanovic said:
I've got reboot to boatloader on main page from stock recovery on my 6045k
Sent from hell
Click to expand...
Click to collapse
Does the sha1 sum of your recovery happen to match f9062580503eb61b315a5d12c5c6b3bb133aa4b2 ? If so it could solve some issues but why do I suddenly think all 3 models have their own recovery?
---------- Post added at 08:47 AM ---------- Previous post was at 08:43 AM ----------
n3tnut said:
I am in the same boat as OP re the state my Idol 3 (6045i) is currently in. I also unchecked superuser but did not unroot completely before installing the update. I have not yet done a data wipe through recovery though. Unfortunately, back when I rooted the phone I did NOT check the box telling the phone to remember the computer/RSA key for future use. As a result, now when the phone is stuck at the white/animated Alcatel boot logo I can see the phone under adb devices, but it shows as unauthorized.
One thing that did seem odd, was browsing through stock recovery when trying to browse to apply an update from either phone storage or the SD card, no files are showing up at all. All it is showing is the folder root ( /.. ) in both instances and nothing else. Even after I attempted loading several system update and twrp images (in .zip and .img formats) on the SD card from my computer, once loaded in the phone none of the files show up through stock recovery. Is this SD card not compatible/formatted wrong or is something else going on?
Is there any current method to gaining access to the phone via adb manupulating the adbkey files in the $User$/Home/.android folder? I do currently have the adbkey files on my Mac from connecting the phone previously. I'm assuming these files are uniquely generated hashes?
That is ridiculous if the 6045k has bootloader access from recovery and 6045i does not. What would be the reasoning for this?
Click to expand...
Click to collapse
adb reboot bootloader won't work even with it showing unauthorized? If you can get into bootloader you can fix /system without messing up your /data (don't wipe data or you lose adb entirely...you may figure out how to add the correct hash if we can find how it's generated)
Here's some info on the hashes you might find useful taken from: http://nelenkov.blogspot.com/2013/02/secure-usb-debugging-in-android-422.html
Secure ADB implementation
The ADB host authentication functionality is enabled by default when the ro.adb.secure system property is set to 1, and there is no way to disable it via the system settings interface (which is a good thing). The device is initially in the OFFLINE state and only goes into the ONLINE state once the host has authenticated. As you may already know, hosts use RSA keys in order to authenticate to the ADB daemon on the device. Authentication is typically a three step process:
After a host tries to connect, the device sends and AUTH message of type TOKEN that includes a 20 byte random value (read from /dev/urandom).
The host responds with a SIGNATURE packet that includes a SHA1withRSA signature of the random token with one of its private keys.
The device tries to verify the received signature, and if signature verification succeeds, it responds with a CONNECT message and goes into the ONLINE state. If verification fails, either because the signature value doesn't match or because there is no corresponding public key to verify with, the device sends another AUTH TOKEN with a new random value, so that the host can try authenticating again (slowing down if the number of failures goes over a certain threshold).
Signature verification typically fails the first time you connect the device to a new host because it doesn't yet have the host key. In that case the host sends its public key in an AUTH RSAPUBLICKEY message. The device takes the MD5 hash of that key and displays it in the 'Allow USB debugging' confirmation dialog. Since adbd is a native daemon, the key needs to be passed to the main Android OS. This is accomplished by simply writing the key to a local socket (aptly named, 'adbd'). When you enable ADB debugging from the developer settings screen, a thread that listens to the 'adbd' socket is started. When it receives a message starting with "PK" it treats it as a public key, parses it, calculates the MD5 hash and displays the confirmation dialog (an activity actually, part of the SystemUI package). If you tap 'OK', it sends a simple simple "OK" response and adbd uses the key to verify the authentication message (otherwise it just stays offline). In case you check the 'Always allow from this computer' checkbox, the public key is written to disk and automatically used for signature verification the next time you connect to the same host. The allow/deny debugging functionality, along with starting/stopping the adbd daemon, is exposed as public methods of the UsbDeviceManager system service.
We've described the ADB authentication protocol in some detail, but haven't said much about the actual keys used in the process. Those are 2048-bit RSA keys and are generated by the local ADB server. They are typically stored in $HOME/.android as adbkey and adbkey.pub. On Windows that usually translates to %USERPOFILE%\.android, but keys might end up in C:\Windows\System32\config\systemprofile\.android in some cases (see issue 49465). The default key directory can be overridden by setting the ANDROID_SDK_HOME environment variable. If the ADB_VENDOR_KEYS environment variable is set, the directory it points to is also searched for keys. If no keys are found in any of the above locations, a new key pair is generated and saved. On the device, keys are stored in the /data/misc/adb/adb_keys file, and new authorized keys are appended to the same file as you accept them. Read-only 'vendor keys' are stored in the /adb_keys file, but it doesn't seem to exist on current Nexus devices. The private key is in standard OpenSSL PEM format, while the public one consists of the Base 64 encoded key followed by a `[email protected]` user identifier, separated by space. The user identifier doesn't seem to be used at the moment and is only meaningful on Unix-based OS'es, on Windows it is always '[email protected]'.
While the USB debugging confirmation dialog helpfully displays a key fingerprint to let you verify you are connected to the expected host, the adb client doesn't have a handy command to print the fingerprint of the host key. You might think that there is little room for confusion: after all there is only one cable plugged to a single machine, but if you are running a couple of VMs, thing can get a little fuzzy. Here's one of way of displaying the host key's fingerprint in the same format the confirmation dialog uses (run in $HOME/.android or specify the full path to the public key file):
awk '{print $1}' < adbkey.pub|openssl base64 -A -d -a \
|openssl md5 -c|awk '{print $2}'|tr '[:lower:]' '[:upper:]'
We've reviewed how secure ADB debugging is implemented and have shown why it is needed, but just to show that all of this solves a real problem, we'll finish off with a screenshot of what a failed ADB attack against an 4.2.2 device from another Android device looks like:
famewolf said:
adb reboot bootloader won't work even with it showing unauthorized? If you can get into bootloader you can fix /system without messing up your /data (don't wipe data or you lose adb entirely...you may figure out how to add the correct hash if we can find how it's generated)
Click to expand...
Click to collapse
Just tested using adb reboot bootloader again and this is the result: error: device unauthorized. Please check the confirmation dialog on your device.
Something else I tried was running fastboot commands in the narrow window that the phone initially boots (black screen with Android logo) but that didn't seem to work either. I tried:
fastboot reboot-bootloader
fastboot -i 0x1bbb reboot-bootloader
fastboot -i 0x1bbb devices
I noticed if you plug the phone into the computer via USB while the phone is off, it will briefly power on to the Android logo/black screen before flashing the battery status once and turning off. Is this an opportunity to send fastboot or adb commands to the phone?
I'll try messing with the adbkey stuff later when I have time to dig into it.
There is a tool from Alcatel (TCL) which can perform upgrades of the device from a Windows PC. You can try it if nothing else helps. There are two COM ports available under Windows when the device is powered off and the USB cable is connected to the phone. This tool use them to perform some checks on the device and probably will continue with an upgrade (it says that all of your data will be wiped after the upgrade etc. so there is a possibility to overwrite everything with a stock image) ... there are instructions how to work with it. The link is from the French support section of Alcatel. Despite that the program has support for 6039 and 6045 is not clear for which of their versions.
petrov.0 said:
There is a tool from Alcatel (TCL) which can perform upgrades of the device from a Windows PC. You can try it if nothing else helps. There are two COM ports available under Windows when the device is powered off and the USB cable is connected to the phone. This tool use them to perform some checks on the device and probably will continue with an upgrade (it says that all of your data will be wiped after the upgrade etc. so there is a possibility to overwrite everything with a stock image) ... there are instructions how to work with it. The link is from the French support section of Alcatel. Despite that the program has support for 6039 and 6045 is not clear for which of their versions.
Click to expand...
Click to collapse
The problem is we currently have no stock images in the format it requires to flash to restore the device. I would think those have to be available first?
---------- Post added at 02:56 AM ---------- Previous post was at 02:55 AM ----------
n3tnut said:
Just tested using adb reboot bootloader again and this is the result: error: device unauthorized. Please check the confirmation dialog on your device.
Something else I tried was running fastboot commands in the narrow window that the phone initially boots (black screen with Android logo) but that didn't seem to work either. I tried:
fastboot reboot-bootloader
fastboot -i 0x1bbb reboot-bootloader
fastboot -i 0x1bbb devices
I noticed if you plug the phone into the computer via USB while the phone is off, it will briefly power on to the Android logo/black screen before flashing the battery status once and turning off. Is this an opportunity to send fastboot or adb commands to the phone?
I'll try messing with the adbkey stuff later when I have time to dig into it.
Click to expand...
Click to collapse
You can't do fastboot commands until the phone is IN bootloader....so you'd have to do adb reboot bootloader
adb devices
etc....
famewolf said:
The problem is we currently have no stock images in the format it requires to flash to restore the device. I would think those have to be available first?
Click to expand...
Click to collapse
It is possible the program to download these images from a server.
I found another interesting thing. The device has a download mode. It is activated when the phone is powered off and connected to a PC. You must wait the display to turn off after the charging battery symbol and then to press and hold both volume keys, after which to press and hold the power button (without releasing these for the volume). But still don't know what to do in this mode. No device is detected on my Linux box when the phone is in this state. Probably I should try in Windows.
Also when the Alcatel upgrade tool was trying to detect the phone I'm almost sure that one of the COM ports was
Qualcomm HS-USB Diagnostics 9006
there is a lot information for other devices how this can be used to unbrick your phone, so this is a some start. The images which the people flash through it are in raw format.

ZTE Level/LG LS751ZV4 headaches

The ZTE blocks all attempts to install rooting app/apk. 3rd party installation is selected the thing is that when the waring box appears and I hit the drop down tab, the area is blank and there is no option to continue. I have no network connectivity on my laptop so PC methods fail. Have unlimited 4lte data on my stylo 3 m430 but cannot use wifi or USB tethering, didn't pay for it. Any ideas? More complicated is my soft bricked Lgls751zv5, boot loop with Security Error: authentication fail #9]. I believe the underlying problem, if I remember and am correct it is a matter of a bad path but idk. Have been able to boot into recovery menu, soft reset menu, firmware update screen and briefly a screen with a Android character, chest open, with the words no command. I have many tools only some of which work: LG Flash Tool 1.8(LG USB/Parallel Lock Key is not detected, LGUserCSTool(inert dialog box with question marks does not detect devices,)SPFlashToolv5. 1720win,... Actually I got a bunch, all but only LG Bridge works. I have used ADB/ADB Master to issue several commands with varied success. The only option from the recovery menu is ADB Sideload where the device is recognized. Remount, USB, sync, push etc fail. I did install a zv5 boot zip which it accepted and went into mode I described with android figure(bootloader??? ). In recovery menu [LGE] [Recovery] frst_status is 5 where it previously was status 6 before I fd with it. Repeatedly attempted SD card installation but always get footer is wrong, Signature failure. Tried running my zip and img files thru a signature app but no luck. Recovery logs say, got arguments from boot message locale is [en_US], stage is [d], reason is [{null}], can't open /dev/ttyo: no such file or directory. Build properly says it got 01/11/2015 security patch. Fastboot oem unlock fails.. Every thing fails. Any advice is welcome and I appreciate all who take the time to respond. *frustrated *

Phone's screen partially working, need to activate USB Debug

Hello everyone,
my phone (Xiaomi MI 9T) has fallen in the water and now it's partially working.
I really need to recover some data from it, but any method I've found on the internet requires USB Debug active. The phone turns on but it works only as long as it stays on the lock screen or if I go to settings from the notification bar. If I unlock it, the launcher doesn't work (but I can still drag down the notification's bar) and after few seconds the phone reboots I'm also able to activate the toggle of the USB Debug but it looks like it doesn't stay active because if I go back and re-enter developer's section, USB Debug is OFF.
At this point I don't really know what to do. The phone enters fastboot and recovery mode, unfortunately everything is stock, so my possibilities are limited.
I haven't tried to change the screen, but I doubt that would solve the problem, since if I stay in those specific areas, it works fine.
Android version: 10
MIUI 12
Thank you
Dona2592 said:
Hello everyone,
my phone (Xiaomi MI 9T) has fallen in the water and now it's partially working.
I really need to recover some data from it, but any method I've found on the internet requires USB Debug active. The phone turns on but it works only as long as it stays on the lock screen or if I go to settings from the notification bar. If I unlock it, the launcher doesn't work (but I can still drag down the notification's bar) and after few seconds the phone reboots I'm also able to activate the toggle of the USB Debug but it looks like it doesn't stay active because if I go back and re-enter developer's section, USB Debug is OFF.
At this point I don't really know what to do. The phone enters fastboot and recovery mode, unfortunately everything is stock, so my possibilities are limited.
I haven't tried to change the screen, but I doubt that would solve the problem, since if I stay in those specific areas, it works fine.
Android version: 10
MIUI 12
Thank you
Click to expand...
Click to collapse
Due to the security implications of remotely enabling USB Debugging, the only way to enable it is through Developer Options. You can try rebooting to recovery and clearing cache although I am doubtful as to how much that might help you. If your device took a swim, you're going to be looking at repair, which will most likely result in wiping your data.
V0latyle said:
Due to the security implications of remotely enabling USB Debugging, the only way to enable it is through Developer Options. You can try rebooting to recovery and clearing cache although I am doubtful as to how much that might help you. If your device took a swim, you're going to be looking at repair, which will most likely result in wiping your data.
Click to expand...
Click to collapse
Do you know if changing the screen could solve the problem? Or do you think there's a way to copy data 1:1 on another device (such as a used mi 9t I could buy)?
Dona2592 said:
Hello everyone,
my phone (Xiaomi MI 9T) has fallen in the water and now it's partially working.
I really need to recover some data from it, but any method I've found on the internet requires USB Debug active. The phone turns on but it works only as long as it stays on the lock screen or if I go to settings from the notification bar. If I unlock it, the launcher doesn't work (but I can still drag down the notification's bar) and after few seconds the phone reboots I'm also able to activate the toggle of the USB Debug but it looks like it doesn't stay active because if I go back and re-enter developer's section, USB Debug is OFF.
At this point I don't really know what to do. The phone enters fastboot and recovery mode, unfortunately everything is stock, so my possibilities are limited.
I haven't tried to change the screen, but I doubt that would solve the problem, since if I stay in those specific areas, it works fine.
Android version: 10
MIUI 12
Thank you
Click to expand...
Click to collapse
How long ago was it dropped in water, have you allowed it thoroughly dry out? Can you open the body of the device to allow it to dry?
Droidriven said:
How long ago was it dropped in water, have you allowed it thoroughly dry out? Can you open the body of the device to allow it to dry?
Click to expand...
Click to collapse
It stayed in the water for few seconds, the bottom half of it. I shut it down and I let it dry for 2 days, after removing the battery. Anyway I brought it to a center that made a treatment for electronic contacts, an they said that it's needed to change the display first, then run some tests to see what else is wrong. The problem is that changing the screen costs 130€ and, in my opinion, won't solve the issue.
Dona2592 said:
It stayed in the water for few seconds, the bottom half of it. I shut it down and I let it dry for 2 days, after removing the battery. Anyway I brought it to a center that made a treatment for electronic contacts, an they said that it's needed to change the display first, then run some tests to see what else is wrong. The problem is that changing the screen costs 130€ and, in my opinion, won't solve the issue.
Click to expand...
Click to collapse
Can you find a stock update for your specific model number in the form ol stock update.zip that can be flashed in your stock recovery like a OTA update? If so, you might be able to extract the build.prop file from the update then open the build.prop file in a note editor and edit the file by adding or editing lines that enable USB debugging. Then save the file. Then remove everything from the update.zip except for the Meta-inf or "updater script" file/folder then place your modified build.prop file in the update.zip so that it is the only thing in the zip other than the Meta-inf/updater script. Then put it on external sdcard, insert it into your device and boot into stock recovery then choose the option that lets you install updates from sdcard and try flashing your modified update.zip file and reboot the device, if it works, it will enable USB debugging. The next obstacle is getting past your lock screen, which is pointless if the device reboots in seconds. If you can get it to stop rebooting, you might be able to use adb to unlock the lock screen by using adb commands that simulate the touch input required to unlock the screen. You'll have to do some searching to find out the "address" and order of each part of the screen that you need to simulate the touch input on the screen in the right order. It's a bit complicated for those that aren't familiar but it can be done if you do the research.
Or,you can try connecting a USB mouse to the device and see if it will let you open the lock screen.
Droidriven said:
Can you find a stock update for your specific model number in the form ol stock update.zip that can be flashed in your stock recovery like a OTA update? If so, you might be able to extract the build.prop file from the update then open the build.prop file in a note editor and edit the file by adding or editing lines that enable USB debugging. Then save the file. Then remove everything from the update.zip except for the Meta-inf or "updater script" file/folder then place your modified build.prop file in the update.zip so that it is the only thing in the zip other than the Meta-inf/updater script. Then put it on external sdcard, insert it into your device and boot into stock recovery then choose the option that lets you install updates from sdcard and try flashing your modified update.zip file and reboot the device, if it works, it will enable USB debugging. The next obstacle is getting past your lock screen, which is pointless if the device reboots in seconds. If you can get it to stop rebooting, you might be able to use adb to unlock the lock screen by using adb commands that simulate the touch input required to unlock the screen. You'll have to do some searching to find out the "address" and order of each part of the screen that you need to simulate the touch input on the screen in the right order. It's a bit complicated for those that aren't familiar but it can be done if you do the research.
Or,you can try connecting a USB mouse to the device and see if it will let you open the lock screen.
Click to expand...
Click to collapse
Droidriven said:
Can you find a stock update for your specific model number in the form ol stock update.zip that can be flashed in your stock recovery like a OTA update? If so, you might be able to extract the build.prop file from the update then open the build.prop file in a note editor and edit the file by adding or editing lines that enable USB debugging. Then save the file. Then remove everything from the update.zip except for the Meta-inf or "updater script" file/folder then place your modified build.prop file in the update.zip so that it is the only thing in the zip other than the Meta-inf/updater script. Then put it on external sdcard, insert it into your device and boot into stock recovery then choose the option that lets you install updates from sdcard and try flashing your modified update.zip file and reboot the device, if it works, it will enable USB debugging. The next obstacle is getting past your lock screen, which is pointless if the device reboots in seconds. If you can get it to stop rebooting, you might be able to use adb to unlock the lock screen by using adb commands that simulate the touch input required to unlock the screen. You'll have to do some searching to find out the "address" and order of each part of the screen that you need to simulate the touch input on the screen in the right order. It's a bit complicated for those that aren't familiar but it can be done if you do the research.
Or,you can try connecting a USB mouse to the device and see if it will let you open the lock screen.
Click to expand...
Click to collapse
The procedure looks good, I'd give it a try but is there any alternative to the SD card? Cause my phone has no SD slot available. Maybe an external usb card reader to plug into the phone?
Droidriven said:
Can you find a stock update for your specific model number in the form ol stock update.zip that can be flashed in your stock recovery like a OTA update? If so, you might be able to extract the build.prop file from the update then open the build.prop file in a note editor and edit the file by adding or editing lines that enable USB debugging. Then save the file. Then remove everything from the update.zip except for the Meta-inf or "updater script" file/folder then place your modified build.prop file in the update.zip so that it is the only thing in the zip other than the Meta-inf/updater script. Then put it on external sdcard, insert it into your device and boot into stock recovery then choose the option that lets you install updates from sdcard and try flashing your modified update.zip file and reboot the device, if it works, it will enable USB debugging. The next obstacle is getting past your lock screen, which is pointless if the device reboots in seconds. If you can get it to stop rebooting, you might be able to use adb to unlock the lock screen by using adb commands that simulate the touch input required to unlock the screen. You'll have to do some searching to find out the "address" and order of each part of the screen that you need to simulate the touch input on the screen in the right order. It's a bit complicated for those that aren't familiar but it can be done if you do the research.
Or,you can try connecting a USB mouse to the device and see if it will let you open the lock screen.
Click to expand...
Click to collapse
Plus, I don't really get why the system fails right after the lockscreen, I'm actually able to enter the code and the phone unlocks but the launcher seems not working, while the notifications bar works fine, and after some seconds the phone reboots. How can the system work fine in some aspects and bad in others at the same time? Can it be some flash memory issue?
Dona2592 said:
The procedure looks good, I'd give it a try but is there any alternative to the SD card? Cause my phone has no SD slot available. Maybe an external usb card reader to plug into the phone?
Click to expand...
Click to collapse
Yes USB should work in place of sdcard
Dona2592 said:
Plus, I don't really get why the system fails right after the lockscreen, I'm actually able to enter the code and the phone unlocks but the launcher seems not working, while the notifications bar works fine, and after some seconds the phone reboots. How can the system work fine in some aspects and bad in others at the same time? Can it be some flash memory issue?
Click to expand...
Click to collapse
That or kernel panic due to some other important hardware is damaged.
Maybe you can use a adb script to interrupt the running processes right after the device unlocks. Something to stop everything from loading beyond screen unlock. It might allow you to use adb to pull whatever you want from the device via adb pull commands.
Or, if there is a custom recovery for your device and if your bootloader is already unlocked(if it isn', don't unlock it, it will wipe your data), you can install the custom recovery and use it to create a backup of your data then extract your data from the backup.
Droidriven said:
That or kernel panic due to some other important hardware is damaged.
Maybe you can use a adb script to interrupt the running processes right after the device unlocks. Something to stop everything from loading beyond screen unlock. It might allow you to use adb to pull whatever you want from the device via adb pull commands.
Or, if there is a custom recovery for your device and if your bootloader is already unlocked(if it isn', don't unlock it, it will wipe your data), you can install the custom recovery and use it to create a backup of your data then extract your data from the backup.
Click to expand...
Click to collapse
Unfortunately I still have the stock recovery. Plus USB debug is deactivated. What really boggles me is the fact that I can still enter settings and get to developer options, turn ON the toggle of USB debug, but it's like the phone doesn't save the setting, cause if I go back to the main setting screen and enter again developer options, USB debug is OFF. I mean, what the hell?
Having access to device's Stock Recovery you can try as shown below to enable ADB / USB Debug ging: yes you can run Android shell commands from within Android's Stock Recovery.
Unplug device's USB-connection , boot into recovery mode. Having successfully booted into recovery mode, connect device via USB-cable with computer - what switches the USB driver to ADB mode.
Now enable USB debugging via recovery:
Code:
adb shell
echo "persist.service.adb.enable=1" >> /system/build.prop
echo "persist.service.debuggable=1" >> /system/build.prop
echo "persist.sys.usb.config=adb,mtp" >> /system/build.prop"
reboot
Dona2592 said:
Unfortunately I still have the stock recovery. Plus USB debug is deactivated. What really boggles me is the fact that I can still enter settings and get to developer options, turn ON the toggle of USB debug, but it's like the phone doesn't save the setting, cause if I go back to the main setting screen and enter again developer options, USB debug is OFF. I mean, what the hell?
Click to expand...
Click to collapse
Hardware damaged. You're going to have to repair the hardware or forget about retrieving your data, unless you can find a reputable shop that has the equipment and experience to pull your data directly from the chip itself.
xXx yYy said:
Having access to device's Stock Recovery you can try as shown below to enable ADB / USB Debug ging: yes you can run Android shell commands from within Android's Stock Recovery.
Unplug device's USB-connection , boot into recovery mode. Having successfully booted into recovery mode, connect device via USB-cable with computer - what switches the USB driver to ADB mode.
Now enable USB debugging via recovery:
Code:
adb shell
echo "persist.service.adb.enable=1" >> /system/build.prop
echo "persist.service.debuggable=1" >> /system/build.prop
echo "persist.sys.usb.config=adb,mtp" >> /system/build.prop"
reboot
Click to expand...
Click to collapse
Thanks mate, I'll give it a try for sure
Droidriven said:
Hardware damaged. You're going to have to repair the hardware or forget about retrieving your data, unless you can find a reputable shop that has the equipment and experience to pull your data directly from the chip itself.
Click to expand...
Click to collapse
Ok, but do you know what could be the damaged piece of hardware?
Dona2592 said:
Ok, but do you know what could be the damaged piece of hardware?
Click to expand...
Click to collapse
NO
xXx yYy said:
Having access to device's Stock Recovery you can try as shown below to enable ADB / USB Debug ging: yes you can run Android shell commands from within Android's Stock Recovery.
Unplug device's USB-connection , boot into recovery mode. Having successfully booted into recovery mode, connect device via USB-cable with computer - what switches the USB driver to ADB mode.
Now enable USB debugging via recovery:
Code:
adb shell
echo "persist.service.adb.enable=1" >> /system/build.prop
echo "persist.service.debuggable=1" >> /system/build.prop
echo "persist.sys.usb.config=adb,mtp" >> /system/build.prop"
reboot
Click to expand...
Click to collapse
That might work but I've never had any luck with adb in stock recovery, not on the devices that I've owned, at least.
Dona2592 said:
Hello everyone,
my phone (Xiaomi MI 9T) has fallen in the water and now it's partially working.
I really need to recover some data from it, but any method I've found on the internet requires USB Debug active. The phone turns on but it works only as long as it stays on the lock screen or if I go to settings from the notification bar. If I unlock it, the launcher doesn't work (but I can still drag down the notification's bar) and after few seconds the phone reboots I'm also able to activate the toggle of the USB Debug but it looks like it doesn't stay active because if I go back and re-enter developer's section, USB Debug is OFF.
At this point I don't really know what to do. The phone enters fastboot and recovery mode, unfortunately everything is stock, so my possibilities are limited.
I haven't tried to change the screen, but I doubt that would solve the problem, since if I stay in those specific areas, it works fine.
Android version: 10
MIUI 12
Thank you
Click to expand...
Click to collapse
Is your bootloader locked?
Droidriven said:
That might work but I've never had any luck with adb in stock recovery, not on the devices that I've owned, at least.
Click to expand...
Click to collapse
Yeah in fact when I type "adb shell" it gives me error, but I can enter fastboot mode and the phone is seen. Unfortunately I can't do much from there
Arealhooman said:
Is your bootloader locked?
Click to expand...
Click to collapse
Yeah. **** me, for once I kept everything stock and this happened . I've always rooted and customized my phones and nothing like this has ever happened.

Categories

Resources