For those with 'partial' root after JB update - regain root!

Search This thread

nandolv

Member
Sep 27, 2012
31
0
Thanks a lot!! this saved my root!!!
One note, a had a dynamic link in my /data/local folder named tmp and couldn't do the 4,5 and 6 points. I renamed it to tmp.old and a could continue.

;)
 

thenrz

Senior Member
Dec 9, 2010
162
61
shell@android:/system # ls -l /system/Supruser.apk
ls -l /system/Supruser.apk
/system/Supruser.apk: No such file or directory
1|shell@android:/system # ls -l /system/superuser.apk
ls -l /system/superuser.apk
/system/superuser.apk: No such file or directory
1|shell@android:/system #

Superuser.apk will be in /system/app/Superuser.apk

Make sure that is there and with what permissions, and also go ahead and download the files in the op.

Not many steps to get you back, either.



Thanks a lot!! this saved my root!!!
One note, a had a dynamic link in my /data/local folder named tmp and couldn't do the 4,5 and 6 points. I renamed it to tmp.old and a could continue.

Interesting... What rooting method did you use?
 
Last edited:
  • Like
Reactions: Scumbag Inc.

Scumbag Inc.

Senior Member
May 21, 2010
145
20
Austin, TX
I do not have a Superuser.apk in /system/app/ and the permissions for that folder are r/o.
edit:
1|shell@android:/system # ls -l /system/app/Superuser.apk
ls -l /system/app/Superuser.apk
/system/app/Superuser.apk: No such file or directory
1|shell@android:/system #
 
Last edited:

thenrz

Senior Member
Dec 9, 2010
162
61
I do not have a Superuser.apk in /system/app/ and the permissions for that folder are r/o.

Ok, here's what you need to do.

Code:
adb push C:\(file location)\busybox /data/local/tmp
adb push C:\(file location)\Superuser.apk /data/local/tmp
adb shell
$ cd system
$ ./su-backup; su
# mount -o remount,rw /system
# dd if=/data/local/tmp/busybox of=/system/xbin/busybox
# dd if=/data/local/tmp/Superuser.apk of=/system/app/Superuser.apk
# chmod 755 /system/xbin/busybox
# chmod 644 /system/app/Superuser.apk
# chmod 6755 /system/xbin/su
# busybox cp /system/xbin/su /system/bin/su   *(for good measure...)
# ln -s /system/xbin/su /system/bin/su    *(ok if this fails out, may already exist)
# mount -o remount,ro /system
# exit
$ exit
adb reboot

Once you reboot, check with root checker basic or something. if you have any root apps installed already, odds are you will be greeted with a superuser prompt once you get past the lock screen.
 
Last edited:
  • Like
Reactions: Scumbag Inc.

Scumbag Inc.

Senior Member
May 21, 2010
145
20
Austin, TX
No. :( Didn't work. It seems there is a problem with busybox. Let me give it one more shot. This looks promising though. Superuser.apk is in /system/app/ and su is in /system/bin/.
 

thenrz

Senior Member
Dec 9, 2010
162
61
No. :( Didn't work. It seems there is a problem with busybox. Let me give it one more shot. This looks promising though. Superuser.apk is in /system/app/ and su is in /system/bin/.

You can try putting busybox in /system/bin .

So add this with the other dds

# dd if=/data/local/tmp/busybox of=/system/bin/busybox
# ln -s /system/bin/busybox /system/xbin/busybox

Are you able to just type su in the shell and have a root prompt?
 
  • Like
Reactions: Scumbag Inc.

thenrz

Senior Member
Dec 9, 2010
162
61
Still not working. su Permission denied.

at a root prompt - type:

# /system/bin/su -v

curious as to your su binary version

Code:
adb push C:\(downloaded file)\su /data/local/tmp/
adb shell
$ su
# mount -o remount,rw /system
# rm /system/bin/su
# rm /system/xbin/su
# dd if=/data/local/tmp/su of=/system/bin/su
# chmod 6755 /system/bin/su
# chown 0.0 /system/bin/su
# mount -o remount,ro /system
# exit
$ exit
adb reboot
 
Last edited:
  • Like
Reactions: Scumbag Inc.

thenrz

Senior Member
Dec 9, 2010
162
61
Right on!!! Glad you are fixed up :) The su version screwed me op once, and my late night brain took a second to connect those dots.

Enjoy!

Make sure to install supersu. It will tidy up the entire situation for you (newest su versions, everything in the perfect place to help with future OTAs etc)


P.S. It makes me nervous every time putting 'rm' and 'su' in the same line in a shell... so that's why it was my last bit of advice hahaha
 
Last edited:

thenrz

Senior Member
Dec 9, 2010
162
61
Do you have a donate button? I want to buy you a beer.... or 12

<---- Right there. Took a google search haha :)


