[HOW TO] Have rclone autostart on an Android install
#31
(2021-07-25, 18:11)aistand Wrote:
(2021-07-24, 20:20)jkasyan Wrote:
(2021-07-23, 12:41)aistand Wrote: Hi @jkasyan. Neither of the two lines you proposed did not work. The problem is still the same with "Permission Denied".
Thanks for your help anywaySmile
Look at your logfile, and you'll see an entry like:

"The executable running is: /data/app/~~LGX0oAUvP8OwOyuC0-5TUw==/org.xbmc.kodi-YSIJd7kX4fyunrNQAJmUTA==/lib/arm/libkodi.so"

If that was your logfile
​​​​​​before the line
if not xbmcvfs.exists(loc)
Try adding
loc = "/data/app/~~LGX0oAUvP8OwOyuC0-5TUw==/org.xbmc.kodi-YSIJd7kX4fyunrNQAJmUTA==/lib/arm/rclone-android-16-arm"

I don't think that will work, but very curious to see.  

A couple of less ideal/more difficult options:

You can sideload Kodi 18, and that will work. 

If you root your device, then you can run a magisk module https://github.com/galeksandrp/app-data-file-exec

You may also be able to find a version of kodi modifed to Target SDK to 28 in APK Studio Editor.  You'd sideload it, and disable automatic updates.  Team Kodi can't do this with the officially distributed version as google requires targeting SDK 29 to be updated in the play store.

I'm not at all sure how binary addons are going to work in the future. Google already says "An app distributed via Google Play may not modify, replace, or update itself using any method other than Google Play's update mechanism. Likewise, an app may not download executable code (e.g. dex, JAR, .so files) from a source other than Google Play."

Maybe we'll need to publish binary addons as addon apks in the store?  Is that how the binary addons do it right now?  No clue.

Hi @jkasyan I added the line you proposed and kodi showed an error of "Permission denied: '/data/app/~~fN3Dc3yGSLA7OSIdPi-fEw==/org.xbmc.kodi-BgThrOjmXMLYe0nN5Y0kfg==/lib/arm/rclone-android-16-arm'.
The log file is acaliteroh.kodi (paste).

Also My Pixel 3a XL is not rooted.
loc="/data/user_de/0/org.xbmc.kodi/rclone-android-16-arm" 

If that doesn't work, I think the recommendation is to not use kodi 19 on android 10 if you want binary addons to work?  I'm still not clear if the addons in the official repository are even working.
Reply
#32
(2021-07-25, 19:05)jkasyan Wrote:
(2021-07-25, 18:11)aistand Wrote:
(2021-07-24, 20:20)jkasyan Wrote: Look at your logfile, and you'll see an entry like:

"The executable running is: /data/app/~~LGX0oAUvP8OwOyuC0-5TUw==/org.xbmc.kodi-YSIJd7kX4fyunrNQAJmUTA==/lib/arm/libkodi.so"

If that was your logfile
​​​​​​before the line
if not xbmcvfs.exists(loc)
Try adding
loc = "/data/app/~~LGX0oAUvP8OwOyuC0-5TUw==/org.xbmc.kodi-YSIJd7kX4fyunrNQAJmUTA==/lib/arm/rclone-android-16-arm"

I don't think that will work, but very curious to see.  

A couple of less ideal/more difficult options:

You can sideload Kodi 18, and that will work. 

If you root your device, then you can run a magisk module https://github.com/galeksandrp/app-data-file-exec

You may also be able to find a version of kodi modifed to Target SDK to 28 in APK Studio Editor.  You'd sideload it, and disable automatic updates.  Team Kodi can't do this with the officially distributed version as google requires targeting SDK 29 to be updated in the play store.

I'm not at all sure how binary addons are going to work in the future. Google already says "An app distributed via Google Play may not modify, replace, or update itself using any method other than Google Play's update mechanism. Likewise, an app may not download executable code (e.g. dex, JAR, .so files) from a source other than Google Play."

Maybe we'll need to publish binary addons as addon apks in the store?  Is that how the binary addons do it right now?  No clue.

