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

Issue

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

Solution

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.

Answered By – shellter

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published