Follow these steps to build the application, install it on your Android device, and monitor the plugin logs.
1. Build the application
pnpm tauri android build --debug
2. Install the APK
Use adb to install the generated APK. Note that the path may vary based on your local setup.
adb -s "$ADB_SERIAL" install -r /Users/s00d/packeges/tauri-plugin-serialplugin/examples/serialport-test/src-tauri/gen/android/app/build/outputs/apk/universal/debug/app-universal-debug.apk
3. Launch the application
Force stop the existing package and start the main activity:
adb -s "$ADB_SERIAL" shell am force-stop com.serialport.test
adb -s "$ADB_SERIAL" shell am start -n com.serialport.test/.MainActivity
4. Monitor logs
Important: All Rust plugin logs are sent to the SerialPlugin tag, not RustStdout. Use the following command to view them:
adb -s "$ADB_SERIAL" logcat -c
adb -s "$ADB_SERIAL" logcat -v time -s UsbFdBridge SerialPlugin Console
pnpm tauri android build --debug
adb -s "$ADB_SERIAL" install -r /Users/s00d/packeges/tauri-plugin-serialplugin/examples/serialport-test/src-tauri/gen/android/app/build/outputs/apk/universal/debug/app-universal-debug.apk
adb -s "$ADB_SERIAL" shell am force-stop com.serialport.test
adb -s "$ADB_SERIAL" shell am start -n com.serialport.test/.MainActivity
adb -s "$ADB_SERIAL" logcat -c
adb -s "$ADB_SERIAL" logcat -v time -s UsbFdBridge SerialPlugin Console