[libbluray-devel] JRE for Android part 2

Vitor Dall'Acqua veggav at gmail.com
Tue Jan 26 16:06:34 UTC 2021


2021-01-26 14:04:23.410 T:32232   DEBUG <general>: CBlurayCallback::Logger
- dl_posix.c:54: can't open library 'libjvm.so': dlopen failed: library
"libjvm.so" not found

2021-01-26 14:04:23.410 T:32232   DEBUG <general>: CBlurayCallback::Logger
- bdj.c:311: Opening
/mnt/expand/cab01563-bcca-48fa-a0bf-0fbddaf9b192/user/0/org.xbmc.kodi19DV/lib/aarch64//jre/lib/aarch64/server/libjvm
...

2021-01-26 14:04:23.425 T:32232   DEBUG <general>: CBlurayCallback::Logger
- dl_posix.c:56: opened library
'/mnt/expand/cab01563-bcca-48fa-a0bf-0fbddaf9b192/user/0/org.xbmc.kodi19DV/lib/aarch64//jre/lib/aarch64/server/libjvm.so'

2021-01-26 14:04:23.433 T:32232   DEBUG <general>: CBlurayCallback::Logger
- bdj.c:561: LIBBLURAY_CP not set, searching for libbluray-j2se-1.2.1.jar
...

2021-01-26 14:04:23.438 T:32232   DEBUG <general>: CBlurayCallback::Logger
- dl_posix.c:145: library file is
/mnt/expand/cab01563-bcca-48fa-a0bf-0fbddaf9b192/app/org.xbmc.kodi19DV-EwOW1tt0teky8M76PS7UJw==/lib/arm64/

2021-01-26 14:04:23.438 T:32232   DEBUG <general>: CBlurayCallback::Logger
- bdj.c:572: Checking
/mnt/expand/cab01563-bcca-48fa-a0bf-0fbddaf9b192/app/org.xbmc.kodi19DV-EwOW1tt0teky8M76PS7UJw==/lib/arm64/libbluray-j2se-1.2.1.jar
...

2021-01-26 14:04:23.438 T:32232   DEBUG <general>: CBlurayCallback::Logger
- file_posix.c:159: Error opening file
/mnt/expand/cab01563-bcca-48fa-a0bf-0fbddaf9b192/app/org.xbmc.kodi19DV-EwOW1tt0teky8M76PS7UJw==/lib/arm64/libbluray-j2se-1.2.1.jar

getting close!!

On Tue, Jan 26, 2021 at 12:37 PM Vitor Dall'Acqua <veggav at gmail.com> wrote:

