A service that executes binaries for Kodi's addon Elementum on Android without a W^X violation.

Overview

ElementumService

A service that executes binaries for Kodi's addon Elementum on Android without a W^X violation.

Download

Use source https://StefanIlchev.github.io/ElementumService.

Install

Install an .apk with an Application Binary Interface (ABI) that your device supports or the bigger universal one.

Add Elementum to Kodi from the .android_client.zip. When the addon completes installation it'll start the service app which may ask you for some Android permissions.

On Android 11 and up the service app may ask you to allow it to manage all files or try to open its settings if your device doesn't let it. If nothing else works the service app will show you the following command that will allow it to manage all files which you might have to execute for Elementum to work properly:

adb shell appops set --uid service.elementum.android MANAGE_EXTERNAL_STORAGE allow

Auto-update

Reinstall the addon from the added Elementum Service Repository and Kodi should keep it up to date. If you don't see the repository as an option check if it's not disabled.

When updating itself the service app might ask you to allow it to install apps and to confirm the update. After an update the service won't be started automatically. A start can be triggered by interacting with the addon which will try to start the service if it's not responding.

The service app won't work if it's a different version from the addon and will show a message like:

<service-version> ≠ <client-version>

Build

Prepare an Elementum addon .zip at path/to/plugin.video.elementum-<version>.zip containing Android binaries for your device either by building the Elementum project or by downloading it from a release's assets.

Assuming you already have Android Studio setup, execute the following command in a terminal:

gradlew clean assembleRelease zipAndroidClient -DaddonZip="path/to/plugin.video.elementum-<version>.zip"

and when it completes successfully look for the following files in the newly created build folder:

  1. plugin.video.elementum-<version>.android_client.zip found directly in the build folder is the addon .zip you provided with its binaries removed and scripts modified to work with the service app;

  2. ElementumService-<ABI>-release-<version>.apk found in the build/outputs/apk/release subfolder are one or more .apk files containing the binaries from the addon .zip you provided.

Notes

From now on when Elementum starts its daemon it'll actually start the service app and when it stops it'll stop the service app.

You'll no longer be able to use paths to Kodi's data folder as they will be translated to the service app's data folder.

The output from the binaries will no longer appear in Kodi's log and will go to Android's log instead.

