[Q] Root (Read/Write to system) Access from Recovery? - Galaxy S II Q&A, Help & Troubleshooting

How do I get Root (read/write) Access in Recovery? I'm running SGS II rooted using Chainfire 's insecure kernel on XWKE7.
I can only access Superuser via Shell...
If this has been discussed before, please direct me to where.
The point to this would be to be able to push/pull stuff to system on a device that won't boot cause I messed with the framework or something else.

+1 How to make read/write full access in recovery mode ?
Thanks

When using CF-Root, in recovery connect via ADB and type:
Code:
rootsh
at the console.

Yes but how to have root without rootsh.
For push directly in /system ?

Ah, I see.
For that you need a kernel that's running adbd as root.
CF-Root kernel runns adbd with normal user priv's and SUs it to root on the shell, so no go there.
Grab one of the kernels from the "insecure kernels for rooting" thread or my one (*points-to-sig*).
The insecure kernels always run adbd as root, my kernel runns adbd as root when in recovery (not on normally booted system).

Related

[Q] Custom Recovery??

can anybody teach me?
When mine P-500 on Android 2.2,I can root & using custom recovery
Now I using Android 2.2.2,I using GingerBreak v1.2 to root and I already root.
But when I want to operate custom recovery steps.
Then 1st.-restart my phone =>finish ok
2nd.-connect to PC & open Debug mode =>finish ok
3rd.-open windows DOS Command mode and type "adb shell" =>finish ok
4th.-In "$" prompt to input "su"(own superuser)
=show"Permission denied" why??
Hope someone talk to me how to
Thanks a lot
When you type su on your pc, you will usually get a prompt from the superuser app on your phone where you will have to allow it for the procedure to proceed on the pc. Have you done this?
And, If I understand correctly, gingerbreak need not always install busybox and superuser correctly on your phone. check first whether you have the superuser app on your phone and that it works. If not, install these 2 apps from the market.
Then try the procedure once more.
If you are trying to install a custom recovery on your phone, you don't need adb. You can install a custom recovery using a tool like terminal emulator on your phone. The procedure to do so is mentioned in the following thread -
HOWTO] Rooting, Installing -Android SDK, Custom Recovery, Custom ROM's

CWM Not working

