Problems Rooting Nexus S 4G with Mac - Nexus S General

OK, so I just got my Nexus S4G two days ago, and I'm ready to root. My phone out of the box has 2.3.4 on it.
I follow this tutorial: http://www.droidfiles.us/nexus-s-4g/root-nexus-s-4g/ the link to which was provided by a good XDA'er. I get the bootloader unlocked and install CWR (recovery-clockwork-3.0.2.4-crespo.img) and that goes fine.
That's when things stop going fine.
First, I try to create a Nandroid backup, and that process seemingly completes fine until i note that the process says it couldn't mount /data. I don't worry about it.
So, I go to Mounts and Storage to prepare to push SuperUser.zip and I tell CWR to "Mount USB Storage" and I wait as directed, but the USB storage never mounts. I try mounting USB Storage and mounting /sdcard, neither of which work, so I can't push SuperUser.zip.
Figuring I did something wrong, I decide to restore from Nandroid, only to have CWR tell me that the MD5 checksum is incorrect and now I have no clean, base Nandroid to restore to.
Then I do some digging, and discover that there's a new CWR for the NS4G at Koush's site and I download the file (recovery-clockwork-3.1.0.0-crespo4g.img) from there, push it to my phone using fastboot's recovery command and start it up.
It doesn't work.
Clicking any of the options (like mounting partitions, or restarting/powering down the phone) causes the screen to go blank and just display the CWR logo in the middle of the screen. The only solution to get out of those loops is to pull battery and restart.
So, now, I'm wondering what to do.
I go back into fastboot, relock the bootloader and I now wait for a reliable root method to root a 2.3.4 NS4G on a Mac.
My questions are:
Where can I get a stock ROM to completely start over from scratch and even remove the recovery I've installed <-- found a base ROM here: http://forum.xda-developers.com/showthread.php?t=1078213
Is there a fully reliable way to root the NS4G on a Mac, and if so how? (I've looked at this thread: http://forum.xda-developers.com/showthread.php?t=878446 and it looks problematic as well).

Look in the dev section, stickies at top, the one talking about ns4g cdma. You have the su zip already. Put the cwm 3024 img file in the same directory as fastboot. You won't use adb. Boot into bootloader and do the fastboot command to unlock. Phone is wiped. Boot into phone normally and log in with gmail. On the phone, mount the device as usb so you can just copy the su zip to the root of the sd card.unmount phone on the Mac side then the phone side. Boot phone into bootloader. Do the command to fastboot the cwm into the phone again. Once finished, choose recovery on bootloader. It will boot into cwm. Choose install zip from card. Choose pick zip. Install su. Reboot into normal phone. Download busybox and a file manager you like that can handle root. With file manager, go to /system/etc and look for the sh file mentioned in the guide and add .old to the end of the file. If su pops up asking for permissions then you know everything is working. Boot into bootloader again. Install cwm again then choose recovery again. Once in cwm do wipe of caches and factory reset and dalvik. Go back and do backup with nandroid. Boot into normal phone. Sign into google again. Update profile and prl them you should be set. Pretty much that's what I did and it worked the first time around.
Follow the Mac guide in the link

herbthehammer said:
Look in the dev section, stickies at top, the one talking about ns4g cdma. You have the su zip already. Put the cwm 3024 img file in the same directory as fastboot. You won't use adb. Boot into bootloader and do the fastboot command to unlock. Phone is wiped. Boot into phone normally and log in with gmail. On the phone, mount the device as usb so you can just copy the su zip to the root of the sd card.unmount phone on the Mac side then the phone side. Boot phone into bootloader. Do the command to fastboot the cwm into the phone again. Once finished, choose recovery on bootloader. It will boot into cwm. Choose install zip from card. Choose pick zip. Install su. Reboot into normal phone. Download busybox and a file manager you like that can handle root. With file manager, go to /system/etc and look for the sh file mentioned in the guide and add .old to the end of the file. If su pops up asking for permissions then you know everything is working. Boot into bootloader again. Install cwm again then choose recovery again. Once in cwm do wipe of caches and factory reset and dalvik. Go back and do backup with nandroid. Boot into normal phone. Sign into google again. Update profile and prl them you should be set. Pretty much that's what I did and it worked the first time around.
Follow the Mac guide in the link
Click to expand...
Click to collapse
I'm going to give your method a try. Thank you for your rapid response...
I see the subtle change you suggested: simply rebooting after unlocking and pushing recovery, and moving SU to the device via USB. Wish I'd thought of that.
(I'm still concerned about the Nandroid issue I reported. But I'll have to avoid any new ROMs for the time being, until I can get an answer for my Nandroid problem...)

My first nandroid choked. After root and final recovery install, I cleared all the caches it was *****ing about the first time, went in normally to make sure everything was okay, then went back and nandroid and no errors the second time. I probably will just stay with rooted stock but I would not flash other stuff until the dust settles and many of the bugs are worked out of the roms and kernels before jumping in.

TonyArmstrong said:
I'm going to give your method a try. Thank you for your rapid response...
I see the subtle change you suggested: simply rebooting after unlocking and pushing recovery, and moving SU to the device via USB. Wish I'd thought of that.
(I'm still concerned about the Nandroid issue I reported. But I'll have to avoid any new ROMs for the time being, until I can get an answer for my Nandroid problem...)
Click to expand...
Click to collapse
If cwm mount won't work then boot into the phone normally and copy over the file like usual is the only other quick and easy way to do it that I could think of at the moment the snafu happened. Yeah the way I did it might not have been the most efficient way but it got me past the hurdle that cwm made quickly. In the end, the result is the same so no big deal.
I don't know if cwm backs up wimax keys so I did it manually. There's a post on how to do it, I don't know if it's in this section. It might be dev?

Related

ClockworkMod Recovery

This update.zip will flash clockwork recovery, overwriting the need/ability to use the stock recovery folder with command in it.
For advanced users only.
v.8 Download: http://www.mediafire.com/?dvleg4oatkfxm7w
The credit for this all goes to Bekit for the biggest step forward on the Gtablet, and obviously Koush for the custom recovery to begin with. Roebeet packaged this update.zip.
Instructions:
1) Unpack download to root of sdcard. (Internals /sdcard, NOT /sdcard2)
2) Start tablet while holding volume + and power. (Let go when you see text come up saying entering recovery)
3) You will see a short installation and it will reboot.
4) Check the install by powering off, the powering on with volume+ and power
5) You should be greeted by a menu with Clockworkmod at the top
i have been using clockwork on my gtablet for several days now. it backs up and restores just like i would expect it too.
well done as usual.. props for all involved.
Works great no problems at all !!!
wishlist:
1. add SDCARD2 to the mount and storage section.
2. ... wait that is it.!
Should I be able to take this file and rename to update.zip, put it in the root of "sdcard" internal space, put the recovery folder in root directory too and then boot up with power + volume up to install this?
rushless said:
Should I be able to take this file and rename to update.zip, put it in the root of "sdcard" internal space, put the recovery folder in root directory too and then boot up with power + volume up to install this?
Click to expand...
Click to collapse
thats how i did it
rushless said:
Should I be able to take this file and rename to update.zip, put it in the root of "sdcard" internal space, put the recovery folder in root directory too and then boot up with power + volume up to install this?
Click to expand...
Click to collapse
Or just extract the zip file supplied in the first post onto the sd card. Everything will go into its place. Then boot from recovery using power and volume+.
So, if I place the cwm update.zip and recovery folder in the root of sdcard (internal), then when I boot into recovery, CWM will show up instead? Just want to know if it really is that simple. Also, if I want to flash a new ROM (Like the zpad one), do I simply place the update.zip from that rom anywhere other than the root of "sdcard", and flash using CWM?
One last question, if I delete the CWM update.zip, is it like CWM was never placed on my g tab?
Am I the only one having trouble getting cwrecovery on the root of sd card? cant get this to run. i am a visual learner and reading how to do all this is helping me very little. if anyone would be willing to do a video or reference me to a link so i can learn to do all this, i would appreciate greatly. this is very frustrating tab stock!
hey this might help you get it installed..
plug your gtablet into your computer, then on the gtablet, click the "enable usb storage connection" button
then on your pc, open windows explorer, and open removeable drive F, the letter may be different for you.. it should show 13gb free on it, and there should be an android folder and a dcim folder.. that's the root of the storage inside the tablet.. it's the same as sdcard.. unzip the clockworkblahblah.zip to the root/top level directory of that removeable drive. then turn the tablet off. and then hold down the volume + button while powering it back on, it should install the clockworkmod recovery manager.. that's about it
jw52637 don't feel bad... I'm a visual learner as well.
uncola,
I followed your instructions and I saw the update install on boot up. Now I'm lost. I expected to see and application named ClockworkMod Recovery or something like that... but I did not. How do I know it is installed and how do I use it to back up my stock ROM? Also, do I remove the "update.zip" from the root directory or just leave it there?
Sorry for the questions but I want to learn how to do this so I can stop bothering you guys.
mmracing said:
jw52637 don't feel bad... I'm a visual learner as well.
uncola,
I followed your instructions and I saw the update install on boot up. Now I'm lost. I expected to see and application named ClockworkMod Recovery or something like that... but I did not. How do I know it is installed and how do I use it to back up my stock ROM? Also, do I remove the "update.zip" from the root directory or just leave it there?
Sorry for the questions but I want to learn how to do this so I can stop bothering you guys.
Click to expand...
Click to collapse
ClockWorkMod Recovery is the recovery system...so you have to boot your tab into recovery (hold volume + and power the tab up). If installed, you'll get the ClockWorkMod Recovery instead of the stock recovery system. You can make backups, do restores, install .zips, etc... from there.....then "reboot" the system to boot back to your normal system.
Thanks tcrews. I moved the update.zip from the root directory to a saved directory then rebooted holding the volume + key and it booted into ClockWorkMod Recovery. I chose back up and everything seemed to backup fine.
So if/when I install another ROM and I do a restore to the ROM I just backed up I should be right back to where I was at that time. I have used Titanium Backup to back up all my applications and settings and know I would have to restore them also.
I'm just wanting to understand how I can get back to "stock" so that I can get the automatic updates from Viewsonic.
Well i just tried it all again, and all worked very well. Thank you very much
Ok, I'm totaly new to this so please bare with me, having some troubles with my G tablet NOT booting so I cant access it through Windows to install CW to fix my tablet. How can I get the Files on the tablet? I can get it to attempt recovery but no luck. PLEASE help. I'm pulling my hair out here.
Anyone know how or am I sol and should try and sent it back?
maccaw1 said:
Anyone know how or am I sol and should try and sent it back?
Click to expand...
Click to collapse
There is a physical reset button inside the device, or you can try ADB.
I cant get the recovery image to find update.zip
I have clockwork recovery gtab-cwm-v08 installed and renamed to update.zip in the root of the internal sd but when i boot into recovery it goes to the android screen then shows a triangle with a exclamation point, then reboots normally!
I rooted with z4root 1.2.1
I have superuser permission so am rooted!
Unrooted then rooted again figuring this might help!
Tried a few different clockwork recoveries
have no idea what the problem is! if anyone has any clue it would be appreciated!
drumdumb said:
I cant get the recovery image to find update.zip
I have clockwork recovery gtab-cwm-v08 installed and renamed to update.zip in the root of the internal sd but when i boot into recovery it goes to the android screen then shows a triangle with a exclamation point, then reboots normally!
I rooted with z4root 1.2.1
I have superuser permission so am rooted!
Unrooted then rooted again figuring this might help!
Tried a few different clockwork recoveries
have no idea what the problem is! if anyone has any clue it would be appreciated!
Click to expand...
Click to collapse
Had that happen to me. What I did was run the CWM again into the gtab. Next reboot I had CWM insgtalled and working.
Hope that helps
CWM 0.8 is the one that I used and is working for me. I have the gTab w/the "original" partition scheme, and installed it by the original gTab update process.
If you're using newer CWMs I've read posts in the CM6b4 thread that newer CWM version seem to be causing problems for some people.
Also if you have a "newer" "batch" gTab w/a different partition map scheme you might want to check what the latest info is on the IRC channel, #tegratab on freenode IIRC. Might be quickest to ask for help there anyways, as it sounds like this probably isn't your problem.

