experienced embedded developer with general platform questions - Upgrading, Modifying and Unlocking

In other systems I have worked with there are sometimes ways to boot from a file other than the NVRAM that you ordinarily operate from. For some reason people
like to call this the ROM, even though it is writable.
I have an old tablet that has a recovery mode that is only a Chinese menu. I have seen a translation so I know what the items are but none of them
are helpful for re-flashing or booting from a file.
I have been able to connect the tablet using adb and run the shell, and I can get it into fastboot mode but the instructions for "unlocking" the boot loader do
not work so I am stuck with a fastboot prompt on the tablet with no way to proceed. I was able to upload a short file but not the TWRP (I did find one for this
phone). The failure was permission.
My questions:
I have rooted this phone using kingroot and promptly decided that was unsafe and did a full reset to manufacturer. But I am still trying to root. I suppose that the
rooting programs must have to run an exploit, perhaps a buffer overflow thing, but at any rate some series of commands to Android that cause elevation to
be accomplished. Where do I find the exploit documented in order to just do it manually?
Can I extract the su binary from the TWRP and jam it in there? Probably not but I thought I'd ask. Is the su binary in there just an ordinary program unless it
has a file bit set that elevates it?
What exactly is meant by the phrase "unlock the bootloader"? Can I unlock the bootloader manually in the adb shell?
Can I kingroot again and find an su binary, rename it, uninstall kingroot, rename it again? I don't suppose that re-named binary would survive a reflash?
How can I flash this tablet? The tools don't quite work. Even if I can back it up I can't reflash. Best would be the ability to boot a file separate from the ROM. I
read somewhere that sometimes after the flash the phone boots the old ROM once. How can that be true, and if it is true what does that say about the way
those images are actually stored and used?

Related

A new method for ROOTing your xoom!!!

