Get Your XDA 2015 Custom Avatar and Signature Images Here

As stated in our motto, XDA Developer is for developers, by developers. The … more

Pin Your Photos on Android Lollipop with Photo Pinner

In the last few weeks,we have been talking quite a bit about Android 5.0 Lollipop. This … more

Samsung Galaxy Note Edge Hands On – XDA TV

Perhaps one of the more peculiar announcements this year was the curved edge-screened … more

Nova Launcher Update Brings Lollipop Functionality and Feel

One of the most popular third party launcher on Android, Nova Launcher, has just … more
Post Reply

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

OP thecubed

13th November 2011, 11:50 AM   |  #1  
thecubed's Avatar
OP Senior Member
Flag Austin, TX
Thanks Meter: 7,307
 
954 posts
Join Date:Joined: Aug 2008
Donate to Me
More
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 by thecubed; 13th November 2011 at 01:03 PM.
The Following 2 Users Say Thank You to thecubed For This Useful Post: [ View ]
13th November 2011, 04:01 PM   |  #2  
Senior Member
Thanks Meter: 17
 
329 posts
Join Date:Joined: Jun 2009
Donate to Me
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
13th November 2011, 06:23 PM   |  #3  
bjg222's Avatar
Senior Member
Flag Atlanta, GA
Thanks Meter: 28
 
168 posts
Join Date:Joined: Nov 2009
More
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
13th November 2011, 07:40 PM   |  #4  
thecubed's Avatar
OP Senior Member
Flag Austin, TX
Thanks Meter: 7,307
 
954 posts
Join Date:Joined: Aug 2008
Donate to Me
More
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.
The Following User Says Thank You to thecubed For This Useful Post: [ View ]
13th November 2011, 07:45 PM   |  #5  
Senior Member
Thanks Meter: 17
 
329 posts
Join Date:Joined: Jun 2009
Donate to Me
What about running a script that gives root on each boot

Sent from my Sensation using XDA App
13th November 2011, 09:52 PM   |  #6  
Pirateghost's Avatar
Recognized Developer
Thanks Meter: 7,841
 
10,821 posts
Join Date:Joined: Jul 2010
Donate to Me
More
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.
13th November 2011, 10:02 PM   |  #7  
Senior Member
Thanks Meter: 17
 
329 posts
Join Date:Joined: Jun 2009
Donate to Me
Script Manager by devwom

Quote:
Originally Posted by Pirateghost

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.



Sent from my Sensation using XDA App
17th November 2011, 08:14 PM   |  #8  
Senior Member
Austin, TX
Thanks Meter: 50
 
659 posts
Join Date:Joined: Oct 2009
More
Quote:
Originally Posted by Pirateghost

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.

Speaking of visionary, has anyone tried that route yet?
21st November 2011, 05:37 PM   |  #9  
Senior Member
Thanks Meter: 6
 
103 posts
Join Date:Joined: Feb 2010
Quote:
Originally Posted by malickie

Speaking of visionary, has anyone tried that route yet?

Tried Visonary no go.
The Following User Says Thank You to rinnycoop121 For This Useful Post: [ View ]
27th November 2011, 07:31 AM   |  #10  
RootedUser's Avatar
Senior Member
Flag Toledo
Thanks Meter: 15
 
191 posts
Join Date:Joined: Aug 2011
More
So nice of thecubed to up and leave the revo community and not say anything. Great job thecubed!

I've been Supercharged and Gingervolted!

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes