-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Superuser fails and doesn't prompt (with solution) #46
Comments
Can you get me the rest of the stacktrace for this error? I'm not sure where Superuser is attempting to use a sticky broadcast... |
I'll dig around a bit later in logcat and try to find more relevant extracts from logcat. :-) (Tbh I was kinda assuming it was the intent from the su-binary since as best as I understand it it's running with the uid of the Superuser.apk at that point...[but I could very well be wrong about that :P]) |
Well, current su-binary from master may send sticky broadcast by chance. It puts garbage at the very end of the parcel sent to Superuser. The problem is that should happen on all Android versions, not only ICS. Could you try su-binary from gc or gc-ics branch? With original manifest content, of course. |
Compiled gc-ics branch using mm under external/ - result:- """ |
(Worth noting: There is a similar traceback in 3.0.3.2) |
Same traceback when running with my hacked/fixed Superuser.apk but without the warning. Although in its place there is a rather conspicuous looking:- """ |
The last traceback is irrelevant, I guess. It's an informational message (has I as log level). |
I'm guessing because I wipe the data for Superuser each time so permissions.sqlite has not been created yet. It seems to exist once I allow something (with the patched apk). $ adb shell getprop ro.build.version.sdk And yea, I noticed it was informational - just highlighting HTC have been messing with the framework ;) |
Okay - I've got this one solved (but I don't know how you'll fix it properly ;)) Looking at Intent->readFromParcel() on this ROM:-
After the mExtras Bundle there is an extra Integer field for mHtcFlags, so adjusting the su-binary (as a test) to be:-
...worked just fine. So now I guess we need to establish how to determine if a ROM has that extra field in the Intent Parcel. |
I may help you to do so. Could you share your ROM properties (output from getprop). Please, send it to me privately and remove all sensible information from the output. |
Yep, 100% official/stock HTC ICS ROM. - E-mail sent with filtered getprop output. |
I've also issues with superuser. It worked fine for me for a long time, but today I tried to use a new app which requires root and I couldn't get it to work. After trying also other apps it looks like superuser itself has an issue. My results from testing so far.
Not sure which causes it since if I remember right there was a superuser update in the last weeks(?) and both of my devices got updated in the last weeks as well. |
On the assumption my e-mail didn't land with you:- ro.product.model: HTC One S I was toying with the idea of caching the fingerprint against a check of framework.odex for the "HtcIntentFlag" string so on first invocation it'd check framework.odex and each subsequent invocation it just needs to check the flag stored against the fingerprint. Updating the ROM would change the fingerprint and thus require a re-check of framework.odex. (But that still feels a bit messy.) Although I'm personally holding off cause a) my hacked up su-binary works and b) I haven't found a single other person with this issue :-/ (which I would have expected by now!) |
In fact, it didn't.
I'm afraid, it's too much work for little su. Anyway, I'm going to choose very simple solution: check ro.product.device. It shall contain "ville" according to your fingerprint. Perhaps later, we have to check for HTC 4.0.3 or higher. My assumption is HTC will continue to put its crap in the intent body for every ROM it ships.
Experienced enough to dig in and find out there is a crap inside intent??? I doubt... There should be some reports on unusual behavior of su or root apps, definitely. |
Yep - I can't disagree that it's too much work / too messy. However, I would very much prefer that any solution does not by default break AOSP implementations. So could we check (and I'm ignorant of how AOSP sets these variables) ro.product.device and for example ro.product.version ? (I'm obviously giving a very liberal meaning to "we" in the above...) I've been looking on the XDA One S forums - I'd just expect more threads about su/SuperUser not working... or maybe a relatively low number of enthusiasts/rooters have purchased one. I'll try to find time to check the T-Mobile One S HTC ROM to see if this extra field is present there too (partly clutching at straws). |
For existence? For concrete numbers? Sorry, I can't divine what numbers HTC has put into product.version for One S. Anyway, could you post output of
(I meant just "an abstract group of su developers") |
Yes, quite right. Sorry, I was just asking about the concept of checking ro.product.version which I guess is easier to evaluate if you have the version number of the device in front of you curses self for assumptions - anyway, just for reference it was 1.53.401.2. :-) Anyway, there should be a good choice from:- $ adb shell getprop | grep -i htc |
Thank you for the output.
I've pushed the fix in the gc-ics branch. Could you try, please? |
Works for me. (I'm still uneasy about the lack of general complaining about "root does not work!!!!!!!" on the XDA forums though!) |
Could you, please, also check whether the commit 5688e8996072e29d554ac5834d3586aa8633c5a6 is required for your ROM? The simplest way is to revert this commit, become root from a non-privileged account, and invoke pm or am command. They shall print their help texts if the fix isn't required and get SIGSEGV (segmentation fault) otherwise.
If you will be able to pull off logcat from the posters, I may help. You may use my gmail account I've sent a private message to kmdm2... from. Unfortunately, it's practically impossible to understand why su fails without logs. |
XDA forum > root does not work!!!!!!! :-) I am having the same issue on AOSP-4.0.4 on pandaboard. I need su for droid-VNC-server by onaips. I read you guys' thread, and I think I may be of some help to see what prop is making su do things wrong. I guess first thing for me is to try the gc-ics branch for superuser... [EDIT] my bad, I thought su-binary was embedded in Superuser.apk... |
Just tried commit 5688e89 on my pandaboard running AOSP-4.0.4 (API 15). I pushed su in /system/xbin. Superuser.apk recognized it as version 3.1. Then starting VNCserver leads me to:
[EDIT] Same issue pushing su in /system/bin... |
I think I have a mismatch with socket handling between my su binary and Superuser.apk. I tried Superuser-3.0.7-efghi-signed.zip provided on http://androidsu.com/superuser/ but that does not work. Checking the git tree, I see two or three commits in dev branch above 3.0.7 dealing with sockets. Then I probably need to rebuild Superuser.apk in eclipse. Any suggestion to do that, I am not a (experienced) java developer... I just tried to hack su.c to make it not deny access if
All this makes me believe that my pandaboard may not be rooted properly. In my android build system, I made /system to be mounted in RW, start init shell as |
|
What else should it be? Ok for the socket, thanks. [EDIT] I installed the busybox manually. It oversedes most of android toolbox command, eg chown... my busybox lies in /system/bin and is as follows:
[EDIT] ok I fixed this issue with :
-rwsrwsrwx 1 0 0 18496 May 10 20:54 /system/bin/su I didn't what ths 's' meant before today :). Thanks. Running the vncserver again leads me to:
|
|
ok. I use Superuser v3.7, it recognized your su v3.1. But I am not sure I install it the right way, I simply do:
I never copy META-INF/ files. Is it correct?
I'm gonna check what file it tries to access. Thanks. |
"It" doesn't try to access a file. According to the log, su is invoked as |
My bad, I changed LOGD into LOGE in my yesterday debugging session... su and Superuser are just fine now. And I workarounded vncserver to make it work with small tweaks. Thanks a lot git-core, you made my day :-) |
I must add a note here. Superuser is an app such as "sudo" which allows su to run as root. We all run/install it to get root. why not just add the missing permission and be done? having an extra permission on the superuserapp i dont see being a big deal as we all install it to get root anyway. #justsayin |
|
droid-VNC-server last images targets gingerbread, not ICS. The androivncserver binary that is called by the java app has been compiled for GB, and it didn't work on my ICS AOSP. I made few things to generate a androidvncserver_ics. But this is not related to Superuser at all, I don't think it is any value in here. |
Extra backslash removed.
HTC added additional field to the intent body, we have to count for it. See issue #46 against Superuser (ChainsDD/Superuser#46). Thanks to kmdm at github for the report and comprehensive analysis.
Installed Superuser 3.0.7 with su 3.0.3.2 on an ICS device and got the following error in logcat:-
"""
W/ActivityManager( 422): Permission Denial: broadcastIntent()
requesting a sticky broadcast from pid=9080, uid=10171 requires
android.permission.BROADCAST_STICKY
"""
Used apktool to rebuild Superuser.apk with that permission added to AndroidManifest.xml, test-signed and pushed to the device.
Now works fine. :-)
(Clarity: This occurred whether Superuser.apk was pushed to /system/app or /data/app)
The text was updated successfully, but these errors were encountered: