Onedrive网盘Rclone挂载到手机当硬盘使用 win

zsxwz 19/08.20 19:41 4472

需要的工具:

1.Termux

2.Mt文件管理器或RE管理器

3.Magisk manager(面具)

4.Onedrive帐号 

5.爬墙工具


1.Magisk manager安装Rclone模块

需最新版Magisk manager模块,打开左侧栏进入下载栏目搜索Rclone下载并安装.完成后重启。


2.进入Termux

首次打开Termux需要挂梯子安装环境,不然会一直转圈


3.安装Rclone获取配置文件

apt install rclone
#安装rclone


4.初始化配置

复制以下内容回车↙

rclone config


会出现以下信息:

n) New remote
s) Set configuration password
q) Quit config n/s/q> n #输入N回车
name> Dcc #随便填,这是给挂载的网盘命名
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 / A stackable unification remote, which can appear to merge the contents of several remotes
\ "union"
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 / Hubic
\ "hubic"
14 / JottaCloud
\ "jottacloud"
15 / Koofr
\ "koofr"
16 / Local Disk
\ "local"
17 / Mega
\ "mega"
18 / Microsoft Azure Blob Storage
\ "azureblob"
19 / Microsoft OneDrive
\ "onedrive"
20 / OpenDrive
\ "opendrive"
21 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
\ "swift"
22 / Pcloud
\ "pcloud"
23 / QingCloud Object Storage
\ "qingstor"
24 / SSH/SFTP Connection
\ "sftp"
25 / Webdav
\ "webdav"
26 / Yandex Disk
\ "yandex"
27 / http Connection
\ "http"
Storage>19 #选择19


Microsoft OneDrive(可以看到rclone支持多达27种网盘挂载,非常强大,挂载方法都一样的,假如想挂载Google drive就选择12)

Microsoft App Client Id
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_id> #直接留空回车
Microsoft App Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret> #继续留空回车
Edit advanced config? (y/n)
y) Yes
n) No
y/n>n #是否编辑高级配置,选择n回车
Remote config
Use auto config?
* Say Y if not sure
* Say N if you are working on a remote or headless machine
y) Yes
n) No
y/n>n #选择y回车跳转到网页登录授权


输入Onedrive账户密码登录

Onedrive网盘Rclone挂载到手机当硬盘使用Onedrive网盘Rclone挂载到手机当硬盘使用点击接受授权后就可以返回Termux了


可以看到有以下信息:

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然后回车
Found 1 drives, please select the one you want to use:
0: OneDrive (business) id=b!IvHRl2eNOkuhshs2pIgn3zWS3d65p-FEv12wZwS49-wQ4fnRa1
Chose drive to use:>0  #选择0然后回车
Found drive 'root' of type 'business', URL: https://dabcoooacnz-my.sharepoint.com/personal/mua_muabl_cn/Documents
Is that okay?
y) Yes
n) No
y/n>y #选择y后回车


Onedrive网盘Rclone挂载到手机当硬盘使用可以看到已经生成好了token


下面还有:


--------------------

y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d>y #输入y回车
Current remotes:
Name Type
==== ====
Dcc 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退出


好了,Onedrive配置文件生成完毕


文件名:rclone.conf

文件路径:

/data/data/com.termux/files/home/.config/rclone


5.移动配置文件:

为了简单更容易理解就不使用命令行了,我们使用Re文件管理器或者Mt都可以,把rclone.conf文件移动到/sdcard/.rclone/目录里,没有就手动创建。

目录/sdcard/.rclone/下新建两个文件:


注意文件最后需要多留一行空行。


vim .*.params

# 添加
BUFFERSIZE=0 CACHEMAXSIZE=1G CACHEINFOAGE=30m DIRCACHETIME=1h ATTRTIMEOUT=30s READAHEAD=128k CACHEMODE=off DISABLE=0 READONLY=0 BINDSD=1 BINDPOINT= ADD_PARAMS= REPLACE_PARAMS=
vim .global.param

# 添加
NETCHK_ADDR=baidu.com
CACHEMODE=minimal
BINDSD=1
ADD_PARAMS=--fast-list --allow-non-empty
HTTP=0
FTP=0


6.Termux执行挂载命令:

输入su 回车获取让termux获取root权限

再运行

#添加环境变量
export XDG_CONFIG_HOME=/data/media/0

# 可能报错,自己查看一下是否挂载成功,如果成功,忽视即可。
/sbin/rclone remount


默认是挂载在 /mnt/Cloud/ 和/sdcard/Cloud 目录下


Rclone挂载模块项目地址:

https://github.com/piyushgarg/rclone-mount


最后于 20/08.24 21:36 被zsxwz编辑 ,原因:

上一篇:影视采集及无广告解析网站搭建详细教程
下一篇:一个无聊的HTML测试
最新回复 (0)
    • 姿势论坛—姿势小王子
      2
返回
发新帖
友情链接
免责声明:本站部分资源来源于网络,如有侵权请发邮件(mail@zsxwz.com)告知我们,我们将会在24小时内处理。