[Q] Unroot / Return to Stock Recovery for Nexus S 4G (Sprint) - Nexus S Q&A, Help & Troubleshooting

Gang, I've searched and couldn't find. I rooted the Sprint Nexus S 4G and installed CW recovery.
Would some one please be kind enough to point me on how to unroot and return to stock recovery for a return.
Thank you!

Why do you want to return it?

dmora01 said:
Why do you want to return it?
Click to expand...
Click to collapse
Exchanging for another, I appear to have a defective screen which flickers when phone is shaken.

Yeah this would be good to know, as when you unlock it there is now a big unlocked icon when booting. I could see a sprint rep throwing the phone in my face saying they can't support it.

r80ies said:
Yeah this would be good to know, as when you unlock it there is now a big unlocked icon when booting. I could see a sprint rep throwing the phone in my face saying they can't support it.
Click to expand...
Click to collapse
Use a file manager like Root Explorer or SuperManager (any file manager that can run with root access)
Delete /system/app/Superuser.apk
Delete /system/xbin/su
Delete /system/bin/su
Reboot the phone into the bootloader.
Plug the phone into USB.
Type "fastboot oem lock"
Good to go.

What about the custom CWM recovery?
oldblue910 said:
Use a file manager like Root Explorer or SuperManager (any file manager that can run with root access)
Delete /system/app/Superuser.apk
Delete /system/xbin/su
Delete /system/bin/su
Reboot the phone into the bootloader.
Plug the phone into USB.
Type "fastboot oem lock"
Good to go.
Click to expand...
Click to collapse

a2k said:
What about the custom CWM recovery?
Click to expand...
Click to collapse
Oh, my bad. Before deleting root, go to /system/etc and find whatever you renamed the install-recovery.sh file to, and rename it back to install-recovery.sh. Then follow my instructions to delete root, and once you reboot back into the ROM, it will erase ClockworkMod and install the stock recovery. That said, here is a set of updated instructions:
Use a file manager like Root Explorer or SuperManager (any file manager that can run with root access)
Go into /system/etc and find the install-recovery.sh file that you renamed originally, and rename it back to install-recovery.sh. (This will ensure that the stock recovery will be restored on first boot)
If you installed busybox, you'll have to delete it along with all the symlinks that it created.
Delete /system/app/Superuser.apk
Delete /system/xbin/su
Delete /system/bin/su
Reboot the phone into the bootloader.
Plug the phone into USB.
Type "fastboot oem lock"
Good to go.
Click to expand...
Click to collapse

oldblue910 said:
Oh, my bad. Before deleting root, go to /system/etc and find whatever you renamed the install-recovery.sh file to, and rename it back to install-recovery.sh. Then follow my instructions to delete root, and once you reboot back into the ROM, it will erase ClockworkMod and install the stock recovery. That said, here is a set of updated instructions:
Use a file manager like Root Explorer or SuperManager (any file manager that can run with root access)
Go into /system/etc and find the install-recovery.sh file that you renamed originally, and rename it back to install-recovery.sh. (This will ensure that the stock recovery will be restored on first boot)
If you installed busybox, you'll have to delete it along with all the symlinks that it created.
Delete /system/app/Superuser.apk
Delete /system/xbin/su
Delete /system/bin/su
Reboot the phone into the bootloader.
Plug the phone into USB.
Type "fastboot oem lock"
Good to go.
Click to expand...
Click to collapse
Many thanks!!!!

Titanium Backup did install busybox, how do I delete it along with all the symlinks that it created?

a2k said:
Titanium Backup did install busybox, how do I delete it along with all the symlinks that it created?
Click to expand...
Click to collapse
Did Titanium Backup install busybox into /system/xbin? If so, (I assume you have a nandroid backup just in case), I would delete absolutely everything in that folder except dexdump. If it installed busybox somewhere other than /system/xbin, then we'll cross that bridge when we get there.

oldblue910 said:
Did Titanium Backup install busybox into /system/xbin? If so, (I assume you have a nandroid backup just in case), I would delete absolutely everything in that folder except dexdump. If it installed busybox somewhere other than /system/xbin, then we'll cross that bridge when we get there.
Click to expand...
Click to collapse
I don't believe it to be installed in /system/xbin/ as the only two items showing there are:
dexdump
su

