feat: add Android USB serial port support via USB Host API

- Add USB Host permissions and device filter to AndroidManifest.xml
- Create UsbSerialPlugin Kotlin plugin for USB Host API (enumerate, permission, open devices)
- Add serial_connect_fd command for Android to accept USB file descriptors
- Create RawFdStream wrapper for async I/O on raw file descriptors
- Make run_serial_with_poll generic over AsyncRead+AsyncWrite
- Register UsbSerialPlugin in MainActivity
This commit is contained in:
lenn
2026-05-11 20:31:46 +08:00
parent 7323021aec
commit 551022215c
13 changed files with 535 additions and 16 deletions

View File

@@ -0,0 +1,9 @@
{
"plugins": {
"usb-serial": {
"android": {
"package": "com.lenn.tauri_serial.UsbSerialPlugin"
}
}
}
}