Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,729,384 Members 42,920 Now Online
XDA Developers Android and Mobile Development Forum

[SCRIPT][ANDROID] SUDo for Android

Tip us?
 
aureljared
Old
(Last edited by aureljared; 19th May 2014 at 01:06 AM.)
#1  
aureljared's Avatar
Senior Member - OP
Thanks Meter 442
Posts: 664
Join Date: May 2013
Location: Quezon City
Default [SCRIPT][ANDROID] SUDo for Android

Earlier today I came up with the idea of a sudo implementation for Android. I mean, it's pretty tiring to have to enter 'su' first before issuing root commands, right? Sometimes we even forget to do that.

Description:
Well, this isn't a binary, but a script. What it does is just take the commands you pass to it and append it to 'su -c.'
I know it's dead simple but I wanted to bring this over to Android in an easy way, and I had free time

Usage:
Code:
sudo [command]    - run [command] as root
sudo -b                    - use bash as root
sudo -s                    - like -b, but with sh
sudo -h                    - display the help message
Download:
Dropbox
Put it in /system/bin or /system/xbin, set perms to 755.

If I helped you in any way, just hit the Thanks button!

---------------------------------------
Samsung Galaxy Express GT-I8730 (CyanogenMod 11 / Android 4.4.4 by szezso)
---------------------------------------
General Development Thread CM Building Tutorial
Sign/Zipalign Script Enhanced VRTheme Template
Project CyanogenMod: GT-I8730 AOSP Icons + 1% Battery MOD
The Following 2 Users Say Thank You to aureljared For This Useful Post: [ Click to Expand ]
 
aureljared
Old
(Last edited by aureljared; 19th May 2014 at 01:09 AM.)
#2  
aureljared's Avatar
Senior Member - OP
Thanks Meter 442
Posts: 664
Join Date: May 2013
Location: Quezon City
Changelog:
Quote:
v1.1
added support for parameters passed to the command that needs root privileges, e.g 'sudo mount -t'

v1.0
initial release
Sent from my GT-I8730 using Tapatalk

If I helped you in any way, just hit the Thanks button!

---------------------------------------
Samsung Galaxy Express GT-I8730 (CyanogenMod 11 / Android 4.4.4 by szezso)
---------------------------------------
General Development Thread CM Building Tutorial
Sign/Zipalign Script Enhanced VRTheme Template
Project CyanogenMod: GT-I8730 AOSP Icons + 1% Battery MOD
 
aureljared
Old
#3  
aureljared's Avatar
Senior Member - OP
Thanks Meter 442
Posts: 664
Join Date: May 2013
Location: Quezon City
And another!

Sent from my GT-I8730 using Tapatalk

If I helped you in any way, just hit the Thanks button!

---------------------------------------
Samsung Galaxy Express GT-I8730 (CyanogenMod 11 / Android 4.4.4 by szezso)
---------------------------------------
General Development Thread CM Building Tutorial
Sign/Zipalign Script Enhanced VRTheme Template
Project CyanogenMod: GT-I8730 AOSP Icons + 1% Battery MOD
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes