MENU

免费为 Android 设备增加 5T 存储空间

2019 年 09 月 05 日 • 阅读: 21604 • 脚本

劝退警告

以下操作需要 ROOT 权限和 MAGISK 模块支持,更重要的人品得足够好。

下载需要的文件

下表提供的链接指向官网、官方仓库或各大应用商店,方便像我一样的不更新会死星人,但它们的服务器大都在国外,访问速度你懂的。为了方便,你可以从 我的网盘 下载本文使用的版本,其中的 Magisk-uninstaller-20190604.zip 作用是卸载面具,本文不会使用。

文件名类型用途
MT 管理器APP访问挂载硬盘
TermuxAPP获取 Onedrive API Token 和临时挂载
Termux:APIAPP方便 Termux 与 Android 交互
MagiskManagerAPP面具模块管理器
MagiskZIP面具核心支持环境
Rclone-remountZIPRclone 面具模块,用于自动挂载

下载完毕后,你可以立即安装所有 APP 和面具核心支持环境,以及 rclone-remount 模块,安装完面具模块后重启一次手机。如果你不会安装面具及其模块,请接着往下看。

获取 Onedrive API Token 并生成 Rclone 配置

安装 TermuxTermux:API 后打开 Termux,待其初始化完成后执行以下命令。

pkg install rclone -y && rclone config

执行成功后会出现下面的菜单,请按照其中的注释操作。在输入每条命令前,务必确认菜单询问的内容与示例内容一致,因为菜单在不断升级变更,顺序也会稍作调整。

Config Menu

No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n # 输入 n 回车,创建新的远程连接
name> od # 输入任意字符回车,为远程连接起个别名
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
 1 / 1Fichier
   \ "fichier"
 2 / Alias for an existing remote
   \ "alias"
 3 / Amazon Drive
   \ "amazon cloud drive"
 4 / Amazon S3 Compliant Storage Provider (AWS, Alibaba,
 Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, etc)
   \ "s3"
 5 / Backblaze B2
   \ "b2"
 6 / Box
   \ "box"
 7 / Cache a remote
   \ "cache"
 8 / Dropbox
   \ "dropbox"
 9 / Encrypt/Decrypt a remote
   \ "crypt"
10 / FTP Connection
   \ "ftp"
11 / Google Cloud Storage (this is not Google Drive)
   \ "google cloud storage"
12 / Google Drive
   \ "drive"
13 / Google Photos
   \ "google photos"
14 / Hubic
   \ "hubic"
15 / JottaCloud
   \ "jottacloud"
16 / Koofr
   \ "koofr"
17 / Local Disk
   \ "local"
18 / Mega
   \ "mega"
19 / Microsoft Azure Blob Storage
   \ "azureblob"
20 / Microsoft OneDrive
   \ "onedrive"
21 / OpenDrive
   \ "opendrive"
22 / Openstack Swift (Rackspace Cloud Files, Memset Mems
tore, OVH)
   \ "swift"
23 / Pcloud
   \ "pcloud"
24 / Put.io
   \ "putio"
25 / QingCloud Object Storage
   \ "qingstor"
26 / SSH/SFTP Connection
   \ "sftp"
27 / Union merges the contents of several remotes
   \ "union"
28 / Webdav
   \ "webdav"
29 / Yandex Disk
   \ "yandex"
30 / http Connection
   \ "http"
31 / premiumize.me
   \ "premiumizeme"
Storage> 20 # 选择 20 对应的 Microsoft OneDrive,这步的序号可能不同,务必仔细查看
** See help for onedrive backend at: https://rclone.org/
onedrive/ **

Microsoft App Client Id
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_id> # 直接回车,表示不手动提供 Onedrive client_id
Microsoft App Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret> # 直接回车,表示不手动提供 Onedrive client_secret
Edit advanced config? (y/n)
y) Yes
n) No
y/n> n # 输入 n 回车,表示不进行 Onedrive 高级配置
Remote config
Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless mach
ine
y) Yes
n) No
y/n> y # 输入 y 回车,表示使用自动配置
# 此时会提示打开浏览器授权,选择你常用的浏览器打开,并在自动加载的网页中登录 Onedrive 账号
# 当浏览器出现 Success 时,表示授权成功,可以回到 Termux 终端了
If your browser doesnt open automatically go to the fol
lowing link: http://127.0.0.1:53682/auth
Log in and authorize rclone for access
Waiting for code...
Got code
Choose a number from below, or type in an existing value
 1 / OneDrive Personal or Business
   \ "onedrive"
 2 / Root Sharepoint site
   \ "sharepoint"
 3 / Type in driveID
   \ "driveid"
 4 / Type in SiteID
   \ "siteid"
 5 / Search a Sharepoint site
   \ "search"
