Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
j4mm3r
Old
#1  
Senior Member - OP
Thanks Meter 72
Posts: 238
Join Date: May 2010
Default [FIX] Superuser for Honeycomb [2011-02-13]

Okay so ChainsDD's Superuser doesnt work on Honeycomb. The reason is a (unnecessary?) hack used by the developer to link properly and use the mktemp function.

To fix this, I downloaded the sources and compiled them again, but this time avoiding the _mktemp hack. Build instructions:

Code:
(get latest CM sources)
# cd <path-to-project-directory>
# repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
# repo sync

(do a generic build)
# source ./build/envsetup.sh
# lunch full-eng
# make
(take a break, this takes a long time)

(fix the su binary)
# cd system/extras/su
# vi su.c 
(make the fix, just replace _mktemp with mktemp and remove its declaration)
# mm
(the new su binary should be available in out/target/product/generic/system/xbin)
The fixed binary is attached with this post. Just install Superuser from the market or install it after downloading from ChainsDD's thread (link above). Push the fixed su binary and away you go!!

Code:
# adb push su /system/xbin
# adb shell chmod 4755 /system/xbin/su
Let me know how it goes...

Source Code: https://github.com/j4mm3r/android_system_extras
Attached Files
File Type: zip su_fixed.zip - [Click for QR Code] (6.4 KB, 2999 views)
/j4mm3r
Sony Ericsson X10a
The Following 14 Users Say Thank You to j4mm3r For This Useful Post: [ Click to Expand ]
 
crashdau
Old
#2  
Senior Member
Thanks Meter 6
Posts: 150
Join Date: Oct 2005
Location: New York
Quote:
Originally Posted by j4mm3r View Post
Okay so ChainsDD's Superuser doesnt work on Honeycomb. The reason is a (unnecessary?) hack used by the developer to link properly and use the mktemp function.

To fix this, I downloaded the sources and compiled them again, but this time avoiding the _mktemp hack. Build instructions:

Code:
(get latest CM sources)
# cd <path-to-project-directory>
# repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
# repo sync

(do a generic build)
# source ./build/envsetup.sh
# lunch full-eng
# make
(take a break, this takes a long time)

(fix the su binary)
# cd system/extras/su
# vi su.c 
(make the fix, just replace _mktemp with mktemp and remove its declaration)
# mm
(the new su binary should be available in out/target/product/generic/system/xbin)
The fixed binary is attached with this post. Just install Superuser from the market or install it after downloading from ChainsDD's thread (link above). Push the fixed su binary and away you go!!

Code:
# adb push su /system/xbin
# adb shell chmod 4755 /system/xbin/su
Let me know how it goes...

Source Code: https://github.com/j4mm3r/android_system_extras
Works great! My Root is up and working! Thank you!
The Following User Says Thank You to crashdau For This Useful Post: [ Click to Expand ]
 
chhaggerty
Old
(Last edited by chhaggerty; 14th February 2011 at 11:27 PM.)
#3  
chhaggerty's Avatar
Member
Thanks Meter 13
Posts: 54
Join Date: Sep 2010
Location: Minnesota
Updated OP in the other thread to direct people here. Method tested and working perfect. Many thanks to j4mm3r.
Galaxy Nexus CDMA:
HP TouchPad 32 GB
 
18.4009
Old
#4  
18.4009's Avatar
Senior Member
Thanks Meter 17
Posts: 374
Join Date: Sep 2008
Location: Meridian
How do I make it read/write so I can push the new SU over?
Thanks!
18-4009. JUSTIFIABLE HOMICIDE BY ANY PERSON.
Sporting a Galaxy Note 2, Nexus 7 & a chomebook
 
j4mm3r
Old
#5  
Senior Member - OP
Thanks Meter 72
Posts: 238
Join Date: May 2010
Thank you, gentle sir!
Quote:
Originally Posted by chhaggerty View Post
Updated OP in the other thread to direct people here. Many thanks to j4mm3r.
Usually this works on the HC image
# adb remount

