An Android FTP client with zero external dependencies. Supports command-line upload via
adband a built-in GUI file manager.
- Adb CLI: Upload files via
adb shell am start(bypasses Android 12+ background restrictions) - GUI File Manager: Browse, delete, upload, and create folders on remote FTP server
- Zero Dependencies: Pure socket-based FTP implementation, no third-party libraries
- Fully Offline Build: All dependencies are cached locally, no network required
./gradlew assembleDebugAPK: app/build/outputs/apk/debug/app-debug.apk
adb install app/build/outputs/apk/debug/app-debug.apkAndroid 11+ requires the "Manage all files" permission to access /sdcard/.
Run the upload command (see below) → a dialog will pop up → tap "Go to Settings" → enable "Allow management of all files".
Or manually: Settings → Apps → FTP Client → Permissions → Files and media → Allow management of all files.
ftp_upload.bat <server_ip> <file_path> [port] [username] [password] [remote_path]Example:
ftp_upload.bat 192.168.3.200 /sdcard/textftp.txt 21 administrator "your_password" /test/textftp.txtWindows (must quote the entire command):
adb shell "am start -n com.ftpclient/.FtpProxyActivity --es server_ip 192.168.3.200 --ei server_port 21 --es username administrator --es password your_password --es file_path /sdcard/textftp.txt --es remote_path /test/textftp.txt"Linux / macOS:
adb shell am start -n com.ftpclient/.FtpProxyActivity --es server_ip "192.168.3.200" --ei server_port 21 --es username "administrator" --es password "your_password" --es file_path "/sdcard/textftp.txt" --es remote_path "/test/textftp.txt"Open the app → tap "FTP File Manager" → enter server info → connect.
Features:
- Browse directories and files
- Tap folder to enter, navigate back
- Long press → delete
- Tap "Upload File" → pick local file → upload to current directory
- Tap "New Folder" → create a directory
| Parameter | Description | Required | Default |
|---|---|---|---|
server_ip |
FTP server address | Yes | - |
server_port |
FTP server port | No | 21 |
username |
FTP username | No | anonymous |
password |
FTP password | No | anonymous@ |
file_path |
Local file path | Yes | - |
remote_path |
Remote target path | No | file name (root) |
| Component | Description |
|---|---|
FtpProxyActivity |
Transparent proxy activity, starts service then finishes instantly |
FtpService |
Foreground service, executes FTP upload, shows notification |
FtpReceiver |
BroadcastReceiver (alternative start method) |
FtpBrowserActivity |
GUI file manager (browse, delete, upload) |
SimpleFtpClient |
Pure socket FTP client (LIST/DELE/RMD/STOR/CWD/MKD/PWD/CDUP) |
INTERNET— auto grantedMANAGE_EXTERNAL_STORAGE— Android 11+, required for/sdcard/accessFOREGROUND_SERVICE_DATA_SYNC— Android 12+, required for foreground servicePOST_NOTIFICATIONS— Android 13+, required for notification
- Adb 命令行上传:通过
adb shell am start启动 FTP 上传(绕过 Android 12+ 后台限制) - 图形文件管理器:浏览、删除、上传、新建文件夹
- 零外部依赖:纯 Socket 实现 FTP 协议,无需第三方库
- 完全离线编译:所有依赖均已本地缓存,无需网络
./gradlew assembleDebugAPK 路径:app/build/outputs/apk/debug/app-debug.apk
adb install app/build/outputs/apk/debug/app-debug.apkAndroid 11+ 需要授予「文件管理」权限才能访问 /sdcard/ 目录。
执行上传命令后,设备上会弹出权限申请对话框,选择「去设置」→ 开启「允许管理所有文件」。
或手动设置:系统设置 → 应用管理 → FTP 客户端 → 权限 → 文件和媒体 → 允许管理所有文件。
ftp_upload.bat <服务器IP> <文件路径> [端口] [用户名] [密码] [远程路径]示例:
ftp_upload.bat 192.168.3.200 /sdcard/textftp.txt 21 administrator "你的密码" /test/textftp.txtWindows(必须用引号包住整个命令):
adb shell "am start -n com.ftpclient/.FtpProxyActivity --es server_ip 192.168.3.200 --ei server_port 21 --es username administrator --es password 你的密码 --es file_path /sdcard/textftp.txt --es remote_path /test/textftp.txt"Linux / macOS:
adb shell am start -n com.ftpclient/.FtpProxyActivity --es server_ip "192.168.3.200" --ei server_port 21 --es username "administrator" --es password "你的密码" --es file_path "/sdcard/textftp.txt" --es remote_path "/test/textftp.txt"打开 App → 点击「FTP 文件管理器」→ 输入服务器信息 → 连接。
功能:
- 浏览远程目录和文件
- 点击文件夹进入,返回上级目录
- 长按 → 删除
- 点击「上传文件」→ 选择本地文件 → 上传到当前目录
- 点击「新建文件夹」→ 创建目录
| 参数 | 说明 | 必填 | 默认值 |
|---|---|---|---|
server_ip |
FTP 服务器地址 | 是 | - |
server_port |
FTP 服务器端口 | 否 | 21 |
username |
FTP 用户名 | 否 | anonymous |
password |
FTP 密码 | 否 | anonymous@ |
file_path |
本地文件路径 | 是 | - |
remote_path |
远程目标路径 | 否 | 文件名(根目录) |
| 组件 | 说明 |
|---|---|
FtpProxyActivity |
透明代理 Activity,启动服务后立即销毁 |
FtpService |
前台服务,执行 FTP 上传,通知栏显示状态 |
FtpReceiver |
广播接收器(备用启动方式) |
FtpBrowserActivity |
图形文件管理器(浏览、删除、上传) |
SimpleFtpClient |
纯 Socket 实现的 FTP 客户端 |
INTERNET— 自动授予MANAGE_EXTERNAL_STORAGE— Android 11+,访问/sdcard/必需FOREGROUND_SERVICE_DATA_SYNC— Android 12+,前台服务必需POST_NOTIFICATIONS— Android 13+,通知必需