I installed Rom Manager and then downloaded the recovery for Samsung galaxy s2. When hit reboot into recovery. I am unable to perform any operations in CWM. I had to connect the phone via usb and issue a "adb reboot" command to get back.
How do we make cwm work.
http://forum.xda-developers.com/showpost.php?p=18160002&postcount=26
ptulluri said:
I installed Rom Manager and then downloaded the recovery for Samsung galaxy s2. When hit reboot into recovery. I am unable to perform any operations in CWM. I had to connect the phone via usb and issue a "adb reboot" command to get back.
How do we make cwm work.
Click to expand...
Click to collapse
Also must people are having issues flashing in cwm after using ROM manager. If you try installing from cwm and get verification error you needed to flash again then kernel and don't use ROM manager
Flashed CWM and nothing is happening
I flashed CWM Recovery 5.0.2.3 using the instructions here http://forum.xda-developers.com/showthread.php?t=1285823. However, when i go into CWM and select something the only thing that happens is the logo for CWM shows up with a black screen. When I push the power button again it will go back to the list.I am using the stock rom and it hasn't even been rooted yet. When I try to root using super one click, it gets stuck at step #5. Please Advise.
NDN
Dont use Rom Manager. It is known to have issues with the S2
I use CWM Manager and have no problems.....
noobdeeznutz said:
I flashed CWM Recovery 5.0.2.3 using the instructions here http://forum.xda-developers.com/showthread.php?t=1285823. However, when i go into CWM and select something the only thing that happens is the logo for CWM shows up with a black screen. When I push the power button again it will go back to the list.I am using the stock rom and it hasn't even been rooted yet. When I try to root using super one click, it gets stuck at step #5. Please Advise.
NDN
Click to expand...
Click to collapse
The key mapping is different. I had the same issue. Try the home key to select in place of the power button and the back key for back
Also if not rooted I do not think CWM will work...
Use this by Entropy512 it is flawless.
http://forum.xda-developers.com/showthread.php?t=1286432
SNadler said:
The key mapping is different. I had the same issue. Try the home key to select in place of the power button and the back key for back
That was it... THANKS!!!
Click to expand...
Click to collapse
SNadler said:
Also if not rooted I do not think CWM will work...
Click to expand...
Click to collapse
Root is having access to root account in os. It has nothing to do with cwm since cwm is loaded before the os loads.
They are irrelevant
Sent from my SAMSUNG-SGH-I777
Pirateghost said:
Root is having access to root account in os. It has nothing to do with cwm since cwm is loaded before the os loads.
They are irrelevant
Sent from my SAMSUNG-SGH-I777
Click to expand...
Click to collapse
In addition, all of our CWM-enabled kernels are "insecure" kernels - They give root at all times to ADB sessions, this is why SuperOneClick works after flashing them.
But only ADB sessions get root, so you use the "rooted" ADB shell to root the system partition. After that you've got perma-root until you nuke su and Superuser.apk from /system
Entropy512 said:
In addition, all of our CWM-enabled kernels are "insecure" kernels - They give root at all times to ADB sessions, this is why SuperOneClick works after flashing them.
But only ADB sessions get root, so you use the "rooted" ADB shell to root the system partition. After that you've got perma-root until you nuke su and Superuser.apk from /system
Click to expand...
Click to collapse
I think I am confused again?
When I flash a kernel, I have root. I have never used super one click. Just flashed your kernel. I thought that is what gave me root? Are you saying I still do not have root for /system files? Or does your kernel push su and superuser when it is flashed?
SNadler said:
I think I am confused again?
When I flash a kernel, I have root. I have never used super one click. Just flashed your kernel. I thought that is what gave me root? Are you saying I still do not have root for /system files? Or does your kernel push su and superuser when it is flashed?
Click to expand...
Click to collapse
Mine does, codeworkx's doesn't.
Setting a kernel to be insecure is a lot easier and takes less time than putting in a robust root-inject script.
SNadler said:
I think I am confused again?
When I flash a kernel, I have root. I have never used super one click. Just flashed your kernel. I thought that is what gave me root? Are you saying I still do not have root for /system files? Or does your kernel push su and superuser when it is flashed?
Click to expand...
Click to collapse
Entropy512 said:
Mine does, codeworkx's doesn't.
Setting a kernel to be insecure is a lot easier and takes less time than putting in a robust root-inject script.
Click to expand...
Click to collapse
Entropy512: Does this mean that codeworkx's kernel must be flashed with SuperOneClick in order to have complete root (to /system)... but with your kernels we don't need to flash SuperOneClick? If so, in order to unroot (without SuperOneClick) I suspect one would have to flash the non-root stock kernel? Thx
DoctorQMM said:
Entropy512: Does this mean that codeworkx's kernel must be flashed with SuperOneClick in order to have complete root (to /system)... but with your kernels we don't need to flash SuperOneClick? If so, in order to unroot (without SuperOneClick) I suspect one would have to flash the non-root stock kernel? Thx
Click to expand...
Click to collapse
Yes. (Unless you flash an su package with CWM instead of SuperOneClick)
Really, all SuperOneClick is doing are the following commands, assuming you've got a proper su binary and Superuser.apk:
Code:
adb remount
adb push su /system/xbin/su
adb shell chmod 6755 /system/xbin/su
adb push Superuser.apk /system/app/Superuser.apk
adb shell chmod 644 /system/app/Superuser.apk
Entropy512 said:
Yes. (Unless you flash an su package with CWM instead of SuperOneClick)
Really, all SuperOneClick is doing are the following commands, assuming you've got a proper su binary and Superuser.apk:
Code:
adb remount
adb push su /system/xbin/su
adb shell chmod 6755 /system/xbin/su
adb push Superuser.apk /system/app/Superuser.apk
adb shell chmod 644 /system/app/Superuser.apk
Click to expand...
Click to collapse
I understand (I think) that chmod 644 is to set the permission but what is chmod 6755?
SNadler said:
Dont use Rom Manager. It is known to have issues with the S2
I use CWM Manager and have no problems.....
Click to expand...
Click to collapse
I have downloaded CWM Manager and I have tried to install it but it has failed. Is there a different type of process to doing this other than opening it through root explorer?
what are you trying to do? just use the 3 button combo or extended power option to boot into recovery and flash away?
Ok, I am having a huge issue with trying to flash a custom rom. I will try to explain this the best way I can. I have had the same problem as above when trying to use CWM in recovery. Here is what I did:
- I unrooted my phone
- flash CWM with "SGH-I777_ClockworkMod-Recovery_5.0.2.3.tar"
- then it boots into CMW recovery and I can't do jack. When I try to select anything I just get a blank screen with the clock workz logo. If I hit the volume up and down buttons again the list of options comes back, but I will be stuck with the same situation if I try to select any options.
I was able to successfully root my phone in another instance using galaxys2root.com's method, however when I tried to use cwm I also ran into the same problem. I have yet to be able to use anything in cwm recovery. Please help me. I have flashed my phone multiple times and probably bricked it also. Luckily i haven't done any damage yet, but i would like to be able to flash roms. I am still kinda new to flashing roms, but i was able to flash my old infuse like a champ without any of these problems.
ducksauce88 said:
Ok, I am having a huge issue with trying to flash a custom rom. I will try to explain this the best way I can. I have had the same problem as above when trying to use CWM in recovery. Here is what I did:
- I unrooted my phone
- flash CWM with "SGH-I777_ClockworkMod-Recovery_5.0.2.3.tar"
- then it boots into CMW recovery and I can't do jack. When I try to select anything I just get a blank screen with the clock workz logo. If I hit the volume up and down buttons again the list of options comes back, but I will be stuck with the same situation if I try to select any options.
I was able to successfully root my phone in another instance using galaxys2root.com's method, however when I tried to use cwm I also ran into the same problem. I have yet to be able to use anything in cwm recovery. Please help me. I have flashed my phone multiple times and probably bricked it also. Luckily i haven't done any damage yet, but i would like to be able to flash roms. I am still kinda new to flashing roms, but i was able to flash my old infuse like a champ without any of these problems.
Click to expand...
Click to collapse
Use the home soft key to select stuff in CWR, not the power button.
Sent from my SGH-I777 using XDA App
i didnt read all of the posts until after i posted. thanks for not slashing me. so it looks like i use the home button to select then the back button still goes back. got it.
On a side not, I do not remember reading about that within the posts for rooting and flashing clockworkz. I tend to skip over things when reading, but I think someone should put that in big fat red letters "USE HOME BUTTON TO SELECT".

