GithubHelp home page GithubHelp logo

unable to update su binary about superuser HOT 20 CLOSED

koush avatar koush commented on July 16, 2024
unable to update su binary

from superuser.

Comments (20)

koush avatar koush commented on July 16, 2024

did you try both update methods? recovery and install? which phone are you using?

from superuser.

kundancool avatar kundancool commented on July 16, 2024

I tried both the methods but first one fails instantly and second one gives no result
I am using Samsung Galaxy Y (GT-S5360)
I have stock recovery

from superuser.

koush avatar koush commented on July 16, 2024

If you're not rooted, and you have stock recovery installed, installation will fail.
You must already be rooted, or have a custom recovery.

from superuser.

yuvalabou avatar yuvalabou commented on July 16, 2024

i have custom recovery - TWRP, not rooted (accidantly deleted old su) and have problems with installing it in both method.

Logcat - http://pastebin.com/aCXJeipK

from superuser.

koush avatar koush commented on July 16, 2024

To clarify, you must have root, no matter what, to install Superuser.

Superuser will not root your phone for you.

If you lost root, but still have twrp, go into twrp, and manually install teh superuser zip linked in the market.

from superuser.

fduraibi avatar fduraibi commented on July 16, 2024

Hey koush,

this is weird, i have a Nexus 4 (4.3) with TWRP, I rooted it originally with SuperSU (by Chainfire) which also comes bundled with TWRP
Anyway, i wanted to use yours instead since it is open source (+other awesome features) so I removed SuperSU and installed users, both methods didn't work. I booted into recovery, deleted the /system/xbin/su and the link under bin, installed superuser.zip however whenever i open the app it gives me the update message "The superuser binary (su) must be updated"
Other apps like the need root cannot find su binary!
But i can see the file installed under /system/xbin
-rwxr-xr-x root root 371104 2013-09-16 17:23 su

and correctly linked under /system/bin
lrwxrwxrwx root root 2013-09-16 17:23 su -> /system/xbin/su

I deleted your files, installed SuperSU and it worked fine. Is superuser.zip up to date?

from superuser.

koush avatar koush commented on July 16, 2024

I've been receiving quite a few reports about this. If you can provide the following info, it would be useful:

ROM (stock or CyanogenMod, if you're on another ROM, please get on one of these)

In ADB Shell:

ls -l /system/xbin/su
ls -l /system/bin/su
ls -l /system/etc/install-recovery.sh

from superuser.

fduraibi avatar fduraibi commented on July 16, 2024

Ok, so i deleted SuperSU, booted to TWRP and installed superuser.zip (which i got from the link in the play store)
Deleted Dalvic and cache (just in case) and rebooted the phone

hmmm, wait... it works now!!!

anyway, here is the files info:

ls -l /system/xbin/su
-rwsr-sr-x root root 371104 2013-09-16 18:42 su

ls -l /system/bin/su
lrwxrwxrwx root root 2013-09-16 18:42 su -> /system/xbin/su

ls -l /system/etc/install-recovery.sh
-rwxr-xr-x root root 44 2013-09-16 18:42 install-recovery.sh

I don't know what I did different this time, the su file size is the same as before. However, now superuser works as it should.

from superuser.

fduraibi avatar fduraibi commented on July 16, 2024

Wait, the only thing that is different from the other time is the way in which I deleted SuperSU. The first time I choose from SuperSU setting "Remove SuperSU to install other superuser apps" then I deleted the files manually from recovery shell after mounting /system.
But in the second time i selected "Remove SuperSU and un-root the phone" (i don't remember the wording exactly but it was something like that). Not sure if that did anything different from what i did manually!

by the way i am using stock Android 4.3 on Nexus 4

from superuser.

koush avatar koush commented on July 16, 2024

I wonder if supersu is reinstalling itself or something. I'll need to take a look.

from superuser.

fduraibi avatar fduraibi commented on July 16, 2024

i don't think it does.
TWRP on the other hand will suggest installing supersu when trying to reboot if it doesn't find the su binary but that is not related.
However, the su binary that was there is definitely yours since supersu su is dynamically compiled and much smaller in size is statically compiled (as i understood) and is about 300KB.

from superuser.

koush avatar koush commented on July 16, 2024

@fduraibi If you can get it to fail again, can you get me the contents of install-recovery.sh?

from superuser.

fduraibi avatar fduraibi commented on July 16, 2024

Ok, got it to fail again and here is the files details

shell@mako:/ $ ls -l /system/xbin/su
-rwxr-xr-x root     root       371104 2013-09-16 21:34 su
shell@mako:/ $ ls -l /system/bin/su
lrwxrwxrwx root     root              2013-09-16 21:34 su -> /system/xbin/su
shell@mako:/ $ ls -l /system/etc/install-recovery.sh
-rwxr-xr-x root     root          629 2013-09-16 21:00 install-recovery.sh

And for install-recovery.sh:

shell@mako:/ $ cat /system/etc/install-recovery.sh                             
/#!/system/bin/sh

# If you're implementing this in a custom kernel/firmware,
# I suggest you use a different script name, and add a service
# to launch it from init.rc

# Launches SuperSU in daemon mode only on Android 4.3+.
# Nothing will happen on 4.2.x or older, unless SELinux+Enforcing.
# If you want to force loading the daemon, use "--daemon" instead

/system/xbin/daemonsu --auto-daemon &

# Some apps like to run stuff from this script as well, that will 
# obviously break root - in your code, just search this file
# for "install-recovery-2.sh", and if present, write there instead.

/system/etc/install-recovery-2.sh

that is not your file, this is remaining from supersu

i also have these files in /system/etc

-rw-r--r-- root     root            2 2013-09-16 21:00 .has_su_daemon
-rw-r--r-- root     root            2 2013-09-16 21:00 .installed_su_daemon

from superuser.

koush avatar koush commented on July 16, 2024

Oh, ok. And you installed with my superuser.zip? Does TWRP have the chattr command?

from superuser.

koush avatar koush commented on July 16, 2024

Uhhh, something is writing .has_su_daemon, that should not be there if you are on stock.

from superuser.

koush avatar koush commented on July 16, 2024

It seems SuperSU is writing .has_su_daemon when it should not be. That's breaking Superuser install.

https://plus.google.com/u/0/110558071969009568835/posts/YsXBtjuD6rD

from superuser.

fduraibi avatar fduraibi commented on July 16, 2024

yup, SuperSU is doing that:

echo 1 > /system/etc/.has_su_daemon
echo 1 > /system/etc/.installed_su_daemon

from superuser.

osm0sis avatar osm0sis commented on July 16, 2024

Yup. It should only write .installed_su_daemon at most.

from superuser.

koush avatar koush commented on July 16, 2024

I asked @Chainfire to fix this, so I think he's on it.

from superuser.

barbilla avatar barbilla commented on July 16, 2024

Hey @koush I'm a 36 year old lawyer (meaning noobie all over) who just rooted his HTC One International version. I've been trying to understand how to Update the Binary with no results as the only option is with TWRP and when it reboots in recovery I'm absolutely lost on what to do, or what files to choose to make it manually (as it does nothing on its own) I have stock 4.3 android on my phone. Can you please help in plain language? REALLY appreciated my friend

from superuser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.