Went to update SU binary via SU app ands lost root

Sdude1200

Well-known member
Mar 19, 2011
141
14
0
Visit site
I went to update the SU binary via the superuser app, and it failed once. So I clicked the option to try again, and now it says I do not have root privileges. Any idea what would cause this and how to fix it?

Sent from my OptiRom v1ed LG Optimus S
 

Sdude1200

Well-known member
Mar 19, 2011
141
14
0
Visit site
Ill go ahead and try a dirty. Thanks for your quick reply. Ill post once done how it worked out

Sent from my OptiRom v1ed LG Optimus S
 

thekraven

Well-known member
Nov 10, 2010
1,407
1,148
0
Visit site
Don't update the Superuser or Superuser binary till it gets fixed. Superuser 3.0.6 version and the 3.0.1 Binary are the ones causing problems. Stay with 3.0.4 or 3.0.5.
 
  • Like
Reactions: epidenimus

Sdude1200

Well-known member
Mar 19, 2011
141
14
0
Visit site
I found the 3.0.2 binary and flashed that, but still nothing. Do you have a zip of .4 or .5 that I can apply kraven?

Sent from my OptiRom v1ed LG Optimus S
 

sfhub

Well-known member
Jan 15, 2011
2,384
741
0
Visit site
Is it better to just "untie" su from the market? I don't think it is an area that needs major functionality changes all the time and if tied to the market, encourages market updates that could disable it intentionally (in this case it was unintentional)
 

epidenimus

Racer of Elevators
Apr 13, 2011
1,119
255
0
Visit site
Superuser appeared in Market and started begging for the update after I cleared the Market cache and data. I will flash manually if it removes it from the nag list. Glad I did not take the update. Thanks for the tip!
 

punjig

New member
Mar 27, 2011
2
0
0
Visit site
OK, History= got stock EC05, Rooted it using One Click Root Method W/ CWM 3.0.2.5, All was good. Made backups. SU updated itself. Then told me SU Binary was out of date. Reloaded my backup. Su updated agian by itself, This time I saw it updating right at the end of the update, and now same thing. SU Binary out of date, No SU accsess.

OK, Question= I will reload my back up, no problem. HOW can I stop it from auto updates?? As it seems to me it was manually installed to begin with, w/ the OC Method, or am I confussed?

Thanks in advanced!
 

epidenimus

Racer of Elevators
Apr 13, 2011
1,119
255
0
Visit site
If it ain't broke.... why bother with it? (And I wonder why relationships are so difficult...)

So I mimicked the user's problem by flashing your superuser 3.0.4 apk, which gave a newer version of superuser.apk. Cool!

It then nagged me that the su binary was out of date and courteously offered to update mine from v2.3.1-ef to v3.0.2--which is not one of the troublesome versions cited. So I accepted and it succeeded on the first attempt. It even offered me the option to do it again, just because I might have thought it was cool. It was cool, but I declined and rebooted. That's when the trouble began.

I ran rootcheck and it said I no longer had root. (At this point, I expect that I was where the OP was.) So I rebooted to Recovery and again flashed the superuser apk linked previously. No luck.

Output from rootcheck:

Code:
Root Access is not properly configured or was not granted.

Superuser.apk - com.noshufou.android.su - version 3.0.4 is installed!

System Environment PATH /sbin /system/sbin /system/bin /system/xbin

The adb binary is set to default shell user access as root

Standard su binary location is: ls -l /system/bin/su:
-rwsr-sr-x root    root     22172 2011-1023 12:44 su

Standard su binary location is: ls -l /system/xbin/su:
-rwsr-xr-x root    root     26328 2008-0801 08:00 su

Alternate su binary location is: ls -l /sbin/su:
/sbin/su: No such file or directoryj

Alternate su type binary location: ls -l /system/xbin/sudo:
/system/xbin/sudo: No such file or directory

SU binary not found or not operating properly.

I am sure that I could wipe everything and restore a nandroid, but there must be a less blanketous way of reestablishing root. Is it a file permissions or ownership issue? Two conflicting files?
 

epidenimus

Racer of Elevators
Apr 13, 2011
1,119
255
0
Visit site
Alright, now that I recreated the problem, I will proceed with the fix:

How-To: Root a Custom ROM: A bin named 'su' :)

The issue is that the installed su binary is not doing something right and the /system directory is now again read-only.

We know that the installed Superuser.apk 3.0.4 provided by Kraven, combined with the busybox and previous version of the su binary from the ZVD rooting guide work just fine together. However, we cannot overwrite the faulty su binary with things the way they are.

So we refer back to Drew's guide to ZVD rooting for instructions and for a copy of the version of su that we know works.

We need to use adb to push su and gingerbreak only to the device. I am going to presume that you know how to fire up adb, since you already had a rooted a ZVD-based device.

Note
Even though you may get a # prompt in adb here, you are not running with root permissions and will get an error if you attempt a command that requires them.

Skip Step 3 in the guide, as you may want to keep some things your custom ROM has there. if If you are curious or cautious, you can use the following command to see what's there:
Code:
ls -a /data/local/tmp

Go right to Step 4 and push only the provided su and gingerbreak to your device's /data/local/tmp directory.
Code:
adb push gingerbreak /data/local/tmp/gingerbreak
adb push su /data/local/tmp/su