Hi @jkasyan I added the line you proposed and kodi showed an error of "Permission denied: '/data/app/~~fN3Dc3yGSLA7OSIdPi-fEw==/org.xbmc.kodi-BgThrOjmXMLYe0nN5Y0kfg==/lib/arm/rclone-android-16-arm'.
The log file is acaliteroh.kodi (paste).

Also My Pixel 3a XL is not rooted.
loc="/data/user_de/0/org.xbmc.kodi/rclone-android-16-arm" 

If that doesn't work, I think the recommendation is to not use kodi 19 on android 10 if you want binary addons to work?  I'm still not clear if the addons in the official repository are even working.

Hi @jkasyan. I changed loc="/data/user_de/0/org.xbmc.kodi/rclone-android-16-arm".
There is no more error. But the result is still the same with "RCLONE:/system/bin/sh: /data/user_de/0/org.xbmc.kodi/rclone-android-16-arm: Permission denied" in log.
The log file is zudatitici.kodi (paste).

Anyway thanks for your help.
Reply
#33
So there is no solution for Google devices? (I have the chromecast with Google Tv). Apart on the fire tv it works perfectly, the only drawback is that even if the kodi app is installed in an external storage, anything that is inside kodi (.kodi folder), is installed in the internal storage, with 5.6gb it is not you can download all the images that I have in my library ... it's a shame.
Reply
#34
(2021-08-02, 08:24)maiki83 Wrote: So there is no solution for Google devices? (I have the chromecast with Google Tv). Apart on the fire tv it works perfectly, the only drawback is that even if the kodi app is installed in an external storage, anything that is inside kodi (.kodi folder), is installed in the internal storage, with 5.6gb it is not you can download all the images that I have in my library ... it's a shame.

There are 2 solutions:

1. Grab the apk you want to install.
Unpack it.
Add the rclone binary.
Repack and signe it.

Change the execution path within the addon. Can't remember the exact one but it will be side by side kodi own lib files.

2. Use automate for android:

https://forum.rclone.org/t/launch-rclone...droid/9151

This guy made several posts explaining how to do it. You will need a mouse to change settings within automate.
This app has some security measures. I had to download some "security" apks to enable networking and local file access.

.. and one extra solution.
Get yourself a raspberry pi, boot ubuntu, run rclone and share it over nfs/samba.

I have a NAS in my home and rclone runs on it. I gave up using rclone within android because auto update doesn't work (it will never work).
So watchdog addon doesn't work and when you have a gigantic library it's a no go to re scan it all.

To be honest, lately because of the easy to use and to please the wife, I'm just using Emby + rclone running on my NAS. Much easier for the shield to browse a big collection of media.

If I had a smaller collection I would stick with rclone on android itself.

That's just my opinion in my use case.
Reply
#35
(2021-08-02, 20:08)fandangos Wrote:
(2021-08-02, 08:24)maiki83 Wrote: So there is no solution for Google devices? (I have the chromecast with Google Tv). Apart on the fire tv it works perfectly, the only drawback is that even if the kodi app is installed in an external storage, anything that is inside kodi (.kodi folder), is installed in the internal storage, with 5.6gb it is not you can download all the images that I have in my library ... it's a shame.

There are 2 solutions:

1. Grab the apk you want to install.
Unpack it.
Add the rclone binary.
Repack and signe it.

Change the execution path within the addon. Can't remember the exact one but it will be side by side kodi own lib files.

2. Use automate for android:

https://forum.rclone.org/t/launch-rclone...droid/9151

This guy made several posts explaining how to do it. You will need a mouse to change settings within automate.
This app has some security measures. I had to download some "security" apks to enable networking and local file access.

.. and one extra solution.
Get yourself a raspberry pi, boot ubuntu, run rclone and share it over nfs/samba.

I have a NAS in my home and rclone runs on it. I gave up using rclone within android because auto update doesn't work (it will never work).
So watchdog addon doesn't work and when you have a gigantic library it's a no go to re scan it all.

To be honest, lately because of the easy to use and to please the wife, I'm just using Emby + rclone running on my NAS. Much easier for the shield to browse a big collection of media.

If I had a smaller collection I would stick with rclone on android itself.

That's just my opinion in my use case.
I built a kodi 19.1 install with rclone 1.56 that you can manually install at:

bit.ly/3eUAzwZ

You need to uninstall kodi before installing it, as it won't upgrade cleanly.

Then you can run the rclone addon from:

bit.ly/3kYQdeH

I'd highly recommend making your own, but it's here for convenience.   You can (and should) unzip it and diff it against the official 19.1 arm7 apk, and rclone 1.56 rather than trust some rando on the internet, but I do realize that building an apk is more technical than some people want to be.

I use the library auto update addon set to scan silently every 4 hours.  It takes ~1.5 hrs for my library the first time.  With rclone's directory caching and polling enabled, the next update takes < 5 minutes.  With future rclone enhancement (https://github.com/rclone/rclone/issues/5123) it's possible that all scanning would be as quick.  I got rid of the NAS and moved to cloud storage, so I also don't really have anything else for rclone to be always running on.

As far as automate, it looks interesting!  I know that all android apps are going to have to figure out how to deal with downloaded binaries from the internet to stay on the play store.  Termux, Kodi, and even automate will need to download all executable programs from the store to comply with Google's TOS.  However, it seems that it does the exact same thing this addon does:  Download a binary file from the internet.  Run it.   I highly doubt that the current version of automate in the play store will be able to do this on an android 10 device.   I don't have one to test for myself, but given the tests done here, it seems unlikely to work.
Reply
#36
(2021-08-04, 06:59)jkasyan Wrote:
(2021-08-02, 20:08)fandangos Wrote:
(2021-08-02, 08:24)maiki83 Wrote: So there is no solution for Google devices? (I have the chromecast with Google Tv). Apart on the fire tv it works perfectly, the only drawback is that even if the kodi app is installed in an external storage, anything that is inside kodi (.kodi folder), is installed in the internal storage, with 5.6gb it is not you can download all the images that I have in my library ... it's a shame.

There are 2 solutions:

1. Grab the apk you want to install.
Unpack it.
Add the rclone binary.
Repack and signe it.

Change the execution path within the addon. Can't remember the exact one but it will be side by side kodi own lib files.

2. Use automate for android:

https://forum.rclone.org/t/launch-rclone...droid/9151

This guy made several posts explaining how to do it. You will need a mouse to change settings within automate.
This app has some security measures. I had to download some "security" apks to enable networking and local file access.

.. and one extra solution.
Get yourself a raspberry pi, boot ubuntu, run rclone and share it over nfs/samba.

I have a NAS in my home and rclone runs on it. I gave up using rclone within android because auto update doesn't work (it will never work).
So watchdog addon doesn't work and when you have a gigantic library it's a no go to re scan it all.

To be honest, lately because of the easy to use and to please the wife, I'm just using Emby + rclone running on my NAS. Much easier for the shield to browse a big collection of media.

If I had a smaller collection I would stick with rclone on android itself.

That's just my opinion in my use case.
I built a kodi 19.1 install with rclone 1.56 that you can manually install at:

bit.ly/3eUAzwZ

You need to uninstall kodi before installing it, as it won't upgrade cleanly.

Then you can run the rclone addon from:

bit.ly/3kYQdeH

I'd highly recommend making your own, but it's here for convenience.   You can (and should) unzip it and diff it against the official 19.1 arm7 apk, and rclone 1.56 rather than trust some rando on the internet, but I do realize that building an apk is more technical than some people want to be.

I use the library auto update addon set to scan silently every 4 hours.  It takes ~1.5 hrs for my library the first time.  With rclone's directory caching and polling enabled, the next update takes < 5 minutes.  With future rclone enhancement (https://github.com/rclone/rclone/issues/5123) it's possible that all scanning would be as quick.  I got rid of the NAS and moved to cloud storage, so I also don't really have anything else for rclone to be always running on.

As far as automate, it looks interesting!  I know that all android apps are going to have to figure out how to deal with downloaded binaries from the internet to stay on the play store.  Termux, Kodi, and even automate will need to download all executable programs from the store to comply with Google's TOS.  However, it seems that it does the exact same thing this addon does:  Download a binary file from the internet.  Run it.   I highly doubt that the current version of automate in the play store will be able to do this on an android 10 device.   I don't have one to test for myself, but given the tests done here, it seems unlikely to work.

I fully understand your point but for some data I just don't want to loose at all I have a backup running on an unraid NAS with parity on top of that.

