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.

Build

Prepare an Elementum addon .zip at path/to/plugin.video.elementum- .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:

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

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

  1. plugin.video.elementum- .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- -release- .apk found in the build/outputs/apk/release subfolder are one or more .apk files containing the binaries from the addon .zip you provided.

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.

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
  • 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 9
  • [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
  • 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
Src for muffin client, without hwid

Muffin-SRC-BUILDABLE Src for muffin client. Modifications: Fully removed the hwid system, Changed the main menu shader option to be off by default (it

null 28 Dec 2, 2022
This directory contains the model files (protos) for the Bar ServiceThis directory contains the model files (protos) for the Bar Service

This directory contains the model files (protos) for the Bar ServiceThis directory contains the model files (protos) for the Bar Service

Logesh Dinakaran 0 Nov 22, 2021
Starter-Android-Library - Starter Android Library is an Android Project with Modular Architecture.

Starter-Android-Library - Starter Android Library is an Android Project with Modular Architecture.

OpenBytes 1 Feb 18, 2022
SL4A brings scripting languages to Android by allowing you to edit and execute scripts and interactive interpreters directly on the Android device.

#Scripting Layer for Android (SL4A) SL4A brings scripting languages to Android by allowing you to edit and execute scripts and interactive interpreter

Damon Kohler 2.3k Dec 23, 2022
****. Use the native and support library variants instead - https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml.html. An android library that makes it easy to add custom fonts to edittexts and textviews

Add to your project Add this line to your dependencies in build.gradle compile 'in.workarounds.typography:typography:0.0.8' Using the views There are

Workarounds 43 Nov 6, 2021
ZXing ("Zebra Crossing") barcode scanning library for Java, Android

Project in Maintenance Mode Only The project is in maintenance mode, meaning, changes are driven by contributed patches. Only bug fixes and minor enha

ZXing Project 30.5k Dec 27, 2022
RxJava binding APIs for Android's UI widgets.

RxBinding RxJava binding APIs for Android UI widgets from the platform and support libraries. Download Platform bindings: implementation 'com.jakewhar

Jake Wharton 9.7k Jan 6, 2023
A gradle plugin for getting java lambda support in java 6, 7 and android

Gradle Retrolambda Plugin This plugin will automatically build your java or android project with retrolambda, giving you lambda goodness on java 6 or

Evan Tatarka 5.3k Jan 5, 2023
A comprehensive tutorial for Android Data Binding

精通 Android Data Binding 更多干货可移步至个人主页 QQ 交流群:324112728 ,或者点击链接加入QQ群 官方虽然已经给出了教程 - Data Binding Guide (中文版 - Data Binding(数据绑定)用户指南) ,但是实践之后发现槽点实在太多,于是就

Fei Liang 2.6k Dec 6, 2022
A Job Queue specifically written for Android to easily schedule jobs (tasks) that run in the background, improving UX and application stability.

Development in this repository is stopped. Future development continues on https://github.com/yigit/android-priority-jobqueue ========================

Path Mobile Inc Pte. Ltd. 2.4k Dec 9, 2022
An android library for displaying fps from the choreographer and percentage of time with two or more frames dropped

DEPRECATED TinyDancer is deprecated. No more development will be taking place. Check out the Google Android developer documentation for UI performance

Friendly Robot 1.9k Jan 3, 2023
Memory safer implementation of android.os.Handler

Android Weak Handler Memory safer implementation of android.os.Handler Problem Original implementation of Handler always keeps hard reference to handl

Badoo Tech 1.5k Jan 5, 2023
Android Library to help you with your runtime Permissions.

PermissionHelper Android Library to help you with your runtime Permissions. Demo Android M Watch it in action. Pre M Watch it in action. Nexus 6 (M) N

Kosh Sergani 1.2k Dec 14, 2022
Android validation library which helps developer boil down the tedious work to three easy steps.

AwesomeValidation Introduction Implement validation for Android within only 3 steps. Developers should focus on their awesome code, and let the librar

Jing Li 1.1k Dec 17, 2022
📄The reliable, generic, fast and flexible logging framework for Android

logback-android v2.0.0 Overview logback-android brings the power of logback to Android. This library provides a highly configurable logging framework

Tony Trinh 1.1k Jan 8, 2023
Android framework for node.js applications

Introduction Anode is an embryonic framework for running node.js applications on Android. There are two main parts to this: a port of node.js to the A

Paddy Byers 586 Dec 9, 2022
It makes a preview from an url, grabbing all the information such as title, relevant texts and images. This a version for Android of my web link preview https://github.com/LeonardoCardoso/Link-Preview

LeoCardz Link Preview for Android It makes a preview from an url, grabbing all the information such as title, relevant texts and images. Visual Exampl

Leonardo Cardoso 420 Nov 19, 2022
AndroidPermissions 4.2 0.0 Java Android M was added to check Permission. but Permission check processing is so dirty.

Android Permissions Checker Android M was added to check Permission. but Permission check processing is so dirty. This Project is to be simple, Checki

Steve SeongUg Jung 340 Nov 11, 2022
A plug and play ;) android library for displaying a "rate this app" dialog

Easy Rating Dialog This lib provides a simple way to display an alert dialog for rating app. Default conditions to show: User opened the app more than

Fernando Martínez 111 Dec 30, 2022