> Nevermind figured it out, it's because I'm using expanded storage with the
> nvidia shield.
>
> On Tue, Jan 26, 2021 at 12:13 PM Vitor Dall'Acqua <veggav at gmail.com>
> wrote:
>
>> Petri,
>>
>> When bdj.c is looking at java_home, what exactly is it looking for?
>>
>> *with *
>> #undef JDK_HOME
>> #define JDK_HOME "/data/data/org.xbmc.kodi19DV/lib/aarch64/"
>>
>> *result*
>> 2021-01-26 12:30:07.473 T:24061   DEBUG <general>:
>> CBlurayCallback::Logger - dl_posix.c:54: can't open library 'libjvm.so':
>> dlopen failed: library "libjvm.so" not found
>>
>> 2021-01-26 12:30:07.477 T:24061   DEBUG <general>:
>> CBlurayCallback::Logger - bdj.c:474: Skipping
>> /data/data/org.xbmc.kodi19DV/lib/aarch64/ (not found)
>>
>> *with *
>> #undef JDK_HOME
>> #define JDK_HOME "/data/data/org.xbmc.kodi19DV/lib/aarch64/jre/"
>>
>> *result*
>> 2021-01-26 12:51:36.942 T:25917   DEBUG <general>:
>> CBlurayCallback::Logger - dl_posix.c:54: can't open library 'libjvm.so':
>> dlopen failed: library "libjvm.so" not found
>>
>> 2021-01-26 12:51:36.944 T:25917   DEBUG <general>:
>> CBlurayCallback::Logger - bdj.c:474: Skipping
>> /data/data/org.xbmc.kodi19DV/lib/aarch64/jre/ (not found)
>>
>> *with*
>> #undef JDK_HOME
>> #define JDK_HOME
>> "/data/data/org.xbmc.kodi19DV/lib/aarch64/jre/lib/aarch64/server/"
>>
>> *result*
>> 2021-01-26 13:05:06.838 T:27332   DEBUG <general>:
>> CBlurayCallback::Logger - dl_posix.c:54: can't open library 'libjvm.so':
>> dlopen failed: library "libjvm.so" not found
>>
>> 2021-01-26 13:05:06.839 T:27332   DEBUG <general>:
>> CBlurayCallback::Logger - bdj.c:474: Skipping
>> /data/data/org.xbmc.kodi19DV/lib/aarch64/jre/lib/aarch64/server/ (not found)
>>
>> I'll start replacing /data/data with /data/user/0 now but it would be a
>> good idea to figure out what is it looking for.
>>
>>
>> On Tue, Jan 26, 2021 at 10:48 AM Vitor Dall'Acqua <veggav at gmail.com>
>> wrote:
>>
>>> Ok made a small python script that puts the jre files inside the data
>>> folder of the app the same as the PoajvLauncher does
>>>
>>> #!/usr/bin/python3.4
>>> import os, sys, xbmc, time, stat, xbmcvfs, xbmcaddon
>>> from zipfile import ZipFile
>>>
>>> src = os.path.join(xbmcaddon.Addon().getAddonInfo('path'), 'jre.zip')
>>> loc =
>>> xbmcvfs.translatePath("special://xbmcbin/../../../lib/aarch64/jre.zip")
>>> loc2 = xbmcvfs.translatePath("special://xbmcbin/../../../lib/aarch64/")
>>>
>>> if not xbmcvfs.exists(loc):
>>>     xbmcvfs.copy(src, loc)
>>>     st = os.stat(loc)
>>>     os.chmod(loc, st.st_mode | stat.S_IEXEC)
>>>
>>>
>>> zip = ZipFile(loc)
>>> zip.extractall(loc2)
>>> zip.close()
>>>
>>> need a zip file to preserve the symlinks...
>>>
>>> now, compile libbluray pointing to
>>> /data/data/org.xbmc.kod/lib/aarch64 and hope for the best
>>>
>>> On Mon, Jan 25, 2021 at 10:22 PM Vitor Dall'Acqua <veggav at gmail.com>
>>> wrote:
>>>
>>>> So, the only way to load libjvm.so on android is if it is inside the
>>>> lib/aarch64 folder inside the apk directory.
>>>>
>>>> The only way to put the files in the right folder structure is with
>>>> assets.
>>>> Libbluray can't find libjvm.so in assets.
>>>>
>>>> On Mon, Jan 25, 2021 at 8:23 PM Vitor Dall'Acqua <veggav at gmail.com>
>>>> wrote:
>>>>
>>>>> well.. progress I can put the jre folder as is in the assets folder
>>>>> but not in the libs/aarch64 folders...... yet..
>>>>>
>>>>> On Mon, Jan 25, 2021 at 7:02 PM Vitor Dall'Acqua <veggav at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> This is the end of the log, it might have crashed because of
>>>>>> something that wasn't recorded
>>>>>>
>>>>>> 2021-01-25 17:53:05.255 T:30088   DEBUG <general>:
>>>>>> CDVDInputStreamBluray::Open - Disc name           : 3:10 To Yuma - Ultra HD
>>>>>> Blu-ray™
>>>>>> 2021-01-25 17:53:05.255 T:30088   DEBUG <general>:
>>>>>> CDVDInputStreamBluray::Open - First Play supported: 1
>>>>>> 2021-01-25 17:53:05.255 T:30088   DEBUG <general>:
>>>>>> CDVDInputStreamBluray::Open - Top menu supported  : 1
>>>>>> 2021-01-25 17:53:05.255 T:30088   DEBUG <general>:
>>>>>> CDVDInputStreamBluray::Open - HDMV titles         : 0
>>>>>> 2021-01-25 17:53:05.255 T:30088   DEBUG <general>:
>>>>>> CDVDInputStreamBluray::Open - BD-J titles         : 6
>>>>>> 2021-01-25 17:53:05.255 T:30088   DEBUG <general>:
>>>>>> CDVDInputStreamBluray::Open - BD-J handled        : 1
>>>>>> 2021-01-25 17:53:05.256 T:30088   DEBUG <general>:
>>>>>> CDVDInputStreamBluray::Open - UNSUPPORTED titles  : 0
>>>>>> 2021-01-25 17:53:05.256 T:30088   DEBUG <general>:
>>>>>> CDVDInputStreamBluray::Open - AACS detected       : 0
>>>>>> 2021-01-25 17:53:05.256 T:30088   DEBUG <general>:
>>>>>> CDVDInputStreamBluray::Open - libaacs detected    : 0
>>>>>> 2021-01-25 17:53:05.256 T:30088   DEBUG <general>:
>>>>>> CDVDInputStreamBluray::Open - AACS handled        : 0
>>>>>> 2021-01-25 17:53:05.256 T:30088   DEBUG <general>:
>>>>>> CDVDInputStreamBluray::Open - BD+ detected        : 0
>>>>>> 2021-01-25 17:53:05.256 T:30088   DEBUG <general>:
>>>>>> CDVDInputStreamBluray::Open - libbdplus detected  : 0
>>>>>> 2021-01-25 17:53:05.256 T:30088   DEBUG <general>:
>>>>>> CDVDInputStreamBluray::Open - BD+ handled         : 0
>>>>>> 2021-01-25 17:53:05.256 T:30088   DEBUG <general>:
>>>>>> CDVDInputStreamBluray::Open - no menus (libmmbd, or profile 6 bdj)  : 0
>>>>>> 2021-01-25 17:53:05.256 T:30088   DEBUG <general>:
>>>>>> CBlurayCallback::Logger - bdj.c:997: bdj_open()
>>>>>>
>>>>>> 2021-01-25 17:53:05.256 T:30088   DEBUG <general>:
>>>>>> CBlurayCallback::Logger - bdj.c:465: JAVA_HOME not set, trying default
>>>>>> locations
>>>>>>
>>>>>> 2021-01-25 17:53:05.256 T:30088   DEBUG <general>:
>>>>>> CBlurayCallback::Logger - bdj.c:331: Opening libjvm ...
>>>>>>
>>>>>> 2021-01-25 17:53:05.341 T:30105   DEBUG <general>:
>>>>>> CFileCache::Process - Source read didn't return any data! Hit eof(?)
>>>>>> 2021-01-25 17:53:05.348 T:30088   DEBUG <general>:
>>>>>> CBlurayCallback::Logger - dl_posix.c:56: opened library 'libjvm.so'
>>>>>>
>>>>>> 2021-01-25 17:53:05.350 T:30088   DEBUG <general>:
>>>>>> CBlurayCallback::Logger - dl_posix.c:114: dlsym(0xc2c281e42d63307,
>>>>>> 'JVM_DefineModule') failed: undefined symbol: JVM_DefineModule
>>>>>>
>>>>>>
>>>>>> And I don't know how to keep the folder structure while adding with
>>>>>> aapt.
>>>>>> This is how it works, I need to have a folder named lib/aarch64 in
>>>>>> the same folder as aapt so it keeps the folder structure.
>>>>>> But if I have folders inside when jarsigning it crashes. It doesn't
>>>>>> add files in subfolders.
>>>>>>
>>>>>> If we want to use Kodi's own way of adding files it is here:
>>>>>>
>>>>>> https://github.com/xbmc/xbmc/blob/master/tools/android/packaging/Makefile.in#L112
>>>>>>
>>>>>> This is why it only adds .so files but I don't know how to add
>>>>>> subfolders.
>>>>>>
>>>>>> On Mon, Jan 25, 2021 at 6:07 PM Petri Hintukainen <
>>>>>> phintuka at users.sourceforge.net> wrote:
>>>>>>
>>>>>>> ma, 2021-01-25 kello 22:21 +0200, Shaya Potter kirjoitti:
>>>>>>> > to be more specific, they said the android port doesn't support
>>>>>>> > "headfull awt" presumably because it doesn't have a framebuffer to
>>>>>>> > write to.   That would presumably (though we know what assume
>>>>>>> means)
>>>>>>> > mean it supports headless awt.  the question would be, is headless
>>>>>>> > awt sufficient for libbluray.  Basically, how does libbluray draw?
>>>>>>>
>>>>>>> There's no need for Android AWT. Libbluray implements own AWT (so
>>>>>>> that
>>>>>>> graphics can be passed to the application). But java.awt.* classes
>>>>>>> are
>>>>>>> still required in the java runtime libs.
>>>>>>>
>>>>>>> I've just built this JDK, and it seems to have all required AWT
>>>>>>> classes.
>>>>>>>
>>>>>>> > I should note in digging into it, it seems there acually is a
>>>>>>> > supported android port of java now which they are based on
>>>>>>> >
>>>>>>> > http://openjdk.java.net/projects/mobile/android.html
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> > On Mon, Jan 25, 2021 at 9:32 PM Roald Strauss <mr_lou at dewfall.dk>
>>>>>>> > wrote:
>>>>>>> > >
>>>>>>> > >  Lemme pitch in, if I can do that by just replying this mail.
>>>>>>> > >  AWT = Abstract Windowing Tools, as far as I remember.
>>>>>>> > >  It is the framework used for drawing stuff in old Java, and yes,
>>>>>>> > > it is very much needed for Blu-ray Disc Java. It's the only way
>>>>>>> > > developers can draw stuff to the screen.
>>>>>>> > >
>>>>>>> > >
>>>>>>> > >
>>>>>>> > >
>>>>>>> > >  Den 25.01.2021 kl. 20.12 skrev Vitor Dall'Acqua:
>>>>>>> > >
>>>>>>> > >
>>>>>>> > > >
>>>>>>> > > > Got a reply!
>>>>>>> > > >
>>>>>>> > > >  So, launcher already has all the components of JRE (except for
>>>>>>> > > > headful AWT, of course), but it was built with ndk-r12b (i
>>>>>>> > > > think?)
>>>>>>> > > >
>>>>>>> > > >
>>>>>>> > > >  @Petri what is AWT and is that needed for libbluray?
>>>>>>> > > >
>>>>>>> > > >
>>>>>>> > > >  Is it too lazy of my end to ask the guy to compile it with a
>>>>>>> > > > newer ndk? O:)
>>>>>>> > > >
>>>>>>> > > >
>>>>>>> > > >
>>>>>>> > > >
>>>>>>> > > >  On Mon, Jan 25, 2021 at 3:52 PM Vitor Dall'Acqua <
>>>>>>> > > > veggav at gmail.com> wrote:
>>>>>>> > > >
>>>>>>> > > >
>>>>>>> > > > >
>>>>>>> > > > > Well.. wish me luck
>>>>>>> > > > >
>>>>>>> > > > >
>>>>>>> https://github.com/PojavLauncherTeam/PojavLauncher/issues/713
>>>>>>> > > > >
>>>>>>> > > > >
>>>>>>> > > > >
>>>>>>> > > > >  Later, I'll give a go with his JRE files and see what
>>>>>>> > > > > happens.
>>>>>>> > > > >
>>>>>>> > > > >
>>>>>>> > > > >
>>>>>>> > > > >  On Mon, Jan 25, 2021 at 3:27 PM Shaya Potter <
>>>>>>> > > > > spotter at gmail.com> wrote:
>>>>>>> > > > >
>>>>>>> > > > >
>>>>>>> > > > > >
>>>>>>> > > > > > this actually includes source code
>>>>>>> > > > > >
>>>>>>> > > > > >  see
>>>>>>> > > > > >
>>>>>>> > > > > >  https://github.com/PojavLauncherTeam/PojavLauncher
>>>>>>> > > > > >
>>>>>>> > > > > >  Java Runtime Environment (JRE)
>>>>>>> > > > > >
>>>>>>> > > > > >  JRE for Android is here, also the build script here.
>>>>>>> > > > > >  Follow build instruction on build script README.md.
>>>>>>> > > > > >  You can also get CI auto builds.
>>>>>>> > > > > >  Spliting JRE and put to the launcher: coming soon.
>>>>>>> > > > > >
>>>>>>> > > > > >  I'd reach out to that guy, ask him if he would be
>>>>>>> interested
>>>>>>> > > > > > in trying to get his android work integrated into kodi
>>>>>>> > > > > > android build for libbluray usage.
>>>>>>> > > > > >
>>>>>>> > > > > >
>>>>>>> > > > > >  On Mon, Jan 25, 2021 at 7:30 PM Vitor Dall'Acqua <
>>>>>>> > > > > > veggav at gmail.com> wrote:
>>>>>>> > > > > >
>>>>>>> > > > > >
>>>>>>> > > > > > >
>>>>>>> > > > > > >  Received a notice that the e-mails were getting really
>>>>>>> big
>>>>>>> > > > > > > and blocked.
>>>>>>> > > > > > >
>>>>>>> > > > > > >
>>>>>>> > > > > > >
>>>>>>> > > > > > >  So, look another thing I found:
>>>>>>> > > > > > >
>>>>>>> > > > > > >
>>>>>>> https://github.com/PojavLauncherTeam/PojavLauncher/releases
>>>>>>> > > > > > >
>>>>>>> > > > > > >
>>>>>>> > > > > > >  Minecraft launcher built for Android that uses JRE.
>>>>>>> > > > > > >
>>>>>>> > > > > > >  When you install this apk it will place the files are
>>>>>>> > > > > > > normal /data/app/appname/lib and no JRE there.
>>>>>>> > > > > > >  After it runs for the first time it will put files here:
>>>>>>> > > > > > >
>>>>>>> > > > > > >
>>>>>>> > > > > > >
>>>>>>>  /data/user/0/net.kdt.pojavlaunch/jre_runtime/lib/aarch64/s
>>>>>>> > > > > > > erver/libjvm.so
>>>>>>> > > > > > >
>>>>>>> > > > > > >
>>>>>>> > > > > > >  So I took that put in a zip file and added to mega so
>>>>>>> you
>>>>>>> > > > > > > guys can take a look
>>>>>>> > > > > > >
>>>>>>> > > > > > >
>>>>>>> https://mega.nz/file/XNly2ZgB#DFyM8xq4mEAQQ1d3ERF1GFoTqzIOcuESZXjuGdIguek
>>>>>>> > > > > > >
>>>>>>> > > > > > >
>>>>>>> > > > > > >  It seems many use JRE on Android.
>>>>>>> > > > > > >  And as you can see it's very similar to the way it's
>>>>>>> > > > > > > present in Termux.
>>>>>>> > > > > > >
>>>>>>> > > > > > >
>>>>>>> > > > > > >  _______________________________________________
>>>>>>> > > > > > >  libbluray-devel mailing list
>>>>>>> > > > > > >  libbluray-devel at videolan.org
>>>>>>> > > > > > >  https://mailman.videolan.org/listinfo/libbluray-devel
>>>>>>> > > > > > >
>>>>>>> > > > > > >
>>>>>>> > > > > >
>>>>>>> > > > > >  _______________________________________________
>>>>>>> > > > > >  libbluray-devel mailing list
>>>>>>> > > > > >  libbluray-devel at videolan.org
>>>>>>> > > > > >  https://mailman.videolan.org/listinfo/libbluray-devel
>>>>>>> > > > > >
>>>>>>> > > > > >
>>>>>>> > > > >
>>>>>>> > > > >
>>>>>>> > > > >
>>>>>>> > > >
>>>>>>> > > >
>>>>>>> > > >
>>>>>>> > > >
>>>>>>> > > > _______________________________________________
>>>>>>> > > > libbluray-devel mailing list
>>>>>>> > > > libbluray-devel at videolan.org
>>>>>>> > > > https://mailman.videolan.org/listinfo/libbluray-devel
>>>>>>> > > >
>>>>>>> > >
>>>>>>> > > _______________________________________________
>>>>>>> > > libbluray-devel mailing list
>>>>>>> > > libbluray-devel at videolan.org
>>>>>>> > > https://mailman.videolan.org/listinfo/libbluray-devel
>>>>>>> > _______________________________________________
>>>>>>> > libbluray-devel mailing list
>>>>>>> > libbluray-devel at videolan.org
>>>>>>> > https://mailman.videolan.org/listinfo/libbluray-devel
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> libbluray-devel mailing list
>>>>>>> libbluray-devel at videolan.org
>>>>>>> https://mailman.videolan.org/listinfo/libbluray-devel
>>>>>>>
>>>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/libbluray-devel/attachments/20210126/0908be92/attachment-0001.html>


More information about the libbluray-devel mailing list