What exactly does TWRP recovery do as part of its start-up routine? Because whatever it does just broke my phone's ability to boot successfully. I have a Sprint Note II (SPH-L900) running CM12.1.
Backstory: My phone was working fine with CM12.1 and Clockwork Recovery installed, except that I discovered today that I couldn't launch the default Android "Messaging" app. I found a post elsewhere on XDA that suggested deleting the files mmssms.db and mmssms.db-journal from the /data/data/com.android.providers.telephony/databases/ directory. My phone was not rooted, so I couldn't do this with a userspace file manager, and CWM Recovery doesn't have a file manager, but TWRP does. So I rebooted to bootloader, flashed TWRP, rebooted to TWRP, and used its File Manager to add ".old" to the end of the filenames of the two files just mentioned. Then I rebooted the phone.
Very unpleasant surprise: The CM boot animation just went on forever. Repeated attempts, even after flashing back to CWM recovery, yield the same result: the phone no longer boots successfully. This is exactly the same problem that I struggled with for several days recently while trying to install CM12.1 using TWRP recovery. (It never worked. I could only get it to work by flashing it with CWM recovery.)
It appears that TWRP does something as a routine part of its normal startup or shutdown that is breaking my CM12.1 installation. But what could that be? And how can I undo or fix it?
Related
NO ONE?????
ODIN --> Flash Stock Recovery (AP) with NAND Erase All Option Checked (because it seemed to make sense) + Auto Reboot + F. Time Reset --> Reboots to Stock Recovery (did not work before) --> Reboot into Recovery --> Wipe Data/Cache and Dalvik just to be safe (this crashed it before) --> Reboot. THE END
TL/DR: I am currently stuck on recovery/update mode. Any attempt to wipe data or clear dalvik crashes it. any attempt to access data through TWRP crashes it. Flashing stock rom or custom rom does not help. Somethings wrong with /data? It thinks it has root from the CF Auto Root, but does not really? Something wrong with partitions? Should I wipe the nand with ODIN 3.10? Repartition? ugh ... Please help ...
I have searched the forums and found nothing that describes this issue precisely. I have also tried to apply various suggestions to repair, which, for the most part seems to have made it worse. I am hoping that people still look at this forum.
PC - Windows 7
Initially @4.2.2 ---> Touchwiz debloated stock ROM which I rooted. It worked for a couple years, but the device crashed frequently. I do not recall much about the installation, but believe that I used CWM/TWRP at the time. After installing the ROM, I ran triangle away (out of the box, it had 4.1.2, i recall)
I decided to upgrade to the most recent stock ROM (4.4.2). In order to do so, I used an easy installer I found else where on XDA. (http://forum.xda-developers.com/showthread.php?t=2773712 ---ODIN One Click exe). The device was not initially recognized, so I reinstalled the official driver package (said that they already existed, but I installed again anyway). Ran 1-click and it appeared to work.
Initially, the device booted (long startup) and seemed to function. It also preserved all data and programs (presumably did not touch the internal memory - 16 GB) and possibly root /data.
I then tried to root through most recent ODIN with CF auto root. This appeared to work and rebooted (again, showing the updating android apps screen before fully booting).
The only thing that i could find that had changed was the wallpaper (showed on lock screen but not on home screen). I could no longer find the image, so tried to go to /data/data to find it with root explorer equivalent. This is where it started to act weird.
NOTE: I did not clear anything (system cache, etc. at any point)<--a lie (see below)
It showed the root folder fine, but when I clicked on /data it took a while and could not access it. It either rebooted itself or I rebooted, but this time it was stuck in a boot logo loop. I entered download mode and flashed TWRP through ODIN. I set it to not reboot automatically so that the bootloader was not overwritten automatically (thus losing recovery). TWRP came up. The computer recognized it as a Media Device after I mounted USB storage. Just in case, I copied all of the important files from the internal SD Card to my computer. I then tried to go to the file explorer to copy the wall paper and it forced a reboot. At this point it was stuck on a logo screen boot loop again. I was able to enter Download mode and reflash TWRP. This allowed me to enter recovery again, however, now it would only boot directly into recovery (or Download mode if I did the button combo). The interesting thing was that it would reboot two or three times before successfully entering TWRP.
I believe I tried to reflash the stock ROM at this point, which might have worked but made no difference.
I was also having a lot of problems getting Windows to properly recognize the device. I had to reinstall the drivers a couple times. I tried Kies after the problems started and it tried to connect by failed. The diagnose connection did not work either. I was not able to get Kies to connect though I tried several times throughout the attempted repair
I downloaded a stock-rooted 4.4.2 ROM from here and tried to flash it. It failed.
I also tried to flash via Heimdall, but initially could not find any stock ROMs for Heimdall for the Galaxy 8. (The driver utility that is included helped to get the phone recognized by Windows sporadically).
I decided to switch over to CWM touch recovery, which I flashed via ODIN (I was having issues with TWRP again and also could not get windows to recognize the device as a media device when I mounted USB storage). This worked after a couple tries and I was able to enter CWM. I attempted to flash the stock ROM but it failed. Either at that point or when I tried to mount data it returned an error that device did not have root. Again, it would only boot into CWM (on its own) or Download mode (with key combo). At some point around here I cleared the cache and dalvik (error) after it returned an error saying insufficient space when trying to flash ROM.
I dissected the .exe from the autoflash used in the beginning (stock unrooted 4.4.2) and used the contents (system.img, cache.img, hidden.img, tz.img, recovery.img and one other I do not remember) in Heimdall to create a Heimdall package. At this point I figured out I did not need to create the package, but just specify the individual files. I flashed. It appeared to complete System.img successfully and then failed. Tried again with the same result.
Now when I rebooted, it would enter download mode with the Key combo, but otherwise it booted instantly to an error screen to the effect that a firmware installation had failed and to use the repair function in Kies to fix. Kies still did not recognize it.
At this point, I figured I should stop. Currently I can get to the download screen or the error screen. The computer recognizes it but intermittently fails to install driver. Zadig.exe sees it as Gadget Serial. Sometimes Windows just sees it as SAMSUNG_Android, in which case drivers fail. Once or twice I got it to recognize it as Samsung USB Composite Device, but Kies would still not work.
That's all i have for now. If more information is needed, let me know and I will update the post when I get home from work tonight (this is from memory).
Thank you
UPDATE: last night I went home and was able to get it back to the point where I could flash TWRP or CWM recovery. If I try to flash Stock Recovery, it fails. A minor problem is that I cannot turn it off - it just turns it self on again, so the battery keeps running down.
Hi. I've just updated CM13 to the latest nightly using TWRP, but now the system just boots into TWRP - that's whether I select boot system, recovery, or bootloader. I tried restoring from a TWRP backup or another copy of the nightlies zip - it all seems to work fine but doesn't solve the problem. I can connect to the 'recovery' device using adb but adb restart bootloader just loads TWRP again. I've tried wiping first the dalvik/cache, then everything but the internal card, then finally everything but nothing seems to work.
I did get something a little bit like this a few days ago because SuperSU was complaining that I needed to update the binary. I let it do it the way that it suggested one does when TWRP is installed and afterwards couldn't reboot into system, but after a few minutes of frustration sorted things by wiping various partitions.
I attempted to load the full system restore files (cm-13.1-ZNH2KAS29G-crackling-signed-fastboot-74bb753396.zip) using TWRP but that didn't work (I imagine because they're designed to be run via fastboot). I tried loading them via the ADB sideloader option included in TWRP but it failed after a few seconds (I think the message was 'transmitting 0.0x'
I opened that zip and copied the various files to the external card, but I then baulked at installing the image files manually because the only partition option I'm given is boot and my understanding is that each image file should go into its own partition.
The only other potentially pertinent information I can think of:
TWRP keeps reporting "E: Unable to find partition size for '/recovery'"
Has anyone got any ideas please? I had been musing that my next phone would have OTG and NFC, but I wasn't planning to upgrade just yet if I don't absolutely have to.
Have you got it fixed? And if yes - how? I am stuck in a similar situation and can't find a solution for it. Tnx in advance.
So I was updating six rom and phone went into continuous boot. So went into recovery and wiped all but internal memory and reinstalled. Same boot problem. Went into fast boot and pushed another over as well as a vendor image. Tried installing the new rom, beans gaps, super su and same result. I've left the phone for over 20 mins with no result but the boot screen.
I'm having a similar problem.
My status- Unlocked bootloader, twrp accessible, devices not getting detected in fastboot mode by the pc, rooted, restoring using the backup results in a bootloop, correct drivers installed on the pc, superSU and full backup in the mobile.
i cant transfer files since device not getting detected.
my timeline- i followed every instruction on https://forum.xda-developers.com/nexus-5x/general/guides-how-to-guides-beginners-t3206930 and everything went successful, but when it rebooted to the 'Welcome' page (the page which comes when u open mobile for the first time) i restarted my nexus 5x 32gb to recovery mode and then the every boot procedure doesn't complete for several minutes(doesn't go ahead the ball animation)
Hi,
I wanted to update my Pixel C to the most current factory image with flashfire as i did it before a few times without problems.
So I DL'd current factory image from https://developers.google.com/android/images#ryu, opened it in flashfire and said it should flash the normal partitions except recovery as i don't want that it overwrites my TWRP.
Flashfire analyzed the zip file and after i said "flash" it restarted my Pixel into a black screen. At this point i was wondering that nothing more happened.
I waited for 10 minutes so that maybe something in the background could happen, but there was no further action. The screen kept black.
After these 10 minutes i restarted the device but now it always runs into TWRP directly instead of starting the system
I also tried to install the zip manually in TWRP but it tells me
"Could not find 'META-INF/com/google/android/update-binary' in the zip file.
Error installing the zip file '/usb-otg/ryu-n2g48c-factory-0bc0ee15.zip'"
As you can see from the error message i also tried to dl the file again and install it via OTG but the same thing.
If I go into the file manager in TWRP i can still access the folders from the sdcard.
The bootloader is unlocked of course.
Anyone an idea what i can do without loosing all the data?
Thanks in advance
Download the full system image and extract it. There should be a flash_all-file (bat for windows of sh for linux). Open it with an editor and remove the "-w" option in fastboot. "-w" is the switch for wipe. After you removed it, you can flash the complete image and your system should boot again into android. After that you can install a custom recovery, etc. again.
Thank you peter, worked like a charm for the system flash. Now follows the TWRP etc again
EDIT: ok, the system flash was the only thing that worked like a charm. I tried flashing TWRP with NRT but didn't work. I am stuck now at a "no command" screen when i start the device.
To install the custom recovery NRT tells me that i will loose all my data, so i wanted to backup everything.
Unfortunately i can't backup everything now as the temp booted TWRP demands a password to decrypt the sdcard, but i only have a pattern and no password set.
So now i try to flash everything again and to install twrp without loosing all the data.
Hey everyone I have flashed android 7.1.2 August again and android started afterwards without any problems. I was able to restore the backup of all the apps from Google.
Than I wanted to get back root and flashed TWRP with Nexus Root Toolset, but now only TWRP starts every time I switch on the tablet. Any ideas what I can do?
EDIT: I fixed it somehow with flashing the whole firmware package again and than the TWRP wich broke the startup again so i ended up in a TWRP bootloop. Therefore i flashed android again and TWRP 3.0.0.0 than TWRP 3.0.2.4 (something like that) and after like 3 to 4 different flashing steps it worked again. I have no idea what happened during the first flash of Andoir 7.1.2 but i think that something broke there.
Okay so to begin, my device is a us cellular moto z2 force. I had rooted my device with magisk using twrp successfully and everything was working fine.
Where i ran into problems was when i tried to figure out how to get a new boot animation to work. Originally I tried using a rooted file manager to edit /oem/media/ for the boot animation there. I had already placed a new boot animation in /system/media and it still showed the normal boot animation on boot, so i looked it up and /oem/media seemed to be where it checks first.
I tried to use the twrp file manager to rename the file in /oem/media since the root file manager was not working.
What happened was that it still showed the normal boot animation on start up and while twrp showed the one in /oem/media to be renamed, the root file manager did not. This is where i got confused.
I ended up looking around in twrp some more to try and figure out why when i noticed an /oem in /system. I thought (somewhat badly) that this may have been the place where the boot-animation was, even though I couldn't see it. This is the part where everything went wrong.
I deleted /system/syestem/oem because i didn't see the bootanimation.zip in it to delete individually, i just deleted the whole thing because of something i saw about /oem not being needed.
After this my phone still booted but a notification came up saying "finishing updating android" and I knew i did something wrong. Also the check in magisk came back with basic integrity but not the other one. I also noticed magisk was not installed anymore.
This is when I decided to restore from a backup in twrp and bricked my phone. After restoring I restarted my phone and it got stuck in a loop of the screen fromthis guide on how to remove the boot loader unlocked splash screen, which was working fine before.
Any help would be appreciated.
Okay so Managed to boot by switching partitions and clearing cache and data in twrp.
Now my issue, SafetyNet ctsprofile and basic integrity are both false, and I still have no idea how to change the boot animation without bricking my device.
So I was able to download magisk manager then re-download install the magisk framework directly from the app. It seems it was on some middle ground where it didn't work properly but I still had root and could grant superuser to apps, but couldn't install modules or have safety net.
Still have not figured out how to change bootanimation or anything in /oem without it coming right back on boot or while android is running, may give up if it ends up taking too long.
You should use a flashall to get yourself back to stock and unbroken. If you cant find the flashall for usc here google for Nash flashall, its definitely out there. I've been messing with OEM today and it looks like dm-verity is undoing all of our changes.