Factory Reset wiped out the internal SD card! I thought it's not meant to happen?!

This is the first time I'm using a device that doesn't have an external SD card, but I've all along understood that the internal SD card does not get wiped when you do a factory reset, and I'm sure I read that again on another thread just the other day.
My N7 is rooted using Wug's toolkit, with CM10.2 and Bulletproof kernel.
Yesterday I decided to do a factory reset (under Settings, Backup & Reset, Factory Data Reset), but after I did it, all the stuff I had on the internal SD was gone, including my backup files, the ROMs I had transferred there, etc.
Surely this is not meant to be the case, is it??
internal sdcard used to be a different partition.
Now it is just a directory in your /data and the "sdcard" is an emulated sdcard.
I know stock ROM and stock recovery wipes /data and everything in it including the virtual sdcard.
TWRP recovery will only remove the /data user stuff, leaving the virtual sdcard alone.
Which recovery are you running?
sfhub said:
internal sdcard used to be a different partition.
Now it is just a directory in your /data and the "sdcard" is an emulated sdcard.
I know stock ROM and stock recovery wipes /data and everything in it including the virtual sdcard.
TWRP recovery will only remove the /data user stuff, leaving the virtual sdcard alone.
Which recovery are you running?
Click to expand...
Click to collapse
Thanks for that! (Thanks coming your way). Well, better to know now than later! The down side is that I lost my CWM backups and my Titanium Backup files, but the good thing is that I think I have a TWRP backup that's on my computer.
I'm using TWRP, but not really liking it, cos I cannot boot into recovery from the phone and have to keep relying on the Wug Toolkit. I've just downloaded CWM and will be switching to that.
So the moral of this story is that if we are to do a factory reset, we should do it via recovery, correct? I'm presuming CWM will also leave the virtual sd card alone, yeah?
Oh one more thing, I think I lost root after the factory reset!!
I checked my All Apps and SuperSu wasn't there anymore. Just rooted it again using Wug kit.
oohyeah said:
I'm using TWRP, but not really liking it, cos I cannot boot into recovery from the phone and have to keep relying on the Wug Toolkit. I've just downloaded CWM and will be switching to that.
Click to expand...
Click to collapse
I am not sure what issue you are having with TWRP, but you can flash it to the recovery partition and boot to it automatically. If that's the only reason you don't like it, I'd work on fixing the install rather than jumping to another recovery.
oohyeah said:
So the moral of this story is that if we are to do a factory reset, we should do it via recovery, correct? I'm presuming CWM will also leave the virtual sd card alone, yeah?
Click to expand...
Click to collapse
I would probably do it from recovery. I don't know what CWM does on this platform as I've only used it on other platforms.
What do you mean you can't boot into recovery with twrp? I'm using twrp and have no problem booting into recovery.
Sent from my Nexus 7 using xda app-developers app
geckocavemen said:
What do you mean you can't boot into recovery with twrp? I'm using twrp and have no problem booting into recovery.
Click to expand...
Click to collapse
When I try to boot into recovery, it ends up showing a dead android with the red triangle "!" sign. I remember doing some searches and it seemed like this was normal. I remember the reason was that the N7 would always rewrite the recovery or something. From your responses, I'm guessing it's not normal?
The only way I could get into recovery was using the Wug toolkit using USB debugging/ADB, which really sucked, cos if it bootlooped and I can't get into the system to turn on USB debugging, then I'm not sure what I would do (though I read there's some way around it or something). I had never encountered any such thing with all my many other devices which all run CWM.
So what's up with all that?
"su" enter' next line "reboot recovery" in the Android Terminal window should also boot your device into recovery
User_99 said:
"su" enter' next line "reboot recovery" in the Android Terminal window should also boot your device into recovery
Click to expand...
Click to collapse
This will work fine. If you have no aversion to installing apps, Rom Toolbox Lite gives you power widgets you can put on your desktop then go to recovery with one touch. I use Quick Boot PRO, although the free version of that all may do recovery also. One might work for you until you want to play with mods.
Sent from my Nexus 7 using Tapatalk 4
oohyeah said:
When I try to boot into recovery, it ends up showing a dead android with the red triangle "!" sign.
Click to expand...
Click to collapse
That is stock recovery.
You need to get rid of /system/etc/install-recovery.sh
You can get rid of it by hand, or just install SuperSU from TWRP. Then flash TWRP to the recovery partition.
Thank you everyone for your input!
I'm happily back on CWM right now. If I revert back to TWRP next time at least I'll know what to do!
oohyeah said:
Thank you everyone for your input!
I'm happily back on CWM right now. If I revert back to TWRP next time at least I'll know what to do!
Click to expand...
Click to collapse
None of your blunders has anything to do with TWRP.
khaytsus said:
None of your blunders has anything to do with TWRP.
Click to expand...
Click to collapse
OK let me get something straight.
Obviously, the factory resetting that wiped out all internal storage (the original point of the thread) has nothing to do with TWRP, and I never said it did. On this point though, I'm surprised that it doesn't seem to be more well known that a factory reset would do wipe out all your data (did several searches and only found 'confirmations' that your internal SD data would be left untouched), though I'm glad that I know it now.
The suggestions on different ways to boot into recovery were helpful, though I believe that I would still have encountered the dead android, or would I not have?
What's certainly still not clear to me though is regarding the problem of not being able to boot into recovery and getting the dead android with the exclamation/triangle. After the first few replies, I expected to hear that this was NOT meant to be the case and that I did something wrong in the process or whatever.
However, what I seemed to get was that this is the expected behavior, and what I needed to have done was to "get rid of /system/etc/install-recovery.sh".
So let me ask these questions for clarification:
1. Is the dead android normal, given what I did/didn't do?
2. Is deleting /system/etc/install-recovery.sh part of the process of installing TWRP in order to be able to boot into recovery?
3. Would I also need to get rid of /system/etc/install-recovery.sh if using CWM?
(so far it doesn't seem to. After installing CWM I'm not getting the dead android and I didn't delete the install-recovery.sh).
Thanks. And just to be clear, I hope no one takes it the wrong way that I'm bashing TWRP or anything, because I"m not. Just been a long time user of CWM and this is the first time using TWRP and encountering the dead android.
oohyeah said:
So let me ask these questions for clarification:
1. Is the dead android normal, given what I did/didn't do?
2. Is deleting /system/etc/install-recovery.sh part of the process of installing TWRP in order to be able to boot into recovery?
3. Would I also need to get rid of /system/etc/install-recovery.sh if using CWM?
(so far it doesn't seem to. After installing CWM I'm not getting the dead android and I didn't delete the install-recovery.sh).
Thanks. And just to be clear, I hope no one takes it the wrong way that I'm bashing TWRP or anything, because I"m not. Just been a long time user of CWM and this is the first time using TWRP and encountering the dead android.
Click to expand...
Click to collapse
Dead android = stock recovery, so normal there.
When you flash a custom recovery on a stock ROM, there is a file, /system/etc/install-recovery.sh, or I actually prefer just renaming /system/recovery-from-boot.p, which will automatically verify your recovery image and restore it to stock if it doesn't match. So you must always remove this file, or the ROM will restore the stock recovery on boot.
TWRP makes it easy to remove either file by mounting /system in read-write mode and using its built-in file manager to remove it. You can do the same in CWM using adb.
As for point 3, yes, try to reboot into recovery again. If you didn't remove (either file), you'll find stock recovery again.
Thanks, Khaytsus. I booted into recovery (long press power button, reboot menu, recovery), and it booted straight into CWM, like it always has with my other devices. (And to confirm, I have not even looked for the install-recovery.sh file, let alone removed or renamed it.)
So far it seems to me that TWRP requires removal of install-recovery.sh, whereas CWM does not, but this doesn't seem to be what you guys are telling me is supposed to be the case.
oohyeah said:
Thanks, Khaytsus. I booted into recovery (long press power button, reboot menu, recovery), and it booted straight into CWM, like it always has with my other devices. (And to confirm, I have not even looked for the install-recovery.sh file, let alone removed or renamed it.)
So far it seems to me that TWRP requires removal of install-recovery.sh, whereas CWM does not, but this doesn't seem to be what you guys are telling me is supposed to be the case.
Click to expand...
Click to collapse
It really depends on what ordering you do your actions in.
/system/etc/install-recovery.sh doesn't exist on a stock factory shipped system.
It only gets put in place after you install an OTA. If you do all your upgrades using the factory images, you'll never encounter it.
What it does is during your boot process, it will check to see if your recovery is different than what it expects (ie stock). If so, it will install stock recovery by taking the stock kernel and patching it.
If any of the following are true, it will not overwrite your recovery:
/system/etc/install-recovery.sh is missing (or modified to not run as the original file)
/system/recovery-from-boot.p is missing
you are not running the stock kernel
The most common way for install-recovery.sh to be missing is you always used factory images.
The most common way for install-recovery.sh to be modified to not do the original function is if you installed SuperSU. It will overwrite install-recovery.sh with its own.
So in all the back and forth, it is quite possible you got rid of install-recovery.sh or had it modified simply by installing root.
If you then subsequently installed custom recovery, it would stay in place.
Previously you were installing TWRP and flashing it onto the tablet, but upon booting into android, install-recovery.sh realized it wasn't stock recovery, and overwrote TWRP with stock recovery.
That is why whenever you rebooted, you got fallen android (which is stock recovery)
If the way you installed cwm is to use "fastboot flash recovery cwm.img" then the only reason it is around is because something else you did got rid of or modified install-recovery.sh. cwm would be no more immune to install-recovery.sh than twrp was.
oohyeah said:
Oh one more thing, I think I lost root after the factory reset!!
I checked my All Apps and SuperSu wasn't there anymore. Just rooted it again using Wug kit.
Click to expand...
Click to collapse
Just to clarify, you didn't lose root. You just lost the supersu app, a root permission manager, because it was installed to your /data partition. The su binary was still in /system, all you would have had to do was install supersu from the market.
I'm not sure what else you were expecting from a "factory reset"
creaturemachine said:
I'm not sure what else you were expecting from a "factory reset"
Click to expand...
Click to collapse
Did you read the thread? He explained his reason for expectation quite well.
I just started up on a Nexus 4, and was also surprised to see this. Coming from a Galaxy S2, the "sdcard" being left intact was pretty convenient when flashing from ROM to ROM. Albeit, leading to some messiness. When did Nexus change to this behavior?
Skaziwu said:
I just started up on a Nexus 4, and was also surprised to see this. Coming from a Galaxy S2, the "sdcard" being left intact was pretty convenient when flashing from ROM to ROM. Albeit, leading to some messiness. When did Nexus change to this behavior?
Click to expand...
Click to collapse
Depending on which level you are looking at, it didn't really change the behavior, but rather how your data is organized.
Factory reset has always wiped out /data.
On older devices, they put the /sdcard in a separate partition and formatted fat32.
These are the ones that were surviving a factory reset.
On newer devices, the internal /sdcard is starting to migrate onto a directory in /data and the "sdard" you see is "virtual". Since it is on /data, when you wipe data, the virtual sdcard is also wiped.
Some recoveries try to simulate the previous behavior by doing a "rm" of every directory except the virtual sdard when you choose to wipe, instead of the erase/format that Android is doing.
The advantage of keeping the sdcard as a directory under /data is you don't need to decide how much space to split between the sdcard and your /data. Also permissions on files are more flexible being in an ext4 filesystem. Finally since everything is emulated and accessed via MTP, you don't need to unmount the filesystem, so your PC can access it.
There are also cons with this approach, but that is what Google is going with.

Is my device bricked?

Earlier today, I unlocked my bootloader and flashed TruPureXMM ROM. Everything went swimmingly and my MXPE was working beautifully. I decided to play around with Layers Manager a bit, and the first layer I decided to install went without a hitch. The second layer I decided to install put my phone into a bootloop. I have no clue what to do to get my device out of this bootloop.
I can boot into TWRP. It doesn't seem like ADB sideloading works. I just get a message that no devices are found. To add insult to injury, TWRP cannot see the ROM .zip in my directory at all. It is in the download folder of my main directory, yet TWRP cannot see it.
Am I at a loss? I cannot figure out how to get my MXPE functional again. ADB does not seem to recognize it, and TWRP cannot see the .zip, even though I know for a fact where the .zip is on the device. What do I do???
Flash your rom again and wipe data
1. Boot into TWRP
2. Select Mount and check system under partitions.
3. Go back to the home screen.
4. Select file manager.
5. You should be in the root directory. Look for a folder named vendor.
6. Go into the vendor folder. You should see another folder called overlay.
7. Go into overlay and delete everything in that folder. Long press on a file and you should see the option to delete. As for as I know you will have to do this one at a time.
8. After you have deleted everything in that folder, reboot.
9. Profit!
dustin_b said:
1. Boot into TWRP
2. Select Mount and check system under partitions.
3. Go back to the home screen.
4. Select file manager.
5. You should be in the root directory. Look for a folder named vendor.
6. Go into the vendor folder. You should see another folder called overlay.
7. Go into overlay and delete everything in that folder. Long press on a file and you should see the option to delete. As for as I know you will have to do this one at a time.
8. After you have deleted everything in that folder, reboot.
9. Profit!
Click to expand...
Click to collapse
Nice trick. I have been restoring a nandroid backup when layers goes awry. This will be faster unless there are a ton of overlays applied.
I was in the middle of a WhatsApp conversation and my style just blanked out. And it's not powering on anymore. No response! And I never interfered with the bootloader or even attempted to root it. It's running android 6.0 from an OTA update
sigilizer said:
Earlier today, I unlocked my bootloader and flashed TruPureXMM ROM. Everything went swimmingly and my MXPE was working beautifully. I decided to play around with Layers Manager a bit, and the first layer I decided to install went without a hitch. The second layer I decided to install put my phone into a bootloop. I have no clue what to do to get my device out of this bootloop.
I can boot into TWRP. It doesn't seem like ADB sideloading works. I just get a message that no devices are found. To add insult to injury, TWRP cannot see the ROM .zip in my directory at all. It is in the download folder of my main directory, yet TWRP cannot see it.
Am I at a loss? I cannot figure out how to get my MXPE functional again. ADB does not seem to recognize it, and TWRP cannot see the .zip, even though I know for a fact where the .zip is on the device. What do I do???
Click to expand...
Click to collapse
george241312 said:
Flash your rom again and wipe data
Click to expand...
Click to collapse
Might not even need to flash ROM again, just wipe data. But...not to be a jerk....if you are not familiar enough with phone modding to recovery from a bootloop, you shouldn't be messing around with it. But we all have to start somewhere.

Trouble Permanently Flashing TWRP

Hi,
I'm currently using the Skipsoft Android Toolkit to unlock flash TWRP onto my device. I've followed to first steps (install drivers, backup device and unlock bootloader) to the letter and everything went smooth.
Now the final part of installing TWRP is not going so well. Flashing the custom recovery works as expected and I end up in the TWRP menu. However, as soon as I reboot my phone and try to go back to the recovery via Advanced Reboot --> recovery, I end up in the default One Plus Recovery Menu. Now the tool mentioneds when this process fails, renaming the Recovery Restore Files is recommend to prevent the system from flashing the stock recovery on boot (what happens to my device). I follow this option in which I end up back in TWRP, flash a zip named 'permanent-recovery.zip' (while read only mode is turned off in TWRP) and reboot my device. Still when I use Advanced Reboot to open recovery, I end up once again in the Stock Recovery.
Is there anyone who could tell me where I am going wrong and how to solve this issue?
Thanks in advance
Rawrden said:
Hi,
I'm currently using the Skipsoft Android Toolkit to unlock flash TWRP onto my device. I've followed to first steps (install drivers, backup device and unlock bootloader) to the letter and everything went smooth.
Now the final part of installing TWRP is not going so well. Flashing the custom recovery works as expected and I end up in the TWRP menu. However, as soon as I reboot my phone and try to go back to the recovery via Advanced Reboot --> recovery, I end up in the default One Plus Recovery Menu. Now the tool mentioneds when this process fails, renaming the Recovery Restore Files is recommend to prevent the system from flashing the stock recovery on boot (what happens to my device). I follow this option in which I end up back in TWRP, flash a zip named 'permanent-recovery.zip' (while read only mode is turned off in TWRP) and reboot my device. Still when I use Advanced Reboot to open recovery, I end up once again in the Stock Recovery.
Is there anyone who could tell me where I am going wrong and how to solve this issue?
Thanks in advance
Click to expand...
Click to collapse
The basic "mechanics" of what happens seems to still be as follows:
As your phone is delivered with Stock OS, it has these two files installed:
Code:
/system/recovery-from-boot.p
/system/etc/install-recovery.sh
I know from looking at mine when I got it that it had /system/recovery-from-boot.p installed. If it's there, it is run when it runs at boot.
To stop that behavior you have to get rid of those files before you reboot the first time from recovery or else recovery will be replaced with the stock image. I'm aware that supposedly the custom recovery supposedly renames either one or the other or both of these but am not convinced it does this or whether installing root (either Magisk or SuperSU) does it. Either way, since you're stuck with the problem, either from file-manager in TWRP if that's all you can boot to, you need to rename /system/recovery-from-boot.p to something like /system/recovery-from-boot.p.orig and maybe the other one /system/etc/install-recovery.sh to /system/etc/install-recovery.sh.orig as well.
Once even the .p file is gone, it's not going to rewrite recovery. You must, of course, be rooted before you can touch those files although if you can sideboot TWRP, it seems like you are rooted while it is booted and "should" have access to system files if you can mount system rw.
I've fixed it this way on other phones. On this one, installing the "official" TWRP and Magisk did it. When I booted into /system after installing Magisk, I looked for the .p file and found it renamed to /system/recovery-from-boot.bak.
I found a link for a Samsung s8 for the same purpose. It's probably identical. http://www.teamandroid.com/2017/04/25/install-galaxy-s8-twrp-310-recovery/3/
Click to expand...
Click to collapse
I looked into those two files while in TWRP and noticed I only had the recovery-from-boot.p file. This was already in fact renamed to recovery-from-boot.p.bak. I renamed it once again (just to be sure) and after flashing the .zip I mentioned earlier, the TWRP did not last another reboot...
Can I after flashing TWRP again, immediately flash Magsik? I intended to hold off rooting because the rom I was going to install has Magisk build into it. I don't want to create a conflict when flashing later on. Is this going to be an issue?
@hachamacha I've reread your post and wondering if rooting my device is even going to make a difference right now? Since I'm already able to rename files in the system directory, would it even make a difference?
Rawrden said:
I looked into those two files while in TWRP and noticed and only had the recovery-from-boot.p file. This was already in fact renamed to record-from-boot.p.bak. I renamed it once again (just to be sure) and after flashing the .zip I mentioned earlier, the TWRP did not last another reboot...
Can I after flashing TWRP again, immediately flash Magsik? I intended to hold off rooting because the rom I was going to install has Magisk build into it. I don't want to create a conflict when flashing later on. Is this going to be an issue?
Click to expand...
Click to collapse
To me, it doesn't sound like a conflict to re-install Magisk over itself in FOS and see if that helps. The real "action" that counts is all about whether you've already booted into the OS after installing TWRP and then how you go about getting rid of the .p file without doing a regular reboot via the OS. Even installing the FOS ROM should get rid of the .p file (rename it), so something else is going on. I'll look around some more and update this if I can.
By the way: Depending upon how exactly you got from TWRP to the OS the first time, it could already have rewritten the stock recovery by the time you noticed *.p file renamed to *.bak.
OK: I recalled how I did this without a problem: I wrote instructions somewhere but have no idea where. This is what I think I did:
1) fastboot flash recovery recovery.img (custom/TWRP)
2) fastboot boot recovery.img (so force it to load recovery without a traditional reboot).
3) install ROM from that point and after done just hit the reboot button (or install Magisk from that point and hit reboot).
Click to expand...
Click to collapse
---------- Post added at 09:26 AM ---------- Previous post was at 08:59 AM ----------
Rawrden said:
@hachamacha I've reread your post and wondering if rooting my device is even going to make a difference right now? Since I'm already able to rename files in the system directory, would it even make a difference?
Click to expand...
Click to collapse
Just saw this note:
Anytime you're in TWRP, you're automatically "rooted" for the time you're there. It's integral to TWRP having permissions to do anything like install etc. If you just "loaded" TWRP (as in fastboot boot twrprecovery.img) then you'd be rooted, but when you rebooted to the system, you'd be unrooted. While you were in TWRP, in theory you could make file system changes to the /system partition (a) if TWRP lets you mount it rw which I think that first swipe does and b) if you can see the correct files in it's file manager.
So it "seems" like those file changes should be actual file changes to the correct place. Keep in mind that while booted in TWRP, TWRP may have it's own ./system/ that has nothing to do with the OS's ./system folder, so you've got to be able to mount the OS's ./system. TWRP's ./system is already fine and of no importance for this. I can boot mine into TWRP and look around to try to clear this up, but it might not be crystal clear to me either.
The output of a TWRP terminal emulator "mount" command might be of use but it will be messy. Maybe if you can do this in emulator from TWRP:
# mount | grep system, and look at that output, perhaps put it in this post, it'd be of help. The mounted rw ./system we need is going to be the same one you'd see from adb shell or terminal emulator while booted from the OS. My guess is that the one we don't want from TWRP's perspective will be mounted as /system (params...) and that the the OS's system either will not yet be mounted and you'll have to go to mounts and mount it and then look at the output of the mount cmd again to figure out what it was mounted as. Sorry about how complicated this explanation has become. Anyway: The ./system that corresponds to the OS is the only one we care about.
There's no easy way to explain it so I'll leave it hidden to spare anyone having to look at it:
I just booted into TWRP and used terminal emulator and file manager to explore:
findings: While in TWRP, using terminal emulator to do a
$ df and then a $ mount command shows no ./system mounted specifically. // maybe not a surprise.
// TWRP just mounts it's root / file system and there is a /system folder, just not a specific mount point for it.
// TWRP does not auto mount the OS's ./system partition by default. It depends what you're going to do there.
Without going into "mounts" and clicking on /system, it won't even try to mount /system for the OS.
If you can get that mount to work in read/write mode, then you should be able to see the ./system mount using terminal emulator as such.
$ mount | grep -i system (and look specifically for ./system on the right side of whatever appears).
In theory you should be able to make changes to the OS's /system partition now. When you're done, unmount it. (I'm assuming all this works from TWRP, a dodgy assumption)
At this point: I'm just trying to figure out how TWRP does things like installs OS zips to the /system & /data partitions which it is clearly successfully able to do. It could do it without mounting anything because it could use the linux dd command, which just writes to the /dev name. OR: It could mount /system and use it. I'm not sure which.
hachamacha said:
OK: I recalled how I did this without a problem: I wrote instructions somewhere but have no idea where. This is what I think I did:
Quote:
Code:
1) fastboot flash recovery recovery.img (custom/TWRP)
2) fastboot boot recovery.img (so force it to load recovery without a traditional reboot).
3) install ROM from that point and after done just hit the reboot button (or install Magisk from that point and hit reboot).
Click to expand...
Click to collapse
I followed these steps and I managed to install FreedomOS without any issues. My phone booted normally and after a few complimentary steps I booted back into recovery and... TWRP! No more stock recovery. Thanks a lot!
Just one more question: TWRP currently asks whether it is allowed to install itself as a system app. Now I assume it is already a system app, but I'm not expert at this so I can't say for sure. Would you recommend me to install TWRP as a system app?
Rawrden said:
I followed these steps and I managed to install FreedomOS without any issues. My phone booted normally and after a few complimentary steps I booted back into recovery and... TWRP! No more stock recovery. Thanks a lot!
Just one more question: TWRP currently asks whether it is allowed to install itself as a system app. Now I assume it is already a system app, but I'm not expert at this so I can't say for sure. Would you recommend me to install TWRP as a system app?
Click to expand...
Click to collapse
Great! Glad that worked. I guess it's all about how that first boot to the OS occurs.
Anyway: Your question, I'm assuming is about TWRP "Manager" the app? If so, yes, it should be a system app. The thing is that "Official TWRP Manager" doesn't really do much of use that you wouldn't just as soon do from fastboot, so it's not critical and nothing other than TWRP manager will "not work" regardless of what you designate it. All saying it's a system app does is puts a slot for it in Magisks "root table".
Cheers.
hachamacha said:
Great! Glad that worked. I guess it's all about how that first boot to the OS occurs.
Anyway: Your question, I'm assuming is about TWRP "Manager" the app? If so, yes, it should be a system app. The thing is that "Official TWRP Manager" doesn't really do much of use that you wouldn't just as soon do from fastboot, so it's not critical and nothing other than TWRP manager will "not work" regardless of what you designate it. All saying it's a system app does is puts a slot for it in Magisks "root table".
Cheers.
Click to expand...
Click to collapse
Done! Can I just say how grateful I am to you for helping me out with this? Your answers have been extremely detailed and I've learned quite a few things. Unfortunately I can only thank your posts once, because you've earned more than that. Thanks again and keep being awesome!