Follow Steps 5 through 10 exactly.

At Step 11 and Step 12, only cat and set permissions on the su file.
Code:
cat su > /system/bin/su
chmod 4755 /system/bin/su

Exit as described, reboot and enjoy!
Superuser may prompt you for permission if you have root apps set to start at boot.

Finally, this version of Superuser also has a Settings option that stops the nagging about your su binary:
Superuser --> Settings --> Preferences... scroll to the bottom and untick 'Outdated binary notification'

Now go use your favorite music app to listen to the Johnny Cash song that is stuck in your head. :cool:
 
Last edited:
  • Like
Reactions: Sdude1200

Sdude1200

Well-known member
Mar 19, 2011
141
14
0
Visit site
If it ain't broke.... why bother with it? (And I wonder why relationships are so difficult...)

So I mimicked the user's problem by flashing your superuser 3.0.4 apk, which gave a newer version of superuser.apk. Cool!

It then nagged me that the su binary was out of date and courteously offered to update mine from v2.3.1-ef to v3.0.2--which is not one of the troublesome versions cited. So I accepted and it succeeded on the first attempt. It even offered me the option to do it again, just because I might have thought it was cool. It was cool, but I declined and rebooted. That's when the trouble began.

I ran rootcheck and it said I no longer had root. (At this point, I expect that I was where the OP was.) So I rebooted to Recovery and again flashed the superuser apk linked previously. No luck.

Output from rootcheck:

Code:
Root Access is not properly configured or was not granted.

Superuser.apk - com.noshufou.android.su - version 3.0.4 is installed!

System Environment PATH /sbin /system/sbin /system/bin /system/xbin

The adb binary is set to default shell user access as root

Standard su binary location is: ls -l /system/bin/su:
-rwsr-sr-x root    root     22172 2011-1023 12:44 su

Standard su binary location is: ls -l /system/xbin/su:
-rwsr-xr-x root    root     26328 2008-0801 08:00 su

Alternate su binary location is: ls -l /sbin/su:
/sbin/su: No such file or directoryj

Alternate su type binary location: ls -l /system/xbin/sudo:
/system/xbin/sudo: No such file or directory

SU binary not found or not operating properly.

I am sure that I could wipe everything and restore a nandroid, but there must be a less blanketous way of reestablishing root. Is it a file permissions or ownership issue? Two conflicting files?

Thanks for testing this out. That's exactly what happened to me. I may just do a dirty flash and use the version that is preloaded with optirom because it should work. Or I could try doing a complete wipe and a fresh flash of opti. What do you guys suggest?

Sent from my OptiRom v1ed LG Optimus S
 

Sdude1200

Well-known member
Mar 19, 2011
141
14
0
Visit site
Alright, now that I recreated the problem, I will proceed with the fix:

How-To: Root a Custom ROM: A bin named 'su' :)

The issue is that the installed su binary is not doing something right and the /system directory is now again read-only.

We know that the installed Superuser.apk 3.0.4 provided by Kraven, combined with the busybox and previous version of the su binary from the ZVD rooting guide work just fine together. However, we cannot overwrite the faulty su binary with things the way they are.

So we refer back to Drew's guide to ZVD rooting for instructions and for a copy of the version of su that we know works.

We need to use adb to push su and gingerbreak only to the device. I am going to presume that you know how to fire up adb, since you already had a rooted a ZVD-based device.

Note
Even though you may get a # prompt in adb here, you are not running with root permissions and will get an error if you attempt a command that requires them.

Skip Step 3 in the guide, as you may want to keep some things your custom ROM has there. if If you are curious or cautious, you can use the following command to see what's there:
Code:
ls -a /data/local/tmp

Go right to Step 4 and push only the provided su and gingerbreak. to your device's /data/local/tmp directory.
Code:
adb push gingerbreak /data/local/tmp/gingerbreak
adb push su /data/local/tmp/su

Follow Steps 5 through 10 exactly.

At Step 11 and Step 12, only cat the su file.
Code:
cat su > /system/bin/su
chmod 4755 /system/bin/su

Exit as described, reboot and enjoy!
Superuser may prompt you for permission if you have apps that start at boot.

Go use your favorite music app to listen to the Johnny Cash song that is now stuck in your head. :cool:

Posted just as I did lol. I will try that now! Thanks bro :)

Sent from my OptiRom v1ed LG Optimus S
 

epidenimus

Racer of Elevators
Apr 13, 2011
1,119
255
0
Visit site
Thanks for testing this out. That's exactly what happened to me. I may just do a dirty flash and use the version that is preloaded with optirom because it should work. Or I could try doing a complete wipe and a fresh flash of opti. What do you guys suggest?

Sent from my OptiRom v1ed LG Optimus S

I went by your block that says you were running Drew's CM7, which is ZVD-based. It might be a little different with the ZVH series, but same kinda concept.
 

Sdude1200

Well-known member
Mar 19, 2011
141
14
0
Visit site
Yeah I Havn't updated that in a while.... Sorry. Im actually now on OptiRom v1.1 on ZVH, thus the sig. How do you think that i could do this defferently on zvh to get it to work?

Sent from my OptiRom v1ed LG Optimus S