[INFO][GUIDE]Rooting on linux (and mac)

There appear to be two main options for rooting Samsung devices on linux and mac.
Option 1: (un-tested) root.zip (recovery)
This method roots your stock 2.3 rom from in recovery (stock or CWM)
1. Copy Root.zip to your sdcard.
2. Turn your phone off
3. Boot your phone into recovery mode. (Hold HOME+POWER buttons. When the screen turns on let go of POWER but keep holding HOME. After you enter recovery mode, let go of HOME.)
4. Select “apply update from sdcard”
5. Find and select Root.zip
6. When it’s done installing, select “reboot system now”
7. Go to apps and look for 'superuser'. If you see it, your phone is rooted.
Option 2: (un-tested) flash CWM from stock recovery:
This gives you the freedom of a custom recovery, flashed on the device from stock recovery
1. Download recovery-clockwork-5.0.2.6-galaxyace-fix.zip
2. Put recovery-clockwork-5.0.2.6-galaxyace-fix.zip on your sdcard
3. Boot into current stock (default) recovery (zip also compatible with CWM recovery)(Hold HOME+POWER buttons. When the screen turns on let go of POWER but keep holding HOME. After you enter recovery mode, let go of HOME.)
4. Go to "apply update from sdcard"
5. Select "recovery-clockwork-5.0.2.6-galaxyace-fix.zip"
6. When it finishes, power off and boot back into recovery mode to check it has installed (it should say "ClockworkMod Recovery v5.0.2.6" somewhere)
Option 3 (un-confirmed): use Heimdall.
An open source, cross-platform, alternative to Odin.
Heimdall is officially supported on the Galaxy S (and S variants including Galaxy Tab)
It allows you to do pretty much anything Odin can do (interact with download mode), and so you can flash a root kernel to gain root and CWM recovery.
Although supposedly untested on the Galaxy Ace, heimdall should be able to flash the usual root precedure (rooting kernel with CWM).
It would be great if someone could verify heimdall works for the Galaxy Ace
Option 4: (un-tested) root your ROM using the zergRush exploit (from the Revolutionary team).
zergRush rooting scripts: Linux, Mac, Windows
For the zergRush exploit scripts, you only root your firmware, so CWM will need to be installed manually afterwards if you want it.
Now that you have root, you should be able to (optionally) flash CWM from an app or over adb using flash_image) (DO YOU NEED ROOT IF THIS IS DONE IN RECOVERY(STOCK)?)
Apps that can flash CWM include:
* CWM Manager
* Flash image GUI
_DO NOT USE_ ROM Manager (reported unstable)
To flash using ADB and flash_image, download flash_image and an CWM recovery img then run:
Code:
cd directory-containing-files/
adb remount
adb push flash_image /system/bin/flash_image
adb shell chmod 0755 /system/bin/flash_image
adb push recovery.img /sdcard/
adb shell
flash_image recovery /sdcard/Recovery.img
rm /sdcard/recovery.img
reboot recovery
Or from the phone's terminal (if BusyBox is installed):
first put recovery.img & flash_image onto /sdcard/
Code:
cd directory-containing-files/
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
mv /sdcard/flash_image /system/bin/flash_image
chmod 0755 /system/bin/flash_image
flash_image recovery /sdcard/Recovery.img
rm /sdcard/recovery.img
reboot recovery
DISCLAIMER: I do not personally own a Samsung phone, and have not yet tested these methods (although I am interested to hear how well they work,and will do my best to update the post). I am however planning to root a friends Galaxy Ace and possibly also an Galaxy S2, so will be testing some of these soon (I'm not sure I should try the untested heimdall on a friends Ace though)
This seems almost utterly pointless, prove me wrong?
Bofu said:
This seems almost utterly pointless, prove me wrong?
Click to expand...
Click to collapse
+1... I don't understand the point.. Why take a longer way when the shorter way is faster, efficient and trustworthy...
ace_viknesh said:
Why take a longer way when the shorter way is faster, efficient and trustworthy...
Click to expand...
Click to collapse
Sorry, which way is this shorter more trustworthy way?
The point of this is listing the methods I believe to be compatible with linux (and by extension mac)
I am new to Samsung phones and do not possess one myself, but understand that using Odin is restricted to Windows.
I will be flashing CWM Recovery to a Galxacy Ace soon and will try methods that have been tested (friend's phone)
If you know of other methods or if one of the listed methods does not work, I will update the post
Also if anyone can confirm heimdall to work with the Ace this would be the first time on xda (searching I've found only people saying it may work) the Ace is not on its supported list, however as it uses the same protocol (right?) it should work?
If however the mods believe this post to be useless or irrelevant, they are welcome to move it to the appropriate location
Point 1- Hopefully useful for Linux and Mac users.
Point 2- If on Windows its much easier and takes very less time..
Also u told about ROM Manager (reported unstable),... Dude leave unstable it bricks our phone... mAking it unusable...
Best way to root is to put the upd.zip in rooting section and flashing in recovery... Can thr be any other way better than that?
Bofu said:
This seems almost utterly pointless, prove me wrong?
Click to expand...
Click to collapse
I use OS X exclusively and this was a very useful post, and at least well written and clear. Most guides blindly assume we all use Windows, not everyone does!!!
For context, owning OS X I originally used the upd1.zip method, flashed via original recovery and it worked, which I suppose is the fastest method you don't cover.
I certainly didn't know about heimdall, great to see an open-source cross platform alternative to odin! Don't need to use it just yet, though testing will be invaluable for future use...
So thanks to the OP for writing clearly about alternative options.
But instaling CWM isn't rooting, you can have CWM without root.
Wysłane z mojego GT-S5830 za pomocą Tapatalk
actually speaking in case of SGA you don't need a PC to root or to anything except heavy logcat
What restrictions using odin on windows are you referring to?
Restriction: it doesn't work if you're not using Windows is the restriction... ;-)
dragonnn said:
But instaling CWM isn't rooting, you can have CWM without root.
Click to expand...
Click to collapse
Thanks, I wasn't sure of this as on my Desire I had to unlock the bootloader (s-off it) due to security features (and this was closely related to the rooting process). I use the term rooting as it seems the most generic, if anyone suggests a better word I will gladly consider changing the title
Prashanthme said:
Also u told about ROM Manager (reported unstable),... Dude leave unstable it bricks our phone... mAking it unusable...
Click to expand...
Click to collapse
I've updated the post advising against using ROM Manager, thanks
Prashanthme said:
Best way to root is to put the upd.zip in rooting section and flashing in recovery... Can thr be any other way better than that?
Click to expand...
Click to collapse
Thank you for this, I will get some details and update the post shortly to include this
Edit: I added the root.zip method
btw, I may rework the post to reflect whether current ROM will be rooted, recovery installed, or both and then list methods for each outcome.
matts95 said:
Thanks, I wasn't sure of this as on my Desire I had to unlock the bootloader (s-off it) due to security features (and this was closely related to the rooting process). I use the term rooting as it seems the most generic, if anyone suggests a better word I will gladly consider changing the title
I've updated the post advising against using ROM Manager, thanks
Thank you for this, I will get some details and update the post shortly to include this
Edit: I added the root.zip method
btw, I may rework the post to reflect whether current ROM will be rooted, recovery installed, or both and then list methods for each outcome.
Click to expand...
Click to collapse
Anyone tested Heimdall yet?

[Q] Issue rooting Galaxy S3 with CF-Root 6.4

Hi,
I tried this procedure to get root access on a Samsung Galaxy S3 I9300 :
http://forum.xda-developers.com/gal...3-07-2012-cf-root-6-4-supersu-cwm5-5-t1695238
The installation worked fine, but I'm not sure whether I need to run SuperSU afterwards to get the "su" root access.
SuperSU comes in version 0.93 and tell it requires being updated.
I'm trying to get root access from the adb shell.
The device is detected and "adb shell" works, but not the "su" command afterwards.
Also, "adb root" tells "adbd cannot run as root in production builds".
I chose the above procedure to root as I don't want to overwrite the kernel, nor data.
Can anyone help ?
Configuration details :
Android 4.3
I9300XUGMK6
Kernel 3.0.31-2429075
[email protected]
JSS15J.I9300XXUGNA5
kaglows controlling
Well, it seems that the new security of Android 4.3 is the cause of the difficulty in rooting with CF-Root 6.4.
Furthermore, CF-Root is no more maintained and was replaced by CF-Autoroot.
But I fear destroying the "/data" folder and "mmssms.db" by installing CF-Autoroot, as this means a new kernel.
I wonder if it would be possible to upgrade SuperSU instead.
So the two options :
a) installing CF-Autoroot
b) upgrading SuperSU
Who tested one of them on the Galaxy S3 I9300, and which were the consequences on the MMS and SMS database ?
Thanks

