Tutorial to have TBs of storage easy available through http on android from rclone clean or crypt

I do it from memory so sorry for mistakes:

I - do it from this tutorial:

1.Android - install termux
2.apt update
apt install golang git
-bash-4.4$ export GOPATH=pwd/go
-bash-4.4$ mkdir go
go get -u -v github.com/ncw/rclone

3.go into go/src/github.com/ncw/
rm -rf rclone
apt install git
git clone --branch serve https://github.com/ncw/rclone.git --single-branch
apt install nano
nano rclone/cmd/serve/serve.go

find line 20
there is
bindAddress = "localhost:8080"
remove localhost
so it will be
bindAddress = ":8080"

(you dont have to do it, but it is for binding on all interfaces)

find line 65 and 66
replace 10 to 999999999 so it will be
ReadTimeout: 10 * time.Second,

  •   WriteTimeout:   10 * time.Second,


ReadTimeout: 999999999 * time.Second,

  •   WriteTimeout:   999999999 * time.Second,

go build -v
it will make rclone executable with serve lets call it rclone_s

(remember about chmod+x if smth does not work)
run rclone_s --config=yourconfig.conf serve gdrive:
open chrome or other browser to http://localhost:8080
and now you have all your files in direct http link.

Video seeking does not work, but download is very fast.

later pkill rclone


Thanks for sharing. This is really nice. All my crypt content is now available on android. I can’t wait till this supports seek but for now this is awesome.

I was able to build it on ubuntu for android using gomobile.

Install gomobile and init

Get the relevant ndks from Google.

cd ~/go/src/github.com/ncw/rclone

GOMOBILE="/home/robert/go/src/golang.org/x/mobile/cmd/gomobile/gomobile" GOOS=android GOARCH=arm CC=~/android/android-ndk-r10e/android-17/bin/arm-linux-androideabi-gcc CXX=~/android/android-ndk-r10e/android-17/bin/arm-linux-androideabi-g++ CGO_ENABLED=1 GOARM=7 go build -p=8 -pkgdir=$GOMOBILE/pkg_android_arm -tags="" -ldflags="-extldflags=-pie" -o rclonea

yes…seeking would be great, but it has to be done by someone who knows go lang.
I dont…yet.

The problem here is, that
in line
obj, err := s.f.NewObject(remote)
returned obj is object, not such like in os.Open file system,
so later it is copied into http in 154

  • _, err = io.Copy(w, in)
    and it have to be changed to Write
    but cant…cause obj does not have ReadSeeker method.

i dont know how to convert obj to file …it would have to know size…