a2k said:
I don't believe it to be installed in /system/xbin/ as the only two items showing there are:
dexdump
su
Click to expand...
Click to collapse
OK check /system/bin then. Is BusyBox in there?

oldblue910 said:
OK check /system/bin then. Is BusyBox in there?
Click to expand...
Click to collapse
OldBlue, I really appreciate your assistance!
I feel really stupid, there are numerous files inside /system/bin, heck I stopped counting at 40!! I do not see a "BusyBox" file there, what should I look for?

a2k said:
OldBlue, I really appreciate your assistance!
I feel really stupid, there are numerous files inside /system/bin, heck I stopped counting at 40!! I do not see a "BusyBox" file there, what should I look for?
Click to expand...
Click to collapse
Yeah there will be a bunch. Do you have a terminal emulator installed? If so, go into the terminal emulator:
Type "su" (without quotes)
Type "busybox which busybox" (without quotes)
Tell me what it says.

oldblue910 said:
Yeah there will be a bunch. Do you have a terminal emulator installed? If so, go into the terminal emulator:
Type "su" (without quotes)
Type "busybox which busybox" (without quotes)
Tell me what it says.
Click to expand...
Click to collapse
I installed Terminal Emulator:
Typed: su
Typed: busybox which busybox
Response: busybox: not found
Although TB says:
Root Access: OK (BusyBox 1.16.0 from app)

a2k said:
I installed Terminal Emulator:
Typed: su
Typed: busybox which busybox
Response: busybox: not found
Although TB says:
Root Access: OK (BusyBox 1.16.0 from app)
Click to expand...
Click to collapse
Oh no wonder! You're all set then. BusyBox is located within Titanium Backup's data folder. You don't need to worry. BusyBox will go away when you uninstall Titanium. So just follow my updated instructions and you're good. Let me know if you have any problems. Make sure you have a nandroid backup of your ROM before you delete root, just in case! You can never be too careful!
Use a file manager like Root Explorer or SuperManager (any file manager that can run with root access)
Go into /system/etc and find the install-recovery.sh file that you renamed originally, and rename it back to install-recovery.sh. (This will ensure that the stock recovery will be restored on first boot)
If you installed busybox, you'll have to delete it along with all the symlinks that it created.
Delete /system/app/Superuser.apk
Delete /system/xbin/su
Delete /system/bin/su
Reboot the phone into the bootloader.
Plug the phone into USB.
Type "fastboot oem lock"
Good to go.
Click to expand...
Click to collapse

Quote: Go into /system/etc and find the install-recovery.sh file that you renamed originally, and rename it back to install-recovery.sh. (This will ensure that the stock recovery will be restored on first boot)
what if there is no install-recovery.sh file!!!!!! under system/etc?
i didnt delete it!!!!!!! i was woundering way everybody was talking about renameing it? i dont have that file..

spdwiz18 said:
Quote: Go into /system/etc and find the install-recovery.sh file that you renamed originally, and rename it back to install-recovery.sh. (This will ensure that the stock recovery will be restored on first boot)
what if there is no install-recovery.sh file!!!!!! under system/etc?
i didnt delete it!!!!!!! i was woundering way everybody was talking about renameing it? i dont have that file..
Click to expand...
Click to collapse
Hmmm....try just /etc. Is it in there? Every stock Android build since 2.3.1/GRH78 has had that file in there. It checks the MD5 hash of the current recovery and if it doesn't match up, it flashes the stock one over it. That's really strange.

oldblue910 said:
Hmmm....try just /etc. Is it in there? Every stock Android build since 2.3.1/GRH78 has had that file in there. It checks the MD5 hash of the current recovery and if it doesn't match up, it flashes the stock one over it. That's really strange.
Click to expand...
Click to collapse
Nope .... no such file. I even did a search for it with root explorer and it does not come up. If worse come to worse ill pull it from someone's Tom just so I have it on my phone. But I know I did not delete it.
Sent from my Nexus S 4G using XDA Premium App

That is very strange indeed. I wonder if Google didn't install it on the Nexus S 4G. Can any other NS4G owners verify if /etc/install-recovery.sh exists on your phone?

Related

how to push a file using terminal emulator

