Power & Source of Big Ideas

Android 5.1 UART problem

Moderators: chensy, FATechsupport


I have a NanoPi M2 and M3 work with Android 5.1 ...

I test example programs from GitHub (https://github.com/friendlyarm/AndroidHardwareAccess)

but SerialPortDemo not working and said "Fail to open /dev/ttyAMA2!" (ttyAMA2 for UART 3) ...

in Android 4.4 error not appear but it's not working

how can i use UART in Android 5.1 or Android 4.4
I wonder if this is to do with policies as I see the same issue on my T3 and M3 boards running Android 5.1 when trying to use ttyUSB2 with a modem plugged in.

Try this from either ADB shell or from the UART as root (type su first)


That should disable the policies until the next boot. See if your serial port now works.

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 47 on Wed Feb 21, 2018 7:00 am

Users browsing this forum: No registered users and 1 guest