How to unroot a rom? How is root detected? - Sprint Samsung Galaxy S III

I have an app that checks for root permissions and refuses to run. I am running a Blazer pre-rooted ROM. I have tried the following:
adb shell
mount -o remount,rw /system
busybox cp /system/xbin/su /sdcard
busybox mv /system/xbin/su /system/xbin/su2
When I do this several apps that require root such as titanium backup fail for obvious reasons. The phone is still rooted however. I know this because adb shell is still defaulting me to a root prompt, even after reboot. My questions are:1) If I mv the su binary to something random how does the phone achieve root upon reboot?2) Would it be possible to su to a different uid (the normal non-root user) and then launch my app or change the entire android environment to it?3) What is the Superuser app called in this ROM? There is no /system/app/Superuser.apk. I would like to try to uninstall it.
Thanks,
Ownage

try this
azuki88 said:
I really have trouble with it, need help.
Click to expand...
Click to collapse
http://k0nane.info/rom/ecm/TeamEpic-Root-from-Recovery-v5.zip flash in recovery.

billard412 said:
http://k0nane.info/rom/ecm/TeamEpic-Root-from-Recovery-v5.zip flash in recovery.
Click to expand...
Click to collapse
+1...good suggestion...
Sent from my SPH-L710 using xda premium

Related

Superuser su binary

I've noticed that the su binary installed by superuser doesn't survive a reboot. Anyone else have this problem? Any fixes?
Sent from my SPH-D700 using XDA App
Same here. Have to re update after each reboot
Sent from my SPH-D700 using Tapatalk
same here, had to update the binary too
How do you update the su?
Launch superuser, go to settings and scroll to the bottom.
Sent from my SPH-D700 using XDA App
I've found 3 su:
/system/bin/jk-su (original from the oneclick/permanent)
/system/xbin/su (symlink to /sdx/su)
/sdx/su (superuser updates this one)
Superuser does not update /system/bin/jk-su so I decided to.
So far its working.
Sent from my SPH-D700 using XDA App
dangdang said:
I've found 3 su:
/system/bin/jk-su (original from the oneclick/permanent)
/system/xbin/su (symlink to /sdx/su)
/sdx/su (superuser updates this one)
Superuser does not update /system/bin/jk-su so I decided to.
So far its working.
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
How did you update it yourself?
Here's what worked for me. Keep in mind I am rooted using oneclick 2.2.4 which comes with busybox and remount scripts.
1. Update the su binary using superuser.
2. Launch a terminal (I use better terminal emulator pro)
3. Run 'su' from the terminal
4. Mount system rw with 'remount rw'
5. Remove jk-su with 'rm /system/bin/jk-su'
6. Copy the su binary superuser installed with 'cp /sdx/su /system/bin/jk-su'
7. Reboot and it should survive.
Notes:
Do not include single quotes when running the commands.
I'm paranoid about permissions so as root in terminal I ran:
chown root.shell /system/bin/jk-su
chmod 755 /system/bin/jk-su
To match the permissions of the removed jk-su. I'm not sure if this was necessary.
I haven't tested using adb yet so I don't know the steps.
Sent from my SPH-D700 using XDA App
Code:
#cp /sdx/su /system/bin/jk-su
cp: not found
the last part does not work (i have the same root method)
i have to re-root the phone when i get home today. but i will try to move the updated binary with root explorer instead of the command line.
Replace 'cp' with 'busybox cp'.
Sent from my Android using CDMA
dangdang said:
Replace 'cp' with 'busybox cp'.
Sent from my Android using CDMA
Click to expand...
Click to collapse
will try I had the same issues
dangdang said:
Here's what worked for me. Keep in mind I am rooted using oneclick 2.2.4 which comes with busybox and remount scripts.
1. Update the su binary using superuser.
2. Launch a terminal (I use better terminal emulator pro)
3. Run 'su' from the terminal
4. Mount system rw with 'remount rw'
5. Remove jk-su with 'rm /system/bin/jk-su'
6. Copy the su binary superuser installed with 'cp /sdx/su /system/bin/jk-su'
7. Reboot and it should survive.
Notes:
Do not include single quotes when running the commands.
I'm paranoid about permissions so as root in terminal I ran:
chown root.shell /system/bin/jk-su
chmod 755 /system/bin/jk-su
To match the permissions of the removed jk-su. I'm not sure if this was necessary.
I haven't tested using adb yet so I don't know the steps.
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
I have this exact same problem on my Samsung Moment (have to update SU every reboot).
The directory structure seem a bit different. For example, there's no /system/bin/jk-su (in fact, if I find / -name 'jk-su' I get no results at all).
I am poking around the directory structure trying to figure out where to find the source and destination su files that I'm going to have to overwrite and I can't seem to figure which is which. Does anyone have any idea how to do the functional equivalent of dangdang's post on a Moment?
Thanks!
Um... Why did you feel the need to necro this INCREDIBLY ANCIENT thread?
k0nane said:
Um... Why did you feel the need to necro this INCREDIBLY ANCIENT thread?
Click to expand...
Click to collapse
Because people like to bring out the bat again and continue to beat the remaining not decomposed guts out of the horse...
lmao
I was about to say. WTF is everyone talking about SU not surviving a reboot /noodlescratcher
davidrules7778 said:
Because people like to bring out the bat again and continue to beat the remaining not decomposed guts out of the horse...
lmao
Click to expand...
Click to collapse
k0nane said:
Um... Why did you feel the need to necro this INCREDIBLY ANCIENT thread?
Click to expand...
Click to collapse
It was the most relevant post after doing a search. Forum etiquette blows my mind. I can only imagine how much "use the search feature!" I'd have gotten if I'd have made a new post about this. Oh well, I tried.
lol. i hear ya!
DamienWind said:
It was the most relevant post after doing a search. Forum etiquette blows my mind. I can only imagine how much "use the search feature!" I'd have gotten if I'd have made a new post about this. Oh well, I tried.
Click to expand...
Click to collapse
DamienWind said:
It was the most relevant post after doing a search. Forum etiquette blows my mind. I can only imagine how much "use the search feature!" I'd have gotten if I'd have made a new post about this. Oh well, I tried.
Click to expand...
Click to collapse
most likely SU is built into your kernel and short of rebuilding or repacking your kernel you cant update it..
I have a samsung galaxy s I9000 running Gingerbread will this work for me..?

superuser not showing in app drawer

I have rooted and installed the modaco rom. However, the superuser.apk isn't showing in my app drawer. I can see it is installed if I go settings>more>applications>all applications and I can even open it.
The problem is it will not grant anything root access. Any apps that require root act as though superuser isn't installed.
Anyone have any ideas?
Make sure it's installed in the right location
Code:
$ adb shell
# ls /system/app
[Edit:] You should also check to see if "su" is installed
Code:
# ls /system/xbin
I have the same issue. The superuser.apk is in system/app however su is not in system/xbin it is in system/bin. Could the use of OTA rootkeeper have anything to do with this?
Sent from my Kindle Fire using xda premium
Kind of weird since I have superuser access on the stock rooted rom but when I flash modaco fresh after wiping everything I lose it. Anyway, yeah, it looks like the su binary is not in the right place or something. To fix it I took these instructions from the Root 6.3 thread by jcase that puts su in the correct spot.
Once in recovery
adb shell mount system
adb push su /system/xbin/su
adb shell chown 0.0 /system/xbin/su
adb shell chmod 06755 /system/xbin/su
I still had the su file from when I rooted earlier today but it's posted it in the root thread if you don't have it.
http://forum.xda-developers.com/showthread.php?t=1568340
The superuser app still doesn't show up in the app drawer but I don't care. It works and I can open the superuser app through the android market.

[Q] Unrooting

