• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Mods zte merit z990g rooted, needing advice [Root only]

blue_angel

Member
So I rooted my device and since Ive already established discontinuance with my service provider, Id like to futher explore it and my su privilages :)

I've installed a terminal emulator and would like to axcess my z990g completely and learn to write scripts, but seeing as Im new to all of this, I require assistance.

Could someone give a complete list of su commands, explain their purpose, and how to input them (including where & what is to be entered to axcess my sim network lock) and how to write scripts?

The phone is no longer activated nor used for anything other than to play games on and chat via wifi. and my request are purely for educational purposes only to futher my knowledge of the device.

I would greatly appreciate any and all advice.
 
If you wish to learn about the Linux terminal, you are on the right track. Have a look in the folder /system/xbin/ and see all the programs available to you. You can find out more about each program by searching the program names in google.

Also, I would recommend probably searching some tutorials on shell scripting. There are many.
 
If you wish to learn about the Linux terminal, you are on the right track. Have a look in the folder /system/xbin/ and see all the programs available to you. You can find out more about each program by searching the program names in google.

Also, I would recommend probably searching some tutorials on shell scripting. There are many.

Thank you :) I will check it out :)
 
Hey there, blue_angel! :)

Just wanted to let you know that I've moved your thread here to the Rooted Devices Only section of the Android System Mods, Scripts and Hacks area since your questions principally deal with root (su, etc.) scripting.

Re. the su binary/program--su is basically a special version of the sh shell that also gives you access to root-protected areas of your device. You will still have to give/grant the su binary permission from your SuperUser app (could also be SuperSU, of course).

Like Sepero said, there's a ton of stuff out there on the internet--almost too much to do more than give you a few quick starting points here. But Google is your friend and we'll help you out, too :).

~ ~ ~

Here's a quick demo of some of the nuances of using one shell over the other:
Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Scary Alien>[B][B]adb [COLOR="Red"]shell [/COLOR]ls -al /cache[/B][/B]
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
[B][COLOR="blue"]opendir failed, Permission denied[/COLOR][/B]

In the above, you see that a non-rooted request to list the files in the /cache directory is denied.

Code:
C:\Users\Scary Alien>[B]adb shell [COLOR="red"]su[/COLOR] -c "ls -al /cache"[/B]
-rw-r--r-- root     root      1500495 2013-02-24 18:41 Superuser.apk
-rw------- root     root           43 2012-10-29 22:32 android-root-toolkit-test-root-file-314159265.txt
-rw-rw-rw- root     root           35 2012-09-26 20:26 bootanimation-dmesg
drwxrwx--- root     root              1969-12-31 19:00 lost+found
drwxrwx--- system   cache             2013-06-08 09:25 recovery
-r-xr-xr-x root     root       221760 2012-10-06 19:29 update-binary

But using the su binary allows you to successfully list the files.

Code:
C:\Users\Scary Alien>[B]adb shell [COLOR="red"]sh[/COLOR] -c "ls -al /init*"[/B]
-rwxr-x--- root     root       109412 1969-12-31 19:00 init
-rwxr-x--- root     root         2487 1969-12-31 19:00 init.goldfish.rc
-rwxr-x--- root     root        18414 1969-12-31 19:00 init.rc
-rwxr-x--- root     root         1795 1969-12-31 19:00 init.trace.rc
-rwxr-x--- root     root         6567 1969-12-31 19:00 init.tuna.rc
-rwxr-x--- root     root         3570 1969-12-31 19:00 init.tuna.usb.rc
-rwxr-x--- root     root         3947 1969-12-31 19:00 init.usb.rc

The above shows that the sh shell can list files (this could have also have been done with a "adb shell ls -al /init*" command, but I wanted to show how this compares with the example below).

Code:
C:\Users\Scary Alien>[B]adb shell [COLOR="red"]su[/COLOR] -c "ls -al /init*"[/B]
-rwxr-x--- root     root       109412 1969-12-31 19:00 init
-rwxr-x--- root     root         2487 1969-12-31 19:00 init.goldfish.rc
-rwxr-x--- root     root        18414 1969-12-31 19:00 init.rc
-rwxr-x--- root     root         1795 1969-12-31 19:00 init.trace.rc
-rwxr-x--- root     root         6567 1969-12-31 19:00 init.tuna.rc
-rwxr-x--- root     root         3570 1969-12-31 19:00 init.tuna.usb.rc
-rwxr-x--- root     root         3947 1969-12-31 19:00 init.usb.rc

And you can also do the same with the su binary, although it would probably be best to only use the su binary when you truly do have root-protect activities to do.

~ ~ ~

Here's a couple of apps that will allow you to write and invoke shell scripts from your phone:

Android Terminal Emulator

Gscript Lite

And the original XDA thread for that app: [APP] Gscript * Easily launch/save shell scripts from within Android UI *

Script Manager

(I haven't used this one, but it looks pretty good).

Cheers and best of luck! :)
 
I truely appreciate it. I have been neck high with family issues.....but now things have settled down a bit, Im going to give this a good look through. Again, thank you!
 
Back
Top Bottom