CatShare
1.6 · GitHub
More about this app
Send and receive files over Bluetooth
CatShare
类原生 & 海外设备,现已加入互传联盟。
Android 目前已不再支持非系统应用获取手机的 MAC 地址等无法重置的序列号,但由于各品牌的互传功能通常为系统应用,互传联盟协议将设备的 MAC 地址作为其认证信息的一部分。本应用提供以下方案获取 WiFi Direct P2P 接口 (p2p0) 的 MAC 地址:
MAC 地址获取方案(按优先级)
- 手动配置 - 在设置中手动输入设备的 MAC 地址,可使用命令获取:
adb shell ip addr show p2p0(设备待机和发起传输时 MAC 地址可能不同,需注意抓取发起传输时的 MAC 地址) - 系统权限 - 设备已授予
android.permission.LOCAL_MAC_ADDRESS权限,例如 App 已由系统签名的情况。 - Shizuku / Root - 通过提升权限的方式自动获取
⚠️ 已知事项
- 部分 Samsung 设备的 WiFi Direct MAC 地址可能会周期性变动,该情况下手动配置无效
本 App 的 GitHub Release 和 F-Droid 版本签名一致, F-Droid 版本可能相对滞后,可以任意选择。
功能
- 蓝牙发现
- 文件接收
- 文件发送(需要正确配置 MAC 地址,可通过手动输入、系统权限或 Shizuku 获取)
- 文本传输(两侧均为 CatShare 时复制至剪贴板,接收方为其他设备时以文本文件形式发送)
支持设备(已测试)
| 品牌 | 向该设备发送 | 从该设备接收 |
|---|---|---|
| 小米 | Y | Y |
| OPPO/一加等 | Y | Y,但发送端提示接收失败 |
| vivo | Y | Y |
汇报问题
你可以在该项目的 issue 区汇报你在使用 CatShare 期间遇到的问题,尽量的,请附上 CatShare 的 adb logcat 日志。
通过该命令获取 CatShare 的日志。
release(正式版)
shell(linux)
adb logcat --pid $(adb shell pidof -s moe.reimu.catshare)
cmd(windows)
for /f "tokens=1" %i in ('adb shell pidof -s moe.reimu.catshare') do adb logcat --pid %i
debug(测试版)
shell(linux)
adb logcat --pid $(adb shell pidof -s moe.reimu.catshare.debug)
cmd(windows)
for /f "tokens=1" %i in ('adb shell pidof -s moe.reimu.catshare.debug') do adb logcat --pid %i
<details>
<summary>Details</summary>
```
在此处填入日志内容,注意其应被包裹在反括号代码块内
```
</details>
How Shizuku is used
Can send and receive files over Bluetooth and Wi-Fi Direct by reading the Wi-Fi Direct MAC address via `NetworkInterface.getHardwareAddress` in a Shizuku user service.
This is an AI-assisted analysis of Shizuku-related usages in the app's public source code. It is best effort, so it may not catch every single usage.
How this app uses Shizuku
CatShare uses Shizuku only to learn the real Wi-Fi Direct hardware address needed to set up direct file transfers.
- Advertise for receiving: when discoverable mode is turned on, the real Wi-Fi Direct address read through Shizuku is shared over Bluetooth so nearby senders can find and connect to this device.
- Connect for sending: when sending files to a discovered device, the real Wi-Fi Direct address read through Shizuku is sent over Bluetooth to the receiver to establish the direct Wi-Fi connection for the transfer.
Android APIs or commands used
java.net.NetworkInterface.getNetworkInterfacesjava.net.NetworkInterface.getHardwareAddress
Notable details
If the system already allows reading the address, the app reads it directly without Shizuku. Without Shizuku and without that access, it falls back to a placeholder address.
Changelog
What's new for version 1.6
- 支持使用
LOCAL_MAC_ADDRESS权限获取 MAC 地址(需要转为系统应用) - 修复低版本下需申请后台位置权限 #30
- 新增黑白图标
Permissions
20 permissions requested
Sources
2 sources
Sources
2 sources