Hi All,
This is just a quick 2 part question as I see many threads for the GNEX on rooting, but none very concrete on removing root. I've tried searching, but I must have missed it.
So, my questions are:
1. Once rooted via whatever method (I used fastboot method myself, thanks efrant for teaching the fastboot stuff), how do I unroot this thing to bring it back to stock configuration?
2. To make the unit truly stock again, can I just use fastboot and flash a factory google image? I know doing this will eliminate all my data, but will it remove all traces of any rooting done? (Insecure Kernal, SU, Busybox and whatever else)?
Please let me know.
Thanks guys... wasn't planning on rooting, but I miss the ability to do it. lol
1. See two.
2. Yes.
Flashing the stock image will bring your phone back to an out-of-the-box state.
Sent from my Galaxy Nexus using Tapatalk 2
infazzdar said:
1. See two.
2. Yes.
Flashing the stock image will bring your phone back to an out-of-the-box state.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Thanks man,
Makes me feel better about my decision to root this phone.
Appreciate the reply.
If you installed Superuser to system when you rooted then you'll need to remove that also but here are the basic adb commands for the job (make sure you have data and system mounted via CWM so you have access):
Code:
adb shell
rm /system/bin/su
mount -o remount,ro -t ext4 /dev/block/mmcblk0p1 /system
exit
BusyBox is another matter since CWM installs it to sbin every time you boot with it. Perhaps someone has a better idea (?), but from messing around a bit the other night the best method I've come up with is to use BusyBox to remove BusyBox, as follows:
Code:
adb shell
cd /sbin
cp busybox /data/local/tmp/busybox
chmod 06755 /data/local/tmp/busybox
rm busybox
/data/local/tmp/busybox rm `/data/local/tmp/busybox find -follow -maxdepth 1 -type l`
/data/local/tmp/busybox rm /data/local/tmp/*
exit
that second to last line gets rid of all the stray symlinks busybox left behind, not sure if CWM leaves any of those recovery/symlinks in sbin also or if those should be removed as well; perhaps someone else can fill us in on that point!
osm0sis said:
If you installed Superuser to system when you rooted then you'll need to remove that also but here are the basic adb commands for the job (make sure you have data and system mounted via CWM so you have access):
Code:
adb shell
rm /system/bin/su
mount -o remount,ro -t ext4 /dev/block/mmcblk0p1 /system
exit
BusyBox is another matter since CWM installs it to sbin every time you boot with it. Perhaps someone has a better idea (?), but from messing around a bit the other night the best method I've come up with is to use BusyBox to remove BusyBox, as follows:
Code:
adb shell
cd /sbin
cp busybox /data/local/tmp/busybox
chmod 06755 /data/local/tmp/busybox
rm busybox
/data/local/tmp/busybox rm `/data/local/tmp/busybox find -follow -maxdepth 1 -type l`
/data/local/tmp/busybox rm /data/local/tmp/*
exit
that second to last line gets rid of all the stray symlinks busybox left behind, not sure if CWM leaves any of those recovery/symlinks in sbin also or if those should be removed as well; perhaps someone else can fill us in on that point!
Click to expand...
Click to collapse
So flashing a Google factory image won't remove root? Or it will, but won't remove all evidence if someone went searching around trying to deny warranty.
When I rooted, I used the method of flashing recovery, then installed the su.zip via recovery. When I unrooted I simply flashed a factory image.
when you say installed superuser to system I'm guessing you mean something more advanced than the typical root process, correct?
Sent from my Galaxy Nexus using XDA
thos25 said:
So flashing a Google factory image won't remove root? Or it will, but won't remove all evidence if someone went searching around trying to deny warranty.
When I rooted, I used the method of flashing recovery, then installed the su.zip via recovery. When I unrooted I simply flashed a factory image.
when you say installed superuser to system I'm guessing you mean something more advanced than the typical root process, correct?
Sent from my Galaxy Nexus using XDA
Click to expand...
Click to collapse
Flashing the factory system image DOES remove root (and busybox and anything else you changed on the ROM).There is no need to do anything that osm0sis said to do.
And there is no "more advanced" process of rooting. Root is two files placed on you system: /system/bin/su and /system/app/Superuser.apk. Nothing more. (Whether you place them there yourself, or have CWM do it for you, is irrelevant.) Remove those those and root is gone.
Sent from my Galaxy Nexus using Tapatalk 2
if you grab wugfresh's toolkit itll do all of that with one-click convenience. thats what I do to un-root my Nexus.
Zbraptorsdr said:
if you grab wugfresh's toolkit itll do all of that with one-click convenience. thats what I do to un-root my Nexus.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?p=21936493
Sent from my Galaxy Nexus using Tapatalk 2
efrant said:
Flashing the factory system image DOES remove root (and busybox and anything else you changed on the ROM).There is no need to do anything that osm0sis said to do.
Click to expand...
Click to collapse
Right, I was referring to "unroot"ing without reflashing the system.img, since my intent with that method was to keep all settings, etc. as-is, just remove all traces of root.
osm0sis said:
Right, I was referring to "unroot"ing without reflashing the system.img, since my intent with that method was to keep all settings, etc. as-is, just remove all traces of root.
Click to expand...
Click to collapse
Yup, you would need to remove it manually if you were running a custom ROM, but with a stock ROM, flashing the system partition only WOULD leave all your data/settings as is.
osm0sis said:
BusyBox is another matter since CWM installs it to sbin every time you boot with it.
Click to expand...
Click to collapse
IS this true? Can someone confirm? And is it true for all phones?
Zbraptorsdr said:
if you grab wugfresh's toolkit itll do all of that with one-click convenience. thats what I do to un-root my Nexus.
Click to expand...
Click to collapse
The easiest way to do it, just click and its does it on its own.
The-Droidster said:
IS this true? Can someone confirm? And is it true for all phones?
Click to expand...
Click to collapse
Just wanted to clear this up now that I'm a bit more wise on the subject. The sbin stuff doesn't matter since it's all part of the ramdisk, and gets generated on each boot (to recovery or OS) and otherwise doesn't exist. No need to delete anything but su. :good:
osm0sis said:
Just wanted to clear this up now that I'm a bit more wise on the subject. The sbin stuff doesn't matter since it's all part of the ramdisk, and gets generated on each boot (to recovery or OS) and otherwise doesn't exist. No need to delete anything but su. :good:
Click to expand...
Click to collapse
he means, of course, "su" as in /system/bin/su AND /system/app/Superuser.apk. partially correct, i think, ramdisk is only used for early OS boot. Ramdisk + kernel = boot.img.
Recovery is on a different partition, for starters, and AFAIK, deploys needed files to a temporary location on the phone's ram or in the file system, which would be the recovery partition. Busybox gets placed in there as well.
Sent from my i9250
stock kernel has a ramdisk but not all kernels are packaged with one. recovery also has a ramdisk, just as it also has a kernel. Decompile/split/unzip one some time and you'll see /sys/ and /proc/ and /sbin/ all get generated from the ramdisk. And yes, if you for some reason put Superuser.apk or SuperSU.apk in /system/app/ (a completely unnecessary step), then naturally they need to go too.

I think I messed up my root...

I'm currently running on yakju 4.1.1 and I think I've accidently messed up my root privileges. I think I somehow messed up my su by clicking the root button in Nexus Root Toolkit 1.5.
Cause:
I've always used Voodoo OTA Rootkeeper to keep my root. I update the SuperUser app via the market and found out that my su binary was out of date. I've tried various ways to update the su binary but gaining root access always resulted in a failure within the SuperUser app so finally I decided to try out the root toolkit. By clicking the root button in the app I think I've only made my situation worse....
Now I'm seeing that my su backup in the Rootkeeper app is messed up and I can't seem to delete it. The RootKeeper app seems to think that I'm still rooted and I can't successfully do the "temp-unroot" as well. Other apps such as Titanium Backup can't detect my root status now....
Can anyone offer any suggestions without re-flashing my image?
ayang02 said:
I'm currently running on yakju 4.1.1 and I think I've accidently messed up my root privileges. I think I somehow messed up my su by clicking the root button in Nexus Root Toolkit 1.5.
Cause:
I've always used Voodoo OTA Rootkeeper to keep my root. I update the SuperUser app via the market and found out that my su binary was out of date. I've tried various ways to update the su binary but gaining root access always resulted in a failure within the SuperUser app so finally I decided to try out the root toolkit. By clicking the root button in the app I think I've only made my situation worse....
Now I'm seeing that my su backup in the Rootkeeper app is messed up and I can't seem to delete it. The RootKeeper app seems to think that I'm still rooted and I can't successfully do the "temp-unroot" as well. Other apps such as Titanium Backup can't detect my root status now....
Can anyone offer any suggestions without re-flashing my image?
Click to expand...
Click to collapse
As of Nexus Root Toolkit 1.5.2, I do not see yakju 4.1.1 in the list of supported devices.
yakalid said:
As of Nexus Root Toolkit 1.5.2, I do not see yakju 4.1.1 in the list of supported devices.
Click to expand...
Click to collapse
I've figured out the solution to my problem: just re-push su & Superuser.apk to /system/su and /system/apps/Superuser.apk respectively.
Basically I referenced this thread: http://forum.xda-developers.com/showthread.php?t=1531865
Since I already have su and Superuser.apk in my /system (although I think I tainted both files), all I needed to do was grab clean versions of su and Superuser.apk and adb push em through and type "adb shell su" to make the # appear. I was even able to update su binary within Superuser, awesome :good:
Note: Once you do step 6, your prompt should change from $ to #. If not, it did not work.
7) Mount the system partition as rw: mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
8) Copy su to /system: cat /data/local/tmp/su > /system/bin/su
9) Change permissions on su: chmod 06755 /system/bin/su
10) Copy Superuser.apk: cat /data/local/tmp/Superuser.apk > /system/app/Superuser.apk
11) Change permissions on Superuser.apk: chmod 0644 /system/app/Superuser.apk
12) Mount the system partition as r/o: mount -o remount,ro -t ext4 /dev/block/mmcblk0p1 /system
13) Rescind root: exit
14) Exit the ADB shell: exit
Click to expand...
Click to collapse
Hope this helps with people who are having troubles with Superuser/su not gaining root access.
If you have an unlocked bootloader and the SU binary is still on the phone, this should fix the issue:
http://forum.xda-developers.com/showthread.php?t=1765754
As for the superuser APK, it does NOT need to be moved to the system folder, it just needs to be downloaded from the marketplace and will function if the su binary is present with proper permissions.
Matridom said:
If you have an unlocked bootloader and the SU binary is still on the phone, this should fix the issue:
http://forum.xda-developers.com/showthread.php?t=1765754
As for the superuser APK, it does NOT need to be moved to the system folder, it just needs to be downloaded from the marketplace and will function if the su binary is present with proper permissions.
Click to expand...
Click to collapse
I guess it makes sense, the only real issue was my su permissions.
I did this with a locked bootloader btw.

Achieveing a temp unroot on the Blazer ROM?

I have an app that checks for root permissions and refuses to run. I am running a Blazer pre-rooted ROM. I have tried the following:
adb shell
mount -o remount,rw /system
busybox cp /system/xbin/su /sdcard
busybox mv /system/xbin/su /system/xbin/su2
When I do this several apps that require root such as titanium backup fail for obvious reasons. The phone is still rooted however. I know this because adb shell is still defaulting me to a root prompt, even after reboot. My questions are:
1) If I mv the su binary to something random how does the phone achieve root upon reboot?
2) Would it be possible to su to a different uid (the normal non-root user) and then launch my app or change the entire android environment to it?
3) What is the Superuser app called in this ROM? There is no /system/app/Superuser.apk. I would like to try to uninstall it.
Thanks,
Ownage
Ownage1100 said:
I have an app that checks for root permissions and refuses to run. I am running a Blazer pre-rooted ROM. I have tried the following:
adb shell
mount -o remount,rw /system
busybox cp /system/xbin/su /sdcard
busybox mv /system/xbin/su /system/xbin/su2
When I do this several apps that require root such as titanium backup fail for obvious reasons. The phone is still rooted however. I know this because adb shell is still defaulting me to a root prompt, even after reboot. My questions are:
1) If I mv the su binary to something random how does the phone achieve root upon reboot?
2) Would it be possible to su to a different uid (the normal non-root user) and then launch my app or change the entire android environment to it?
3) What is the Superuser app called in this ROM? There is no /system/app/Superuser.apk. I would like to try to uninstall it.
Thanks,
Ownage
Click to expand...
Click to collapse
did you try hide my root from the market? it works well with google wallet..
https://play.google.com/store/apps/...wsMSwxLDEsImNvbS5hbXBob3Jhcy5oaWRlbXlyb290Il0.
Ownage1100 said:
I have an app that checks for root permissions and refuses to run. I am running a Blazer pre-rooted ROM. I have tried the following:
adb shell
mount -o remount,rw /system
busybox cp /system/xbin/su /sdcard
busybox mv /system/xbin/su /system/xbin/su2
When I do this several apps that require root such as titanium backup fail for obvious reasons. The phone is still rooted however. I know this because adb shell is still defaulting me to a root prompt, even after reboot. My questions are:
1) If I mv the su binary to something random how does the phone achieve root upon reboot?
2) Would it be possible to su to a different uid (the normal non-root user) and then launch my app or change the entire android environment to it?
3) What is the Superuser app called in this ROM? There is no /system/app/Superuser.apk. I would like to try to uninstall it.
Thanks,
Ownage
Click to expand...
Click to collapse
Voodoo OTA RootKeeper also allows you to temporarily unroot and then re-root.

Categories

Resources