Or the long form:
# adb shell mount -o remount,rw /dev/block/mmcblk1p2 /system
Quote:
Originally Posted by 18.4009 View Post
How do I make it read/write so I can push the new SU over?
Thanks!
/j4mm3r
Sony Ericsson X10a
The Following User Says Thank You to j4mm3r For This Useful Post: [ Click to Expand ]
 
18.4009
Old
(Last edited by 18.4009; 13th February 2011 at 09:23 PM.)
#6  
18.4009's Avatar
Senior Member
Thanks Meter 17
Posts: 374
Join Date: Sep 2008
Location: Meridian
Quote:
Originally Posted by j4mm3r View Post
Thank you, gentle sir!


Usually this works on the HC image
# adb remount

Or the long form:
# adb shell mount -o remount,rw /dev/block/mmcblk1p2 /system
Thank you, worked like a charm.
Well, I got the SU pushed over and ran the command to set permissions and rebooted but still no root after reboot.
I just got the nook so I am probably do something wrong.
18-4009. JUSTIFIABLE HOMICIDE BY ANY PERSON.
Sporting a Galaxy Note 2, Nexus 7 & a chomebook
 
landlocked
Old
(Last edited by landlocked; 13th February 2011 at 09:28 PM.)
#7  
landlocked's Avatar
Junior Member
Thanks Meter 0
Posts: 18
Join Date: Dec 2008
Default Stuck on root access issue

Many thanks to those who worked on HoneyComb (HC) v4 on eMMC and the rooting solution.

I have root after first flashing to eMMC and checking with terminal. I downloaded and pushed the new SU and still appear to have root -- according to terminal.

The Superuser app opens just fine, but Root Explorer crashes and Rom Manager/CWR complain about not having elevated rights. I *think* I have the latest version of both.

Note: I have only run the two commands above -- and not the list of commands in the OP.


What am I missing here?

Many thanks,

Landlocked
Currently using: Droid 2 w/ Froyo and NC with HC preview V4.
 
18.4009
Old
#8  
18.4009's Avatar
Senior Member
Thanks Meter 17
Posts: 374
Join Date: Sep 2008
Location: Meridian
When I type SU in terminal emulator I get an error stating:
"reloc_library[1315]: 1749 cannot locate _mktemp..."
18-4009. JUSTIFIABLE HOMICIDE BY ANY PERSON.
Sporting a Galaxy Note 2, Nexus 7 & a chomebook
 
j4mm3r
Old
#9  
Senior Member - OP
Thanks Meter 72
Posts: 238
Join Date: May 2010
one way to quickly check if you have it working is to do the following:

- Get to a shell:
# adb shell
(this should give you the "root@android:/ #" prompt)

- Become un priviledged:
root@android:/ # su 1000
root@android:/ $
(the "$" indicates that you are no longer root)

- Try to become root again:
root@android:/ $ su

This should open up the Superuser dialog asking you to allow or deny superuser request, which means that its working as expected. If you need more help then join on #nookolor on irc.freenode.net (see http://nookdevs.com/IRC for instructions for IRC). I can help you there.


Quote:
Originally Posted by landlocked View Post
Many thanks to those who worked on HoneyComb (HC) v4 on eMMC and the rooting solution.

I have root after first flashing to eMMC and checking with terminal. I downloaded and pushed the new SU and still appear to have root -- according to terminal.

The Superuser app opens just fine, but Root Explorer crashes and Rom Manager/CWR complain about not having elevated rights. I *think* I have the latest version of both.

Note: I have only run the two commands above -- and not the list of commands in the OP.


What am I missing here?

Many thanks,

Landlocked
/j4mm3r
Sony Ericsson X10a
 
j4mm3r
Old
#10  
Senior Member - OP
Thanks Meter 72
Posts: 238
Join Date: May 2010
Did you replace the "su" binary with the one in the first post?

Quote:
When I type SU in terminal emulator I get an error stating:
"reloc_library[1315]: 1749 cannot locate _mktemp..."
/j4mm3r
Sony Ericsson X10a

 
Post Reply+
Tags
binary, fixed, honeycomb, superuser
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...