Comments
  • release 0.1.86.4.apk

    release 0.1.86.4.apk

    Installing this causes elementum to not start, or hang with "looks like elementum is still starting up" message. Reverting to 1.86.3 fixes things. Running e 1.86, Nvidia shield, android 11

    opened by earlgray44 15
  • NAS write permission denied for ElementumService on NVIDIA Shield

    NAS write permission denied for ElementumService on NVIDIA Shield

    Since ElementumService is installed as a system app (and not a user app), it is impossible to grant NAS write permission via the normal Settings UI.

    A solution is required for non-rooted devices (e.g. installing the app as a user app instead).

    Any help?

    opened by homiee 11
  • [suggestion] turn off service from notification

    [suggestion] turn off service from notification

    it would be good if you could turn off the service from notification

    because sometimes i close Kodi from recent apps and this this doesn't turn off the service so i have to open Kodi again open Elementum again and reclose it from the app

    opened by uomar8 9
  • Library Integration Issue

    Library Integration Issue

    I'm running Kodi on a Shield Pro (Android 11). I've noticed that after installing the Elementum service, my library stopped being updated when I added new movies to the library via Elementum. Took me a while to pinpoint the issue but I believe it's because of this that you mentioned on the README:

    You'll no longer be able to use paths to Kodi's data folder as they will be translated to the service app's data folder.

    I can see the movies are added to /storage/emulated/0/Android/data/service.elementum.android/files/.kodi/temp/elementum_library/Movies but this is not the directory that Kodi is using in the library, so I think this is the reason why I don't see updates on my library. My library is currently configured to use the special://temp/elementum_library/Movies directory which translates to /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/temp/elementum_library/Movies. I tried to change this to use the service.elementum.android directory mentioned above but it obviously fails since those files belong to a diferent app (the Elementum Service) and Kodi can't access them. Is there a workaround for this?

    Thanks in advance!

    opened by henshin 6
  • nVidia Shield: Storage Permission toggle disappears (too quickly to toggle ALLOW)

    nVidia Shield: Storage Permission toggle disappears (too quickly to toggle ALLOW)

    As others have mentioned, thank you so much for your generous work!

    I've tried installing various releases, but keep having the same issue. I try and open Elementum, then have a pop-up that says: adb shell appops set --uid service.elementum.android MANAGE_EXTERNAL_STORAGE allow

    there's an OK button, but that's about it.

    whenever trying to open Elementum, it's still giving me the "still warming up" notice.

    when i go into the app permissions, i'll see a permissions box QUICKLY... before it then vanishes. i've tried quickly pressing down, but cannot seem to get onto the spot to toggle the ALLOW permissions.

    any suggestions?

    ElementumService_notice

    opened by splaquet 6
  • Just curious: Do the binaries actually need the .so extension?

    Just curious: Do the binaries actually need the .so extension?

    It's unusual to name executables using the "so" file extension. Is there anything in android that forces you to name the files that way? I see that you bundle the binaries as JNI libraries into the APK (which is maybe the reason for naming the files that way), but isn't it also possible to just package them as resources (for example using the processResources gradle task)?

    There is no actual issue that I am trying to fix. I am just curious about some of the choices you've made.

    That being said, I think your solution to the W^X issue is very elegant: Since android only allows the execution of binaries bundled with the APK, let's just put them into an APK. Nice! Luckily the Kodi extension uses sockets to communicate with the core process, otherwise we would have lot more work to do :)

    Thanks for this project btw!

    opened by ChristianCiach 4
  • Google Chromecast 4k with Android 12 - Kodi data on /sdcard

    Google Chromecast 4k with Android 12 - Kodi data on /sdcard

    Hi,

    Thanks for making this possible on Android 11+ :)

    Could you please check the logcat on why the Elementum doesn't work when Kodi's data path is set to /sdcard, instead of the default one /Android/data/ ?

    The daemon doesn't start, I think

    logcat.txt

    Let me know if you need more info.

    Thanks !

    opened by johnnyslt 3
  • Path error starting elementum

    Path error starting elementum

    After install the service APK and install the modified Zip I'm getting the error:

    Stat /storage/emulated/0/data/service.elementum.android/fi No such file or directory

    Device: TCL android TV 11

    Kodi version: V19.3 matrix

    opened by Regjoz 3
  • Elementum service stopped working

    Elementum service stopped working

    Hi, Since today elementum service has stopped working. After I start today to watch something message "elementum service has started" appears and movie has stopped. I try to reinstall apk file and kodi but nothing happened. Here log. I am sorry but on Chromecast with Google tv I can't copy log file. https://drive.google.com/drive/folders/1bx8kVrdBqK1fo3qD-FZCgFmdBgqTVjIq Please take a look.

    opened by ninormalen 2
  • Any possibility to merge to Kodi v20 (Nexus)?

    Any possibility to merge to Kodi v20 (Nexus)?

    Version 19.4 works perfectly, but my cell phone uses 120hz and only the Nexus version has this function, and the Nexus version has the following error: "Internal server error"

    2022-08-26 04:02:36.512 T:27322    INFO <general>: Loading skin file: DialogSelect.xml, load type: KEEP_IN_MEMORY
    2022-08-26 04:02:37.679 T:27686 WARNING <general>: --- Playing "[COLOR springgreen][B]Nacional [/B][/COLOR]". plugin://plugin.video.elementum/play?uri=magnet:?xt=urn:btih:4e26bed5b6a21ba4b7c3d5c8c4f7d3596341e2da&amp;dn=A%20Lei%202021%20WEB-DL%20720p%20NACIONAL&amp;tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&amp;tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce
    2022-08-26 04:02:37.699 T:27686 WARNING <general>: Setting most video properties through ListItem.setInfo() is deprecated and might be removed in future Kodi versions. Please use the respective setter in InfoTagVideo.
    2022-08-26 04:02:39.933 T:27322    INFO <general>: Loading skin file: DialogConfirm.xml, load type: KEEP_IN_MEMORY
    2022-08-26 04:02:48.246 T:27686   ERROR <general>: /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.urllib3/lib/urllib3/connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'dl.opensubtitles.org'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
                                                         warnings.warn(
                                                       
    2022-08-26 04:02:54.287 T:27322   ERROR <general>: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.videos/?name=%5BCOLOR+springgreen%5D%5BB%5DNacional+%5B%2FB%5D%5B%2FCOLOR%5D&url=%3C%2Fstrong%3E%3C%2Fp%3E%3Cp+style%3D%22text-align%3A+center%3B%22%3E%3Cstrong%3EWEB-DL+720p+%28MK%29%3C%2Fstrong%3E+%7C+1.95+GB%3Cbr+%2F%3E%3Cstrong%3E%3Ca+href%3D%22magnet%3A%3Fxt%3Durn%3Abtih%3A4e26bed5b6a21ba4b7c3d5c8c4f7d3596341e2da]
    2022-08-26 04:02:57.305 T:27322    INFO <general>: CWinSystemAndroid::DestroyWindow
    2022-08-26 04:02:57.365 T:27284 WARNING <general>: CPeripheralBusAndroid: failed to update input device with ID 5 because it couldn't be found
    2022-08-26 04:02:57.365 T:27284 WARNING <general>: CPeripheralBusAndroid: failed to update input device with ID 2 because it couldn't be found
    
    opened by GladistonXD 2
  • MiTV cant install

    MiTV cant install

    Hi thanks for your work but Im no able to install the universal package in my MiTV model MTV-MOOQ0. Android version 10. Kernel version: 4.19.79+ Build: QTG3.200305.006.3055 I get "there was a problem parsing the app" corrupt xml binary file. Any tips? Thanks Nuno

    opened by cervaens 2
  • "there was a problem parsing the package" message

    Hello Stefan. Thank you for a good work. I see that for many of us Elementum works on android 10+, but I still have an issue with it. Whatever I do this message is on my screen when trying to run apk. And it doesn't matter if it is universal or specific one. Too many times too many tries. Simply I don't know what to do. I have some android 10 tv box. Sorry to bother you.

    opened by darkonije 13
  • Elementum restarting issue

    Elementum restarting issue

    Hello,

    First of all thanks for your amazing work. I had everything working perfectly but recently I had to restore my device. I've installed everything back as usual but now the "Elementum daemon has started" pops up when I launch the movie, then after few seconds the movie stops playing. It seems the daemon crashes.

    I'm on NVIDIA Shield 2019 Tube firmware 9.0.2 (33.1.0.319) Android 11; Kodi 19.4

    EDIT: it seems it happens only with 4K HDR content

    opened by RunAway189 56
Releases(v0.1.860052)
Owner
null
InstaKill is a shitty addon for the Meteor Client created without knowledge of the code

InstaKill About InstaKill is a shitty addon for the Meteor Client created without knowledge of the code. The only thing this addon adds is InstaKill e

null 4 Jun 15, 2022
BinAbsInspector: Vulnerability Scanner for Binaries

What is BinAbsInspector? BinAbsInspector (Binary Abstract Inspector) is a static analyzer for automated reverse engineering and scanning vulnerabiliti

null 1.3k Jan 4, 2023
Android Auto Apps Downloader (AAAD) is an app for Android Phones that downloads popular Android Auto 3rd party apps and installs them in the correct way to have them in Android Auto.

Android Auto Apps Downloader (AAAD) is an app for Android Phones that downloads popular Android Auto 3rd party apps and installs them in the correct way to have them in Android Auto.

Gabriele Rizzo 865 Jan 2, 2023
Tinker is a hot-fix solution library for Android, it supports dex, library and resources update without reinstall apk.

Tinker Tinker is a hot-fix solution library for Android, it supports dex, library and resources update without reinstalling apk. Getting started Add t

Tencent 16.6k Dec 30, 2022
Labymod-Addon für Journalisten auf dem Minecraft-Server GermanMiner.de

