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

tommytopdrive

Member
Oct 20, 2012
51
66
After a week of gnashing of teeth and scratching of heads, I have a rooted M130 Casio Gzone Commando. I found a file (/system/etc/init.qcom.sdio.sh) that was rwxrwxrwx.
First, I made a backup of the file to my sd card.
Second, I turned wireless off
I then edited it with root explorer and added at the bottom just above "exit 0" the following lines:

chmod 0777 /system
chmod 0777 /system/bin

I edited it with root explorer by first adding the commands above then saved the file. I noticed it made a backup so I edited it again by adding a "1" after the "#!/system/bin/sh" on the first line and saved it again. Finally, I remove the "1" and saved again. This process may not be necessary, but sometimes I have seen where a backup might try to load.

After this I rebooted and found that the /system and /system/bin folders were now read/write without superuser.
I used adb to push su (I used the su file from zergRush, however you can use the one from the link below) to the /system/bin folder. Alternately you can do this from your phone by using a file explorer to copy/paste from your sd to the /system/bin folder
I checked with root explorer that su was, in fact, in the /system/bin folder. However, its permissions and ownership were incorrect.

I went back to the /system/etc/init.qcom.sdio.sh file and below the lines I added earlier I added the following:

chown root.root /system/bin/su
chmod 06755 /system/bin/su

I saved the file three times like above and then rebooted.
I went into root explorer and verified the ownership and permissions of su. They were correct.

After that I installed superuser and busybox installer from the play store.
The M130 was officially rooted.

As a precaution, I removed the lines I added in the /system/etc/init.qcom.sdio.sh file and returned the permissions and owners for /system and /system/bin back to their original settings.

Finally, I updated the recovery to GNMs all in one recovery for the commando from
http://androidforums.com/getitnowmarketing/330813-all-in-one-recovery-thread.html

*I highly recommend you install the GNM recovery as soon as your rooted and do a nandroid backup BEFORE you start freezing and removing bloatware. In this, you can always return to an operational commando if you fudge something up....experience is the best teacher.

Files:

Casio Commando drivers
http://androidforums.com/commando-all-things-root/357216-c771-drivers.html

adb if needed
http://androidforums.com/commando-all-things-root/659843-m130-rooted.html#post5307553
 
I just did a factory reset to see if I could reproduce what I have done, however, the file mentioned above is already 0777, as well as su and busybox are already installed.

so this will be kind of hard to figure out what exploit opened up that file to 0777. I need to do some more research and backtracking. I do have voice on the phone, however, dont have data (I was able to get VZ to assist with provisioning the phone, and they did say my area has data outages, but it has been a while now so still checking on that). Once again it could have been because I was messing with QPST.

I think there was an exploit for the droid bionic that might have done it, or possibly a chinese one called kingroot.

By the way for a screen shot for proof of root, what is the best way to do that?
 
Upvote 0
After a week of gnashing of teeth and scratching of heads I think I have a rooted M130 commando. I still have to find out exactly what allowed it, but while trying many different exploits, I found a file (/system/etc/init.qcom.sdio.sh) that was rwxrwxrwx. I edited it to add chmod for /system and /system/bin, pushed su and then edited it to chown su to root. I had to (after making a back up) restore nv with QPST several times to get the results (that part needs dissecting to to see why). After that installed superuser.apk and busybox.

And finally updated the recovery to GNMs all in one.

Now, We just need to do some testing to find out at what point the file came avaliable as 0777.

The only issue I have encountered (which could have been due to my own messing around) is that the phone is connected to the verizon network, but I dont have data, and when I try to make a call I get a recording to call support. I am heading over to verizon now to see if all they need to do is reprogram the phone to connect, hopefully without a hard reset.

So this may be a slight noob question, but could one of you explain what chmod is? and with that, what exactly the file is and how it works to root the phone? Im sure i can say on behalf on all the noobs hungry for root, we would like to know ;)
 
  • Like
