[share][guide]how to set file permission? - Galaxy Y GT-S5360 General

Hi all,
some people dont know how to set file permission after push the file/apk etc.. so i share this guide to all...
Big thanks to Sun90 because let me to share his guide...
Sun90 said:
Hey Guys i have often seen lot of Question regarding the same "How to set the file permission,sorry i am a noob please explain?"
well this we come across on all threads, at some given point of time.
Reason being simple that we suggest some people to do as said below:
Hey,
1) copy the file XXXX to your Internal or External sd-card.
2) push the file XXXX to sytem/xxxx folder.
3) set permissions to rw-r--r-- blah blah blah.
4) reboot your phone and see.
Then comes the question again from the same people as below:
Hey,
1) I have done accordingly, but really confused regarding File permission though please explain?
2) How to set File Permission?
3) what is rw-r--r-- blah blah i cannot get it? etc.
So this Simple Guide will defenetly help the people with the same.
Let me not go in depth regarding the same,Since this excellent Tutorial from Matt Doyle explain's in more detail about it
Understanding File Permissions- by Matt Doyle
In order to set the file permission all you need is to have Root explore/Browser or similar type of File manager app been installed on your phone, with Root access.
when you open the File manager you see all your files and folder listed there, thats not our main concern, but something below each one of those file's or folder's, what we are really interested in like:
under say Data folder you see something like 'rwxrwx--x' which is of real concern here.
when you long press on the same Data Folder a pop appears as below
Fig 1
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
and when you select Permissions in that pop up menu it appears as below.
Fig 2
as you can see in the pic above the permission is set to 'rwxrwx--x' (771 according to Table below)
So in order to set the right Permission for a file, after you have copied the file to the relavent folder, all you have to follow is the below steps and also the Table guide below it.
1)Any File Manager app like Root Explorer/Browser,Es-file explorer installed with root access (Do ensure to Mount as R/W (Read/Write)).
2)Find the File which you have copied to the appropriate Folder for which you have to set Permissions with the above installed file manager app.
3) Long press on the file to open a pop up menu as shown in Fig 1 above.
4)Set Permission accordingly ( been suggested by people for you) using the table guide below as reference.
5) Then reboot your phone for the same (Permission set) to take effect.
Table Guide for Reference
----------------------------------
No- Box is Unchecked, Yes- Box Checked
So, for example:
777 is the same as rwxrwxrwx
755 is the same as rwxr-xr-x
666 is the same as rw-rw-rw- and so on.
I do hope this Guide will come in handy to all those people who want to set filepermission, but need some clarity upon the same.
All Credit to Matt Doyle for his Excellent Tutorial on 'Understanding File Permissions' which being an inspiration for me to make this Guide.
And also like to Thank the XDA for this wonderfull Knowledge based Site.
All constructive Comments to improve the same by my fellow Member's are Welcome
Click to expand...
Click to collapse
Credits:
Sun90
Matt Doyle

Even this needs a tutorial?
Sent from my GT-I9500 using Tapatalk

All files permissions will be automatically Set after a Reboot
Sent from my GT-S5360 using Tapatalk 2

shyamSGY said:
All files permissions will be automatically Set after a Reboot
Sent from my GT-S5360 using Tapatalk 2
Click to expand...
Click to collapse
Sometimes that doesn't work. You can always use fix permission in cmw
Sent from my GT-I9500 using Tapatalk

xXx~~~SHLOK~~~xXx said:
Even this needs a tutorial?
Sent from my GT-I9500 using Tapatalk
Click to expand...
Click to collapse
Sometime it needed ..

at least we must respect him as he already share this to some of beginner members

Related

[MOD][KE7] Gingerbread Stock 1% Battery - May 22nd