Freezes on Google screen after attempted SU Install from TWRP

Ok I am sure I did this before without any problem, but this time, through TWRP on the NRTK, I installed Magisk, no problems, and then went back to install the SU with the zip file in TWRP again and then on the reboot it freezes on the Google startup screen.
I didnt even want to install the SU zip, but when I ran SU after Magisk installed after reboot, SU gave an error, so I decided to install SU from TWRP.
Did I do something wrong there, so I dont repeat the same error next time?
And how do I get out of this locked state?
I've tried wiping all cache to factory reset without deleting internal storage data... I am hoping I dont have to delete and wipe everything and start all over. I did not have a chance to eve install TiB yet.
Dathaeus said:
Ok I am sure I did this before without any problem, but this time, through TWRP on the NRTK, I installed Magisk, no problems, and then went back to install the SU with the zip file in TWRP again and then on the reboot it freezes on the Google startup screen.
I didnt even want to install the SU zip, but when I ran SU after Magisk installed after reboot, SU gave an error, so I decided to install SU from TWRP.
Did I do something wrong there, so I dont repeat the same error next time?
And how do I get out of this locked state?
I've tried wiping all cache to factory reset without deleting internal storage data... I am hoping I dont have to delete and wipe everything and start all over. I did not have a chance to eve install TiB yet.
Click to expand...
Click to collapse
Flash the stock boot.img from the image/rom you were using before this and reboot. You will have to re-root (properly) afterwards, but your phone should boot up. If you use Magisk, you don't need SU, and vice versa. Use only one method to root.
v12xke said:
Flash the stock boot.img from the image/rom you were using before this and reboot. You will have to re-root (properly) afterwards, but your phone should boot up. If you use Magisk, you don't need SU, and vice versa. Use only one method to root.
Click to expand...
Click to collapse
Hmmm ya I prob should have posted that SU error message instead of what I did, douche move.
But how do I flash the boot.img... I have an original copy of it on my PC... can I somehow while in TWRP on the phone connect to my PC via cable and run commands from my PC in CMD and execute that old boot.img flash? Or is there a location in the stock Nexus already I can use? Because there is no file in the root drive after I did the soft wipe.
P.S. Everything I have done so far has not deleted my whole storage, yet.... not sure if that is necessary at this point bec it seems reflashing the boot.img wipes absolutely everything again? If I have to it is what it is... just painful when this happens before I could get TiB running... unless my Nandroid backup file I have will restore and work after I do this?
Dathaeus said:
Hmmm ya I prob should have posted that SU error message instead of what I did, douche move.
But how do I flash the boot.img... I have an original copy of it on my PC... can I somehow while in TWRP on the phone connect to my PC via cable and run commands from my PC in CMD and execute that old boot.img flash? Or is there a location in the stock Nexus already I can use? Because there is no file in the root drive after I did the soft wipe.
Click to expand...
Click to collapse
While in TWRP you have MTP (file transfer) so you can add files to your device. Transfer the boot.img over to your device via MTP and then use TWRP to flash. Just be sure to select flash IMAGE rather than ZIP. Lesson here is when you get back up and running, install fastboot/adb and make sure it is working well and communicating with your PC. Then you can learn how to use it. This would take literally 5 seconds to flash via fastboot (device in bootloader mode).
---------- Post added at 01:29 PM ---------- Previous post was at 01:26 PM ----------
Dathaeus said:
P.S. Everything I have done so far has not deleted my whole storage, yet.... not sure if that is necessary at this point bec it seems reflashing the boot.img wipes absolutely everything again? If I have to it is what it is... just painful when this happens before I could get TiB running... unless my Nandroid backup file I have will restore and work after I do this?
Click to expand...
Click to collapse
NO, flashing boot.img will not delete any of your files. It will only write to the boot partition. If using fastboot the command is fastboot flash boot boot.img
v12xke said:
While in TWRP you have MTP (file transfer) so you can add files to your device. Transfer the boot.img over to your device via MTP and then use TWRP to flash. Just be sure to select flash IMAGE rather than ZIP. Lesson here is when you get back up and running, install fastboot/adb and make sure it is working well and communicating with your PC. Then you can learn how to use it. This would take literally 5 seconds to flash via fastboot (device in bootloader mode).
NO, flashing boot.img will not delete any of your files. It will only write to the boot partition. If using fastboot the command is fastboot flash boot boot.img
Click to expand...
Click to collapse
Yep I actually had those platform files already, and yes the MTP was active there, I just never tried that before so didnt know it was even a possibility or the right way.
So I tried via flashing my very old boot.img and also the one from
https://forum.xda-developers.com/nexus-6p/general/stock-modified-boot-img-regular-root-t3306684
via TWRP "Install" via image install (not zip) and to the "boot partition"
and no change, same stuck on Google logo screen.
I tried the fastboot command from CMD and it says
< waiting for any device >
and doesnt do anything. I had it on the default TWRP menu screen.... I waited over 20 min although I know it shouldnt take near that long, just in case.
My bootloader is unlocked BTW, I dont want to assume anything here.
You need help getting the latest fastboot/adb binaries working on your PC. So many tutorials on how to do this. Ugh.
Dathaeus said:
Yep I actually had those platform files already, and yes the MTP was active there, I just never tried that before so didnt know it was even a possibility or the right way.
So I tried via flashing my very old boot.img and also the one from
https://forum.xda-developers.com/nexus-6p/general/stock-modified-boot-img-regular-root-t3306684
via TWRP "Install" via image install (not zip) and to the "boot partition"
and no change, same stuck on Google logo screen.
I tried the fastboot command from CMD and it says
< waiting for any device >
and doesnt do anything. I had it on the default TWRP menu screen.... I waited over 20 min although I know it shouldnt take near that long, just in case.
My bootloader is unlocked BTW, I dont want to assume anything here.
Click to expand...
Click to collapse
Which OS security patch were you running? Flash the system (to the system partition in TWRP) and boot images (again) from the 6P factory image of the same name:
https://developers.google.com/android/images?hl=en
See if this helps.
Sent from my Nexus 5X using Tapatalk
v12xke said:
You need help getting the latest fastboot/adb binaries working on your PC. So many tutorials on how to do this. Ugh.
Click to expand...
Click to collapse
Not sure what you mean... I JUST did all that when I redid my phone completely back to factory etc etc.... just few weeks ago and then again on my new replacement. But just to be sure, I downloaded all those files again today and it didnt make any difference.
Still stuck on the
< waiting for any device >
I have to be missing some other step or something else is wrong here.
FYI not sure if this matters but when phone boots to recovery there's a red error message
"Unable to mount storage"
but it loads to TWRP fine anyways.
SlimSnoopOS said:
Which OS security patch were you running? Flash the system (to the system partition in TWRP) and boot images (again) from the 6P factory image of the same name:
https://developers.google.com/android/images?hl=en
Click to expand...
Click to collapse
Yep thats what I been doing.....
So the CMD command still doesnt work, which I think is weird in itself... and when I try to install from recovery, it goes through the whole process, both boot.img and system.img, but then it freezes on the Google logo again, so no change.
Sorry I am not sure what security patch, I just got this used from eBay, and one thing, not sure if this means anything, it says its a beta version or something and that message came up all the time when I rebooted when the phone was working.
Do I need to suck it up and redo the whole phone again........ :/

Categories

Resources