Ive temporarily rooted my device to push a file to system/app and ive followed the instruction from the widgetpicker app from xda and it keeps telling me 'permisson denied' from typing "c:\android-windows\tools> adb remount
can someone please help me get this file into the system app folder
Symondo said:
Ive temporarily rooted my device to push a file to system/app and ive followed the instruction from the widgetpicker app from xda and it keeps telling me 'permisson denied' from typing "c:\android-windows\tools> adb remount
can someone please help me get this file into the system app folder
Click to expand...
Click to collapse
1.Put the app in the root of your internal sd.
2.Open root explorer and scroll to sdcard and click to open.
3.Scroll to the app and long press,which gives you the options and click copy or move.
4.Click your back button,which will take you back to "Mounted as r/w.
5.Scroll to and click on system and click app and then paste.
6.Press and hold the installed app and change permission to rw-r-r
Hit home and your done.
i dont have root explorer at the moment and would like to try n do this without paying for an additonal app just now.
i dont understand how its so difficult to move a file into a folder
cd /sdcard/somewhere
su
cp file.apk /system/app
exit
Sent from a piece of ginger bread
K900 said:
cd /sdcard/somewhere
su
cp file.apk /system/app
exit
Sent from a piece of ginger bread
Click to expand...
Click to collapse
tried this it states "sd card not found" in terminal emulator.
Ive got it granted super user access and a temporary root. do i need to do with without the temp root?
The other code ive tried which i cant get to work is:
c:\android-sdk-windows\tools>adb remount
c:\android-sdk-windows\tools>adb push AppWidgetPicker.apk /system/app

Rooted, trying to reinstall deleted Stock.apk

I had a questions about restoring the deleted Stocks app. I rooted with the new unrevoked last night and then installed Titanium to remove apps. I prematurely removed the Stocks app and I have been trying to get it back since.
I've tried multiple routes, from this Wildefire thread http://forum.xda-developers.com/showthread.php?t=738147 I tried the apk via adb and Root Explorer. Neither worked.
Then I downloaded the stock odexed EVO rom from this thread http://forum.xda-developers.com/showthread.php?t=874251, grabbd the stock.apk and moved it to my \system\apps folder with Root Explorer. I've restarted, tried clearing the Dalvik Cache, pushing it via adb, none have worked.
Right now it's still sitting in the \system\app folder.
I wanted to see if there was anything else I can try to get it back? Or am I doing something wrong?
Thanks in advance.
I take it you are running stock Rom. I think the best way is to make a nandroid of the stock Rom that you are running, with ClockworkMod. Once done download Myn's Rom or sprint lovers. Both of this Rom's have the stock Sprint apps. When flashing the Roms, please, make sure to use Rom Manager and flash ClockworkMod, than flash Amo-ra; is located at the buttom as an alternate recovery. Than once you flash the Rom, let it load, than flash clockworkMod again, than go into recovery, than restore,advance restore, select the newest nandroid, and just restore data. This will give you all the stock apps. OR just try this.
http://forum.xda-developers.com/showthread.php?t=832388
Here are some more apk's.
http://forum.xda-developers.com/showthread.php?t=901393
grab the apk out of the stock rom you have, then in adb do this
adb remount
adb push Stock.apk /system/app
if you need to push the odex do this also
adb push Stock.odex /system/app
the important thing is the remount to make the system/app read write
you can go to the rom file open the file then open system then open app and add the apk you want and reload the rom into the phone that sit more simple
ifly4vamerica said:
grab the apk out of the stock rom you have, then in adb do this
adb remount
adb push Stock.apk /system/app
if you need to push the odex do this also
adb push Stock.odex /system/app
the important thing is the remount to make the system/app read write
Click to expand...
Click to collapse
I did the above while booted in recovery mode with the system mounted. It successfully went in the system/app folder. I see it in Root Explorer, although it still doesn't show up in the apps menu. Oh well.
baker2gs said:
I did the above while booted in recovery mode with the system mounted. It successfully went in the system/app folder. I see it in Root Explorer, although it still doesn't show up in the apps menu. Oh well.
Click to expand...
Click to collapse
Yeah it doesn't work right if you are in recovery because it messes with permissions I heard. Just do it with phone plugged in to computer and on. If that doesn't work you can try deleting the apk and then using
Adb remount
Adb install stock.apk
Don't know if these will work but worth a try. Last resort is find a flashable zip that writes something to system/app and drop the apk in there.
Evo Sent
ifly4vamerica said:
Yeah it doesn't work right if you are in recovery because it messes with permissions I heard. Just do it with phone plugged in to computer and on. If that doesn't work you can try deleting the apk and then using
Adb remount
Adb install stock.apk
Don't know if these will work but worth a try. Last resort is find a flashable zip that writes something to system/app and drop the apk in there.
Evo Sent
Click to expand...
Click to collapse
When I run that command with the phone on charge mode with debugging on plugged into the computer I get a "remount failed: Operation not permitted".
I installed the Sync drivers and tried it with that but it didn't work either.
Any suggestions? Thanks for your help by the way.
baker2gs said:
When I run that command with the phone on charge mode with debugging on plugged into the computer I get a "remount failed: Operation not permitted".
I installed the Sync drivers and tried it with that but it didn't work either.
Any suggestions? Thanks for your help by the way.
Click to expand...
Click to collapse
I can't help with that, never ran in to that problem before, are you nand unlocked and s-off?
ifly4vamerica said:
I can't help with that, never ran in to that problem before, are you nand unlocked and s-off?
Click to expand...
Click to collapse
Yes to both, I have been trying to do research on it. It may be the stock rom...
I tried some workarounds but they didn't work. Thanks for your help.
baker2gs said:
Yes to both, I have been trying to do research on it. It may be the stock rom...
I tried some workarounds but they didn't work. Thanks for your help.
Click to expand...
Click to collapse
No problem, sorry I couldn't help.
Evo Sent
Just an update, I tried the .zip route you suggested. I created a Titanium back up and threw the Stock.apk in the zip. I ran the update.zip in recovery. It placed Stock.apk in the system/app folder but the app still does not appear in the apps menu. Thanks again.