Opening this new thread, because the other one got way too crowded with many different files and modifications.
It's only a small mod and is based on pendos gingerbread battery modification, which he posted here: http://forum.xda-developers.com/showpost.php?p=13659496&postcount=71
Thanks for providing them.
So this is basically a stock-battery-indicator with the percentage numbers added and the charging animation being smoother. No CRT effect, no other icons changed.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Note: THIS IS FOR KE7 ONLY!
Note 2: Backup the old file and activate USB-Debugging. Just in case ...
Install instructions
with ADB:
Code:
adb remount
adb shell stop
adb push framework-res.apk /system/framework/
adb shell chmod 644 /system/framework/framework-res.apk
adb shell start
with root explorer:
Code:
1. copy new framework-res.apk to /system/
2. change file permissions to rw-r--r-- (should be the same as for all files in system/framework -> check it!)
3. move new framework-res.apk to /system/framework/ and replace the old one
4. reboot
Copy your old framework-res.apk before doing anything, so you can go back if something goes wrong. You might encounter 2 or 3 force closes when replacing the framework. Click them away, finish the process (if you havn't already) and reboot the device. Everything should be fine from there on.
For me it works. Thank you!!
did not work on me,could not install it,got KE7
possible to integrate the crt effect as well? Thanks..
Thanks man it worked for me
How to install it???
I run it from "Root Explorer" and it says "application not installed"...
Do i have to copy it over the original "framework-res"???
Great thread, the other one "Greener SystemUI.apk" got way too messy. This could be a lot easier thread to look out for, given that people keep this strictly for the battery mods.
Any chance we could get a step by step guide for installing these mods in the first post?
jokuvuan said:
Great thread, the other one "Greener SystemUI.apk" got way too messy. This could be a lot easier thread to look out for, given that people keep this strictly for the battery mods.
Any chance we could get a step by step guide for installing these mods in the first post?
Click to expand...
Click to collapse
Totally agree!!! Please, give us a step by step instructions!!!
I will post a step by step guide tomorrow ... need to go to bed now.
enkkei said:
How to install it???
I run it from "Root Explorer" and it says "application not installed"...
Do i have to copy it over the original "framework-res"???
Click to expand...
Click to collapse
I use Root Explorer to do all of this. Make sure you give yourself R/W to /system/framework & don't use the " "'s.
1. Copy Chalid's file to MicroSD card (you don't have to copy to your MicroSD, you can copy to sdcard if you want)
2. go to /system/framework & rename "framework-res.apk" to "framework-res.apk.old" (don't panic if you get some FC for some running apps)
3. go to /sdcard/eternal_sd & move "framework-res.apk" to /system/framework (don't panic if you get some FC's .......)
4. reboot
5. enjoy
remember to change the permission's to mimic the original "framework-res.apk".
Hi, worked for me but lost all my contacts. It seems that this process removes the Google sync account. After re-syncing all is well. Thanks!
Can this also been made for KE2?
I wanted to try pendos tutorial using adb on my pc:
adb remount
adb shell stop
adb push framework-res.apk /system/framework/
adb shell start
I've already copied my original framework-res.apk to sd card as backup. When I type adb devices it gives my serial number as expected, but when I type in adb remount it says operation not permitted.
I've already flashed ke7 and rooted using chainfires kernel which is all working without any problems. Any suggestions?
Sent from my GT-I9100 using XDA App
alexmw said:
Hi, worked for me but lost all my contacts. It seems that this process removes the Google sync account. After re-syncing all is well. Thanks!
Click to expand...
Click to collapse
Without a valid framework-res.apk in /system/framework/, even for a couple of seconds you spend renaming the files, the google account syncs will be deleted. So better replace the file right from the beginning and backing up the old before that, instead of renaming it.
1) I suggest renaming der new one in .new first.
2) copy to /system/framework.
3) check/change permissions of .new
4) rename old one in .old
5) rename .new
ALexander
that way, the google account information will be deleted.
Ignore
101010
Works good. Thanks.
Please help ...
First of all: I am totally new in the world of Andriod.
I have not followed the instructions and now my SGS2 doesn't reboot. It got stuck on the Samsung Galaxy SII screen.
What have I done:
renamed original framework-res.apk to framework-res.apk.bak
(I FORGOT to copy the new framework-res.apk to /system/framework )
reboot SGS2
it got stuck on first screen
What can I do now??? Can someone please help me out? Thx
Decided to buy root explorer and it worked perfectly! Thanks

[SCRIPT] shellpaste v0.4