NewsAddon-GermanMiner-Labymod LabyMod-Addon für die Fraktion News auf dem Minecraft-Wirtschaftsserver GermanMiner.de Zu LabyMod, Zu GermanMiner Jeglic

Jan Heist 2 Nov 25, 2022
karasic addon for meteor client

Karasic Addon Addon for Meteor Client by Kiriyaga(ajaj#7615) https://discord.gg/chJNFZzTgq download jar file and run it with latest dev build of Meteo

киригай 14 Dec 2, 2022
Netheopoiesis is our entry to the Slimefun Addon Jam 2022. Created by Sefiraat and J3fftw

Netheopoiesis Netheopoiesis is our entry to the Slimefun Addon Jam 2022. Created by Sefiraat and J3fftw This addon has three main aims: To bring life

null 3 Jun 16, 2022
Template mod to make an addon mod for Create fabric.

Create Fabric Addon Template This template mod comes pre-configured for developing an addon mod for Create on Fabric. Setup For environment setup inst

null 14 Dec 29, 2022
Tuya 37 Dec 26, 2022
Get device location by telephony (SIM card) or settings without using GPS tracker.

react-native-device-country Get device location by telephony (SIM card) or settings without using GPS tracker Installation yarn add react-native-devic

dev.family 46 Nov 29, 2022
Maintainable software without effort.

modern-clean-architecture Create services with a clean architecture with significantly less effort necessary than usual. The main idea of Clean Archit

Bertil Muth 29 Dec 14, 2022
A simple app to use Xposed without root, unlock the bootloader or modify system image, etc.

中文文档 Introduction VirtualXposed is a simple App based on VirtualApp and epic that allows you to use an Xposed Module without needing to root, unlock t

VirtualXposed 14k Jan 8, 2023
The goal of the project is to create a web application using Java EE and database (PostgreSQL) without connecting a modern technology stack like spring boot and hibernate

About The Project SignIn page SignUp page Profile page The goal of the project is to create a web application using Java EE and database (PostgreSQL)

Islam Khabibullin 2 Mar 23, 2022
QuickShop is a shop plugin that allows players to easily sell/buy any items from a chest without any commands.

QuickShop is a shop plugin that allows players to easily sell/buy any items from a chest without any commands. In fact, none of the commands that QuickShop provides are ever needed by a player.

Ghost_chu 24 Dec 30, 2022
Run Java plugins without compiling them

Run Java plugins without compiling them! Usage Under plugins/SkriptJava, you can put your .java files to run when the server is up and loaded. This pl

Rance Andres 5 Sep 5, 2022
Winfoom is an HTTP(s) proxy server facade that allows applications to authenticate through the proxy without having to deal with the actual handshake.

winfoom Basic Proxy Facade for NTLM, Kerberos, SOCKS and Proxy Auto Config file proxies To help this project please give it a star ⭐ Overview Winfoom

Eugen Covaci 56 Dec 8, 2022
A Network Observer which would provide maximum details about the network to the administrator on their screen without knowing to their users.

Smart-Network-Observer-With-Energy-Framework A Network Observer which would provide maximum details about the network to the administrator on their sc

Shrutika Ambre 5 Jul 15, 2022
The Google code scanner API provides a complete solution for scanning codes without requiring your app to request camera permission.

Android Google Code Scanner The Google code scanner API provides a complete solution for scanning codes without requiring your app to request camera p

Prabhakar Thota 7 Nov 23, 2022
This app brings Privacy dashboard features from Android 12 to older android devices.

PrivacyDashboard This app brings Privacy dashboard features from Android 12 to older android devices. Have you ever thought which apps are accessing y

Rushikesh Kamewar 234 Jan 7, 2023