[IDEA][Vivid] Possible Tethered Perma-Temp-Root Solution (Devs only!)

Search This thread

thecubed

Inactive Recognized Developer
Aug 19, 2008
1,046
10,458
Austin, TX
So, I just got this phone.
Not having permanent root is killing me, but I think this should solve the issue of disappearing su and busybox.

The general idea is to move all our root binaries to /data/local/bin, and remount /data to accept suid binaries (the 'su' binary requires sticky bit, aka chmod 4755). After you set that, you bind mount /system/xbin to /data/local/bin. Bind mounts stay in memory, and aren't cleared like mods to /system are.

This won't solve the issue of stuff in /system going away, but it will solve the issue of having your root utilities go away after a short amount of time.

This section would be run from the desktop PC on the first time of 'rooting' the phone:
Code:
adb install superuser.apk
adb push zergRush /data/local/tmp/zergRush
adb shell "chmod 755 /data/local/tmp/zergRush;/data/local/tmp/zergRush"
adb shell "mkdir /data/local/bin"
adb push su /data/local/bin/su
adb push busybox /data/local/bin/busybox
adb push temproot.sh /data/local/tmp/temproot.sh
adb shell "chmod 755 /data/local/tmp/temproot.sh;/data/local/tmp/temproot.sh"

and the 'temproot.sh' file would contain:
Code:
#!/system/bin/sh
mount -o remount,suid /dev/block/mmcblk0p34 /data
chmod 4755 /data/local/bin/su
chmod 755 /data/local/bin/busybox
cat /system/xbin/dexdump > /data/local/bin/dexdump
cat /system/xbin/wireless_modem > /data/local/bin/wireless_modem
/data/local/bin/busybox mount --bind /data/local/bin /system/xbin

on a reboot, all you'd have to run from the desktop PC would be:
Code:
adb push zergRush /data/local/tmp/zergRush
adb shell "chmod 755 /data/local/tmp/zergRush;/data/local/tmp/zergRush"
adb shell "mount -o remount,suid /dev/block/mmcblk0p34 /data"
adb shell "/data/local/bin/busybox mount --bind /data/local/bin /system/xbin"

and you'd be back to working.

let me know what y'all think, hopefully this solves something or isn't something already been done before :)

Thanks for looking!

EDIT:
upon discussing some other possibilities with a friend, he suggested "why not have this all happen on-device?"
it appears there may be a way to temproot/do the above all on the device without the need for a PC!
(dev details: adbd listens on localhost:5037, run zergrush then take adb client on phone connect to adbd on phone and run the temproot scripts)
exciting stuff here, folks!
 
Last edited:
  • Like
Reactions: markjo and Reclaim

mohsinkhan47

Senior Member
Jun 20, 2009
332
16
This should work. If the device is killing any mods in the system folder just move it to the data folder. Just install superuser in the data/app.

Sent from my Sensation using XDA App
 

bjg222

Senior Member
Nov 9, 2009
183
29
Atlanta, GA
Sounds like an interesting idea. I've played around with moving su to different places with no luck, but I hadn't tried moving everything to /data. I'll try it and see if it helps!

Sent from my HTC PH39100 using XDA App
 

thecubed

Inactive Recognized Developer
Aug 19, 2008
1,046
10,458
Austin, TX
This works for my phone-- I've rooted it with this method, and rebooted then ran my 'on reboot' script, and the phone is good to go again.

Right now I'm working on a method to do all this on-device and at boot.
The process should work, since the zergRush exploit restarts the adb server as root, so in theory connecting to the adb server from the phone itself should give it root privileges.

Once you've got root privileges, the app can decide whether it's been 'rooted' before or not, and apply the proper script (either install busybox and su, or just re-mount the necessary partitions).

Hopefully this all makes sense, I'll try to make a proof of concept sometime soon... but I'll probably make a windows GUI first.
 
  • Like
Reactions: markjo

Pirateghost

Inactive Recognized Developer
Jul 24, 2010
11,696
8,703
androidninjas.com
you might talk to the guys that wrote the visionary root app that we used on the G2/desire z. i think it was paul obrien. it was an app that would do this on reboot for you.
 

RootedUser

Senior Member
Aug 17, 2011
191
15
Toledo
So nice of thecubed to up and leave the revo community and not say anything. Great job thecubed!

I've been Supercharged and Gingervolted!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    So, I just got this phone.
    Not having permanent root is killing me, but I think this should solve the issue of disappearing su and busybox.

    The general idea is to move all our root binaries to /data/local/bin, and remount /data to accept suid binaries (the 'su' binary requires sticky bit, aka chmod 4755). After you set that, you bind mount /system/xbin to /data/local/bin. Bind mounts stay in memory, and aren't cleared like mods to /system are.

    This won't solve the issue of stuff in /system going away, but it will solve the issue of having your root utilities go away after a short amount of time.

    This section would be run from the desktop PC on the first time of 'rooting' the phone:
    Code:
    adb install superuser.apk
    adb push zergRush /data/local/tmp/zergRush
    adb shell "chmod 755 /data/local/tmp/zergRush;/data/local/tmp/zergRush"
    adb shell "mkdir /data/local/bin"
    adb push su /data/local/bin/su
    adb push busybox /data/local/bin/busybox
    adb push temproot.sh /data/local/tmp/temproot.sh
    adb shell "chmod 755 /data/local/tmp/temproot.sh;/data/local/tmp/temproot.sh"

    and the 'temproot.sh' file would contain:
    Code:
    #!/system/bin/sh
    mount -o remount,suid /dev/block/mmcblk0p34 /data
    chmod 4755 /data/local/bin/su
    chmod 755 /data/local/bin/busybox
    cat /system/xbin/dexdump > /data/local/bin/dexdump
    cat /system/xbin/wireless_modem > /data/local/bin/wireless_modem
    /data/local/bin/busybox mount --bind /data/local/bin /system/xbin

    on a reboot, all you'd have to run from the desktop PC would be:
    Code:
    adb push zergRush /data/local/tmp/zergRush
    adb shell "chmod 755 /data/local/tmp/zergRush;/data/local/tmp/zergRush"
    adb shell "mount -o remount,suid /dev/block/mmcblk0p34 /data"
    adb shell "/data/local/bin/busybox mount --bind /data/local/bin /system/xbin"

    and you'd be back to working.

    let me know what y'all think, hopefully this solves something or isn't something already been done before :)

    Thanks for looking!

    EDIT:
    upon discussing some other possibilities with a friend, he suggested "why not have this all happen on-device?"
    it appears there may be a way to temproot/do the above all on the device without the need for a PC!
    (dev details: adbd listens on localhost:5037, run zergrush then take adb client on phone connect to adbd on phone and run the temproot scripts)
    exciting stuff here, folks!
    1
    This works for my phone-- I've rooted it with this method, and rebooted then ran my 'on reboot' script, and the phone is good to go again.

    Right now I'm working on a method to do all this on-device and at boot.
    The process should work, since the zergRush exploit restarts the adb server as root, so in theory connecting to the adb server from the phone itself should give it root privileges.

    Once you've got root privileges, the app can decide whether it's been 'rooted' before or not, and apply the proper script (either install busybox and su, or just re-mount the necessary partitions).

    Hopefully this all makes sense, I'll try to make a proof of concept sometime soon... but I'll probably make a windows GUI first.
    1
    Speaking of visionary, has anyone tried that route yet?

    Tried Visonary no go.