This is a handy little shell script I wrote today that I used to copy files to /system/app folder. This is the first thing I ever wrote for Android so I don't know if anyone has any use for this but there ya go.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
To use simply download the shellpaste.txt from below and rename it to shellpaste.sh. Put the file in the root of your SD card then go to android terminal and type the following:
Code:
sh /sdcard/shellpaste.sh
Changelog:
Code:
shellpaste v0.4
-now supports all folders not just /system.
-added chmod to actually make it useful. Thanks Tigger31337.
shellpaste v0.3
-cleaned up the code a bit.
shellpaste v0.2
-first release.
Thanks man this is very helpful for the things I do. Cheers.
-rezo609
Awesome! Hope it serves you well.
small scripts, medium tricks, big handy
Does this address permissioning after the file(s) are copied?
No offense, but yours seems like a rather convoluted method when you've got things like adb push or just drag and drop from the PC. If the apk is already on your phone, then you need only do a cut and paste to /system (with, say, Root Explorer) and then set permissions. Done.
Also, it's not very flexible. What if I want to copy to /data? Another script??
None taken. The script changes the permissions to r/w, copies the file, then changes it back to read-only. As I said, this was just a script I wrote to help me with what I needed to do at the time. Maybe I'll write a new version that supports any folder the user chooses.. I agree, it's not exactly an elegant solution but I'm a complete noob at this. You gotta start somewhere, right?
Edit: Also, I am completely open to feature suggestions. So if there's anything more advanced you guys would like to see in newer versions feel free to post. I'm using this as a tool to learn as much as possible.
Sent from my htc wildfire s a510e using XDA
I don't mean permissions at the f/s mount level, I mean permissions at the file level (i.e. chmod).
If you're copying an apk to /system/app, then eventually you'll need to chmod it to 644 before it will execute properly. Maybe I'm missing something, but copying an apk from SD card to /system isn't going to do this for you automatically.
I have a suggestion to your script
Example: I pushed a systemUI.apk in system/app folder through adb now when you look at your phone the statusbar dissappears, of course because of push, now can you make a script to rerun the apk or execute it, like mounting it dunno the exact word, so that you won't have to reboot your phone to see your statusbar again, instead just run it like windows run. This is usefull if your modding the APK.
Gotcha. Completely forgot about chmod.
I'll try to make it reinstall the systemui.apk without rebooting but could use some pointers on how to achieve this.
Edit:
Made a new version that supports mounting of all folders and added chmod into the mix. Should work properly now.
einstein.frat said:
I have a suggestion to your script
Example: I pushed a systemUI.apk in system/app folder through adb now when you look at your phone the statusbar dissappears, of course because of push, now can you make a script to rerun the apk or execute it, like mounting it dunno the exact word, so that you won't have to reboot your phone to see your statusbar again, instead just run it like windows run. This is usefull if your modding the APK.
Click to expand...
Click to collapse
I've never used android scripts before but I'm guessing you could just do
exec /system/app/whatever.apk
But idk on that one.
Sent from my HTC Wildfire S A510e using xda premium
einstein.frat said:
I have a suggestion to your script
Example: I pushed a systemUI.apk in system/app folder through adb now when you look at your phone the statusbar dissappears, of course because of push, now can you make a script to rerun the apk or execute it, like mounting it dunno the exact word, so that you won't have to reboot your phone to see your statusbar again, instead just run it like windows run. This is usefull if your modding the APK.
Click to expand...
Click to collapse
I do exactly this on the WildChild ROM, using pm disable/enable.
It's a method I came up with by myself (so, it's not very elegant but it gets the job done ). There might be other ways of doing it, but I haven't seen any yet.

Obtaining Write Access Over Root Files

