Skip to content

zja2004/cliphub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📱 Android Phone as Wireless NAS

English Guide | 中文说明 (Chinese Guide)


📱 Android Phone as Wireless NAS

Turn your old Android phone into a secure, wireless NAS for Windows using Termux, SSH, and Rclone.

Phone to NAS Diagram

This project provides a comprehensive, beginner-friendly guide and automation scripts to mount your Android phone's storage as a local disk (e.g., X:) on Windows over Wi-Fi.

🌟 Features

  • Wireless File Access: Access phone storage like a native Windows drive.
  • Secure: Uses SFTP with SSH Key authentication (no passwords needed).
  • Automated: One-click scripts for connecting and startup.
  • Stealth: Runs silently in the background without annoying windows.
  • No Root Required: Works on standard Android phones.

📋 Configuration Parameters

These are the default assumptions used in this guide. You may need to change them based on your setup.

Parameter Value Description
Phone IP 192.168.1.xxx Local IP of your phone (Static IP recommended).
SSH Port 8022 Default Termux SSH port.
Username u0_aXXX Your Termux username (changes per device).
Mount Drive X: The drive letter on Windows.
Shared Path ~/storage/shared/NAS The directory on phone to share (maps to /sdcard/NAS).

🚀 Quick Start (Min Path ~10 mins)

  1. Phone Setup: Install Termux & enable SSH.
  2. Windows Setup: Install WinFsp & Rclone.
  3. Keyless Entry: Setup password-less login.
  4. Mount Drive: Configure Rclone and assume control.
  5. Auto-Start: Make it run automatically when you turn on your PC.

📥 One-Click Scripts

Located in scripts/windows/:

  • install-check.ps1: Checks if you have Rclone, WinFsp, and can connect to the phone.
  • mount-phone.ps1: The main script to mount the drive.

🔒 Security Warning

  • Internal Network Only: This setup is designed for your home Wi-Fi (LAN).
  • Do NOT expose Port 8022 to the Internet: Never set up port forwarding for this on your router unless you are an expert and understand the risks.
  • SSH Keys: Keep your private key (id_ed25519) safe.

🛠️ Troubleshooting

Something plain wrong? Drive not showing up? 👉 Read the Troubleshooting Guide / FAQ


📱 安卓手机变无线 NAS (中文版)

通过 Termux、SSH 和 Rclone,将你的旧安卓手机变成 Windows 的安全无线 NAS。

本项目提供了一套完整的、面向新手的教程和自动化脚本,帮助你通过 Wi-Fi 将安卓手机存储挂载为 Windows 的本地磁盘(例如 X: 盘)。

🌟 特性

  • 无线文件访问:像访问 Windows 本地 D 盘一样访问手机存储。
  • 安全:使用 SFTP + SSH 密钥认证(无需输入密码)。
  • 自动化:提供一键连接和开机自启脚本。
  • 隐形运行:后台静默运行,没有烦人的黑框口。
  • 无需 Root:适用于标准安卓手机。

📋 配置参数

本教程默认使用以下假设,你需要根据实际情况进行调整。

参数 默认值 说明
手机 IP 192.168.1.xxx 手机的局域网 IP(建议在路由器设置静态 IP)。
SSH 端口 8022 Termux 默认 SSH 端口。
用户名 u0_aXXX 你的 Termux 用户名(每台设备不同)。
挂载盘符 X: 在 Windows 上显示的盘符。
共享路径 ~/storage/shared/NAS 手机上共享的目录(对应 /sdcard/NAS)。

🚀 快速开始(最快约 10 分钟)

  1. 手机端设置:安装 Termux 并启用 SSH。
  2. Windows 端设置:安装 WinFsp 和 Rclone。
  3. 免密登录:配置 SSH 密钥实现免密连接。
  4. 挂载 X 盘:配置 Rclone 并挂载磁盘。
  5. 开机自启:设置电脑开机自动连接手机。

📥 一键脚本

位于 scripts/windows/ 目录下:

  • install-check.ps1:环境自检脚本(检查 Rclone、WinFsp、手机连接)。
  • mount-phone.ps1:核心挂载脚本,可一键运行。

🔒 安全警告

  • 仅限内网使用:本方案设计用于家庭 Wi-Fi 环境。
  • 不要将 8022 端口暴露到公网:除非你是专家并了解风险,否则绝对不要在路由器上做端口映射。
  • 保护 SSH 密钥:保管好你的私钥文件 (id_ed25519)。

🛠️ 故障排查

遇到问题?盘符没出现? 👉 阅读故障排查指南 / FAQ

涵盖:

  • Permission denied 权限错误
  • X 盘未出现
  • SSH 连接超时
  • 手机电池优化杀后台问题

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors