Can't run a script - One (M7) Q&A, Help & Troubleshooting

hello I'm trying to run a script but I can't it gives me the errors in screenshot. I run it as root. I'm s-off.
here's the script. (note that I can do this manually with a file explorer)
chmod 777 /sys
chmod 660 /sys/android_camera_awb_cal/awb_cal
cp /sdcard/htcm8awb/awb_cal /sys/android_camera_awb_cal/awb_cal

MaRcIuPT said:
hello I'm trying to run a script but I can't it gives me the erros in screenshot. I run it as root. I'm s-off.
here's the script. (note that I can do this manually with a file explorer)
chmod 777 /sys
chmod 660 /sys/android_camera_awb_cal/awb_cal
cp /sdcard/htcm8awb/awb_cal /sys/android_camera_awb_cal/awb_cal
Click to expand...
Click to collapse
Need some more information, please. First off, do you have an HTC One m7 (Sprint) or an HTC One M8? From your script, it looks like it is made for the M8. This is the thread for the m7 Sprint variant.

MarkBell said:
Need some more information, please. First off, do you have an HTC One m7 (Sprint) or an HTC One M8? From your script, it looks like it is made for the M8. This is the thread for the m7 Sprint variant.
Click to expand...
Click to collapse
I have the m7 international (I believe this section is for m7 any version), I'm only replacing a file with the script.

MaRcIuPT said:
I have the m7 international (I believe this section is for m7 any version), I'm only replacing a file with the script.
Click to expand...
Click to collapse
Did you ever have any luck? Can you try asking the question to the person who wrote the script?
It's quite possible the script is for the m8 since the script names an m8 folder, but I'm not an expert on scripts by any means. @clsA: Do you know what may be going on here?
Do those directories referred to in your screenshot actually exist on your phone?
Also: I was wrong about this being Sprint variant exclusive. My bad on that.

MaRcIuPT said:
hello I'm trying to run a script but I can't it gives me the errors in screenshot. I run it as root. I'm s-off.
here's the script. (note that I can do this manually with a file explorer)
chmod 777 /sys
chmod 660 /sys/android_camera_awb_cal/awb_cal
cp /sdcard/htcm8awb/awb_cal /sys/android_camera_awb_cal/awb_cal
Click to expand...
Click to collapse
Try using SManager to run the script. It might help.

MarkBell said:
Did you ever have any luck? Can you try asking the question to the person who wrote the script?
It's quite possible the script is for the m8 since the script names an m8 folder, but I'm not an expert on scripts by any means. @clsA: Do you know what may be going on here?
Do those directories referred to in your screenshot actually exist on your phone?
Also: I was wrong about this being Sprint variant exclusive. My bad on that.
Click to expand...
Click to collapse
I can rename the folder.... it's simply a folder. the scrip is made for m7. not m8. It does work for some in init.d and some don't.. like me. and I tried to run the script to see why and this is what happens. the folders are there because as I said I can do that step by step in ES explorer, change permissions then replace the file I want.
Atishay Jain said:
Try using SManager to run the script. It might help.
Click to expand...
Click to collapse
with Smanager I get the message is attached. :\
I tried to run a cp command in a terminal (root) and it says the same thing " I/O error" the other steps in script I did successfully in a terminal.
Tried too with 'busybox cp' command and I get " cp: can't create '/sys/android_camera_awb_cal/awb_cal': File exists " so I know the file exists that's why I wan't to replace it xD my head hurts. Searched a lot why I can't copy and no success.

MaRcIuPT said:
I can rename the folder.... it's simply a folder. the scrip is made for m7. not m8. It does work for some in init.d and some don't.. like me. and I tried to run the script to see why and this is what happens. the folders are there because as I said I can do that step by step in ES explorer, change permissions then replace the file I want.
with Smanager I get the message is attached. :\
I tried to run a cp command in a terminal (root) and it says the same thing " I/O error" the other steps in script I did successfully in a terminal.
Tried too with 'busybox cp' command and I get " cp: can't create '/sys/android_camera_awb_cal/awb_cal': File exists " so I know the file exists that's why I wan't to replace it xD my head hurts. Searched a lot why I can't copy and no success.
Click to expand...
Click to collapse
I am not able to get the exact reason for the problem but most such things get solved on updating busybox. Try doing that. Use the tool by jrummy from the market or download the busybox wraithdu installer script from the v6 supercharger thread by zeppelinrox.