Your choice> 1 # 选择 1 对应的 OneDrive Personal or Business 回车
Found 1 drives, please select the one you want to use:
0: OneDrive (business) id=b!ZyWPB3G6-EetswlYu40wymfxwt_D
MENCvHVsnO89SKEvQjaMk22FTYhImrbqkbkN
Chose drive to use:> 0 # 选择 0 对应的 OneDrive 账号
Found drive 'root' of type 'business', URL: https://oned
roptbsteduau-my.sharepoint.com/personal/102419_onmicroso
ft_net/Documents
Is that okay?
y) Yes
n) No
y/n> y # 输入 y 回车,确认 Onedrive 在线路径
2019/09/05 04:26:04 ERROR : Failed saving config "drive_
id" = "b!ZyWPB3G6-EetswlYu40wymfxwt_DMENCvHVsnO89SKEvQja
Mk22FTYhImrbqkbkN" in section "od" of the config file: s
ection 'od' not found
2019/09/05 04:26:04 ERROR : Failed saving config "drive_
type" = "business" in section "od" of the config file: s
ection 'od' not found
--------------------
[od]
type = onedrive
token = {}
drive_id = b!ZyWPB3G6-EetswlYu40wymfxwt_DMENCvHVsnO89SKE
vQjaMk22FTYhImrbqkbkN
drive_type = business
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y # 输入 y 回车,确认生成的 Onedrive Token
Current remotes:

Name                 Type
====                 ====
od                   onedrive

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> q # 输入 q 回车,退出配置菜单

如果某一步配置错了,可以按屏幕下方 悬浮键盘 上的 Ctrl 再按 输入法键盘 上的 C,停止配置,随后输入以下命令回车,重新配置,过程同上。

rclone config

为 Magisk Rclone Remount 模块生成配置

刷入面具核心环境

假设你已经解锁 BL 并刷入了 TWRP。现在,进入 TWRP,刷入刚刚下载的 Magisk-v19.3.zip。安装完成后重启手机,安装 MagiskManager-v7.3.2.apk 并打开,查看是否提示 Magisk 已安装。详细过程可以参考 这篇文章,或在下文留言。

生成 Rclone Remount 配置

回到桌面,打开 Termux,输入 su 回车,在弹出 Magisk Root 授权提示框 后,点击 允许

回到终端,复制以下全部命令粘贴回车。

RCLONE_REMOUNT_CONF_DIR=/sdcard/.rclone/ && \
RCLONE_CONF_DIR=/data/data/com.termux/files/home/.config/rclone/ && \
mkdir -p $RCLONE_REMOUNT_CONF_DIR && \
cp ${RCLONE_CONF_DIR}rclone.conf $RCLONE_REMOUNT_CONF_DIR && \
rm -rf /sdcard/Cloud && \
rm -rf /mnt/cloud && \
cat > ${RCLONE_REMOUNT_CONF_DIR}.global.param <<EOF
NETCHK=1

NETCHK_ADDR=qq.com

CACHEMODE=minimal

BINDSD=1

ADD_PARAMS=--fast-list --allow-non-empty

HTTP=0

FTP=0

EOF

安装 Rclone Remount 模块

打开 Magisk Manager,从侧边栏进入 模块管理 界面。

Screenshot_2019-09-05-14-56-49-487_com.topjohnwu..png

点击屏幕正下方的 + 号,从 内置存储 (可能需要点击右上角菜单,打开 显示内置存储,随后从 左侧边栏 进入)选择第一步下载的 rclone-remount-v1.8a.zip

Screenshot_2019-09-05-14-56-55-398_com.topjohnwu..png

如果卡在下图界面超过 3 分钟,直接 重启。重启后打开 MT 管理器,进入 /sdcard/Cloud 目录查看是否挂载成功(首次进入需要 ROOT 授权)。

Screenshot_2019-09-05-15-00-18-183_com.topjohnwu..png

如未挂载成功,打开 Magisk Manager 让其后台运行,接着打开 Termux,执行以下命令手动挂载。

# 输入 su 回车
su
# 当前缀变成 /data/com.termux/files/home 时,执行以下命令
/sbin/rclone remount

如果执行过程中卡住,请切换网络,或挂载 VPN,如仍无法启动,大概就是人品问题吧。如果你不相信自己人品很差,可以卸掉面具模块,从上文的 为 Magisk Rclone Remount 模块生成配置 开始重做一次。

日志和配置文件可以在 /sdcard/.rclone/ 查看,挂载目录是 /mnt/cloud/sdcard/Cloud

TG 大佬群 QQ 大佬群

最后编辑于: 2019 年 12 月 18 日
返回文章列表 文章二维码
本页链接的二维码
打赏二维码
添加新评论

Loading captcha...

