Environmnet variable usage won't work on arm android build

What is the problem you are having with rclone?

Variable usage won't work on arm android build. Users should be able to add remotes by setting environment variables, but only the rclone listremotes can see the variable remote, commands like rclone lsd/sync/... won't work.

What is your rclone version (output from rclone version)

➜  RcloneVault git:(master) ✗ rclone version
rclone v1.53.2-DEV
- os/arch: android/arm64
- go version: go1.15.3

Which OS you are using and how many bits (e.g. Windows 7, 64 bit)

Android 10

Which cloud storage system are you using? (e.g. Google Drive)

local drive

The command you were trying to run (e.g. rclone copy /tmp remote:tmp)

export RCLONE_CONFIG_testing_TYPE=crypt
export RCLONE_CONFIG_testing_REMOTE=/sdcard/crypt
export RCLONE_CONFIG_testing_PASSWORD=KlRtRzRLKV95RHdARnYkSsjdf2qM0vSGQoY
rclone listremotes
rclone lsd testing:/
rclone serve webdav testing:/ --addr 0.0.0.0:8080

A log from the command with the -vv flag (e.g. output from rclone -vv copy /tmp remote:tmp)

➜  RcloneVault git:(master) ✗ rclone listremotes
AliYun_5M_root:
Aliyun_anki_root:
JianGuoYun_root:
K20Pro_Hotpot_sdcard:
K20Pro_Hotpot_termux:
K20Pro_sdcard:
K20Pro_termux:
Laptop_C:
Laptop_D:
OneDrive_root:
memory:
test_crypt:
well:
➜  RcloneVault git:(master) ✗ export RCLONE_CONFIG_testing_TYPE=crypt
export RCLONE_CONFIG_testing_REMOTE=/sdcard/crypt
export RCLONE_CONFIG_testing_PASSWORD=KlRtRzRLKV95RHdARnYkSsjdf2qM0vSGQoY
➜  RcloneVault git:(master) ✗ rclone listremotes
AliYun_5M_root:
Aliyun_anki_root:
JianGuoYun_root:
K20Pro_Hotpot_sdcard:
K20Pro_Hotpot_termux:
K20Pro_sdcard:
K20Pro_termux:
Laptop_C:
Laptop_D:
OneDrive_root:
memory:
test_crypt:
testing:
well:
➜  RcloneVault git:(master) ✗ rclone lsd testing:
2020/11/17 13:33:04 Failed to create file system for "testing:": didn't find section in config file
➜  RcloneVault git:(master) ✗ rclone lsd testing:/
2020/11/17 13:33:07 Failed to create file system for "testing:/": didn't find section in config file
➜  RcloneVault git:(master) ✗ rclone version
rclone v1.53.2-DEV
- os/arch: android/arm64
- go version: go1.15.3
➜  RcloneVault git:(master) ✗ rclone lsd testing: -vv
2020/11/17 13:42:49 DEBUG : rclone: Version "v1.53.2-DEV" starting with parameters ["rclone" "lsd" "testing:" "-vv"]
2020/11/17 13:42:49 DEBUG : Using config file from "/data/data/com.termux/files/home/.config/rclone/rclone.conf"
2020/11/17 13:42:49 Failed to create file system for "testing:": didn't find section in config file

I think the problem here is that you need to put the testing in UPPERCASE, so

export RCLONE_CONFIG_TESTING_TYPE=crypt

give that a go

Thank you a lot! It worked.

To find the name of the environment variable, you need to set, take RCLONE_CONFIG_ + name of remote + _ + name of config file option and make it all uppercase.

And in windows lower case works, while android don't work make me tend to think it's the arm build rclone's duty. Turned out it's just Windows is not case sensitive, and I misunderstandingly thought it's only the name of config file option need to be uppercase.

Yes I think environment variables are case insensitive in windows which is probably why it works there.

I checked the the docs, it does say

To find the name of the environment variable, you need to set, take RCLONE_CONFIG_ + name of remote + _ + name of config file option and make it all uppercase.

Which I think is clear, but maybe it could be clearer?

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.