MaRcIuPT said:
hello I'm trying to run a script but I can't it gives me the errors in screenshot. I run it as root. I'm s-off.
here's the script. (note that I can do this manually with a file explorer)
chmod 777 /sys
chmod 660 /sys/android_camera_awb_cal/awb_cal
cp /sdcard/htcm8awb/awb_cal /sys/android_camera_awb_cal/awb_cal
Click to expand...
Click to collapse
i would guess you're using Windows Notepad (or similar) to edit/create that script?
you need to use UNIX style EOL delimiters for those commands to work.
EDIT: i've attached an example, the same script (just lists directory contents), looks the same in the Script Runner, once saved with Windows EOL delimiters, gives the first output,
same script with UNIX EOL, gives the second output.

nkk71 said:
i would guess you're using Windows Notepad (or similar) to edit/create that script?
you need to use UNIX style EOL delimiters for those commands to work.
EDIT: i've attached an example, the same script (just lists directory contents), looks the same in the Script Runner, once saved with Windows EOL delimiters, gives the first output,
same script with UNIX EOL, gives the second output.
Click to expand...
Click to collapse
Yes I used the notepad to edit the original. now with your help I did understand and used the notepad++, converted to UNIX EOL and saved as script (sh). No errors now on missing directories but I can't copy/replace the file even with cp -f to force it. I can't understand which command ES explorer uses when I manually copy the file, because it replaces the file successfully.

MaRcIuPT said:
Yes I used the notepad to edit the original. now with your help I did understand and used the notepad++, converted to UNIX EOL and saved as script (sh). No errors now on missing directories but I can't copy/replace the file even with cp -f to force it. I can't understand which command ES explorer uses when I manually copy the file, because it replaces the file successfully.
Click to expand...
Click to collapse
Not sure, but
Are you running the script as root?
And maybe you need file permission to be 666 instead of 660.
Sent from my HTC One using Tapatalk

nkk71 said:
Not sure, but
Are you running the script as root?
And maybe you need file permission to be 666 instead of 660.
Sent from my HTC One using Tapatalk
Click to expand...
Click to collapse
Yeah Always run on root. Tried 666 and 777. Tried with cp, cat, rm first then CP. No success.
Sent from my HTC One using XDA Free mobile app

Related

How to filter ads on your G1