已有 28 条评论
  1. badleric badleric   GNU/Linux x64  Firefox 121.0

    感谢楼主分享,不知道这么做费电吗?

  2. 陈独秀 陈独秀   Android 6.0  Google Chrome 81.0.4044.117

    按照教程走了,文件夹是创建好了,但里面没东西啊@(泪)

  3. 陈独秀 陈独秀   Android 6.0  Google Chrome 81.0.4044.117

    帮你点击广告了/滑稽

    1. LOGI LOGI   Windows 10 x64 Edition  Google Chrome 81.0.4044.129

      @陈独秀感谢

  4. BlessWz BlessWz   Windows 10 x64 Edition  Google Chrome 80.0.3987.149

    大佬你好,我挂载OneDrive成功了@(笑眼),但是OneDrive内的操作无法同步到本地怎么办呢@(小乖)?

    1、我在OneDrive客户端内新建了一个文件夹之后,挂载的OneDrive内并没有多出文件夹,说明云端操作无法同步到本地
    2、在本地新建文件夹之后,云端也出现了,说明本地可以同步到云端

    1. LOGI LOGI   Windows 7 x64 Edition  Google Chrome 80.0.3987.122

      @BlessWz没刷新吧

    2. BlessWz BlessWz   Windows 10 x64 Edition  Google Chrome 80.0.3987.149

      @LOGI刷新了,没用。实测只有remount才会变化,很奇怪,我完全按照你的步骤来的@(惊哭)

    3. LOGI LOGI   Windows 7 x64 Edition  Google Chrome 80.0.3987.122

      @BlessWz可能需要调节同步间隔的启动参数,可以去 mount 插件的 github 主页看看

    4. BlessWz BlessWz   Windows 10 x64 Edition  Google Chrome 80.0.3987.149

      @LOGI感谢,可以了

  5. Max Max   Windows 10 x64 Edition  Google Chrome 79.0.3945.117

    爱了爱了 ,折腾了一下 ,成功了。@(太开心)

    1. LOGI LOGI   Windows 10 x64 Edition  Google Chrome 80.0.3987.116

      @Max恭喜恭喜

  6. aslarn aslarn   Windows 10 x64 Edition  Google Chrome 76.0.3809.132

    请问这个模块在安卓10上可以用吗?我始终没有挂载成功,系统是miui11,安卓10的

    1. LOGI LOGI   Windows 10 x64 Edition  Google Chrome 78.0.3904.87

      @aslarn不知道呢,我只有安卓 9 的设备。手动挂载试试,然后看看日志里有什么错

    2. aslarn aslarn   Windows 10 x64 Edition  Google Chrome 76.0.3809.132

      @LOGI试了手动挂载但是弄得内存泄漏::quyin:hematemesis::

    3. LOGI LOGI   Windows 10 x64 Edition  Google Chrome 78.0.3904.87

      @aslarn那可能不兼容,没办法#(哭泣)

    4. aslarn aslarn   Android 10  Google Chrome 80.0.3987.99

      @LOGI博主,我隔了这么久又来试了,这次到时挂载成功了,果然这个看人品的::quyin:fue::

    5. LOGI LOGI   Windows 10 x64 Edition  Google Chrome 80.0.3987.106

      @aslarn恭喜大佬

  7. ddd ddd   Windows 10 x64 Edition  Google Chrome 77.0.3865.75

    Termux:API安装失败

    1. LOGI LOGI   Windows 10 x64 Edition  Google Chrome 77.0.3865.90

      @dddAPI 非必须

  8. 阿牛 阿牛   iOS 13.1  Mozilla Compatible

    搞好了,谢谢,同步速度还不错。每年空间续费多少钱?

    1. LOGI LOGI   Windows 10 x64 Edition  Google Chrome 76.0.3809.132

      @阿牛神速啊大佬,你说的是 Onedrive 续费?如果不是因为违规使用被封是不用续费的哈

    2. 阿牛 阿牛   Mac OS X 10.14.6  Google Chrome 76.0.3809.132

      @LOGI刚好上月我magisk手机,一直想试试rclone,看到你的文章,就迫不及待了想试试了。

  9. 初夏阳光 初夏阳光   Android 9  Google Chrome 76.0.3809.132

    哇哦真好(●°u°●)​ 」,等我刷上 TWRP ROOT 啥的就来试一试@(乖)

    1. 初夏阳光 初夏阳光   Windows 10 x64 Edition  Google Chrome 76.0.3809.132

      @初夏阳光Mount Okay! 重装了一手 Pixel Experience ,感觉跟一加的氢氧OS差不太多。顺手刷了一下 Magsik 第一次用

    2. LOGI LOGI   Windows 10 x64 Edition  Google Chrome 76.0.3809.132

      @初夏阳光大佬就是大佬,人品完全 OK

    3. LOGI LOGI   Windows 10 x64 Edition  Google Chrome 76.0.3809.132

      @初夏阳光我也是一次 Mount 成功,不过后来改一下配置就挂不上了,最后卸掉 Magisk 重装才可以。不过这是一篇恰饭文,我不建议一直挂着,貌似挺费电,而且 Onedrive 在国内的速度也很迷。氢氧一开始基于 CM,也就是 LOS,可能跟张老板北美起家有关,现在一加在海外口碑和销量也都挺好。最后感谢大佬投食@(太开心)

    4. 初夏阳光 初夏阳光   Windows 10 x64 Edition  Google Chrome 76.0.3809.132

      @LOGIhahaha, 蛮有意思的,之前买了一个一块的,后来看涨价了又买了一个玩。
      OneDrive 挂载在手机上也不是很方便,还是挂载在服务器上装个 Aria2 方便。

    5. LOGI LOGI   Windows 10 x64 Edition  Google Chrome 76.0.3809.132

      @初夏阳光╮(╯▽╰)╭ 是的