To update the thread:

I have updated the OP to reflect this new 'root restore' method for our primes. If there's a lot of people in this boat, I can put a batch script together for some automated love...
 
Last edited:
  • Like
Reactions: lineager

tsmt971@yahoo

Senior Member
Oct 2, 2007
350
127
Right on!!! Glad you are fixed up :) The su version screwed me op once, and my late night brain took a second to connect those dots.

Enjoy!

Make sure to install supersu. It will tidy up the entire situation for you (newest su versions, everything in the perfect place to help with future OTAs etc)


P.S. It makes me nervous every time putting 'rm' and 'su' in the same line in a shell... so that's why it was my last bit of advice hahaha

That is exactly right. I did regain Su then install the Supersu for the safety in the future.

Sent from my HTC Desire HD using xda premium
 

thenrz

Senior Member
Dec 9, 2010
162
61
That is exactly right. I did regain Su then install the Supersu for the safety in the future.

Sent from my HTC Desire HD using xda premium

I have not had any issues with root since installing supersu. I noticed the su -v command shows a supersu branded version, which kinda makes me feel safe knowing the binaries are being completely handled by a program and not dumb fingers a la me lol.
 

piokon

Member
Jan 21, 2012
47
2
Can you also update the OP with information on what to do to avoid being in the situation one has partial root? As in, what is the proper procedure of updating from ICS to JB so that one retains full root? Even just linking to the thread/post that covers it somewhere else would be very helpful :)
 

ssoldz

Member
Feb 11, 2012
9
2
I'd love an automated script. I don't know enough to fix things if I do it by hand and mess up.

Sent from my Transformer Prime TF201 using Tapatalk 2
 

thenrz

Senior Member
Dec 9, 2010
162
61
Can you also update the OP with information on what to do to avoid being in the situation one has partial root? As in, what is the proper procedure of updating from ICS to JB so that one retains full root? Even just linking to the thread/post that covers it somewhere else would be very helpful :)

Realistically, it is just a matter of installing SuperSU. I haven't seen anyone with that installed have any issue with retaining root. I will update the OP with this info!



I'd love an automated script. I don't know enough to fix things if I do it by hand and mess up.