You can find the latest version of this app on the slideme app store.
http://slideme.org/application/adfree
This is the old thread, I started a new thread in the general section => http://forum.xda-developers.com/showthread.php?p=40759351
================================================================================================================================================
Spoiled by ad free browsing on my normal desktop computer it became increasingly annoying seeing all the ads on my phone. However it's really easy to make them disappear, although you most likely will need root on the phone.
Download the hosts.txt file from http://www.mvps.org/winhelp2002/hosts.txt, you may need to run dos2unix over the file to remote \r characters, rename the file hosts and copy it to /system/etc on your phone and say goodbye to most ads.
You may find the list to be imperfect, for example some feedburner URLs are "blocked" as a result which can screw with RSS feeds, although it's annoying giving too much info to Google but like everything else in life some things are a trade off.
If you want to root your phone, try this article.
Thanks for this!
As soon as I read the topic title I realised what you were doing and I never thought of it myself.
My hosts file was /etc/hosts though, not /system/etc/hosts
Dark X Dragon said:
As soon as I read the topic title I realised what you were doing and I never thought of it myself.
Click to expand...
Click to collapse
I've been using this technique for a bit, just didn't think to post about it before did a quick search and noticed no one else had so thought I might as well
My hosts file was /etc/hosts though, not /system/etc/hosts
Click to expand...
Click to collapse
Doesn't seem to matter, I just checked the /etc dir and it has the same hosts file.
Actually, /etc is a symbolic link to /system/etc, so your hosts file is really at /system/etc -- however, accessing the file through either path is equivalent.
Ha ha hosts exists on android!? I had no idea. I'm also a spoiled ad-less pc user. This is great. Thanks.
If you can't download the file above (it appears as text in browser), replace .txt with .zip at the end of the url. This will download the zip file which u can later unzip with an unzip app in the market.
Ok. I can't paste over the original hosts file using the phone? Astro and lynda file managers don't do it for me. And yes I am rooted, running 1.5 dudes build. Can this be done only from a PC?
ShatBag1105 said:
Ok. I can't paste over the original hosts file using the phone? Astro and lynda file managers don't do it for me. And yes I am rooted, running 1.5 dudes build. Can this be done only from a PC?
Click to expand...
Click to collapse
You have a couple of options, you can download the terminal app from the market and use it, or you can use ADB to shell into the phone, or wait for someone to code an app to do it all for you.
For the time being go with installing terminal, then type 'su' to become root. That is unless you have a copy of adb handy, if you can 'adb shell' the following commands are the same, except you can copy and paste.
Then remount the system partition read-write.
Code:
mount -o remount,rw /dev/block/mtdblock3 /system
Then you go into the etc dir
Code:
cd /system/etc
Then you can rm the hosts file
Code:
rm hosts
Then grab the hosts.txt file
Code:
wget http://www.mvps.org/winhelp2002/hosts.txt -O hosts
Always more than one way to skin a cat, but the above works for me(tm)
lbcoder said:
Actually, /etc is a symbolic link to /system/etc, so your hosts file is really at /system/etc -- however, accessing the file through either path is equivalent.
Click to expand...
Click to collapse
Ugghh, I read that ages ago but really didn't commit it to memory. It is now. =)
There's a fair chance I won't get around to it but I'm tempted to take this ad blocking further. Namely an automatic app but there might be more to add to it.
Thanks for the help delta. I figured it had to be done in terminal. And you know, this would definitely become very popular as an app.
I'm a dummy its etc not ect
delta_foxtrot2 said:
Then grab the hosts.txt file
Code:
wget http://www.mvps.org/winhelp2002/hosts.txt -O hosts
Always more than one way to skin a cat, but the above works for me(tm)
Click to expand...
Click to collapse
(I am using the terminal program on the phone)
Until the above step, no problems
After typing in the above I get the following message:
"bad address "www.mvps.org"
I checked for typing errors, tried it 3 times but get the same error message
Any suggestions please?
thanks
nyayo99 said:
(I am using the terminal program on the phone)
Until the above step, no problems
After typing in the above I get the following message:
"bad address "www.mvps.org"
I checked for typing errors, tried it 3 times but get the same error message
Any suggestions please?
thanks
Click to expand...
Click to collapse
Try it without the http://www. It might work like that. This is a lot harder than it should be lol. The g1 is putting up a fight!
ShatBag1105 said:
Try it without the http://www. It might work like that. This is a lot harder than it should be lol. The g1 is putting up a fight!
Click to expand...
Click to collapse
Thanks, but this didn't work either.
Some googling indicated a possible DNS issue.
So I looked up the IP address (209.68.48.119), substituted that into your instructions and presto, everything worked!
Many thanks for the ad killer option for the G1
Aah beautiful work. Just to clarify for newbs like me. The last line is (# wget http://209.68.48.119/winhelp2002/hosts.txt -O hosts). Make sure that -O hosts is a captialized O.
ShatBag1105 said:
Aah beautiful work. Just to clarify for newbs like me. The last line is (# wget http://209.68.48.119/winhelp2002/hosts.txt -O hosts). Make sure that -O hosts is a captialized O.
Click to expand...
Click to collapse
Yes, capital letter o, lower case o stores the output of wget into the file which isn't the desired outcome
I plan on suggesting the following URLs to the hosts.txt guy to block admob ads in apps
p.admob.com
analytics.admob.com
r.admob.com
In the mean time you can manually add it to the hosts file yourself, just copy and past from another line.
After updating the hosts file you may need to reboot or wait for the hostname to expire from the internal lookup cache, unless someone knows a quick way to flush the cache to speed up the process that is.
Thanks for this. Worked great for me. Very helpful tutorial.
Just uploaded "AdFree" to android market, this does all the steps I laid out manually at the touch of a button.
Its funny how
127.0.0.1 localhost
is the only thing blocked in the /system/etc/hosts file. lol.
andonnguyen said:
Its funny how
127.0.0.1 localhost
is the only thing blocked in the /system/etc/hosts file. lol.
Click to expand...
Click to collapse
That isn't "blocked" and in fact nothing gets blocked by the hosts file it just points hostnames to the local system, which usually has no web server running so the connection fails immediately.
However you MUST have localhost listed or various things will fail and cause all sorts of issues.
New version of AdFree is now up, I have the app adding the admob hostnames to the bottom of the list.

[SCRIPT] OLYEM_U4 1.4.2 Telstra/Bell FULL Deodex -> 1.1 Updated

Hey guys,
I have updated this thread with a script and files for those who are unsure of how to make this work. Its a quick script so don't expect much, reverse engineered to simply de-odex your phone fully.
You must have ADB added to your "Allow" list in Superuser.apk.
WARNING:
This can brick your phone if you do not do things properly. I have tested it on my phone and it worked flawlessly. Once again though, I was on a fresh install of 1.4.2.
INSTRUCTIONS:
-Download files here <-- Updated link
-Extract files to C:\
-Execute SevensDeodex1.1.bat
-Wait a few minutes
-Phone will reboot and take a while to start up
-Done
MANUAL INSTALL:
Navigate to extracted files through CMD or Shell
Type the following commands
adb.exe push 142system.tar.gz /data/local/tmp/
adb push bin/install_script.sh /data/local/tmp/install_script.sh
adb shell
Once in adb type:
su
cd /data/local/tmp
chmod 755 install_script.sh
./install_script.sh
Known issues:
-Photoeditor.apk deleted as de-odexing this was a problem. So what
Updates:
1.1 Updated to fix some issues with the bat file.
1.0 Original release
Special Thanks to: NFHimself for showing me the way
i know that ken was looking for a dump of /system and /data, did you or will you toss one at him seven?
i would, but i was working on some frameworks on 0.37 that i don't really want to leave unfinished
raybond25 said:
i know that ken was looking for a dump of /system and /data, did you or will you toss one at him seven?
i would, but i was working on some frameworks on 0.37 that i don't really want to leave unfinished
Click to expand...
Click to collapse
You want me to upload a framework dump?
Will that help, let me know exactly what you need and I'll try to help.
I found aout about that method too last night, I just deleted the photoeditor apk and odex file and it ran through the app deodex fine. When I tried to copy my framework files though adb shell refused to replace the files, even using the -f force command.
Yes... could someone throw me:
/system/
/data/
I know that's a lot... but that's what I'll need. Thanks guys. PM me if you need a private FTP server to upload it. If not, you can use Dropbox or Hotfile.com (I have a premium account).
http://db.tt/kdUycD1 just dumped that last night..might be a slow downlad though...raybond25 gave me the script for it since I've never done it hope its what you need
Sent from my MB860 using XDA Premium App
that was something that was needed, but after that it needed to be deodexed. I sent snake's dump to NFHimself and he deodexed it.
Deodexed system
raybond25 said:
that was something that was needed, but after that it needed to be deodexed. I sent snake's dump to NFHimself and he deodexed it.
Deodexed system
Click to expand...
Click to collapse
so with a deodex script we can deodex our system and framework?
Sent from my MB860 using XDA Premium App
SN4K3B1T3 said:
so with a deodex script we can deodex our system and framework?
Sent from my MB860 using XDA Premium App
Click to expand...
Click to collapse
i'm not sure how NFH did it, you'd have to ask him about his method but that system has deodexed /app and /framework
i'm not sure if he plans on writing a script that will do this and releasing it or not, that deodex was mainly because kennpenn was looking for it.
but, yes it can be done.
Will upload deodex files now
any special tricks ive tried deodexing at least 4 times and it stops at 91 out of 134...pissed
yeah i got an error at core.odex
I agree there is no sense reinventing the wheel, I used dsixda's htc kitchen to do it, had a working folder for something else, simply replaced app and framework with the files from telstra and ran his script and selected deodex. He has bits in there specific to the Atrix, I noticed that when looking at the scripts to do my own version, didn't bother after since it was already done. No errors, and haven't had a problem in over a month so it's all good, it only needs to be done once per firmware.
My rule of thumb, don't run anything for your $$$ phone if you don't have source or can read the scripts yourself, especially if it hasn't been tested specifically on your phone. Don't be in a rush to execute some file or script unless it's from a family member you really like with lots of money.
Cheers!
NFHimself said:
I agree there is no sense reinventing the wheel, I used dsixda's htc kitchen to do it, had a working folder for something else, simply replaced app and framework with the files from telstra and ran his script and selected deodex. He has bits in there specific to the Atrix, I noticed that when looking at the scripts to do my own version, didn't bother after since it was already done. No errors, and haven't had a problem in over a month so it's all good, it only needs to be done once per firmware.
My rule of thumb, don't run anything for your $$$ phone if you don't have source or can read the scripts yourself, especially if it hasn't been tested specifically on your phone. Don't be in a rush to execute some file or script unless it's from a family member you really like with lots of money.
Cheers!
Click to expand...
Click to collapse
I've updated the OP and thread title.
Now includes a working script to deodex. Very simple and straight forward, no need to use any other tools and this should make it easier for all other users who are new at this.
Thanks for your help sir, you are a king amongst men!
Not a problem.
One thing about the script, Superuser.apk needs to know about the shell having root access, so once you root the phone, do an adb shell su command, accept the prompt from Superuser.apk, and you are good to go. I tossed some stuff into my root.bat (.sh) scripts to launch Superuser.apk and update it's database automatically, bit of a hack but worked the last 20 times I tried it.
NFHimself said:
Not a problem.
One thing about the script, Superuser.apk needs to know about the shell having root access, so once you root the phone, do an adb shell su command, accept the prompt from Superuser.apk, and you are good to go. I tossed some stuff into my root.bat (.sh) scripts to launch Superuser.apk and update it's database automatically, bit of a hack but worked the last 20 times I tried it.
Click to expand...
Click to collapse
ooooooooh you absolutely right.
Since I'm new at making scripts i'm going to simply just update the script so that the user has to put ACCEPT on the phone before running the rest of the commands you know, new vers coming now
I keep getting this error.. I took a screen shot of it.. Any ideas?
nate_benji said:
I keep getting this error.. I took a screen shot of it.. Any ideas?
Click to expand...
Click to collapse
easy. It means you do not have root access allowed with ADB.
If you're phone is not rooted, go to the link in my signature that shows you how to root.
If you have root and you know its working then you must do the following first:
Open up your command prompt - make sure to keep your phone's screen active and unlocked.
Type "adb shell"
Once you have $
type "su"
check your phone's screen, as you will be prompted to allow, or deny access.
Select "Allow"
Now you are set to go, execute the script again.
Let me know of your results
I just tried it on a fresh SBF flash and root, root confirmed working though adb shell. It pushes everything fine, but when it goes to execute the script the cmd window just closes.
EDIT: Managed to get a screen right before it closes. Not sure of the problem because root works in adb and titanium backup.
Open up CMD manually
then navigate to where the bat file is and run it.
Tell me what the output is please.
Also, you said Root is working through ADB.
Then try to do everything manually as such:
adb.exe push 142system.tar.gz /data/local/tmp/
adb push bin/install_script.sh /data/local/tmp/install_script.sh
adb shell
Once in adb type:
su
cd /data/local/tmp
chmod 755 install_script.sh
./install_script.sh
And there you go.

Cannot edit build.prop anymore - read-only.

Using Nook Color, CM7 nighly 107.
Got Netflix working a while back by modifying the build.prop file using ES File Explorer - no issues.
Tried again to make some mods and cannot save it anymore. ES reports "writable - NO"
Tried to "su chmod 666" it and it comes back with "File system read-only"
Is anybody else seeing this? What am I missing?
Thanks...
I encountered a similar situation during the build.prop edit while using ES File Explorer on my NC running CM7 on internal memory.
Possibly, the permissions in the program need to be changed to enable it to "write".
Here's what I did: Menu==>Settings==>Root options. "Check" Root Explorer and if my memory serves me correctly, click "Yes" to get past the "Experimental Feature", toggle the "Cyanogen Mod" (if you're using CM7) radio button, click OK and check the "Mount File System" box to make the system writable.
Now, it should be writable. Hope this helps.
dhyamato said:
... check the "Mount File System" box to make the system writable.
Click to expand...
Click to collapse
Thanks for the tip, that wasn't it
I remember setting those originally. I just checked again and "Root Explorer" and "Mount FIle System" are both checked.
mwilli20 said:
Using Nook Color, CM7 nighly 107.
Got Netflix working a while back by modifying the build.prop file using ES File Explorer - no issues.
Tried again to make some mods and cannot save it anymore. ES reports "writable - NO"
Tried to "su chmod 666" it and it comes back with "File system read-only"
Is anybody else seeing this? What am I missing?
Thanks...
Click to expand...
Click to collapse
In 106 SU wasn't working correctly until I reinstalled it. You can't modify build.prop without superuser rights. Check the thread about SU / Superuser missing in 106 (and I bet 107) for instructions. It worked for me.
DiDGR8 said:
Check the thread about SU / Superuser missing in 106 (and I bet 107) for instructions. It worked for me.
Click to expand...
Click to collapse
Interesting... the OP withdrew his post: (apparently it's back in 107)
http://forum.xda-developers.com/showthread.php?t=1131369
However when I checked it, the SU app was misbehaving, Force closing, refusing to respond to the menu command. So I reinstalled it. Now it's OK.
Unfortunately I still cannot edit the build.prop file.
I don't think it's a superuser problem because without SU access ES cannot even see the system folder!!! I can see it, and edit the file, just cannot save it.
You might try fixing permissions under recovery.
have you tried the app: nook netflix fixer?
I've changed it successfully on the past 6 consecutive nightlies using adbwireless pull/push. However since 106 I've hsd to reflash su. N108 hasn't given me the su issue. Is it fixed?
Same problem with the build.prop file: cannot save changes, or copy over it. Running in nightly 108 today. Tried both Root Explorer and ES File manager.
I think you need to change the build.prop file properties to be rw using chmod. Don't forget to mount system as rw before doing the chmod.
Sent from my Huawei Ascend using XDA App
foltz61 said:
I think you need to change the build.prop file properties to be rw using chmod.
Click to expand...
Click to collapse
Tried that (sudo chmod 666...), get the same message. "file system is read-only"
backup and restore fresh start....?
I'm not great at linux but I do it differently. Try chmod +rw /system/build.prop . Make sure you have system mounted as RW first. I'd also check superuser to make sure whatever terminal/file explorer you are using still has root privileges.
Sent from my Huawei-M860 using XDA App
foltz61 said:
Try chmod +rw /system/build.prop
Click to expand...
Click to collapse
666 is the same thing as +rw in this case...
It looks like the "fresh start" suggestion a couple of posts up is the best
All those numbers always confuse me . Sorry. Good luck.
Sent from my Huawei-M860 using XDA App
bike2002 said:
have you tried the app: nook netflix fixer?
Click to expand...
Click to collapse
Thanks! That did it!
Does anybody know why this app can modify the build.prop file while ES File Explorer cannot?
I had to mount the folder containing build.prop with rw access in order to use chmod. I think the latest version of the netflix fixer may do the same (see my post in that thread). In short, I used;
Code:
su
busybox mount -0 rw,remount /dev/block/mmcblk1p3 /system
in the terminal before using the chmod command in order to give myself rw permissions in the folder. I'm only two days old at this, so it beats me why root doesn't have normal rw permissions on the folder.
NCKevo said:
I had to mount the folder containing build.prop with rw access in order to use chmod...
Click to expand...
Click to collapse
Thanks for the tip. I ran the command successfully (by the way, small typo, I believe it's -o not -0) and was able to chmod and edit the file with vi.
That's where confusion began. I reboot and after the reboot I was able to modify the file without remounting the /system directory. The mount command does not surive a reboot does it?
Have you tried just pulling the build.prop
Code:
c:/<target_folder> adb pull /system/build.prop
then editing it with note pad then pushing it back and rebooting>
mwilli20 said:
That's where confusion began. I reboot and after the reboot I was able to modify the file without remounting the /system directory. The mount command does not surive a reboot does it?
Click to expand...
Click to collapse
That is confusing. What are the full (i.e. ls -l) permissions on the file now? (It's possible that it somehow ended up with o+w, but I don't understand how - vi isn't exactly known for changing permissions on-the-fly.)
Rodney

[Q] Permanently Change Folder Permission

I am trying to change the folder permission of the "data/gps" folder to "rwx rwx rwx", by default, it's set to "rwx --- ---".
I can do this by using ES File Explorer but the folder permission gets reverted to the default upon reboot. So I'm guessing ES File Explorer can't change it permanently.
My question is, is there any method that I can use to change it permanently? I have Terminal Emulator installed, but I've never used it before so I don't want to go around messing with it just yet (unless if I can get a confirmation that it'll do what I need it to do).
I would appreciate any help on this. Thanks.
Update:
I tried it with Terminal Emulator, "chmod 777 /data/gps". No luck, the permissions still reverted to default upon reboot.
I was informed that all scripts placed within "/etc/init.d" folder are executed on boot. So I created a shell script file and placed it in that folder.
#Change folder permission
chmod 777 /data/gps
Click to expand...
Click to collapse
Unfortunately, that didn't work either. I don't know if the script above is incorrect or incomplete. One thing I can't figure out though, are all the scripts in the folder executed with superuser privilege? Correct me if I'm wrong but in order to change the permission for "/data/gps" folder, superuser privilege is required. I have tried the following scripts, nothing works.
#Change folder permission
su chmod 777 /data/gps
Click to expand...
Click to collapse
#Change folder permission
sudo chmod 777 /data/gps
Click to expand...
Click to collapse
#Change folder permission
sudo su chmod 777 /data/gps
Click to expand...
Click to collapse
Anyone with ideas?
UPDATE: I have got this fixed! Turns out that there was nothing wrong with the script. Placing the script in the init.d folder does the trick, it's just that I couldn't get it to work with CM9, it works perfectly on OneCosmic ROM. Maybe CM9 doesn't support init.d?

[Q] Easy answer, many thanks!

Hi guys. How can i execute scripts found in "miui-bin" folder? A simple drag'n drop didn't solve that:laugh:
XDRdaniel said:
Hi guys. How can i execute scripts found in "miui-bin" folder? A simple drag'n drop didn't solve that:laugh:
Click to expand...
Click to collapse
It's automatically executed on boot. But i think you can execute it by :
Code:
su
then
Code:
cd /system/miui-bin
then execute the script by mentioning it's name.
Never tried it, but worth a shot !
F4uzan said:
It's automatically executed on boot. But i think you can execute it by :
Code:
su
then
Code:
cd /system/miui-bin
then execute the script by mentioning it's name.
Never tried it, but worth a shot !
Click to expand...
Click to collapse
i tried this
su
cd /system/miui-bin
bootsound
it says
bootsound: not found
my guess is that there is another script that activates miui-bin folder, but wich one?
Try:
export PATH=/system/miui-bin:$PATH
Before doing the rest
XDRdaniel said:
Hi guys. How can i execute scripts found in "miui-bin" folder? A simple drag'n drop didn't solve that:laugh:
Click to expand...
Click to collapse
This means that you are working on an MIUI ROM?
ast00 said:
This means that you are working on an MIUI ROM?
Click to expand...
Click to collapse
yes
XDRdaniel said:
i tried this
su
cd /system/miui-bin
bootsound
it says
bootsound: not found
my guess is that there is another script that activates miui-bin folder, but wich one?
Click to expand...
Click to collapse
Try this
su
cd /system/miui-bin/
./bootsound
If it gives an error other than file not found then check your permissions ...
To change permissions use chmod
If it gives file not found error then use root explorer and see if the path of file is correct ...also if the script boot sound has an extension (like .sh ) then you must mention it in the 3rd line ....
Good luck
Sent from my GT-S5570 using Tapatalk 2

Categories

Resources