How To Change File Permissions Through ADB
Gizbeat has come across a situation where a chinaphonearena user is soft-bricked and can’t boot into Android. I believe this is due to the permission settings on the build.prop file.
He can still boot into recovery and is already rooted. So here’s a good chance to write a tutorial on how to change file permissions through ADB should the need arise.
The tutorial will cover this specific situation of doing it through recovery, but the basic premise and commands are the same, so you can do it while you’re booted as well (enable USB debugging if you’re booted already).
Also we’ll be changing the permissions in /system, for which root is required. Changing the permissions of non-system files wouldn’t require root access.
I’ll also just mention that if you can boot into Android, the process is much simpler and can be done with ES Explorer or a similar app.
What you’ll need:
- PDAnet MTK6589 ADB VCOM Drivers
- The latest version of MTK Droid Tools
- A USB Cable to plug your phone into PC
What to Do:
- Install the PDAnet MTK6589 ADB VCOM drivers
- Extract MTK Droid Tools and run it
- Boot into recovery by holding Vol-UP and the power button at the same time
- Connect your phone to PC via USB
- Wait a few seconds and you should see your phone’s info come up on MTK Droid Tools
- In the bottom right corner, you’ll see ‘ADB Terminal’. Click it. A small black program window will open.
- At the prompt, type ‘adb shell’. You should now see either a ‘$’ or a ‘#’. The # means you’re rooted.
- Type ‘cd system’. You should now see ‘/system #’ (SEE NOTES)
- Type ‘chmod 644 build.prop’ (SEE NOTES)
- ‘cd’ stands for ‘change directory’. Replace inside the ‘<>’ with whatever directory you need to be in. Typing ‘ls’ at any point will show you where you currently are at in the phone’s file system and a list of folders and files at your current location. In this particular instance, we need to change a system file, so we type ‘cd system’ to change the directory to /system. Remember this depends where currently are. For example if we’re already navigated to ‘/android/data’ and type ‘cd system’ it will return an error.
- This will depend on what file you want to modify. ‘chmod’ is the command. The number following it is the permission code. Then comes the name of the file you want to modify.
U G W
rwx rwx rwx chmod 777 filename
rwx rwx r-x chmod 775 filename
rwx r-x r-x chmod 755 filename
rw- rw- r-- chmod 664 filename
rw- r-- r-- chmod 644 filename
U = User
G = Group
W = World
r = Readable
w = writable
x = executable
- = no permission
https://gizbeat.com/2103/how-to-change-file-permissions-through-adb/How ToRootTutorialsGizbeat has come across a situation where a chinaphonearena user is soft-bricked and can't boot into Android. I believe this is due to the permission settings on the build.prop file.
He can still boot into recovery and is already rooted. So here's a good chance to write a tutorial on...Damian Parsonshttps://plus.google.com/107879368390224447304
[email protected]AdministratorHi, I'm Damian Parsons. I've been working with Android phones since the first Droid came out. I'm fascinated by computers and technology. My first BBS were ran on an old Apple IIc and Commodore 64. I work hard to bring the latest updates to you every day - without all the boring fluff. Please subscribe to keep up on the newest China tech.
See our forum -> www.chinaphonearena.comGizBeat