FORUMS
Remove All Ads from XDA

[FIX] Superuser for Honeycomb [2011-02-13]

248 posts
Thanks Meter: 74
 
By j4mm3r, Senior Member on 13th February 2011, 08:05 PM
Post Reply Email Thread
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, 3350 views)
The Following 14 Users Say Thank You to j4mm3r For This Useful Post: [ View ] Gift j4mm3r Ad-Free
 
 
13th February 2011, 08:27 PM |#2  
Senior Member
Flag New York
Thanks Meter: 8
 
More
Quote:
Originally Posted by j4mm3r

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: [ View ] Gift crashdau Ad-Free
13th February 2011, 08:51 PM |#3  
chhaggerty's Avatar
Senior Member
Flag Minnesota
Thanks Meter: 285
 
More
Updated OP in the other thread to direct people here. Method tested and working perfect. Many thanks to j4mm3r.
13th February 2011, 08:54 PM |#4  
18.4009's Avatar
Senior Member
Flag Boise
Thanks Meter: 34
 
More
How do I make it read/write so I can push the new SU over?
Thanks!
13th February 2011, 08:58 PM |#5  
OP Senior Member
Thanks Meter: 74
 
More
Thank you, gentle sir!
Quote:
Originally Posted by chhaggerty

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

How do I make it read/write so I can push the new SU over?
Thanks!

The Following User Says Thank You to j4mm3r For This Useful Post: [ View ] Gift j4mm3r Ad-Free
13th February 2011, 09:08 PM |#6  
18.4009's Avatar
Senior Member
Flag Boise
Thanks Meter: 34
 
More
Quote:
Originally Posted by j4mm3r

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.
13th February 2011, 09:22 PM |#7  
landlocked's Avatar
Junior Member
Thanks Meter: 0
 
More
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
13th February 2011, 09:31 PM |#8  
18.4009's Avatar
Senior Member
Flag Boise
Thanks Meter: 34
 
More
When I type SU in terminal emulator I get an error stating:
"reloc_library[1315]: 1749 cannot locate _mktemp..."
13th February 2011, 09:38 PM |#9  
OP Senior Member
Thanks Meter: 74
 
More
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 "[email protected]:/ #" prompt)

- Become un priviledged:
[email protected]:/ # su 1000
[email protected]:/ $
(the "$" indicates that you are no longer root)

- Try to become root again:
[email protected]:/ $ 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

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

13th February 2011, 09:40 PM |#10  
OP Senior Member
Thanks Meter: 74
 
More
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..."

13th February 2011, 09:43 PM |#11  
18.4009's Avatar
Senior Member
Flag Boise
Thanks Meter: 34
 
More
Quote:
Originally Posted by j4mm3r

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 "[email protected]:/ #" prompt)

- Become un priviledged:
[email protected]:/ # su 1000
[email protected]:/ $
(the "$" indicates that you are no longer root)

- Try to become root again:
[email protected]:/ $ 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.

I get this error:
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	469
Size:	22.9 KB
ID:	517024  
Post Reply Subscribe to Thread

Tags
binary, fixed, honeycomb, superuser

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes