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?
Related
My app-private dir (running Apps2SD) became corrupt, a repair ext operation has removed the directory. Now, I can re-create it, but I don't know the proper permissions to CHMOD it, so that it is properly set up.
This also meant I lost my protected apps, which really sucks, but I have backups I can reinstall from.
Who knows what permissions I need to pass to it? I am in recovery mode right now with adb shell.
Thanks
EDIT - got it (hopefully).
chown 1000:1000 app-private
chmod 0771 app-private
seems to have the permissions set right, now to boot up and see if it works right.
Hey guys, I just used root explorer v 2.2 to delete the annoying apps built into the system (amazon mp3)
I am now trying to move my apps into the system so that they cannot easyly be removed. I want to send over lookout and sim checker. That way a theif would not be able to easily delete the apps.
when I select the "move" option (with sim checker) then go to the system apps dirrectpry and then select "paste", it says paste and shows a progress indicator for like 1 second then when I check to see if it actually did the move, it hasn't can anyone help me out
I know I have full root access as I have clicked to allow it and am remounted as r/w so that's not the problem.
Any help to get those two apps into my read only system directory would be greatly apprecaited.
Oh ya I think ill add that I have also tryed to simply change the permissions of the app to readonly (with root explorer) but that did not stop the basic android app manager from uninstalling it.
Try to use adb to move it.
so i went and installed adb, i know its working as well with a little test, could someone please write out a sample command for me to use for this purpose of moving an app out of the apps to sd location and into the system apps.
asb123 said:
so i went and installed adb, i know its working as well with a little test, could someone please write out a sample command for me to use for this purpose of moving an app out of the apps to sd location and into the system apps.
Click to expand...
Click to collapse
mv /system/sd/app/*lookout* /system/app
mv /system/sd/app/*checker* /system/app
It really depends on the name of the file though, if it has lookout in it, then it will be moved to /system/app. The * tells it to move anything with that in the file name
type adb and it will give you the commands + switches
adb pull
adb push
In response to your first attempt, it sounds like system is not being mounted as rw. If it were, the copying would work (I do this all of the time with SUFBS). Try to mount the system as rw via the terminal then copy.
JAguirre1231 said:
mv /system/sd/app/*lookout* /system/app
mv /system/sd/app/*checker* /system/app
It really depends on the name of the file though, if it has lookout in it, then it will be moved to /system/app. The * tells it to move anything with that in the file name
Click to expand...
Click to collapse
so i have the command prompt cd to andorid adk\tools
when i now type in the above :
mv /system/sd/app/*lookout* /system/app
it doesnt recognize the command
so i have C:\android-sdk-windows\tools> mv /system/sd/app/*lookout* /system/app
and it doesnt recognize mv as a command
cloverdale said:
In response to your first attempt, it sounds like system is not being mounted as rw. If it were, the copying would work (I do this all of the time with SUFBS). Try to mount the system as rw via the terminal then copy.
Click to expand...
Click to collapse
hey, sorry for the noob question but could you tell me the command for this. I know in the app i was using it says remount as rw and i do have access to change the system app folder (delted apps) but how can i remount as RW in terminal whats the command? And after, do i need to manually remount back to what i was so that it is back to being unchangeable?
asb123 said:
so i have the command prompt cd to andorid adk\tools
when i now type in the above :
mv /system/sd/app/*lookout* /system/app
it doesnt recognize the command
so i have C:\android-sdk-windows\tools> mv /system/sd/app/*lookout* /system/app
and it doesnt recognize mv as a command
Click to expand...
Click to collapse
If you have the tools directory in your PATH (as you should) no need to cd to the directory. Anyways, sorry to move it in adb do
adb remount
adb shell
*previous commands*
exit
Bingo!
it says failed on /systen/sd/app/com.lookout.apk - cross-device link
asb123 said:
it says failed on /systen/sd/app/com.lookout.apk - cross-device link
Click to expand...
Click to collapse
Ou have 2 android phones plugged in or an emulator running ath the same time
i dont have two phones plugged in and i dont have an emulator that i know of...
but on the bright side i mannaged to solve my problem using droid explorer. I successfully have gotten lookout entrenhed into the system so that it cannot be uninstalled from the menu.
BUT when i tried the same thing for sim checker it did not work, it would not copy into system\apps
i did manage to get it inot system\app but using the copy rather than move option in root explorer, after reinstalling using the simchecker in system\app
but it is showing up as still uninstallable. I have no idea why simcheck is not working but it worked for lookout...
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
so i decided to go back to stock KTM but after installing battery extender kernel (giving me root) i cant set permissions on files to add into system/app. any ideas how to fix that?
Joomlad said:
so i decided to go back to stock KTM but after installing battery extender kernel (giving me root) i cant set permissions on files to add into system/app. any ideas how to fix that?
Click to expand...
Click to collapse
Tru to use adb or terminal emulator.
Type this command in terminal emu.
su
chmod 644 /system/app/
It should work...
Sent from my GT-S5830 using Tapatalk 2
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