[Development] [QtSerialPort] Porting to Android

Denis Shienkov scapig2 at yandex.ru
Thu Aug 1 22:00:01 CEST 2013

01.08.2013 23:02, Thiago Macieira пишет:
>> As far as I know, you don't need JNI to access sockets and files,
>> that's done through the NDK.
> Right. Android is just Linux, albeit using a bastardised and broken libc. If
> we want to open files, we open files. If we want to open a socket, we do it.
Means how I understand, JNI is necessary to export only C/C++ code 
"upward" to Dalvik VM
(i.e. that it was possible to use Java a code)?

I.e. in our case, in principle, the Java there is no need for us and we 
can use "direct access"
to Linux layer's ABI?

> Worst case scenario is that we have to ask via JNI the permission to open
> certain files or to connect sockets to certain hosts. But I don't know how the
> Android security system works, so I can't give you a full answer.
I too am afraid of it.
Because it is probable to /dev/ttyXXX access will be necessary Root 

>> For graphics, the Android QPA plugin is on
>> qtbase/src/plugins/platforms/android.
> The assets file engine that we're discussing in another thread is also there.

Sory, "there" means in QPA plugin?

UPD, good news:

I was able to quickly compile QtSerialPort (without /examples and 
without /tests of subdirectories) on Qt4.8.2
with use "windows-online-necessitas-alpha4.1-sdk-installer.exe" on Win8 
For this purpose it was necessary to comment out two lines in 
Now need try to check work on the real device with ARMv6.

This good start... :)

Best regards,

More information about the Development mailing list