S
S
Sam2016-12-02 11:55:39
Android
Sam, 2016-12-02 11:55:39

How to remount FS for writing (RW) from an android application? Or how else to write to a serial port like /dev/ttyS0?

I have been suffering for a long time trying to learn how to work with a COM port from an android application. In Windows and Linux, this is much easier to do thanks to JSSC, and there are almost no solutions for Android. usb-serial-for-android doesn't even find the list of ports, and android-serialport-api just like JSSC doesn't even start before Android 5 due to the fact that for some reason in the native module methods using "termios.h" are not recognized. Perhaps it is not in the stripped-down core of the anroid.
And so I decided to write everything from scratch, but even zero does not come out.
If the command in the shell "echo 1234 > /dev/ttyS0" works well, the port receives a string, then I can't work with the port as a file, it says that there is no access:
Reason: open failed: EACCES (Permission denied)
At the same time, the device is rooted, I can even read from / system (I can't write).

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
CityCat4, 2016-12-02
@CityCat4

Rooted exactly? Generally speaking, Permission denied means the lack of rights to perform the operation...

A
aol-nnov, 2016-12-02
@aol-nnov

/dev/ttyS0, all of a sudden, is not on any fs.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question