Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,782,686 Members 37,346 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
thecubed
Old
(Last edited by thecubed; 13th November 2011 at 01:03 PM.)
#1  
thecubed's Avatar
Senior Member - OP
Thanks Meter 5,411
Posts: 907
Join Date: Aug 2008
Location: Austin, TX

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

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!
The Following 2 Users Say Thank You to thecubed For This Useful Post: [ Click to Expand ]
 
mohsinkhan47
Old
#2  
Senior Member
Thanks Meter 17
Posts: 329
Join Date: 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
 
bjg222
Old
#3  
bjg222's Avatar
Senior Member
Thanks Meter 28
Posts: 168
Join Date: Nov 2009
Location: 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
Current Phone: HTC Vivid (White, Stock Rooted), Asus Transformer Prime (not yet rooted)

Past Phones: HTC Incredible S (Black, Stock Rooted), HTC Hero (White, VillainROM), HTC Dream (White, Too many different ROMS to list!)
 
thecubed
Old
#4  
thecubed's Avatar
Senior Member - OP
Thanks Meter 5,411
Posts: 907
Join Date: Aug 2008
Location: Austin, TX

 
DONATE TO ME
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: [ Click to Expand ]
 
mohsinkhan47
Old
#5  
Senior Member
Thanks Meter 17
Posts: 329
Join Date: Jun 2009

 
DONATE TO ME
What about running a script that gives root on each boot

Sent from my Sensation using XDA App
 
Pirateghost
Old
#6  
Pirateghost's Avatar
Recognized Developer
Thanks Meter 6,832
Posts: 10,407
Join Date: Jul 2010

 
DONATE TO ME
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.
 
mohsinkhan47
Old
#7  
Senior Member
Thanks Meter 17
Posts: 329
Join Date: Jun 2009

 
DONATE TO ME
Script Manager by devwom

Quote:
Originally Posted by Pirateghost View Post
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
 
malickie
Old
#8  
Senior Member
Thanks Meter 49
Posts: 657
Join Date: Oct 2009
Location: Austin, TX
Quote:
Originally Posted by Pirateghost View Post
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?
Current Phones:
SG Note 3, Samsung Galaxy S4 Zoom
Tablet:
Acer Iconia A500
Previous Phones:
T-Mobile Dash, T-Mobile Wing, iPhone 3g, Garminfone, HTC G2, MyTouch 4G, Motorola Atrix, Motorola Atrix 2, Samsung Skyrocket, HTC Titan, SGSII, LG Thrill, HTC Vivid, SGSIII
And a Long list of Stuff Prior to Smart Phone Existence.
 
rinnycoop121
Old
#9  
Senior Member
Thanks Meter 5
Posts: 101
Join Date: Feb 2010
Quote:
Originally Posted by malickie View Post
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: [ Click to Expand ]
 
RootedUser
Old
#10  
RootedUser's Avatar
Senior Member
Thanks Meter 15
Posts: 191
Join Date: Aug 2011
Location: 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!

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Moto G 4G Receives Official CyanogenMod 11 Love

When theMoto Gwas initially released to the world in November of last year,very few actually … more

Get Your Tasks Organized on Android Wear with Agenda Wear

Having a checklist of things you need to do is something we all can find useful at … more

Top 5 LG G3 MODs – XDA Developer TV

The LG G3 has been LG’s breakout hit of the summer. Using their knowledge frombuilding some … more

Make Your Calendar Widget Beautiful with Month

For some of us, summer vacation is alreadyover. For those getting ready to school, work, or … more