I have a Galaxy S3 L710, Rooted, using the PAC Man v19.9.0 ROM and a certain kernel. I am having trouble obtaining write access over root/system files. Basically, I am trying to edit init.d files, but whenever I try to save them within Script Manager or ES File Explorer, I get "Permission Denied."
I have enabled Root Explorer in ES File Explorer and I checked the "Mount File System" box but I still cannot properly save system files. Can anyone help? Has anyone experienced this before and found a way around it?
Check to make sure ES has been granted SU permissions in your SU app.
flonker said:
Check to make sure ES has been granted SU permissions in your SU app.
Click to expand...
Click to collapse
Yup, it has SU permissions.
Well you could work around it...
Copy the init.d file to your sdcard, change it, and then replace the original init.d file
Sent from my PG06100
You can long press whatever file your trying to edit and you'll get this.
Random file of mine btw.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Scroll to the bottom and hit properties, and you get this.
Click on change, and you'll get this.
You can select read, write, execute.
Sent from a planet far far away.
Well I have kind of the same Problem, Please bare over with me im a n00b at this. I have file i need to get into Init.d folder and when i try and copy to it, it allso comes with the Permission Denied. What i did was I installed ES Exploere and Universal init.d. I then vent into ES anc Clicked Root and accepted SU request. then i vent to my Download folder and log pressed on the file i wanted to copy into the init.d folder and pick copy to and showed the location of the Folder and clicked OK it comes with Permission denied!. Then i check the Permission on the Init.d folder and it has RWX RWX RWX in the Permissions so i guess its OK. so can someone please explain me what i do wrong, I allso tried to make a folder or a file in the init.d same Problem permission denied. I dont have a spare SSD card or anything so i cant try and move it around as someone explained above.
Es file explorer doesn't come with write authority enabled it is set to default read only. You have to go into the settings of ES File Explorer and set the 'write' option on.
I prefer Root Explorer but ES will do the job when set up correctly.
Remember search is your best friend, Have a great day!
Extensions and Permissions
edfunkycold said:
Es file explorer doesn't come with write authority enabled it is set to default read only. You have to go into the settings of ES File Explorer and set the 'write' option on.
I prefer Root Explorer but ES will do the job when set up correctly.
Remember search is your best friend, Have a great day!
Click to expand...
Click to collapse
Thank you i have just bought the Root Explorer and have copied into /etc/init.d/ and what kind of extension should the file have to be come executed when the system startsup? and whats the Permissions required?

[How To] Permanent Chrome or Chrome Beta Desktop View

Root is required. This will enable full time desktop view in Chrome or Chrome Beta. I do not take credit for making this mod, it's something I've been using for quite a while and thought others might enjoy it. Just move the attached file into data/local (not the data folder in internal storage but the system folder). Make sure the file is named "chrome-command-line" without any file extension or quotes. Change permissions to: rw- r-- r-- and then reboot.
If you are using ES File Manager turn on Root Explorer and Show Hidden Files by hitting the button on the top left. Then hit the drop down menu and select "device" then you should see the data folder.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
https://app.box.com/s/6273nx14o6p05w9529tt
trying this out, whats the rw, r, r mean
downhillvinnie said:
trying this out, whats the rw, r, r mean
Click to expand...
Click to collapse
Change the permissions to:
Owner: RW-
Group: R--
Others: R--
Its not working for me . hmmm
airmaxx23 said:
This will enable full time desktop view in Chrome or Chrome Beta. I do not take credit for making this mod, it's something I've been using for quite a while and thought others might enjoy it. Just move the attached file into data/local and change permissions to: rw- r-- r-- and then reboot.
https://app.box.com/s/6273nx14o6p05w9529tt
Click to expand...
Click to collapse
Works great thanks for sharing
how the heck did you do it LOL
I'm having no luck. wiped chrome and followed instructions. Do I need to change the permission of the local folder or just the file?
Sent from my SM-N900V using XDA Premium 4 mobile app
sooner2k1 said:
I'm having no luck. wiped chrome and followed instructions. Do I need to change the permission of the local folder or just the file?
Sent from my SM-N900V using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Just place it in data/local, change the file permissions (not the folder) and reboot.
Must be some other variable throwing mine off. Doesnt seem to work.
Sent from my SM-N900V using XDA Premium 4 mobile app
sooner2k1 said:
Must be some other variable throwing mine off. Doesnt seem to work.
Sent from my SM-N900V using XDA Premium 4 mobile app
Click to expand...
Click to collapse
I've never had an issue doing this on several different devices for people over the last year or so. Are you sure you're putting it in the proper folder and changing the permissions correctly? I updated the OP with a pic of the permissions.
how are you getting to that file location?
downhillvinnie said:
how are you getting to that file location?
Click to expand...
Click to collapse
Root Explorer and another file manager.
I have es file manager find data folder and open, all I have is a file named IMS
downhillvinnie said:
I have es file manager find data folder and open, all I have is a file named IMS
Click to expand...
Click to collapse
You're looking in storage (internal sd) and not in the system files. Turn on Root Explorer and Show Hidden Files in ES File manager, then hit the drop down menu and select device then you should see the data folder.
ok did it still doesnt work
downhillvinnie said:
ok did it still doesnt work
Click to expand...
Click to collapse
You rebooted? I've never seen this not work before.
DOH! Rebooted and works awesome....Sorry and thanks! Much better:good:
downhillvinnie said:
DOH! Rebooted and works awesome....Sorry and thanks! Much better:good:
Click to expand...
Click to collapse
Good to hear, you had me worried...lol
this is something i have been wanting for some time. thanks for posting it!
fletch33 said:
this is something i have been wanting for some time. thanks for posting it!
Click to expand...
Click to collapse
+1 thanks!

