SDL on native Android

Hi,

I would like to write a cross platform application that is close to embedded than Android. Our current test platform has hardware accelerated Android drivers but linux drivers are nonexistent.

As such I would like to leverage SDL to write an app using a minimal Android base platform, which consists of everything in Android below Dalvik / zygote.

The closest thing I found to supporting something like this is: https://code.google.com/p/android-sdl-native/ which is a few years old.

Is there a more current solution? Does anyone have any other ideas?

Best,
Sri

Hi,

I’m writing an application that I want to run on as many platforms as possible:

Our current test hardware runs Android and has accelerated drivers available. We want to move to embedded Linux but sadly linux driver support is close to nil.

So the idea is to leverage SDL to write an app using a minimal Android base platform, which consists of everything in Android below Dalvik / zygote. Hopefully this images explains things better:

The closest thing I found to supporting something like this is: https://code.google.com/p/android-sdl-native/ which is a few years old.

Is there a more current solution? Does anyone have any other ideas?

Hi,

I’m writing an application that I want to run on as many platforms as
possible.

Our current test hardware runs Android and has accelerated drivers. We want
to move to embedded Linux but sadly linux driver support is close to nil.

So the idea is to leverage SDL to write an app using a minimal Android base
platform, which consists of everything in Android below Dalvik / zygote.
Hopefully this image explains things better:

The closest thing I found to supporting something like this is:
https://code.google.com/p/android-sdl-native/ which is a few years old.

Is there a more current solution? Does anyone have any other ideas?

Best,
Sri

Hi,

I’m writing an application that I want to run on as many platforms as possible.

Our current test hardware runs Android and has accelerated drivers available. We want to move to embedded Linux but sadly linux driver support is close to nil.

So the idea is to leverage SDL to write an app using a minimal Android base platform, which consists of everything in Android below Dalvik / zygote. Hopefully this images explains things better:

The closest thing I found to supporting something like this is: https://code.google.com/p/android-sdl-native/ which is a few years old.

Is there a more current solution? Does anyone have any other ideas?

-------------- next part --------------
A non-text attachment was scrubbed…
Name: CRL0zRx.png
Type: image/png
Size: 96064 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20140806/8575de1a/attachment-0001.png

SDL2 works on Android if that’s what you’re asking. Be Aware that SDL2 is
geared towards gaming. If you are looking to create an non-gaming app, you
might want to look into SDKs such as PhoneGap.

Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768On Wed, Aug 6, 2014 at 11:23 PM, Sri Gogineni <sriakhil.gogineni at gmail.com> wrote:

Hi,

I’m writing an application that I want to run on as many platforms as
possible.

Our current test hardware runs Android and has accelerated drivers. We
want to move to embedded Linux but sadly linux driver support is close to
nil.

So the idea is to leverage SDL to write an app using a minimal Android
base platform, which consists of everything in Android below Dalvik /
zygote. Hopefully this image explains things better:

http://i.imgur.com/CRL0zRx.png

The closest thing I found to supporting something like this is:
https://code.google.com/p/android-sdl-native/ which is a few years old.

Is there a more current solution? Does anyone have any other ideas?

Best,
Sri


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I understand that it works using a NativeActivity but that still requires an APK and Java code, unless I misunderstood something.

What I?m asking is running the application via init.rc and running it natively bypassing Dalvik and the JVM.On Aug 6, 2014, at 10:53 PM, Pallav Nawani wrote:

SDL2 works on Android if that’s what you’re asking. Be Aware that SDL2 is geared towards gaming. If you are looking to create an non-gaming app, you might want to look into SDKs such as PhoneGap.

Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768

On Wed, Aug 6, 2014 at 11:23 PM, Sri Gogineni <@Sriakhil_Gogineni> wrote:
Hi,

I’m writing an application that I want to run on as many platforms as possible.

Our current test hardware runs Android and has accelerated drivers. We want to move to embedded Linux but sadly linux driver support is close to nil.

So the idea is to leverage SDL to write an app using a minimal Android base platform, which consists of everything in Android below Dalvik / zygote. Hopefully this image explains things better:

http://i.imgur.com/CRL0zRx.png

The closest thing I found to supporting something like this is: https://code.google.com/p/android-sdl-native/ which is a few years old.

Is there a more current solution? Does anyone have any other ideas?

Best,
Sri


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I asked a few people about this.