I should have it done by Friday or so... got pretty busy today. Would you be interested in testing it?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 29
    This will only work if you can access a root prompt (#) in adb shell! THIS WAS DONE AFTER DOING A WIPE FROM THE VOLUME DOWN MENU WHEN BOOTING THE PRIME! I do not know if this will work without the wipe, but it very well may. Maybe someone more knowledgeable can chime in here.

    It may be possible to restore from a su-backup if you have a su binary still in /system/bin or xbin. Even if you can't access a root prompt (#) by just typing su, read starting at page 6. Places to look for a su-backup include /system/ /system/usr/we-need-root/ and /system/bin/

    I have a batch script in the works that will determine if you can re-root and take the appropriate steps to do so if possible.

    I had to do a voldown wipe after my update to JB. My prime would reboot after 5-10 seconds into the homescreen after boot. After wiping, I thought for sure my root was screwed until a new exploit was found.

    I accessed my device through adb, and realized that I could invoke a root prompt using the su command at the $ prompt. Using ES file explorer, I could see su in /system/bin/ but no su-backup or superuser.apk in /system/app/.

    I tried simply installing superuser from the market, but it did not work. The busybox installer would not work, either.


    ATTACHED ARE THE EXACT THREE FILES I USED. I do not know if using different version will affect the process!

    Here is what worked for me:

    1. adb shell
    2. su
    (# - you should see this now! This will not work without this specific prompt!)
    3. type 'exit' press enter, and then 'exit' again. You will now be back at the regular command prompt.
    4. adb push C:\(location of attached files)\superuser.apk /data/local/tmp
    5. adb push C:\(location of attached files)\su /data/local/tmp
    6. adb push C:\(location of attached files)\busybox /data/local/tmp
    7. Access the adb shell again, and type su
    8. chmod 644 /data/local/tmp/superuser.apk
    9. chmod 755 /data/local/tmp/busybox
    10. chmod 6755 /data/local/tmp/su
    11. mount -o remount,rw /system
    12. dd if=/data/local/tmp/Superuser.apk of=/system/app/Superuser.apk
    13. dd if=/data/local/tmp/busybox of=/system/bin/busybox
    14. dd if=/data/local/tmp/busybox of=/system/xbin/busybox
    14a. Chmod 755 /system/bin/busybox
    14b. Chmod 755 /system/xbin/busybox
    15. Reserved
    16. busybox rm /system/bin/su
    17. busybox cp /data/local/tmp/su /system/bin
    18. type su once again to assure you still have access to the # prompt
    18a. Chmod 644 /system/app/superuser.apk
    18b. mount -o remount,ro /system
    19. type exit, and exit again, returning to the regular windows command prompt.
    20. type 'adb reboot' (without quotes)
    NOTE - you will not need to install the superuser.apk app in the normal sense. It will be installed upon the reboot as a system app automatically!
    21. Once your prime has rebooted, go download root checker basic or the like from the play store. Open it, and wait for your superuser prompt! :)
    22. Get the busybox installer from the play store as well, and use that to get the newest version of busybox.
    23. Get SuperSU from the market. It seems to be the safest method to keep root with JB...

    ALSO! Make sure to keep a backup root with voodoo or super su after completing this guide! I have lost root (VERY WELL may have been my own fault... too much poking around) Anyway, better safe than sorry!!!

    Thanks to daymz from the debugfs thread in development for the basic instructions of what needed to be done!! And also thanks to all before me who got us root in the first place!


    I will answer questions to the best of my ability. I am not a developer and do not try to present myself as so... I can tinker with the best, and after losing root, I set out to see if I could figure it out!

    Changes made as per tsmt971
    5
    I have fellow this method and it was failed at step 16 in my case because of the permission issue but I managed to make it move and regained the root. The details of the issue as below.

    Step 16 failed because step 13, 14 which will copy busybox to /system/bin and /system/xbin with a wrong executive permission.
    To correct in my case: after step 13, 14 follow those steps below:
    - chmod 755 /system/bin/busybox
    - chmod 755 /system/xbin/busybox
    - skip step 15
    - continue steps 16, 17, 18
    - chmod 644 /system/app/Superuser.apk
    - continue step 19, 20, 21, 22

    Then you will get your root back, it worked in my case. Good luck guys.
    To the OP, please verify and update those steps if necessary.
    4
    I just figured something out. I found a su-backup in /system/usr/we-need-root . I have lost root again since making this guide. My permissions were screwed up on su. I was able to restore root by doing the following:

    Code:
    adb shell:
    $ cd /system/usr/we-need-root
    $./su-backup; su  (that is a semicolon immediately after the ./su-backup)
    # mount -o remount,rw /system
    (do what needs to be done)
    #exit
    ...

    su-backup must have permissions as such: (get permissions by typing this into adb shell: ls -l /system/usr/we-need-root ) If you get an error, than this specifically won't work for you.

    Code:
    Required su-backup permissions for manual root restore
    $ ls -l /system/usr/we-need-root/su-backup
    -rwsr-sr-x  root  ...

    basically, if you can find a su-backup with proper permissions (and cannot restore root with voodoo or supersu), you can manually use that to repair your root access configuration. Maybe this is well known... but to those who don't this could be useful.
    1
    Wait, let me get this straight. You're saying right now there's no way for many of us to get a root access to our devices if the abovementioned method is not working, right?

    As far as I know, unless someone is keeping a HUGE secret.

    I should mention the unlocker from ASUS but i don't know if anyone has tried it on JellyBean
    1
    Same Boat:
    shell@android:/system/xbin $ ls -l
    ls -l
    -rwxr-xr-x root shell 497964 2012-09-26 21:25 busybox
    -rwxr-xr-x root shell 59760 2012-09-27 11:18 dexdump
    -rwx------ root root 5380 2012-09-27 11:18 ps3bttest
    -rwxr-xr-x root shell 23592 2012-09-27 11:18 rfcomm
    -rwxr-xr-x root shell 380532 2012-09-26 21:04 su

    This is my output when I type SU

    shell@android:/system/xbin $ su
    su
    1|shell@android:/system/xbin $