[Q] Droid 2 Global BootStrap Manual Install?

How would I go about pushing clockworkmod custom recovery via ADB/Terminal instead of using the D2Bootstrap.apk?
You don't and even if it did it wouldn't work because the D2, D2G, DX and Dpro have locked bootloaders stick with koush it has never done me wrong and I've been romming my D2 since we got root and roms back in september 2010.
Sent from my DROID2 using XDA App
newk8600 said:
You don't and even if it did it wouldn't work because the D2, D2G, DX and Dpro have locked bootloaders stick with koush
Click to expand...
Click to collapse
I'm just asking how the app can do something that a terminal can't? I don't know how to comprehend that, I would think that there would be a way.
I wonder if the apk will have any useful information. Thank you for the reply
fKngFtd said:
I'm just asking how the app can do something that a terminal can't? I don't know how to comprehend that, I would think that there would be a way.
Click to expand...
Click to collapse
I'm sure there is a way but why figure it out when it's already been done?
The app pushes files (not sure what) to locations (not sure where) that hijack the booting process on startup before getting to moto's software. If it sees a specific file (I think logwrapper.bin but I'm not sure) is boots into clockworkmod. If it doesn't it just boots like normal.
Sent from my DROID2 using XDA App
newk8600 said:
I'm sure there is a way but why figure it out when it's already been done?
Click to expand...
Click to collapse
I would like to figure out how so "I" won't need an app, and to hopefully bring more info to our Community of D2G owners. Just my own opinion.
You need to get the hijack file from Koush's App. Download droid2bootsrapper either from his site or the market. View it with your favorite zip viewer, say 7zip or Winrar. Look in the assets folder for the hijack file.
Adb push hijack to /system/bin
Chmod 755 hijack
Rename logwrapper to logwrapper.bin (in the /system/bin folder)
Symlink hijack to a new file called logwrapper ("cd /system/bin", "ln -s hijack logwrapper")
Don't try it if you don't know how to SBF.
Sent from my DROID2 GLOBAL using XDA App
Thank you bro, I will try and report back. The SBF is my friend, it has fixed my D2G multiple times. Hah
Sent from my DROID2 GLOBAL using Tapatalk
buryboi said:
You need to get the hijack file from Koush's App. Download droid2bootsrapper either from his site or the market. View it with your favorite zip viewer, say 7zip or Winrar. Look in the assets folder for the hijack file.
Adb push hijack to /system/bin
Chmod 755 hijack
Rename logwrapper to logwrapper.bin (in the /system/bin folder)
Symlink hijack to a new file called logwrapper ("cd /system/bin", "ln -s hijack logwrapper")
Don't try it if you don't know how to SBF.
Sent from my DROID2 GLOBAL using XDA App
Click to expand...
Click to collapse
I tried what you said and but I believe that there is another step?
# adb push hijack /system/bin
# mv /system/bin/logwrapper /system/bin/logwrapper.bin
# cd /system/bin
# ln -s hijack logwrapper
#
Do I need to flash the recovery still, I'm stuck.
(Edit)
I searched further into the apk, and found the recovery image along with *.sh scripts. All help is appreciated.
No, you cant "flash" recovery as the D2G has a locked bootloader.
I'm not positive, but when the App is installed there are additional files in /data (like an update.zip)
I dont know if the hijack loads that update.zip or not...I'm inclined to think it doesn't since most of the custom roms just include the hijack and the symlink and nothing else...
the .sh file is the script that runs when you press "reboot recovery" in the app.
There is another .sh script that runs adbd is su mode when your phone first boots.
To get into recovery type the following in terminal
$su
#touch /data/.recovery_mode
#reboot
When the phone boots, init.rc calls logwrapper, which symlinks to hijack, which checks for the file /data/.recovery_mode. If it finds that file, it unmount system and loads bootstrap/Clockwork Recovery. If it doesn't find it /data/.recovery_mode it creates it, just in case you're phone doesn't boot. When your phone successfully boots, Droid2Bootstraper.apk starts and deletes /data/.recovery_mode so that next time you boot you wont automatically go into Boostrap recovery.
If you dont have the Boostrapper app, then you will probably boot into recovery every time you restart your phone.

