百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

Android-SerialPort-API

> 编程语言
开源

Fork自Google开源的Android串口通信Demo,修改成Android Studio项目

1.5K stars0 点赞1 次浏览
访问官网GitHub

工具介绍

Fork自Google开源的Android串口通信Demo,修改成Android Studio项目

Android-SerialPort-API

Fork自Google开源的Android串口通信Demo,修改成Android Studio项目

This lib is a fork of the Android serial port communication Demo open sourced by Google.

Installation & Usage

Gradle

添加依赖:

Add the dependency:

allprojects {
    repositories {
        ...
        jcenter()
        mavenCentral() // since 2.1.3
    }
}

dependencies {
        // 传统4KB内存页面版本
        implementation 'com.licheedev:android-serialport:2.1.4'
        // 适配16KB页面版本,https://developer.android.google.cn/guide/practices/page-sizes?hl=zh-cn
        implementation 'com.licheedev:android-serialport:2.1.5'
}

Import

java
import android.serialport.SerialPort;

su path

In order to read/write to a serial port in Android you'll need su binary installed on device (this can be done by rooting the device). Usually Android devices that has the ability to communicate with serial ports have su installed on the default path "/system/bin/su". To change this use:

java
// su默认路径为 "/system/bin/su"
// The default path of su is "/system/bin/su"
// 可通过此方法修改
// If the path is different then change it using this
SerialPort.setSuPath("/system/xbin/su");

Usage

…

实现方式参考

Implementation reference

  1. Check sample project
  2. https://juejin.im/post/5c010a19e51d456ac27b40fc

Issues· 27 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Javaandroidserialport

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言