No folders "writable" according to titanium backup

I just gained s-off after rooting, have gigs of space everywhere, super user this, super su that, busy box(why all these apps anyway?)... All other apps can write wherever, now that I'm rooted. Anywhere is settings it looks for folders to save backups says folder isn't writable. I have no custom rom yet as I've not backed anything up. Googled this but apparently I'm the only person in the world with this doozy. Any ideas?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
juntjoo said:
I just gained s-off after rooting, have gigs of space everywhere, super user this, super su that, busy box(why all these apps anyway?)... All other apps can write wherever, now that I'm rooted. Anywhere is settings it looks for folders to save backups says folder isn't writable. I have no custom rom yet as I've not backed anything up. Googled this but apparently I'm the only person in the world with this doozy. Any ideas?
Click to expand...
Click to collapse
Navigate to /system/etc/permissions
Edit platform.xml and find the WRITE_EXTERNAL_STORAGE
Add this <group gid="media_rw" />
Save the changes and reboot.
DONE
Use RootExplorer to do that. Or other app like RootExplorer.
Thanks. Interestingly, that entry was already there. This is what happened next with es explorer:
then with root explorer:
Hmm... Thanks a lot tho for replying. We're getting close. I can feel it
juntjoo said:
Thanks. Interestingly, that entry was already there. This is what happened next with es explorer:
then with root explorer:
Hmm... Thanks a lot tho for replying. We're getting close. I can feel it
Click to expand...
Click to collapse
Do you have root? Busybox installed ? If not flash SuperSU update and busybox. Both are flashable zip's. Just look for SuperSU update.zip and Busybox.zip
Yes I've root. I'll try again, but I will note that I had those but since they didn't help with TB I just uninstalled them, and remember, that code already is there. So I don't know what there is to try next.
When you want to delete files with es you need to set root permissions in the app itself.
Tools - set root on - also tap it once to enable the R/W rights
Looks like this :
Mr Hofs said:
When you want to delete files with es you need to set root permissions in the app itself.
Tools - set root on - also tap it once to enable the R/W rights
Looks like this :
Click to expand...
Click to collapse
Thanks but my goal is to be able to get TB to save anywhere
Mx player displayed that message about kit Kat not allowing it to delete files too.
juntjoo said:
Mx player displayed that message about kit Kat not allowing it to delete files too.
Click to expand...
Click to collapse
Flash this via recovery. CLICK HERE
Titanium backup won't write anywhere, not on phone either. If this is ext sd specific, should it apply here?
juntjoo said:
Titanium backup won't write anywhere, not on phone either. If this is ext sd specific, should it apply here?
Click to expand...
Click to collapse
Just flash that.
Okay, will try. Thanks. ...
Omg, you're a life saver. I was literally figuratively about to pull the trigger
juntjoo said:
Omg, you're a life saver. I was literally figuratively about to pull the trigger
Click to expand...
Click to collapse
So it worked. Good.
XSL-FO said:
So it worked. Good.
Click to expand...
Click to collapse
Yeah at least now he can stop flooding the forums with his n00b rage.
Yes, thank you a lot. And others who contributed. And sorry for my "noob rage" lol. HTC should have this info and post it. Even if they aren't responsible for it they should take some.

Categories

Resources