[libbluray-devel] JRE for Android part 2

Vitor Dall'Acqua veggav at gmail.com
Wed Jan 27 14:52:40 UTC 2021


It would be fantastic if you could compile it for Android.
I'll do the changes you propose to an unmodified version of bdj.c

I have zipped the jar files with the jre and I'm working like this:
#undef JDK_HOME
#define JDK_HOME
"/mnt/expand/cab01563-bcca-48fa-a0bf-0fbddaf9b192/user/0/org.xbmc.kodi19DV/lib/aarch64/"
#undef LIBBLURAY_CP
#define LIBBLURAY_CP
"/mnt/expand/cab01563-bcca-48fa-a0bf-0fbddaf9b192/user/0/org.xbmc.kodi19DV/lib/aarch64/"
#endif

back at a place that's not the apk.

the people at PojavLauncher suggested that more libs should be pre loaded
and suggested looking at how they do it:
https://github.com/PojavLauncherTeam/PojavLauncher/blob/v3_openjdk/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/utils/JREUtils.java

but if you already got it running on linux, I guess this is not the case
here.

On Wed, Jan 27, 2021 at 11:46 AM Petri Hintukainen <
phintuka at users.sourceforge.net> wrote:

> ti, 2021-01-26 kello 22:58 -0300, Vitor Dall'Acqua kirjoitti:
> > Ok, I'm back at using the libs inside the libs folder as this makes
> > no difference in the end.
> > The reason for the crashes the JVM Module, I just removed that..
>
> No, as I already wrote, it doesn't crash because of missing
> JVM_DefineModule. Missing JVM_DefineModule is normal with Java 8. Crash
> happens somewhere after this check, and before end of bdj_open(), where
> Java version is logged.
>
> If you drop the check for JVM_DefineModule, you need to set java_9 to
> 0. Java 9+ requires different initialization arguments.
>
> > and
> > started removing a lot of stuff from bdj.c including all the
> > irrelevant ifdefs
>
> To pinpoint the location, you could add following lines to bdj_open(),
> _load_jvm() and _bdj_init():
>
>     BD_DEBUG(DBG_CRIT, "at line %d\n", __LINE__);
>
> Then, we can see what is the last line before crash.
>
> Is the log buffered ? If yes, last lines may be missing from there.
>
> > Petri, if you can take a look at my final bdj.c is the last pastebin
>
> java_9 is uninitialized, other than that it looks identical to the
> orginal (with #ifdefs removed).
>
> > I'm getting crashes without any explanation.
> >
> > Tried adb logcat but I can't see anything relevant:
> > https://pastebin.com/NLM1UP6C
> > T
> > And this is from Kodi
> > https://pastebin.com/fGad2kUx
> >
> > And here is the version I'm using of my bdj.c
> > https://pastebin.com/AwXcCMBa
> >
> > Any comment or advice is more than welcome because without any log
> > indication I have no idea where to look.
>
> I compiled this jvm for Linux with the same configuration options
> (=headless), and it seems to be missing some native functions. Looking
> at the code and Makefiles this could be because of work-in-progress
> with AWT Android porting. Still, that does not cause any crash in
> Linux, just failure to initialize JVM and BD-J. (missing functions
> cause link errors when runtime library AWT classes are loaded).
>
> After adding those functions to the library it seems to play BD-J discs
> in Linux. If those functions are missing also in the library you're
> using, it most likely won't play any discs.
>
> I could compile it for android, with the missing functions, if you want
> to give it a try ?
>
> Another thing that could be worth of trying is disabling JIT (I don't
> know if Android allows running user-generated code, or if JIT is even
> enabled in android build).
> This can be done by executing the following line unconditionally:
>
>     option[n++].optionString = str_dup("-Xint");
>
> (= replace if(getenv("BDJ_JVM_DISABLE_JIT")) with if(1) )
>
>
>
> _______________________________________________
> 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/20210127/170abb11/attachment.html>


More information about the libbluray-devel mailing list