[Q] CWM feeling like a newb

I downloaded everything in the cwm final
I used file manager to overwrite the old files and when I boot into recovery I still get the old recovery and not cwm
There is also nowhere for me to instal from update.zip
I have done this on my evo and it was easy but I'm clearly missing something with my galaxy 4g would someone be so kind as to give step by step instructions?
BGVampire said:
I downloaded everything in the cwm final
I used file manager to overwrite the old files and when I boot into recovery I still get the old recovery and not cwm
There is also nowhere for me to instal from update.zip
I have done this on my evo and it was easy but I'm clearly missing something with my galaxy 4g would someone be so kind as to give step by step instructions?
Click to expand...
Click to collapse
reinstall packages
krylon360 said:
reinstall packages
Click to expand...
Click to collapse
No fair you beat me to it.....duh winning..
Sent from my SGH-T959V using XDA Premium App
krylon360 said:
reinstall packages
Click to expand...
Click to collapse
and yes you must reinstall packages every time you want to re-enter CWM so you must leave the update.zip on you SD card
wrecless said:
and yes you must reinstall packages every time you want to re-enter CWM so you must leave the update.zip on you SD card
Click to expand...
Click to collapse
Thank you for your post. Common knowledge I know but a great reminder!
Sent from my Galaxy s 4g
can't flash CWM recovery
everytime i boot into recovery, i selected reinstall packages, then i get error : signature verification failed!
am I missing something? I have EVO too, it wasn't that difficult to install CWM.
anybody can help me by pointing to things I might have missed?
sarfrazhc said:
everytime i boot into recovery, i selected reinstall packages, then i get error : signature verification failed!
am I missing something? I have EVO too, it wasn't that difficult to install CWM.
anybody can help me by pointing to things I might have missed?
Click to expand...
Click to collapse
recovery.bin probably isn't being overwritten correctly. At first I downloaded the file with Dolphin Browser and had the same problems. Try downloading the file with firefox and then try pushing it to /system/bin again.
probably recovery file is not being copied in system/bin folder. i can see it has only read permission for group and write permission. i tried rom manager permission fix, that didn't change permission of recovery. i tried changing from terminal using chmod +w & chmod 755. but that didn't help change the permission on recovery file.
sarfrazhc said:
probably recovery file is not being copied in system/bin folder. i can see it has only read permission for group and write permission. i tried rom manager permission fix, that didn't change permission of recovery. i tried changing from terminal using chmod +w & chmod 755. but that didn't help change the permission on recovery file.
Click to expand...
Click to collapse
Rom Manager isn't working for the Galaxy S 4G yet.
What application are you using to copy recovery to /system/bin?
typically i use ES explorer but i tried File Expert too.
one typo on my prev post: i don't have write permission on recovery, only got read permission.
sarfrazhc said:
typically i use ES explorer but i tried File Expert too.
one typo on my prev post: i don't have write permission on recovery, only got read permission.
Click to expand...
Click to collapse
ES won't work. File Expert should work. Just make sure you have R/W permissions. Don't do anything with Rom Manager. That won't help.
yea it should work as they say but it does not. I tried changing permission using File expert,it click OK and then i check file permission on recovery right away, the write permission is not checked. even chmod 755 failed to change the write permission!
sarfrazhc said:
yea it should work as they say but it does not. I tried changing permission using File expert,it click OK and then i check file permission on recovery right away, the write permission is not checked. even chmod 755 failed to change the write permission!
Click to expand...
Click to collapse
I don't think you have any problems with R/W. I just don't think the recovery file was overwritten. Look in /system/bin in File Expert. Do you see recovery and recovery.bin? Or just recovery?
/system/bin/recovery file exists and i have been trying to change its permission.
sarfrazhc said:
/system/bin/recovery file exists and i have been trying to change its permission.
Click to expand...
Click to collapse
You don't need to change the permission of recovery. Copy the recovery file and navigate to /system/bin in file expert. When you get there you want to hit menu then more then mount. It will give you two options. Pick mount as read write. Then paste the recovery file.
Read through this thread again. It should help.
http://forum.xda-developers.com/showthread.php?t=1099374
mounted with read/write and now i could boot into recovery.
Thanks a lot for taking time to answer my questions. First backup is in progress...
sarfrazhc said:
mounted with read/write and now i could boot into recovery.
Thanks a lot for taking time to answer my questions. First backup is in progress...
Click to expand...
Click to collapse
No problem man.