Technically the linux kernel is a C api, and nothing prevents you from
interacting with it using syscalls, exactly the same way as in normal linux.

However, broadly speaking the JVM interacts with hardware through a set of
daemons that acquire exclusive hardware locks, preventing simultaneous
access from other sources, even if you do have root access on the device.
Interacting with these daemons from outside the JVM is apparently
impossible.

(With the possible exception of the network interface, which for reasons
which are unclear to me, is an exception to this).

Anyhow, you’re probably best off taking your query to the NDK google group (
https://groups.google.com/forum/#!forum/android-ndk); I would surprised if
no one has tried this before; someone might be able to point you in the
right direction.~
Doug.

On Fri, Aug 8, 2014 at 8:13 AM, Sri Gogineni <sriakhil.gogineni at gmail.com> wrote:

I understand that it works using a NativeActivity but that still requires
an APK and Java code, unless I misunderstood something.

What I?m asking is running the application via init.rc and running it
natively bypassing Dalvik and the JVM.

On Aug 6, 2014, at 10:53 PM, Pallav Nawani wrote:

SDL2 works on Android if that’s what you’re asking. Be Aware that SDL2 is
geared towards gaming. If you are looking to create an non-gaming app, you
might want to look into SDKs such as PhoneGap.

Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768

On Wed, Aug 6, 2014 at 11:23 PM, Sri Gogineni <sriakhil.gogineni at gmail.com wrote:

Hi,

I’m writing an application that I want to run on as many platforms as
possible.

Our current test hardware runs Android and has accelerated drivers. We
want to move to embedded Linux but sadly linux driver support is close to
nil.

So the idea is to leverage SDL to write an app using a minimal Android
base platform, which consists of everything in Android below Dalvik /
zygote. Hopefully this image explains things better:

http://i.imgur.com/CRL0zRx.png

The closest thing I found to supporting something like this is:
https://code.google.com/p/android-sdl-native/ which is a few years old.

Is there a more current solution? Does anyone have any other ideas?

Best,
Sri


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Check how eg oryool or bgfx are doing it. They dont use java code at all
(afair)Am 08.08.2014 09:02 schrieb “Doug” <douglas.linder at gmail.com>:

I asked a few people about this.

Technically the linux kernel is a C api, and nothing prevents you from
interacting with it using syscalls, exactly the same way as in normal linux.

However, broadly speaking the JVM interacts with hardware through a set of
daemons that acquire exclusive hardware locks, preventing simultaneous
access from other sources, even if you do have root access on the device.
Interacting with these daemons from outside the JVM is apparently
impossible.

(With the possible exception of the network interface, which for reasons
which are unclear to me, is an exception to this).

Anyhow, you’re probably best off taking your query to the NDK google group
(https://groups.google.com/forum/#!forum/android-ndk); I would surprised
if no one has tried this before; someone might be able to point you in the
right direction.

~
Doug.

On Fri, Aug 8, 2014 at 8:13 AM, Sri Gogineni <sriakhil.gogineni at gmail.com> wrote:

I understand that it works using a NativeActivity but that still requires
an APK and Java code, unless I misunderstood something.

What I?m asking is running the application via init.rc and running it
natively bypassing Dalvik and the JVM.

On Aug 6, 2014, at 10:53 PM, Pallav Nawani wrote:

SDL2 works on Android if that’s what you’re asking. Be Aware that SDL2 is
geared towards gaming. If you are looking to create an non-gaming app, you
might want to look into SDKs such as PhoneGap.

Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768

On Wed, Aug 6, 2014 at 11:23 PM, Sri Gogineni < sriakhil.gogineni at gmail.com> wrote:

Hi,

I’m writing an application that I want to run on as many platforms as
possible.

Our current test hardware runs Android and has accelerated drivers. We
want to move to embedded Linux but sadly linux driver support is close to
nil.

So the idea is to leverage SDL to write an app using a minimal Android
base platform, which consists of everything in Android below Dalvik /
zygote. Hopefully this image explains things better:

http://i.imgur.com/CRL0zRx.png

The closest thing I found to supporting something like this is:
https://code.google.com/p/android-sdl-native/ which is a few years old.

Is there a more current solution? Does anyone have any other ideas?

Best,
Sri


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I wonder if the app is created purely without Java, how could the launcher would create an activity :).

It works without java.

Check oryol - not a single line of java code.Am 08.08.2014 um 16:09 schrieb mr_tawan:

I wonder if the app is created purely without Java, how could the
launcher would create an activity Smile.

http://www.caveproductions.org
http://www.ufoai.org

Have a good read of
https://github.com/floooh/oryol/tree/master/code/Ext/android_native

The ‘android bridge’ it uses is a set of bindings on JVM. This is a
completely different thing to using the platform without interacting with
the JVM; and the same as what SDL does.~
Doug.

On Fri, Aug 8, 2014 at 10:15 PM, Martin Gerhardy <martin.gerhardy at gmail.com> wrote:

Am 08.08.2014 um 16:09 schrieb mr_tawan:

I wonder if the app is created purely without Java, how could the launcher
would create an activity [image: Smile].

It works without java.

Check oryol - not a single line of java code.

http://www.caveproductions.orghttp://www.ufoai.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Sorry, I was maybe not clear enough in my statement - let me rephrase:
“It works without writing any java code for an Activity and anything
like that.”

Of course it won’t work without java at all. Sorry. But as far as I
remember the initial question was about skipping the need to include
java code - so I still think my answer is correct. You still have to
install the sdk and the ndk. Also in the earlier days of the ndk not
everything was available from it - but I think they caught up on most of
the issues.

Also I personally like the way SDL is doing it - because a lot of stuff
is only available on the java side - and writing jni stuff for
everything you would like to use if often a lot more work (even if that
wasn’t the question). But still - it’s possible without (your own) java
code.

Regards
MartinAm 09.08.2014 um 10:47 schrieb Doug:

Have a good read of
https://github.com/floooh/oryol/tree/master/code/Ext/android_native

The ‘android bridge’ it uses is a set of bindings on JVM. This is a
completely different thing to using the platform without interacting
with the JVM; and the same as what SDL does.

~
Doug.

On Fri, Aug 8, 2014 at 10:15 PM, Martin Gerhardy <@Martin_Gerhardy mailto:Martin_Gerhardy> wrote:

Am 08.08.2014 um 16:09 schrieb mr_tawan:
I wonder if the app is created purely without Java, how could the
launcher would create an activity Smile.
It works without java.

Check oryol - not a single line of java code.

-- 
--

http://www.caveproductions.org
http://www.ufoai.org


_______________________________________________
SDL mailing list
SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

http://www.caveproductions.org
http://twitter.com/MartinGerhardy

The initial question was about skipping Dalvik (jvm) and everything above
[see the linked image]. The things that are the most similar to this are
FireFox OS, Chromecast and Embedded QT.

The previous projects/devices show its possible. I’m wondering if SDL (or
something else) can leverage the platform to develop native apps. I’ll also
ask in the NDK group.On Sat, Aug 9, 2014 at 2:18 AM, Martin Gerhardy <martin.gerhardy at gmail.com> wrote:

Sorry, I was maybe not clear enough in my statement - let me rephrase:
“It works without writing any java code for an Activity and anything like
that.”

Of course it won’t work without java at all. Sorry. But as far as I
remember the initial question was about skipping the need to include java
code - so I still think my answer is correct. You still have to install the
sdk and the ndk. Also in the earlier days of the ndk not everything was
available from it - but I think they caught up on most of the issues.

Also I personally like the way SDL is doing it - because a lot of stuff is
only available on the java side - and writing jni stuff for everything you
would like to use if often a lot more work (even if that wasn’t the
question). But still - it’s possible without (your own) java code.

Regards
Martin

Am 09.08.2014 um 10:47 schrieb Doug:

Have a good read of
https://github.com/floooh/oryol/tree/master/code/Ext/android_native

The ‘android bridge’ it uses is a set of bindings on JVM. This is a
completely different thing to using the platform without interacting with
the JVM; and the same as what SDL does.

~
Doug.

On Fri, Aug 8, 2014 at 10:15 PM, Martin Gerhardy < martin.gerhardy at gmail.com> wrote:

Am 08.08.2014 um 16:09 schrieb mr_tawan:

I wonder if the app is created purely without Java, how could the
launcher would create an activity [image: Smile].

It works without java.

Check oryol - not a single line of java code.

http://www.caveproductions.orghttp://www.ufoai.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing listSDL at lists.libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://www.caveproductions.orghttp://twitter.com/MartinGerhardy


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org