TopRank Skills

Home / Claw Skills / 其他 / android-transfer-secure
Official OpenClaw rules 15%

android-transfer-secure

Securely transfers files from macOS to Android with checksum verification and path validation.

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 android-transfer-secure 技能。 若已安装,则直接安装 android-transfer-secure 技能。

Overview

Skill Key
aadipapp/android-transfer-skill
Author
tempguest
Source Repo
openclaw/skills
Version
0.1.0
Source Path
skills/aadipapp/android-transfer-skill
Latest Commit SHA
a8e6c3f7484c56d14bd56bedc600ce35f786cb8f

Extracted Content

SKILL.md excerpt

# Secure Android File Transfer

This skill allows you to transfer files to an Android device with high security standards:
- **Checksum Verification**: Ensures data integrity by comparing SHA256 hashes.
- **Path Validation**: Prevents directory traversal and unauthorized path access.
- **Overwrite Protection**: Prevents accidental data loss on the device.

## Commands

- `transfer`: Push a file to the connected Android device.

README excerpt

# Secure Android File Transfer Skill

This skill provides a **secure** way to transfer files from your Mac to an Android device.

## Security Features
1.  **Checksum Verification**: Calculates SHA256 hash locally and remotely to ensure perfect file integrity.
2.  **Overwrite Protection**: Will NOT overwrite existing files on the phone unless you force it.
3.  **Path Sanitization**: Blocks directory traversal attempts (e.g. `../`) to prevent accessing unauthorized files.
4.  **Device Authorization**: Verifies the device is authorized before attempting transfer.

## Prerequisites

- **Android Debug Bridge (adb)**: Must be installed.
    - Install via Homebrew: `brew install android-platform-tools`
- **USB Debugging**: Must be enabled on your Android phone (Settings > Developer Options).
- **Authorization**: When you plug in the phone, tap "Allow" on the "Allow USB debugging?" prompt.

## Usage

### Transfer a file
```bash
python3 scripts/secure_transfer.py /path/to/local/file.jpg
```
*Transfers to `/sdcard/Download/` by default.*

### Specify destination
```bash
python3 scripts/secure_transfer.py myfile.txt --dest /sdcard/Documents/
```

### Force overwrite
```bash
python3 scripts/secure_transfer.py myfile.txt --force
```

## Troubleshooting
- **"adb not found"**: Run `brew install android-platform-tools`.
- **"No authorized Android device found"**: Check your USB cable and unlock your phone to accept the authorization prompt.
- **"checksum mismatch"**: The transfer was corrupted. The script automatically deleted the partial file. Try again.

Related Claw Skills