Reactions: hacker1969
Upvote 0
here are some screen shots.

I guess I can unroot to try to root again, as I do have a nandroid backup.

Its hard to read, but on the first one you can see the M130 underneath the camera root request.
 

Attachments

  • 20121209101518768.gif
    20121209101518768.gif
    13.2 KB · Views: 410
  • 20121209101636345.jpg
    20121209101636345.jpg
    23.5 KB · Views: 380
Upvote 0
How do I use chmod? / What is chmod?
It has some nice information on what chmod actually is.
Just some basic info for people from the site:
chmod (change mode)
permissions for the owner, the group and the world, respectively
digits include 4 (read only), 5 (read and execute), 6 (read and write) and 7 (read, write and execute).
so 777 means that owner, group and world have read write and execute permissions.
hope this lifts some of the fog of confusion:p
 
Upvote 0
After a week of gnashing of teeth and scratching of heads I think I have a rooted M130 commando. I still have to find out exactly what allowed it, but while trying many different exploits, I found a file (/system/etc/init.qcom.sdio.sh) that was rwxrwxrwx. I edited it to add chmod for /system and /system/bin, pushed su and then edited it to chown su to root. I had to (after making a back up) restore nv with QPST several times to get the results (that part needs dissecting to to see why). After that installed superuser.apk and busybox.

And finally updated the recovery to GNMs all in one.

Now, We just need to do some testing to find out at what point the file came avaliable as 0777.

The only issue I have encountered (which could have been due to my own messing around) is that the phone is connected to the verizon network, but I dont have data, and when I try to make a call I get a recording to call support. I am heading over to verizon now to see if all they need to do is reprogram the phone to connect, hopefully without a hard reset.

ok so i have the file open now, (already backuped my stuff), and am trying to edit it. I just have 2 questions and then i believe im all set.
1. Where did you put the chmod? In the begining before the arg=$1, or later?
2. Did you use the # symbol, or $, or none at all?
thanks for the good info by the way. Hope to root soon!:D
 
Upvote 0
I am a little curious, can anyone open up /system/etc with any file explorer (i use root explorer as it will let you view quite a few things even when not being rooted) and see what the permissions are for the file i mentioned in my first post on a unrooted commando.

yes you can. You have to change a few settings, but ES File Explorer will let you view files and will also tell you if they are readable and writable.
 
Upvote 0
ok so i have the file open now, (already backuped my stuff), and am trying to edit it. I just have 2 questions and then i believe im all set.
1. Where did you put the chmod? In the begining before the arg=$1, or later?
2. Did you use the # symbol, or $, or none at all?
thanks for the good info by the way. Hope to root soon!:D
What are your permissions for /system/etc/init.qcom.sdio.sh?
 
Upvote 0
i tried adding chmod in what i think is proper syntax into the file, and nothing has happened. looked to see if the directories that i typed were writable, and they were not. also i tried running it from adb and it says permission denied. getting a little spotty here...please help me out...
until that file is writable, you wont be able to edit it. You can check the permissions by using ES File explorer or adb. In adb from the $ type:

cd /system/etc then press enter
ls -l then press enter

that will tell you the permissions of all the files in that folder.
 
Upvote 0
If you can modify init.qcom.sdio.sh and push it to the /systerm/etc folder or edit it directly from a file explorer in android, then you can add the commands at the very bottom (just above "exit 0") REMEMBER: as you are messing with the file system you take all responsibility, etc, etc, etc.

You would add the following:

chmod 0777 /system
chmod 0777 /system/bin

I would push it twice or edit it twice with file explorer (I actually edited it three times by first adding the commands -save. Then added a "1" after the "#!/system/bin/sh" on the first line - save. Finally remove the "1" and save again.) as it makes a backup and might try to load the backup.

After this reboot your phone and see if the new commands stick and make your /system and /system/bin writable. It might work, but I think we will have to take more steps to envoke the file to execute.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones