Rclone 1.61.1 (and some previous versions) on Android 8/9

What is the problem you are having with rclone?

Doesn't connect to remotes at all under multiple Android versions.

Run the command 'rclone version' and share the full output of the command.

I have tried various versions of rclone, including 1.61.1. All d'led from rclone.org.

Which cloud storage system are you using? (eg Google Drive)

Google Drive and pCloud.

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone -P lsd pc:
rclone -P lsd gd:

The first tries to list on a pCloud account, the second on Google Drive.

Both commands produce similar output:

2023/01/24 15:27:20 ERROR : : error listing: couldn't list files: Get "https:// api . pcloud . com /listfolder?folderid=0": dial tcp: lookup api . pcloud . com on [::1]:53: read udp [::1]:47444->[::1]:53: read: connection refused
2023/01/24 15:27:20 Failed to lsd with 2 errors: last error was: couldn't list files: Get "https:// api . pcloud . com/listfolder?folderid=0": dial tcp: lookup api . pcloud . com on [::1]:53: read udp [::1]:47444->[::1]:53: read: connection refused

(I had to fiddle with the links as I am a newb.)

Other commands I tried produced the same errors. I've looked through the forum and tried a couple remedies, see Listing team drives failed Error , none worked.

What DOES work, but is slightly unsatisfactory, is copying the rclone binary (1.61.1) from a termux install to the phones in question and using that binary. (I have termux on two tablets with loads of free memory, but I can't install that on the phones as these do not have enough spave left. I use an older terminal emulator there.) Everything works as expected with that binary.

So I can go ahead with rclone but this is surely not an optimal situation.

can you post the redacted config file?

looks like an issue with DNS and/or IPV6.
might try to bind to IPV4 address using
https://rclone.org/docs/#bind-string

It looks like the DNS is not working on these. Rclone is attempting to contact localhost as the DNS server which is unlikely to work.

Termux does some magic in order to get the android DNS working.

If you had time to investigate why our android build doesn't work properly with DNS that would be great.

This issue might be relevant net: support for android without cgo · Issue #8877 · golang/go · GitHub - there may be a solution in there - I haven't had time to go through it thoroughly.

Note that we should be building our Android builds with CGO support so maybe that isn't the issue, or maybe our builds aren't being built with CGO support like they should be.

This looks like a more relevant issue: net: DNS requests do not work on Android · Issue #10714 · golang/go · GitHub which appears to be fixed but has the same symptoms.

@asdffdsa The same config works on several Linux, Windows and Android (with the termux rclone) machines w/o any problem. Also, as I wrote I have tried the solutions in that thread I linked, among them --bind. No joy.

@ncw I can, within reason :slight_smile:, try to investigate this. However, though I am a dev myself, my knowledge of Go is minimal.

Couple further points to note: all machines in my "zoo" connect to the same router and with the exception of rclone.org's rclone everything works. Also, as noted I have tried the GODEBUG=netdns=go/cgo ./rclone thing to no effect.

I know that I had used a previous version of rclone.org's rclone on the phones and this did work... that's why i tried various older versions I had lying around. No joy either.

I think you must be using the normal linux builds under android - these will not work properly.

I tried a build from here testbuilds - namely rclone-android-21-armv8a under termux and it worked just fine with DNS and everything!

Perhaps I should promote the android builds to first class supported builds to avoid this confusion. I've been reluctant to do so as it is another platform to look after, one which there are an extreme number of variants.

i use rclone on termux, on a daily basis, works great.

what is the advantage to promoting android builds to first class?

@ncw If by "normal linux builds" you mean the standard downloads from the rclone Downloads page, yes that is what I have been using all along (obviously the correct arm build). I have used these builds before and I am positive that I had a functioning rclone version on those phones before. I had not at all realised that there are testbuilds specifically for Android... I normally don't look into such builds (or beta stuff) for mission-critical stuff.

Anyway... the good news is that a testbuild from the link you provided seems to work. :green_circle:

Whether it's worthwhile to promote those builds to first class is debatable. What would have helped me a lot is a simple but well-visible hint (below the table with the standard downloads) that the normal builds may or may not function under Android... and that, in case they don't, there are those Android testbuilds to investigate further. As I said I had no idea till now that these existed... and I've been an rclone user for many years.

I agree that the termux rclone works well under termux (I use it regularly on the tablets) but for reasons I have already mentioned I can't use termux on the phones (though the termux rclone does work on the phone, as noted).

If you use termux - then no advantage at all.

However if you want to use rclone without termux then you want one of those builds.

Ah ha!

The builds I linked are the v1.61.1 release. They are testbuilds because we don't officially support android but I believe they are fully working.

That is a good idea. I've put a note in the docs which will go live at the next release.

At some point we'll make these official builds I expect. I expect them to be fully working so feedback would be useful.

@ncw I will certainly report any problems I run into with that build (or later ones) though I am using rclone mostly from the tablets (which run rclone under termux). The two phones are pretty old things which I've undusted for an upcoming trip to India, so they will get some usage there but how much remains to be seen. Thanks for helping out and also for creating a great tool :smiley:

1 Like

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