rom manage recovery problem

I cant go to recovery through Rom Manager for some reason. It works manualy( power+volume) but when I click it from the app it freezes, and shows an exclamation point triangle
have you tried to reinstall the app?
Wich CWM do you have?
thy the above post; if that doesn't work, go into recovery manually and fix permissions
that must be why
I was following this video http://www.youtube.com/watch?v=PVyGw6vycFo
and it said I had to wipe my data which I did, and maybe CWM was removed?
Ill try to flash CWM and see what happens.
Worked! thanks
In wich way?
Have you reinstall Rom manager App or reflah CWM Recovery?
actually, theres been a trend going on here....
I went on recovery to check if its working after I flashed it and it worked, after turning it off and removing the usb out of my computer I tried again and it didnt work.
Any ideas why?
Edit: when I had ROM manager I already tried to Flash CWM there if you're wondering.
Rename /etc/install-recovery.sh to something else with your preferred file explorer with root capability. Now reflash cwm and it will stick. What you are seeing now is stock recovery.
Harbb said:
Rename /etc/install-recovery.sh to something else with your preferred file explorer with root capability. Now reflash cwm and it will stick. What you are seeing now is stock recovery.
Click to expand...
Click to collapse
where can I find /etc/install-recovery.sh and what do you mean by file explorer with root capability?
Root explorer, ES File Explorer or something of the sort. This will let you directly modify files on the /system partition. Just enable root functionality in the settings, allow root when the popup comes up and rename/delete the /system/etc/install-recovery.sh file (this is the correct path, /etc is a link to /system/etc - ignore the other one).
Directories work pretty much the same as windows except it doesn't use "drives" (ie, C:\, D:\, etc), everything is found within the root directory (which is /).
Harbb said:
Root explorer, ES File Explorer or something of the sort. This will let you directly modify files on the /system partition. Just enable root functionality in the settings, allow root when the popup comes up and rename/delete the /system/etc/install-recovery.sh file (this is the correct path, /etc is a link to /system/etc - ignore the other one).
Directories work pretty much the same as windows except it doesn't use "drives" (ie, C:\, D:\, etc), everything is found within the root directory (which is /).
Click to expand...
Click to collapse
fairly new to android so I have no clue what you are talking about sorry... can you give me some steps on how to do that. again I apologize, Im still new
Download this from the market, i'm sure you'll figure it out
quick unrelated question: I tried to apply the ROM and it didnt continue, it said it was aborted or something

Categories

Resources