Google can discontinue the drive service at any time and everything would disappear so I still rely on my NAS for 2% of what I have on the drive.

Your solution to use auto update and the cache is welcome but maybe I understand rclone cache wrong.
When you launch kodi it will launch rclone, this will be with a brand new cache. So unless you leave Kodi running for several ours for the next library scan it will have to rebuild the cache all over again.

Unless it would be possible to have a always present cache that would not be removed every rclone launch.
And in this case every scan would be fast without hammering the Drive API.
Reply
#37
(2021-08-04, 19:23)fandangos Wrote: So unless you leave Kodi running for several ours for the next library scan it will have to rebuild the cache all over again.

Unless it would be possible to have a always present cache that would not be removed every rclone launch.

I do leave kodi running all the time on the android box.  The persistent cache not removed every rclone launch is the linked github request, which may happen someday.

I'm using drobox as the backend, and am not overly concerned about API calls either way.
Reply
#38
@fandangos i've been using your ADDON for couple of weeks now on FIRE STICK 4K and TIVO STREAM 4K, both work great and playback is smoth, but i do need help with the library update is there something i can use so kodi can scan the new content and add it right away?

Thank you,
Reply
#39
From reading here, I suppose this addon should work on a Nvidia Shield. Could somebody confirm it? Without root being needed?

