It's the original reference project from Android 模拟器串口与PC虚拟串口通讯 - CSDN博客
Fork project android-serialport-api-demo to android-stm32-uart-command and add CommandActivity.java to implement STM32 bootloader USART command protocol.
图为:CommandActivity UI
-
put STM32_Robot.bin to /sdcard
adb push STM32_Robot.bin /sdcard/STM32_Robot.bin
-
app sign platform key
- put "android.stm32.uart" folder into AOSP/packages/app/
- entry path "AOSP/package/app/android.stm32.uart", then run command
mm -j4
- app signed platform key will be built in "out/target/product/your_device_name/system/app/android.smt32.uart/android.smt32.uart.apk"
- install output android.smt32.uart.apk