I do not know why you say this...
MOD EDIT: Rooters beware. Proceed with extreme caution, as these are highly uncharted waters.
Hi,
I am here to provide you a new method in rooting your xoom, it does not require to flash the decrypted boot.img image.
I have tried it only on my Wifi XOOM, which is a UK version. (With a Japan version of ROM, downloaded from Motodev and upgrade to 3.1)
***EDIT***
I have also tried on a HK 3g xoom (which shows MZ601 in MTP but MZ602 in fastboot). It works without any problem, and internal storage preserved untouched.
===============================================================
I am NOT a xoom developer, nor a rom cook. I am just a user of xoom, which know
a little on developing and are willing to try new things.
So, I can not be sure that the method below works on your device. By following the
things below, your xoom may have a chance to brick.
I am not responsible for any brick or mulfunction device.
===============================================================
To root your xoom, you should start with flashing your device with the clockworkmod recovery (Please refer to the post by solarnz).
After flashing the clockworkmod recovery, do the following.
1. Download the attached ROOT.zip, place it on the root directory of the external sd card, and rename it to update.zip
2. Restart your device to the recovery by:
Type "adb reboot recovery" from your pc
OR press volumn down ~2 seconds after the motorola logo appears when the device starts,
then volumn up when "-->Android recovery" appears.
3. Apply the update in the recovery.
That's it. Your device should be already rooted.
=======================================================================
I am not the inventor of the method, I think about this since I have a Samsung i9000,
and the method of rooting the i9000 is by applying a update.zip file.
I have created the ROOT.zip file by changing the i9000 root zip file with the newer su and superuser.apk (From here: http://forum.xda-developers.com/showthread.php?t=1010568)
I have also changed the updater-script in order to let the updater mount the correct partition for the update.
I am not sure if this update applies to other devices (especially for the 3g ones). This should work if the system partition have name "/dev/block/platform/sdhci-tegra.3/by-name/system".
I would like to thank solarnz for providing the clockmodwork recovery for xoom,
the one who invented the method of rooting the i9000 with a update.zip (I cannot find who make that, sorry...),
and also Xaositek for providing the su and superuser.apk files (I am too lazy to find it by myself...).
========================================================================
That's all. Please try on your device (especially for those stock 3.2) if you would like to take some risk, and report if it is success or not.
Thanks.
eddielo said:
Hi,
I am here to provide you a new method in rooting your xoom, it does not require to flash the decrypted boot.img image.
I have tried it only on my Wifi XOOM, which is a UK version. (With a Japan version of ROM, downloaded from Motodev and upgrade to 3.1)
===============================================================
I am NOT a xoom developer, nor a rom cook. I am just a user of xoom, which know
a little on developing and are willing to try new things.
So, I can not be sure that the method below works on your device. By following the
things below, your xoom may have a chance to brick.
I am not responsible for any brick or mulfunction device.
===============================================================
To root your xoom, you should start with flashing your device with the clockworkmod recovery (Please refer to the post by solarnz).
After flashing the clockworkmod recovery, do the following.
1. Download the attached ROOT.zip, place it on the root directory of the external sd card, and rename it to update.zip
2. Restart your device to the recovery by:
Type "adb reboot recovery" from your pc
OR press volumn down ~2 seconds after the motorola logo appears when the device starts,
then volumn up when "-->Android recovery" appears.
3. Apply the update in the recovery.
That's it. Your device should be already rooted.
=======================================================================
I am not the inventor of the method, I think about this since I have a Samsung i9000,
and the method of rooting the i9000 is by applying a update.zip file.
I have created the ROOT.zip file by changing the i9000 root zip file with the newer su and superuser.apk (From here: http://forum.xda-developers.com/showthread.php?t=1010568)
I have also changed the updater-script in order to let the updater mount the correct partition for the update.
I am not sure if this update applies to other devices (especially for the 3g ones). This should work if the system partition have name "/dev/block/platform/sdhci-tegra.3/by-name/system".
I would like to thank solarnz for providing the clockmodwork recovery for xoom,
the one who invented the method of rooting the i9000 with a update.zip (I cannot find who make that, sorry...),
and also Xaositek for providing the su and superuser.apk files (I am too lazy to find it by myself...).
========================================================================
That's all. Please try on your device (especially for those stock 3.2) if you would like to take some risk, and report if it is success or not.
Thanks.
Click to expand...
Click to collapse
How do you flash cwm if your device if locked? Also the purpose of the rooted boot.img is to allow you to mount your device for adb commands.
Sent from my PG86100 using Tapatalk
yeah no offense but this sounds a little sketch... I see you make a quote at the bottom asking people to report success if they try... I personally would not try this.
Unlocking and rooting is really not that hard and not very time consuming using current methods
Of course, for installing CWM, you have to unlock your device by using "fastboot oem unlock", but that will not brick your device anyway.
For this method, you do not need to issue adb commands to root your device, so no need to have a modified boot.img.
Also, for the current rooting methods, it is not 100% work on some device (like the HK 3g version, which reported missing of internal storage after rooting with currently available method), I would like to see if this work on that.
Rooters beware. Proceed with extreme caution, as these are highly uncharted waters.
eddielo said:
For this method, you do not need to issue adb commands to root your device, so no need to have a modified boot.img.
Click to expand...
Click to collapse
I think you missed my point. Rooted boot.img isn't used for rooting. Its used for adb commands like adb remount. Say i want to adb push a file to my xoom, ls a directory on my xoom, or adb rename system files. Those are all reason you need the rooted boot.img.
Sorry, this is not a rooting method. All what this is doing is flashing su, busybox and Superuser.apk.
There is more to rooting a device than this. You also need an insecure boot image.
I am sorry if I do not catch the real meaning of rooting a device.
What I think of rooting is to let my device, starting from everything stock, untouched, to a state that applications that need root, like Titanium backup or root explorer, works without problem.
I have tried on my two devices with this method, titanium backup works perfectly, root explorer can remount the system partition to rw and can successfully copy files and delete files from that.
The insecure boot.img image, as far as I know, provides everyone to use "adb remount" and make changes to the system directory. But my method do not need adb in copying the binaries and chmod them. You may call it flashing, but after that, su works without problem.
Please, try it first. If you think it is not a method of rooting, I am sorry about that.
Actually guys, don't dismiss him just yet, over in the Galaxy S II forums we only flash insecured images long enough to root the OS then flash back to a secure one, so you have root access but no remount or system r/w.
It's a (fairly) legitimate method and is exactly how I rooted my xoom this time round, well not exactly, I did it like this:
unlock
flash solarnz CWM
adb mount system r/w
push su and busybox
reboot
install superuser from market
done
This is how most people run their GSII and means you can use root apps but no insecure boot image (because the GSII shows a warning on every boot with insecure images and keeps a binary flash counter, cheeky samsung).
This will at least get you to the point where you can su from within android and dump your boot image to modify it yourself, which is what I just did to update my Euro 3G root guide.
So does this mean just "rooted".....like can't flash a rom?
Sent from my Xoom using XDA Premium App
roughneckboren said:
So does this mean just "rooted".....like can't flash a rom?
Sent from my Xoom using XDA Premium App
Click to expand...
Click to collapse
Rooting has nothing to do with installing a rom. To install a rom, you just need to unlock and fastboot flash CWM. This guide in noway helps you flash a rom.
alias_neo said:
Actually guys, don't dismiss him just yet, over in the Galaxy S II forums we only flash insecured images long enough to root the OS then flash back to a secure one, so you have root access but no remount or system r/w.
It's a (fairly) legitimate method and is exactly how I rooted my xoom this time round, well not exactly, I did it like this:
unlock
flash solarnz CWM
adb mount system r/w
push su and busybox
reboot
install superuser from market
done
This is how most people run their GSII and means you can use root apps but no insecure boot image (because the GSII shows a warning on every boot with insecure images and keeps a binary flash counter, cheeky samsung).
This will at least get you to the point where you can su from within android and dump your boot image to modify it yourself, which is what I just did to update my Euro 3G root guide.
Click to expand...
Click to collapse
Without an rooted boot.img your recovery will get wiped out every time you boot the OS.
So will this let you make a titanium backup of your data? That way you could recover your data after using the regular unlock method that erases everything?
silvinoa said:
So will this let you make a titanium backup of your data? That way you could recover your data after using the regular unlock method that erases everything?
Click to expand...
Click to collapse
Yes and NO...
Yes this method will allow you to run titanium backup. But to use this method you have to unlock, which erases everything.

Stuck in bootloop after messing with framework-res.apk

I was in the process of replacing framework-res.apk and missed the step of changing the permissions before replacing it. I found several threads on how to unbrick the phone by flashing a new ROM but I was hoping I can somehow fix the permissions on the framework file and be done. I installed adb and I already had the LG USB drivers installed but when I run adb devices it doesn't list anything. Windows 7 shows "LG AndroidNet Phone" and a removable disk under "Safely Remove Hardware" so I think I have the right drivers.
Is there hope that I can fix the file permissions?
BTW, I'm a newb so I may be missing something. And also scared of having to flash a ROM
I need help.
do you have CWM in the phone ? if so boot into that and run adb devices and see if it finds it their
No, I don't. Other than using DooMLoRD zergrush to root the phone a few months ago, I have not messed with anything else.
gabcon73 said:
No, I don't. Other than using DooMLoRD zergrush to root the phone a few months ago, I have not messed with anything else.
Click to expand...
Click to collapse
unless your phone will boot normaly to the home screen or you have CWM on it you will haveto flash the koren rom theirs no way to get it into recovery that i know of ... have you tryed a factory reset ?
I replied to you at another thread, so I'll repeat here.
What you need to do is re-root while it's looping. It might take you 100 tries before it succeed , but eventually it should succeed.
After that you can try fix the permissions, but if the new .apk file is not copied successfully first time it might get you in boot loop again, so I'd recommend at that point push the .apk again and then change the permissions.
I found that zergrush dated 2011-10-21 has more chances to succeed, because it has more retries before it gives up, the new version tries only few times and gives up too quickly.
I've attached the root I was using with 3 versions of zergrush.
Open CMD window and execute root.bat, let it copy all needed files to the phone. If it fails, try execute loop.bat, it will just execute zergrush indefinitely , so you can go do other stuff. You can check if root succeeded by opening another CMD window and type: adb shell
then, if it shows sign "$" type su, if it shows "#" you are good to go.
P.S.
This method only works with AT$T stock rom, if you are on LU6200 you are probably out of luck, as their root requires wifi and user interaction...
Having CWM is very handy in such situations, not only because you can restore backups, but because you'll have root access.
Thanks [email protected], I'll give it a try. And yes, I have the stock ROM.
I'm having problems downloading root.zip, I've tried two computers and different browsers, it only downloads 554 bytes.
Yeah, for some reason it was downloading 404 page...
I reuploaded it.
I let the loop.bat run overnight without success so I decided to call AT&T and have it replaced under warranty. The new phone arrived today and I've been busy reinstalling and reconfiguring. I may install CWM just so I can easily recover from a backup in case I do some other stupid thing to the phone.
Thanks guys

Bricked Phone After Magisk Install

Today, my phone got bricked after I installed Magisk, am i am looking for a way of sorting it out. The phone was running Android 9 DP3 when rooted, and I was following HighOnAndroids root guide on Youtube for reference,
I unlocked my bootloader and successfully installed TWRP. After this, I installed Magisk, which went throuygh perfectly fine. However, after rebooting the phone, I am stuck on the google splash screen, with a small progress bar that stays for the duration of the time on this screen. After about 2 minutes, the phone reboots into TWRP again.
Does anyone know how I could return to stock Android or at least escape this issue?
Many thanks
James
Jameswebb97 said:
Today, my phone got bricked after I installed Magisk, am i am looking for a way of sorting it out. The phone was running Android 9 DP3 when rooted, and I was following HighOnAndroids root guide on Youtube for reference,
I unlocked my bootloader and successfully installed TWRP. After this, I installed Magisk, which went throuygh perfectly fine. However, after rebooting the phone, I am stuck on the google splash screen, with a small progress bar that stays for the duration of the time on this screen. After about 2 minutes, the phone reboots into TWRP again.
Does anyone know how I could return to stock Android or at least escape this issue?
Many thanks
James
Click to expand...
Click to collapse
Use duces script to flash June google factory image.
jlokos said:
Use duces script to flash June google factory image.
Click to expand...
Click to collapse
I followed the guide on the DeucesScript XDA page but the command window keeps saying "'fastboot' is not recognized as an internal or external command, operable program or batch file."
Jameswebb97 said:
I followed the guide on the DeucesScript XDA page but the command window keeps saying "'fastboot' is not recognized as an internal or external command, operable program or batch file."
Click to expand...
Click to collapse
You need this information (the stuff I made bold + the hyperlink):
Code:
If you are having issues with this script:
Download the latest fastboot and adb Platform Tools UPDATED Dec. 22, 2017!!! This is the most common problem!!!
Download/Update Google USB Drivers
Video: Force-Installing the Android USB Drivers Fastboot & ADB
[B]Verify you have the [URL="https://wiki.lineageos.org/adb_fastboot_guide.html"]environment variable (path)[/URL] set for adb and fastboot[/B]
Try a different USB port
Try a different cable
Format Userdata in Stock Recovery
Try to boot stock before doing mods like Locking Bootloader / Kernel / TWRP / Magisk
Jameswebb97 said:
I followed the guide on the DeucesScript XDA page but the command window keeps saying "'fastboot' is not recognized as an internal or external command, operable program or batch file."
Click to expand...
Click to collapse
umph....hate to tell you, but you have a long way to go...
so before going on this "journey", I would suggest you booting into TWRP again, and try installing (not adb sideloading, just in case you're doing that) Magisk again. Also, be sure you are using the latest (might be considered "beta") 16.4 for taimen... I'm thinking your boot.img or dtbo.img simply may have gotten glitchy and repatching (by installing Magisk again) might fix it...
Also, if you want to go a step further, you might want to consider using the official Magisk uninstaller. Since Magisk makes a copy of your stock boot and dtbo image, it may put that back so you can get it in working order to get into the system (although without root), and then figure things out and/or reinstall Magisk (through TWRP is best) while all things Magisk was removed...
Good luck and hope this helps....
Make sure you are trying to open from the correct location, and put .\fastboot
EvilDobe said:
You need this information (the stuff I made bold + the hyperlink):
Code:
If you are having issues with this script:
Download the latest fastboot and adb Platform Tools UPDATED Dec. 22, 2017!!! This is the most common problem!!!
Download/Update Google USB Drivers
Video: Force-Installing the Android USB Drivers Fastboot & ADB
[B]Verify you have the [URL="https://wiki.lineageos.org/adb_fastboot_guide.html"]environment variable (path)[/URL] set for adb and fastboot[/B]
Try a different USB port
Try a different cable
Format Userdata in Stock Recovery
Try to boot stock before doing mods like Locking Bootloader / Kernel / TWRP / Magisk
Click to expand...
Click to collapse
Ive tried all of this now, i got the script working, but now the phne says it is corrupt and i cannot get into recovery. Is this game over do you think?
simplepinoi177 said:
umph....hate to tell you, but you have a long way to go...
so before going on this "journey", I would suggest you booting into TWRP again, and try installing (not adb sideloading, just in case you're doing that) Magisk again. Also, be sure you are using the latest (might be considered "beta") 16.4 for taimen... I'm thinking your boot.img or dtbo.img simply may have gotten glitchy and repatching (by installing Magisk again) might fix it...
Also, if you want to go a step further, you might want to consider using the official Magisk uninstaller. Since Magisk makes a copy of your stock boot and dtbo image, it may put that back so you can get it in working order to get into the system (although without root), and then figure things out and/or reinstall Magisk (through TWRP is best) while all things Magisk was removed...
Good luck and hope this helps....
Click to expand...
Click to collapse
This is good advice, thanks. i have a new problem (ugh), where i got the script working through changing the paths, but now the phone says that it is corrupt and i cannot access TWRP. Game over?
Jameswebb97 said:
Ive tried all of this now, i got the script working, but now the phne says it is corrupt and i cannot get into recovery. Is this game over do you think?
Click to expand...
Click to collapse
With the unlocked bootloader it'll always say the device is corrupt. Manually put the device into the bootloader & flash the DeucesScript. You're basically starting over at this point but it is possible to get up & going again.
Jameswebb97 said:
This is good advice, thanks. i have a new problem (ugh), where i got the script working through changing the paths, but now the phone says that it is corrupt and i cannot access TWRP. Game over?
Click to expand...
Click to collapse
EvilDobe said:
With the unlocked bootloader it'll always say the device is corrupt. Manually put the device into the bootloader & flash the DeucesScript. You're basically starting over at this point but it is possible to get up & going again.
Click to expand...
Click to collapse
EvilDobe might be right...but I have a bit to offer before maybe starting all over...
I doubt you needed to edit the script and "change the paths." Most likely you merely did not have the images (you extracted from the .zip of the Full Factory image you got from the Google Developers site) inside the "platform-tools" folder with the adb & fastboot .exe and all the other files and folders.
In any case, I suggest you get the TWRP image file [.img] (NOT the installer .zip necessarily), put the .img file "... inside the "platform-tools" folder with the adb & fastboot .exe and all the other files and folders." (I've seen some users simply cut and paste those 2 .exe files only to the extracted folder -- this is why I state it this way) Then, power down your device. After it's off, hold down the Volume Down button and press & hold the Power button (this is the manual way to get into the Bootloader Mode). Once there, plug your phone into your computer (USB-A to USB-C would be best) and open a command prompt/powershell ("run as administrator" or with administrative priveleges) and direct it to the platform-tools folder (i.e. if I put it on my desktop, it would be "C:\Users\MyName\Desktop\platform-tools"), you can temporarily boot into TWRP via command
Code:
fastboot boot twrp-3.2.1-2-taimen.img
When in TWRP (hopefully), I suggest trying to do what I advised before -- try either Magisk installer to repatch the boot and dtbo image, or Magisk Uninstaller to attempt to replace your boot and dtbo to stock.
*NOTE: Of course, this is assuming you are running Microsoft Windows (if not, you will need to input .\ as @naiku suggested) and also the whole "device is corrupt" is due to "funky" boot image issues. If not, I/we can guide you to flashing the Full Factory back onto the phone (hopefully without losing data and settings)...
Good luck and hope this helps...
simplepinoi177 said:
EvilDobe might be right...but I have a bit to offer before maybe starting all over...
I doubt you needed to edit the script and "change the paths." Most likely you merely did not have the images (you extracted from the .zip of the Full Factory image you got from the Google Developers site) inside the "platform-tools" folder with the adb & fastboot .exe and all the other files and folders.
In any case, I suggest you get the TWRP image file [.img] (NOT the installer .zip necessarily), put the .img file "... inside the "platform-tools" folder with the adb & fastboot .exe and all the other files and folders." (I've seen some users simply cut and paste those 2 .exe files only to the extracted folder -- this is why I state it this way) Then, power down your device. After it's off, hold down the Volume Down button and press & hold the Power button (this is the manual way to get into the Bootloader Mode). Once there, plug your phone into your computer (USB-A to USB-C would be best) and open a command prompt/powershell ("run as administrator" or with administrative priveleges) and direct it to the platform-tools folder (i.e. if I put it on my desktop, it would be "C:\Users\MyName\Desktop\platform-tools"), you can temporarily boot into TWRP via command
Code:
fastboot boot twrp-3.2.1-2-taimen.img
When in TWRP (hopefully), I suggest trying to do what I advised before -- try either Magisk installer to repatch the boot and dtbo image, or Magisk Uninstaller to attempt to replace your boot and dtbo to stock.
*NOTE: Of course, this is assuming you are running Microsoft Windows (if not, you will need to input .\ as @naiku suggested) and also the whole "device is corrupt" is due to "funky" boot image issues. If not, I/we can guide you to flashing the Full Factory back onto the phone (hopefully without losing data and settings)...
Good luck and hope this helps...
Click to expand...
Click to collapse
Pleased to be editing this comment; managed to get it working following your step by step. Think i'm going to stay away from rooting something this expensive in the future! Thanks so much!
Jameswebb97 said:
Pleased to be editing this comment; managed to get it working following your step by step. Think i'm going to stay away from rooting something this expensive in the future! Thanks so much!
Click to expand...
Click to collapse
I wouldn't go that far with staying away. When I come across people IRL that want to start doing this stuff I always tell them to read the instructions, step through them, read the instructions again, ask questions (as you did here) BEFORE you get started, read the instructions again, and only when you're confident start messing with your device. This is a fun, and at times stressful, hobby. It's great when everything goes according to plan but it's an omg omg omg omg omg omg moment when you mess something up.
Start with baby steps. The straight upgrade to P is fairly simple provided your device is unlocked. Get that working & you'll be set. I have root on my DP3 & the only thing I've done so far is delete some apps from system that I know I don't want/need. If your main goal is to just enjoy your phone, test out Android P, and maybe go back... root isn't needed. Once everything is squared away & you're running for a day or so you can always fastboot to recovery, make a backup, and then try to add root. I hope you don't shy away & get deeper into the hobby. It truly starts to get fun when you begin to understand more of what is going on.
Jameswebb97 said:
Pleased to be editing this comment; managed to get it working following your step by step. Think i'm going to stay away from rooting something this expensive in the future! Thanks so much!
Click to expand...
Click to collapse
Hey I'm so glad you got it working! Leave me a "Thanks!" would make it up to me ... I'm always happy to help out and get things figured out...yet I don't get the satisfaction of knowing if it does end up helping a lot of the time because a good number don't come back with their experience...so thanks for that! Glad you got it going...
EvilDobe said:
I wouldn't go that far with staying away. When I come across people IRL that want to start doing this stuff I always tell them to read the instructions, step through them, read the instructions again, ask questions (as you did here) BEFORE you get started, read the instructions again, and only when you're confident start messing with your device. This is a fun, and at times stressful, hobby. It's great when everything goes according to plan but it's an omg omg omg omg omg omg moment when you mess something up.
Start with baby steps. The straight upgrade to P is fairly simple provided your device is unlocked. Get that working & you'll be set. I have root on my DP3 & the only thing I've done so far is delete some apps from system that I know I don't want/need. If your main goal is to just enjoy your phone, test out Android P, and maybe go back... root isn't needed. Once everything is squared away & you're running for a day or so you can always fastboot to recovery, make a backup, and then try to add root. I hope you don't shy away & get deeper into the hobby. It truly starts to get fun when you begin to understand more of what is going on.
Click to expand...
Click to collapse
And it's as @EvilDobe means.....
I remember back in the days of the Motorola Droids (OG Droid1, Droid 3, & Droid 4) where you could really mess things up and come out with a big ol' "brick" "paperweight" as there were many instances where you could not come back from (i.e. updating to a certain point, then attempting to downgrade when Google/Motorola/Verizon put blocks that breaks it). But this isn't the case these days. @Jameswebb97, at least with the Pixel 2's, Oreo and/or P(Android OS 9), it's actually more difficult than easy to get that too far gone. The only reason why I can help so many troubleshooting their issues is because I, myself, have wrecked my current device in some serious ways! So I can relate and have experience in helping in the same situations. I've gotten it to where it says "device is corrupt," (which isn't all that uncommon), BUT with the added desperate troubleshooting where I had to wipe/erase, changing partition types, format several partitions, even go about "resizing" the partition to match the "target extraction size" of the Full Factory flash, and even as far as learning to manually flash the various system partitions and that there are two (system_a & system_b) but, in Google's infinite wisdom(?), one flashes to system_a and the other to system_other!!! And I haven't even started on reading others' issues when going after the Slot A and Slot B complications -- I didn't even attempt to touch this in that troubleshooting story.
My point is: I think I've broken my device farther than most people and got it so close to the brink, and yet I was able to bring it back and am still using that same device today (most people would usually, at that point, go and get a RMA replacement). Honestly, as long as you have access to Bootloader Mode (which Google, in their infinite wisdom, seems to have placed it in the main board memory or separate memory rather than storage as to make it always accessible which makes it hard to "lose"), you have a really good (seemingly perfect) "safety net" in which you can always flash back to a working, stock state -- which is why it's the best policy to just make good backups before experimenting so, if anything, you get back to this state and restore all your data. I'm not trying to convince you to root or to try custom ROMs or anything -- even though there are many great reasons and capabilities of rooting -- I am simply appealingl to your sense of curiosity and reassure you so you aren't held back and you don't restrict and limit yourself if you don't want to, but are to fearful to experiment.
I hope you don't take this post as "lecturing" or anything, just some thoughts I hope you consider...
Glad it worked out in the end for you!

adb restore 'ended' without restoring

OK so first of all, if this is the wrong place for this I'm sorry, it's quite late for me and I've been researching how to fix this for about two days and running up with nothing.
I recently upgraded to a Pixel 2XL, loving the device but unfortunately a couple of my apps save data into the data/data part of phone. The only way to then move that over and preserve the data is to use something like adb backup and restore. The backup seems to work fine, but so far every time I try to use restore on my pixel 2xl it 'ends' without actually adding the missing app data across.
I've tried using usb 2 and 3, no difference. I've made sure the usb debugging is on and that my phone is unlocked. I also made sure to try using the commands through both cmd and powershell and that both were in admin mode. I've also tried looking into other options like a friend suggested using es file explorer manager to change the download location, but I wasn't able to puzzle out a way to make something that was in data/data save elsewhere.
My phone isn't rooted, and I'd rather not go that far if I can help it. Any advice or ideas?
Aahhh,"...your phone isn't rooted..."that's probably it/key. I'm unsure whether any kind of "restore" works without root access -- backup of course works because that simply involves "copying" and "storing" files (essentially the basic process of backing up) and, as the system needs to be able to read and access the data, you pretty much have the "read access" to it. Restore on the otherhand, for those who are unaware, are essentially "copying" those stored files and "overwriting" the existing files -- which require "write access". The process of "rooting" is to acquire "root access" which allows both "read/write access" (therefore: "r/w access"). *again, for those who are unaware.
Sorry for just blabbering on about that, I guess I got carried away. In any case, basically (all in all, the reason why I blabbered on) I don't think you're going to go far without root access -- or "rooting" as you say -- but there is one thing I can suggest. When using adb, try running this command first before running any other adb command (i.e. restore):
Code:
adb root
It might just give you enough of that "root access" I was blathering about...
Also, among the all the things you made sure to do and include you made sure of, one thing you didn't mention is making sure you have the most up to date platform-tools (r28.0.1 *at least last I personally saw a few weeks ago).
Good luck to you, hope I made these things somewhat understandable, and hope this helped as well....
Thank you for the suggestions, tried it but no dice sadly. I kinda am hairy on rooting it too as I just got the phone and it's been a long time since I've done android dev work. If you have any other ideas I'd be welcome to hearing them but again thanks for trying.
simplepinoi177 said:
Aahhh,"...your phone isn't rooted..."that's probably it/key. I'm unsure whether any kind of "restore" works without root access -- backup of course works because that simply involves "copying" and "storing" files (essentially the basic process of backing up) and, as the system needs to be able to read and access the data, you pretty much have the "read access" to it. Restore on the otherhand, for those who are unaware, are essentially "copying" those stored files and "overwriting" the existing files -- which require "write access". The process of "rooting" is to acquire "root access" which allows both "read/write access" (therefore: "r/w access"). *again, for those who are unaware.
Sorry for just blabbering on about that, I guess I got carried away. In any case, basically (all in all, the reason why I blabbered on) I don't think you're going to go far without root access -- or "rooting" as you say -- but there is one thing I can suggest. When using adb, try running this command first before running any other adb command (i.e. restore):
Code:
adb root
It might just give you enough of that "root access" I was blathering about...
Also, among the all the things you made sure to do and include you made sure of, one thing you didn't mention is making sure you have the most up to date platform-tools (r28.0.1 *at least last I personally saw a few weeks ago).
Good luck to you, hope I made these things somewhat understandable, and hope this helped as well....
Click to expand...
Click to collapse
Where your bootloader is apparently unlocked, download a TWRP recovery image to the directory fastboot is in and boot it using the fastboot command "fastboot boot twrp.img". From there, take a nandroid backup of your device. Restoring is done in the same fashion. AND, since TWRP is memory resident when booting it this way, the stock recovery remains untouched.
Strephon Alkhalikoi said:
Where your bootloader is apparently unlocked, download a TWRP recovery image to the directory fastboot is in and boot it using the fastboot command "fastboot boot twrp.img". From there, take a nandroid backup of your device. Restoring is done in the same fashion. AND, since TWRP is memory resident when booting it this way, the stock recovery remains untouched.
Click to expand...
Click to collapse
Great idea! And that's why veterans and those with experience are the best to go to...!
OK so first, thank you so much for all the advice. I've taken awhile to get back to you because this took some time to parse. I'm admittedly kind of a novice at this. So I've used the instructions here https://www.xda-developers.com/how-to-install-twrp/ to try and install twrp. I think I did it right, had the zip contents and img file in the same directory that adb is in, then ran the command...and this is what I got back.
N:\platform-tools>fastboot flash recovery twrp-3.2.3-1-taimen.img
Sending 'recovery' (40960 KB) OKAY [ 1.203s]
Writing 'recovery' FAILED (remote: 'Flashing is not allowed in Lock State')
Finished. Total time: 1.219s
as the 'fastboot reboot' command appeared to bring me right back to normal operating for the phone I'm guessing the failed stopped me with that 'flashing not allowed in lock state' there. Am I missing a step?
close, but not exactly right...
you got the downloading platform tools right, and putting the necessary files in that same folder that fastboot.exe resides in also right (you wouldn't believe how many novices actually make the mistake of not doing this)...
but you don't ever (underlined and emphasized not really for you AshtonHunter, but for any who are under the wrong impression; it's caused endless headaches and has even been complained by developers on Twitter...) "fastboot flash" TWRP with Pixels (any; and AFAIK any a/b slotted devices). You boot the twrp .img file. Also, for those who do not know and for future reference, there is no "recovery" for fastboot to "flash" to on Pixels (any), as there no longer is a separate partition for recovery; recovery resides in the boot partition. All in all, the command should be exactly this:
Code:
fastboot boot twrp-3.2.3-1-taimen.img
Immediately afterwards, you'll see your Pixel 2 XL restart and load up TWRP...
Good luck to you and hope this helps...
Hey everyone. So I tried this but it also didn't work. Same error 'cannot in locked state' when trying to run the command. I do notice there's a green 'locked' on my phone when it's in the screen after the 'adb reboot bootloader' command. Any ideas?
simplepinoi177 said:
close, but not exactly right...
you got the downloading platform tools right, and putting the necessary files in that same folder that fastboot.exe resides in also right (you wouldn't believe how many novices actually make the mistake of not doing this)...
but you don't ever (underlined and emphasized not really for you AshtonHunter, but for any who are under the wrong impression; it's caused endless headaches and has even been complained by developers on Twitter...) "fastboot flash" TWRP with Pixels (any; and AFAIK any a/b slotted devices). You boot the twrp .img file. Also, for those who do not know and for future reference, there is no "recovery" for fastboot to "flash" to on Pixels (any), as there no longer is a separate partition for recovery; recovery resides in the boot partition. All in all, the command should be exactly this:
Code:
fastboot boot twrp-3.2.3-1-taimen.img
Immediately afterwards, you'll see your Pixel 2 XL restart and load up TWRP...
Good luck to you and hope this helps...
Click to expand...
Click to collapse
AshtonHunter said:
OK so first of all,
if this is the wrong place for this I'm sorry, it's quite late for me and I've been researching how to fix this for about two days and running up with nothing.
I recently upgraded to a Pixel 2XL, loving the device but unfortunately a couple of my apps save data into the data/data part of phone. The only way to then move that over and preserve the data is to use something like adb backup and restore. The backup seems to work fine, but so far every time I try to use restore on my pixel 2xl it 'ends' without actually adding the missing app data across.
I've tried using usb 2 and 3, no difference.
I've made sure the usb debugging is on and that my phone is unlocked. I also made sure to try using the commands through both cmd and powershell and that both were in admin mode. I've also tried
looking into other options like a friend suggested using es file explorer manager to change the download location, but I wasn't able to puzzle out a way to make something that was in data/data save elsewhere.
My phone isn't rooted, and I'd rather not go that far if I can help it. Any advice or ideas?
Click to expand...
Click to collapse
AshtonHunter said:
Hey everyone. So I tried this but it also didn't work. Same error 'cannot in locked state' when trying to run the command. I do notice there's a green 'locked' on my phone when it's in the screen after the 'adb reboot bootloader' command. Any ideas?
Click to expand...
Click to collapse
You would only get this error if your device isn't "unlocked"... I/we were all under the impression that (which is why I quoted) your device is "unlocked"... So maybe some clarification is in order...
There are two types of "unlocking" that can be attributed to the device; 1) your device can be "locked" to a carrier or global region, and it can be "unlocked" so the device can be used on any network anywhere, and 2) all Pixel's (and all smartphones AFAIK) have their bootloader in a locked state, and in order to do any kind of "rooting" or data restore/recovery or modification down to the system level you have to "unlock" the bootloader or have it in an "unlocked" state.
*BEWARE! Before running these commands, please note that running critical will erase/wipe EVERYTHING -- I am pretty sure running both will actually cause this to happen.
Considering all of this, when you said your "...phone is unlocked", you are speaking in terms of #2 I listed above, correct? Basically, you have run the command -- while in Bootloader Mode -- "fastboot flashing unlock" & (just as important, imho) "fastboot flashing unlock_critical", right? Because, if you haven't done these, then your device was never "unlocked" (in the sense that most relates to us and what you are intending) as well as without having one these commands, you had no chance at restoring your /data folder or partition "data" (pun not intended).
After clearing any misunderstanding and/or issues of these type, we might be able to better help after that point...but it is looking like you may need to root or at least do the same steps towards that end to accomplish what you are seeking...
So, get back to me/us on this, and hope this all helps...
Ok! So after confirming I could do it without any issue and having a day of time to work on it, my phone's bootloader is now unlocked and I've managed a backup using TWRP. Only thing now is I'm not entirely sure what I should be looking at and how in here. Advice is welcome but I'm going to be digging into it myself to see if I can puzzle it out with some friends of mine online. Also just again thank you all for all the assistance. I would have never gotten this far with it without you all!
AshtonHunter said:
Ok! So after confirming I could do it without any issue and having a day of time to work on it, my phone's bootloader is now unlocked and I've managed a backup using TWRP. Only thing now is I'm not entirely sure what I should be looking at and how in here. Advice is welcome but I'm going to be digging into it myself to see if I can puzzle it out with some friends of mine online. Also just again thank you all for all the assistance. I would have never gotten this far with it without you all!
Click to expand...
Click to collapse
What exactly are you wanting to do now that your bootloader is unlocked, and you have twrp? Can I assume you want to root it?
AshtonHunter said:
Ok! So after confirming I could do it without any issue and having a day of time to work on it, my phone's bootloader is now unlocked and I've managed a backup using TWRP. Only thing now is I'm not entirely sure what I should be looking at and how in here. Advice is welcome but I'm going to be digging into it myself to see if I can puzzle it out with some friends of mine online. Also just again thank you all for all the assistance. I would have never gotten this far with it without you all!
Click to expand...
Click to collapse
I'm glad you were successfully able to get it done! (clicking a "Thanks!" would be all I would welcome in return)
So, now, you might be able to successfully do what you originally did and restore through adb if you wish...I mean, if you simply have a /data folder that's been backed up, there might not be too many options available for you. Another thing you might try is running a custom recovery (TWRP I believe is the best or only) and restoring -- and/or backing up from your old device/phone, wiping everything, setting phone up, then use that TWRP backup to restore -- but you can only really run a restore if it was a TWRP backup to begin with... One other good way is running a Titanium Backup backup and restoring that way...
Good luck and hope this helps...
please help
simplepinoi177 said:
Aahhh,"...your phone isn't rooted..."that's probably it/key. I'm unsure whether any kind of "restore" works without root access -- backup of course works because that simply involves "copying" and "storing" files (essentially the basic process of backing up) and, as the system needs to be able to read and access the data, you pretty much have the "read access" to it. Restore on the otherhand, for those who are unaware, are essentially "copying" those stored files and "overwriting" the existing files -- which require "write access". The process of "rooting" is to acquire "root access" which allows both "read/write access" (therefore: "r/w access"). *again, for those who are unaware.
Sorry for just blabbering on about that, I guess I got carried away. In any case, basically (all in all, the reason why I blabbered on) I don't think you're going to go far without root access -- or "rooting" as you say -- but there is one thing I can suggest. When using adb, try running this command first before running any other adb command (i.e. restore):
Code:
adb root
It might just give you enough of that "root access" I was blathering about...
Also, among the all the things you made sure to do and include you made sure of, one thing you didn't mention is making sure you have the most up to date platform-tools (r28.0.1 *at least last I personally saw a few weeks ago).
Good luck to you, hope I made these things somewhat understandable, and hope this helped as well....
Click to expand...
Click to collapse
sorry in advance, I'm not very familiar with this webiste.
Im in a similar situation where it wont let me restore my adb backup, I am rooted and the bootloader is unlocked (though twrp is not installed). could you please help, i beg you.

Is My Mi MIX 2 Ruined?

Someone was "helping" me root my Mi Mix2. I can't be 100% sure what went wrong, but he managed to get it stuck in Fastboot mode, such that no matter what I do (i.e. any combination of power offs, or simultaneous button presses, or commands from terminal). I suspect he did not understand me when I said Magisk was tool best suited...he may have used some more familiar or standard tool like SuperSU or something to try and root.
Assuming I have sufficiently described my problem, is there anything I can do to get the phone back into a usable state?
Is your bootloader unlocked? If yes try to flash ROM using miflash tool.
I appreciate the response/suggestion.
fotocreaman said:
Is your bootloader unlocked?
Click to expand...
Click to collapse
Yes. I double checked with "fastboot oem device-info" commmand
fotocreaman said:
If yes try to flash ROM using miflash tool.
Click to expand...
Click to collapse
On your advice I did that, including downloading current (?) version and current(?) version of stock ROM. I received a message to effect that a flash script (.bat) file was missing (or at least not found).
Other threads regarding this error suggest unzipping something (?) twice but I didn't see a file inside the original zip file that could be additionally unzipped, and certainly nothing with a .bat extension.
Can you put here the exact error message and when it exactly occurs? Describe the steps you did to get to that point
Hi aa040371
1- download fastboot rom for your phone and unzip it twice , put folder in C:\ storage http://update.miui.com/updates/v1/fullromdownload.php?d=chiron_global&b=F&r=global&n=
2- Look at the tutorial to use miflashtool https://c.mi.com/thread-1857937-1-1.html
regards
I'm Still Here...
So, after more than a few detours and distractions, I have my phone (Mi Mix 2S, not the plain "2" I originally indicated!) basically back to stock...good frustration-tolerance building exercise.
I am currently in the process of trying to get TWRP to remain after booting to OS. I have researched/read numerous threads on this -- e.g. boot into TWRP, flash TWRP, reboot directly into TWRP again -- but somehow none of them do the trick. Every time I boot into the OS, the Recovery partition gets overwritten and I am back to the stock recovery tool. If I can trust/believe what at least one person has indicated online, this appears to be due to a script in /system/bin, but I can't get at that file to rename or delete it. In fact, I can't even see it in the file system as that area is completely locked down. I know it is there as a Find command executed via ADB shell lists it even though it indicates it is off-limits.
So I turned my attention to loading a rooting app/tool instead hoping that would let me get TWRP to hang around for long term...another excursion in futility. My phone model is M1803D5XA, so according to one more forum thread somewhere, I am supposed to be using SuperSU rather than Magisk? Whatever...it seems impossible: most of the zip files I located don't pass security/file-signing check. The one I found that at least starts to load/install (SR5-SuperSU-v2.82-SR5-20171001224502) works fine right up until it fails while trying to update "sepolicy" files. For some reason I have to sideload SuperSU from TWRP because I am not allowed to push a file even to my SDcard via ADB.
I just don't get why this all has to be so difficult, as in each and every step along the way. I feel like Sisyphus or Job or someone similar...sigh Any thoughts or suggestions still welcome...thanks.
aa040371 said:
So, after more than a few detours and distractions, I have my phone (Mi Mix 2S, not the plain "2" I originally indicated!) basically back to stock...good frustration-tolerance building exercise.
I am currently in the process of trying to get TWRP to remain after booting to OS. I have researched/read numerous threads on this -- e.g. boot into TWRP, flash TWRP, reboot directly into TWRP again -- but somehow none of them do the trick. Every time I boot into the OS, the Recovery partition gets overwritten and I am back to the stock recovery tool. If I can trust/believe what at least one person has indicated online, this appears to be due to a script in /system/bin, but I can't get at that file to rename or delete it. In fact, I can't even see it in the file system as that area is completely locked down. I know it is there as a Find command executed via ADB shell lists it even though it indicates it is off-limits.
So I turned my attention to loading a rooting app/tool instead hoping that would let me get TWRP to hang around for long term...another excursion in futility. My phone model is M1803D5XA, so according to one more forum thread somewhere, I am supposed to be using SuperSU rather than Magisk? Whatever...it seems impossible: most of the zip files I located don't pass security/file-signing check. The one I found that at least starts to load/install (SR5-SuperSU-v2.82-SR5-20171001224502) works fine right up until it fails while trying to update "sepolicy" files. For some reason I have to sideload SuperSU from TWRP because I am not allowed to push a file even to my SDcard via ADB.
I just don't get why this all has to be so difficult, as in each and every step along the way. I feel like Sisyphus or Job or someone similar...sigh Any thoughts or suggestions still welcome...thanks.
Click to expand...
Click to collapse
Recovery will get overwritten by dm-verity, you have to flash either magisk or another mod that disables dm-verity, but personally I suggest to use a custom rom if you don't care about miui
HrX said:
Recovery will get overwritten by dm-verity, you have to flash either magisk or another mod that disables dm-verity, but personally I suggest to use a custom rom if you don't care about miui
Click to expand...
Click to collapse
Hello...thanks. I definitely don't care about MIUI...in fact the whole exercise I am struggling through is so I can get LineageOS onto my phone. I've probably read 50+ threads/posts on 6-7 different forums regarding unbricking/unlocking/rooting/TWRPing/customROMing my particular phone, but this is the first time I've seen mention of DM-Verity. I'll look into it...not really hopeful, though. But anyway...thanks again.

Categories

Resources