[Q] Creating a method to manually root a device

Are there any tutorials to learn creating one's own rooting method via PC?
I mean, the devs who create methods to root a device manually, where do they learn it to do it?
Hey, from what I know these are some methods that moonbutt74 told me. Be aware that I and he never got to the point of trying them.
1st you need to know if you have a locked bootloader. If yes, then I can't help you here
Method 1.
Set up your ADB shell. Once thats done run :
Code:
cat /proc/cpuinfo
Collect your processor specs and look if you can peg the device on kernel "family" source and GPU family.
Now this is where you will fake it and most likely soft brick. Do a comparison of a similar device and find out if chainfire has a cd-autoroot for the comparison device. You will need to be able to compile a working kernel for the mystery device, then you will need to break down the cf-autoroot package and modify it. It gets stranger from here. As best as I understand the layout, chainfire build a "generic" recovery / kernel for the device in question [Samsung] when the image flashes, it writes to cache and when the device reboots, it begins executing predefined instructions from cache, backs up the stock recovery, writes cf-autoroot recovery, roots the device and then reflashes the stock recovery.
Method 2.
Pull the stock recovery.img or boot.img via adb from your phone.
If you can get the boot.img or the recovery.img successfully, find out how to unpack it and ONLY CHANGE THE DEFAULT PROP ENTRY FOR
Code:
ro.secure=1
to
Code:
ro.secure=0
and the same for
Code:
ro.adb.secure=1
to
Code:
ro.adb.secure=0
Then repack the with the signature key intact. DO NOT LOOSE THE ORIGINAL STOCK IMG (srsly don't. You will end up begging in the forum for a new one). If you succeed with that and successfully write back the img without boot.img or recovery.img being broken, you can then access the device trough a unsecured recovery.img via adb and hopefully push a good su binary to system/xbin. The permission of the su binary should be set to 6754 or 6744.
Now this all depends on if you have the tools for writing to the device and find out if fastboot is accessible etc.
You are most likely going to brick of you slam head first into it. Take one step and see where it takes you and take Notes.
Method 3.
While this had been mentioned in method 2. you can build or port a custom recovery for your device. Tough I yet didn't take the time to learn how that works. Once you got the custom recovery, download supersu.zip and flash it via custom recovery.
Good luck

Categories

Resources