What version should one use? Fandangos's or jkasyan's? And lastly: does one have to install rclone separately? What I knew until today is that to mount rclone you would need to root your device. Since here I don't see mention of mounting (it uses WEBDAV, if I understand correctly), maybe it's the solution I was looking for.
For troubleshooting and bug reporting please make sure you read this first (usually it's enough to follow instructions in the second post).
Reply
#40
@fandangos any help? Please... :-)
For troubleshooting and bug reporting please make sure you read this first (usually it's enough to follow instructions in the second post).
Reply
#41
(2021-10-31, 18:23)ashlar Wrote: From reading here, I suppose this addon should work on a Nvidia Shield. Could somebody confirm it? Without root being needed?

What version should one use? Fandangos's or jkasyan's? And lastly: does one have to install rclone separately? What I knew until today is that to mount rclone you would need to root your device. Since here I don't see mention of mounting (it uses WEBDAV, if I understand correctly), maybe it's the solution I was looking for.

Literally just did this on a shield, no root. I used the version in the first post from jkasyan and followed the instructions. You don't need to install rclone seperately. Create a working rclone config on your pc if you haven't got one, copy the config file to a usb drive, and put that in the kodi profile directory. Install the addon from zip and edit the remote name in the addon settings in kodi. Set up the webdav source. Restart kodi.

I haven't tried using the source in a library yet but I can browse my gdrive in the source and play videos fine.
Reply
#42
(2021-11-04, 18:24)moley89 Wrote:
(2021-10-31, 18:23)ashlar Wrote: From reading here, I suppose this addon should work on a Nvidia Shield. Could somebody confirm it? Without root being needed?

What version should one use? Fandangos's or jkasyan's? And lastly: does one have to install rclone separately? What I knew until today is that to mount rclone you would need to root your device. Since here I don't see mention of mounting (it uses WEBDAV, if I understand correctly), maybe it's the solution I was looking for.

Literally just did this on a shield, no root. I used the version in the first post from jkasyan and followed the instructions. You don't need to install rclone seperately. Create a working rclone config on your pc if you haven't got one, copy the config file to a usb drive, and put that in the kodi profile directory. Install the addon from zip and edit the remote name in the addon settings in kodi. Set up the webdav source. Restart kodi.

I haven't tried using the source in a library yet but I can browse my gdrive in the source and play videos fine.
Cool. Thanks a lot for updating on this. Let us also know if library works correctly. I tried serving webdav from PC to Kodi (on the same PC) and it seemed to work ok, so I more or less get what the plugin is doing. Library remains a question but the fact that it's using the VFS cache is a reason for hope.
For troubleshooting and bug reporting please make sure you read this first (usually it's enough to follow instructions in the second post).
Reply
#43
hi team

i just would like to know which is the best addon that i can use to scan the library for new contend, i've been using this addon for a while with FIRE STICK 4K, 4K MAX and TIVO STREAM 4K, works great with any of those devises but it still very slow when it comes to update the library so any ideas of what can i use? thank you.
Reply
#44
(2021-08-04, 06:59)jkasyan Wrote:
(2021-08-02, 20:08)fandangos Wrote:
(2021-08-02, 08:24)maiki83 Wrote: So there is no solution for Google devices? (I have the chromecast with Google Tv). Apart on the fire tv it works perfectly, the only drawback is that even if the kodi app is installed in an external storage, anything that is inside kodi (.kodi folder), is installed in the internal storage, with 5.6gb it is not you can download all the images that I have in my library ... it's a shame.

There are 2 solutions:

1. Grab the apk you want to install.
Unpack it.
Add the rclone binary.
Repack and signe it.

Change the execution path within the addon. Can't remember the exact one but it will be side by side kodi own lib files.

2. Use automate for android:

https://forum.rclone.org/t/launch-rclone...droid/9151

This guy made several posts explaining how to do it. You will need a mouse to change settings within automate.
This app has some security measures. I had to download some "security" apks to enable networking and local file access.

.. and one extra solution.
Get yourself a raspberry pi, boot ubuntu, run rclone and share it over nfs/samba.

I have a NAS in my home and rclone runs on it. I gave up using rclone within android because auto update doesn't work (it will never work).
So watchdog addon doesn't work and when you have a gigantic library it's a no go to re scan it all.

To be honest, lately because of the easy to use and to please the wife, I'm just using Emby + rclone running on my NAS. Much easier for the shield to browse a big collection of media.

If I had a smaller collection I would stick with rclone on android itself.

That's just my opinion in my use case.
I built a kodi 19.1 install with rclone 1.56 that you can manually install at:

bit.ly/3eUAzwZ

You need to uninstall kodi before installing it, as it won't upgrade cleanly.

Then you can run the rclone addon from:

bit.ly/3kYQdeH
The second link leads to a warning from Bitly, stating that the link has been blocked for security reasons. Can't understand why, if it was supposed to lead to a Dropbox file as the first link provided (the custom build).

The plugin in your repository is pointing to a build that doesn't exist anymore. I know one can change it in settings, just pointing it out in case you didn't notice.
For troubleshooting and bug reporting please make sure you read this first (usually it's enough to follow instructions in the second post).
Reply
#45
(2021-11-04, 18:24)moley89 Wrote:
(2021-10-31, 18:23)ashlar Wrote: From reading here, I suppose this addon should work on a Nvidia Shield. Could somebody confirm it? Without root being needed?

What version should one use? Fandangos's or jkasyan's? And lastly: does one have to install rclone separately? What I knew until today is that to mount rclone you would need to root your device. Since here I don't see mention of mounting (it uses WEBDAV, if I understand correctly), maybe it's the solution I was looking for.

Literally just did this on a shield, no root. I used the version in the first post from jkasyan and followed the instructions. You don't need to install rclone seperately. Create a working rclone config on your pc if you haven't got one, copy the config file to a usb drive, and put that in the kodi profile directory. Install the addon from zip and edit the remote name in the addon settings in kodi. Set up the webdav source. Restart kodi.

I haven't tried using the source in a library yet but I can browse my gdrive in the source and play videos fine.
Hmmm... I had a friend of mine buy a Nvidia Shield following this. We iinstalled 19.4 from the download here on Kodi.tv. Then we placed rclone.conf in the correct directory, installed the addon. The addon downloaded rclone but then it does not work and in the log I have:

2022-05-19 12:45:10.405 T:21881    INFO <general>: RCLONE:/system/bin/sh: /data/user/0/org.xbmc.kodi/cache/apk/assets/../../../cache/lib/rclone-android-16-arm: Permission denied

Since I see this upthread, I wonder if there is a way to handle this correctly. Google talks about "untrusted apps" being stopped from calling Exec(), but I doubt it's as simple as downloading Kodi from the Play Store (we didn't do it because there's still 19.3 there).

Unfortunately @jkasyan custom build is downloadable but the plugin is not, as I mentioned in the previous post.

It would be great if you could upload an updated version, to 19.4.
For troubleshooting and bug reporting please make sure you read this first (usually it's enough to follow instructions in the second post).
Reply

Logout Mark Read Team Forum Stats Members Help
[HOW TO] Have rclone autostart on an Android install0