Essential Android ADB shell edit forum

Changing file permissions using chmod command

Notice, that in order to change file prmissions, your device need to be rooted, su binary doesn’t come with factory shipped devices!

Convention:

adb shell su -c "chmod <numeric-permisson> <file>"

Numeric permission constructed from user, group and world sections.

For example, if you want to change file to be readable, writable and executable by everyone, this will be your command:

adb shell su -c "chmod 777 <file-path>"

Or

adb shell su -c "chmod 000 <file-path>"

if you intent to deny any permissions to it.

1st digit-specifies user permission, 2nd digit- specifies group permission, 3rd digit - specifies world (others) permission.

Access permissions:

--- :   binary value:   000,  octal value: 0 (none)
--x :   binary value:   001,  octal value: 1 (execute)
-w- :   binary value:   010,  octal value: 2 (write)
-wx :   binary value:   011,  octal value: 3 (write, execute)
r-- :   binary value:   100,  octal value: 4 (read)
r-x :   binary value:   101,  octal value: 5 (read, execute)
rw- :   binary value:   110,  octal value: 6 (read, write)
rwx :   binary value:   111,  octal value: 7 (read, write, execute)

Table Of Contents
39 ACRA
64 Menu
112 Loader
119 Xposed
132 Colors
135 Fresco
140 AdMob
147 Button
156 Vk SDK
170 XMPP
176 OpenCV
200 FileIO
203 Moshi
217 Paint
229 ADB shell
231 AIDL
241 JCodec
243 Okio
255 Looper
  ↑ ↓ to navigate     ↵ to select     Esc to close