2020-05-08, 03:09
Thought i would document the way I set up rclone to automatically run on my android kodi install.
Prerequisites:
1) Download and unzip rclone-android-arm binary from https://beta.rclone.org/test/testbuilds-latest/
2) A working rclone.conf file (configure with rclone on pc/mac and confirm it's working beforehand)
3) daemon.py from https://www.jejik.com/articles/2007/02/a...in_python/
4) My autoexec.py from https://paste.kodi.tv/raw/aqujicatid
Edit the daemon.py to remove the following two lines
os.dup2(so.fileno(), sys.stdout.fileno())
os.dup2(se.fileno(), sys.stderr.fileno())
Edit the autoexec.py file to have the rclone command you want run at kodi start. I highly recommend using the "serve webdav" command, and adding the webdav as a source in Kodi, but any rclone commands will work.
If you use my example, you need to change <your rclone named remote> to your rclone remote.
Then add a webdav source to localhost on port 23457 in kodi.
I have tried using "serve http" but kodi had problems with certain characters in directory names, &,' etc...
Copying all 4 files into your kodi userdata directory will start rclone running when kodi starts, on your android device. I'm sure there's a proper plugin/addon way to do things, but this, with changes to buffering in the advancedsetting.xml file has been flawless for reading directly from cloud storage.
I've created a github fork of fandangos addon. It will download the rclone binary and start it on kodi start. The command it runs can be modified, as well as the version of rclone it downloads in the addon settings.
https://github.com/jmez11/rclone-addon
You can create a zip of the script.service.rclone and install manually.
On start it will download the specified rclone binary to special://temp/rclone.gz and unzip it to special://xbmcbin/../../../cache/lib/rclone-android-16-arm
It will only download a new version if special://xbmcbin/../../../cache/lib/rclone-android-16-arm does not exist. To update the rclone binary to a newer version, you need to update the url in your config, and delete special://xbmcbin/../../../cache/lib/rclone-android-16-arm in the file manager. Then restart kodi.
Hope someone else finds this information useful.
Prerequisites:
1) Download and unzip rclone-android-arm binary from https://beta.rclone.org/test/testbuilds-latest/
2) A working rclone.conf file (configure with rclone on pc/mac and confirm it's working beforehand)
3) daemon.py from https://www.jejik.com/articles/2007/02/a...in_python/
4) My autoexec.py from https://paste.kodi.tv/raw/aqujicatid
Edit the daemon.py to remove the following two lines
os.dup2(so.fileno(), sys.stdout.fileno())
os.dup2(se.fileno(), sys.stderr.fileno())
Edit the autoexec.py file to have the rclone command you want run at kodi start. I highly recommend using the "serve webdav" command, and adding the webdav as a source in Kodi, but any rclone commands will work.
If you use my example, you need to change <your rclone named remote> to your rclone remote.
Then add a webdav source to localhost on port 23457 in kodi.
I have tried using "serve http" but kodi had problems with certain characters in directory names, &,' etc...
Copying all 4 files into your kodi userdata directory will start rclone running when kodi starts, on your android device. I'm sure there's a proper plugin/addon way to do things, but this, with changes to buffering in the advancedsetting.xml file has been flawless for reading directly from cloud storage.
I've created a github fork of fandangos addon. It will download the rclone binary and start it on kodi start. The command it runs can be modified, as well as the version of rclone it downloads in the addon settings.
https://github.com/jmez11/rclone-addon
You can create a zip of the script.service.rclone and install manually.
On start it will download the specified rclone binary to special://temp/rclone.gz and unzip it to special://xbmcbin/../../../cache/lib/rclone-android-16-arm
It will only download a new version if special://xbmcbin/../../../cache/lib/rclone-android-16-arm does not exist. To update the rclone binary to a newer version, you need to update the url in your config, and delete special://xbmcbin/../../../cache/lib/rclone-android-16-arm in the file manager. Then restart kodi.
Hope someone else finds this information useful.