ADB Shell giving bad mode when executing chmod (under su)

Comic Sans MS Lover picture Comic Sans MS Lover · Feb 15, 2012 · Viewed 31.1k times · Source

I'm having an issue related to the Android ADB Shell. When I try to execute the command chmod he gives me a "Bad Mode". I don't get it why. I'm sure I'm executing under "su", as represented by the '#'. Anyone have any idea why this is happening, and how to make it work? Thanks in advance.

chmod o+rw /dev/ttyS1

Answer

shellter picture shellter · Feb 15, 2012

Bad mode means the permissions on the file are not set correctly, and some versions of chmod don't understand the o+rw notation. All chmods understand octal notation, where 6=read/write, so try

 chmod 666 /dev/ttyS1

I hope this helps.