matinzk
Posts: 35
Joined: Fri Sep 28, 2012 4:26 pm
Location: UK

Android on RPi without Uder Interface

Fri Sep 28, 2012 4:31 pm

Hi everyone ,my first post so be gentle.

I do alot of Android programming for phones and tablets. I'm just about to do a project whereby we have chosen to work with Raspberry Pi's, since they're at a fraction of a price comparing to the Android tablets and can be mounted almost anywhere with choice of a good LCD.

Right to the point of what we want to do:-
We wanna make a system, so when the RPi is powered up our Android app runs without the need of an Android Operating System Graphical User Interface.

So we need to install an Android without the needs of a graphical interface. Is this at all possible?

Any help is appreciated,

Thanks.

ferjeezy
Posts: 14
Joined: Sat Sep 01, 2012 7:58 pm

Re: Android on RPi without Uder Interface

Fri Sep 28, 2012 7:38 pm

From what I understand about Android, you have to have the graphical interface running to use the apps. You can create your app to run as a home app and it will boot straight into your app.

User avatar
woopderson
Posts: 35
Joined: Fri Aug 10, 2012 4:06 pm
Location: Toronto, Canada

Re: Android on RPi without Uder Interface

Fri Sep 28, 2012 7:45 pm

matinzk wrote:Hi everyone ,my first post so be gentle.

I do alot of Android programming for phones and tablets. I'm just about to do a project whereby we have chosen to work with Raspberry Pi's, since they're at a fraction of a price comparing to the Android tablets and can be mounted almost anywhere with choice of a good LCD.

Right to the point of what we want to do:-
We wanna make a system, so when the RPi is powered up our Android app runs without the need of an Android Operating System Graphical User Interface.

So we need to install an Android without the needs of a graphical interface. Is this at all possible?

Any help is appreciated,

Thanks.
The current builds of android also do not use GPU acceleration, resulting in poor performance. Broadcom has yet to release the drivers for the system, although there is a video of a GPU accelerated build they made which runs quite nicely.

For some ported droid builds w/o acceleration: http://androidpi.wikia.com/wiki/Android_Pi_Wiki

matinzk
Posts: 35
Joined: Fri Sep 28, 2012 4:26 pm
Location: UK

Re: Android on RPi without Uder Interface

Fri Sep 28, 2012 8:39 pm

If the current builds of Android don't GPU acceleration, can this be done with Linux then?

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Android on RPi without Uder Interface

Fri Sep 28, 2012 8:46 pm

If it still has to be an Android Application , i don't know.
Else , of course. But you'll have to learn a LOT.


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

matinzk
Posts: 35
Joined: Fri Sep 28, 2012 4:26 pm
Location: UK

Re: Android on RPi without Uder Interface

Fri Sep 28, 2012 9:21 pm

So can I program in java and run on Linux without the GUI?

If so, any guides on this at all?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26442
Joined: Sat Jul 30, 2011 7:41 pm

Re: Android on RPi without Uder Interface

Fri Sep 28, 2012 9:33 pm

Well, OpenJDK works on the Raspi so Java is possible, However, I'm presuming you get a lot of libraries on Android you may not get on plain OpenJDK, so you will have to be careful what you use. However, since you app doesn't appear to need a UI, that's one thing you don;t have to worry about - but depending on what you do want, you'll need to check what is available on the JDK vs Android.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

6677
Posts: 383
Joined: Wed Mar 14, 2012 9:23 pm

Re: Android on RPi without Uder Interface

Fri Sep 28, 2012 10:26 pm

An android app won't work on linux due to the android libraries being missing, also contrary to common belief android apps are not java, they use a virtual machine called dalvik which is not compatible with java byte code or vice versa. Assuming you could get a dalvik virtual machine running on rasbian and the android libraries in place then yes you could test your apps on the pi, but really by the time you've done that broadcoms drivers may well be available and you could just run android on the pi natively.

This work has been done on windows 7 and mac OSx (intel) before though in a project called Bluestacks: http://bluestacks.com/ (whether bluestack works via porting over dalvik and the android libraries or some other method I have no idea but either way it works)

matinzk
Posts: 35
Joined: Fri Sep 28, 2012 4:26 pm
Location: UK

Re: Android on RPi without Uder Interface

Fri Sep 28, 2012 10:57 pm

Maybe I should have worded this better.

"So can I program in java and run on Linux without the GUI?"

By java I meant pure java and not java for Android. I'm pretty open to ideas to get this done. And by without GUI I meant no GUI for the OS, the application will have graphics containing images which change regularly.

Thanks guys.

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Android on RPi without Uder Interface

Sat Sep 29, 2012 3:48 am

Well , then try JogAmp / JOGL. It provides Hardware acceleration
for Multimedia and 3D. AFAIK it comes with its own windowing toolkit.
It is really necessary to use no GUI ? You could it set the Pi up so that it does
auto-login and shows no desktop , and boots straight to your app.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

matinzk
Posts: 35
Joined: Fri Sep 28, 2012 4:26 pm
Location: UK

Re: Android on RPi without Uder Interface

Sat Sep 29, 2012 9:21 am

Since we don't want the user know what system they're using we need it to run the app without an OS graphical user interface. This way it'll look more like an embedded system without the restrictions that they may have.

Any guides/info on JogAmp or JOGL?

Also on auto login you described?

Thank you.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26442
Joined: Sat Jul 30, 2011 7:41 pm

Re: Android on RPi without Uder Interface

Sat Sep 29, 2012 12:10 pm

I presume then you don't want to use C or C++? Or similar? Must it be a command line Java (or Android) app?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

matinzk
Posts: 35
Joined: Fri Sep 28, 2012 4:26 pm
Location: UK

Re: Android on RPi without Uder Interface

Sat Sep 29, 2012 1:47 pm

I'd rather use Java. As I said it doesn't have to be an Android app if it's gonna run on Linux. The Java will be object oriented just like when done as Android app.

User avatar
xranby
Posts: 540
Joined: Sat Mar 03, 2012 10:02 pm
Contact: Website

Re: Android on RPi without Uder Interface

Sat Sep 29, 2012 8:12 pm

matinzk wrote:Since we don't want the user know what system they're using we need it to run the app without an OS graphical user interface. This way it'll look more like an embedded system without the restrictions that they may have.

Any guides/info on JogAmp or JOGL?
http://www.raspberrypi.org/phpBB3/viewt ... 6&p=157222 - Java OpenGL ES 2 bindings using JogAmp JOGL 2
http://labb.zafena.se/?p=547 - Raspberry Pi demo and background.
I am working on more JogAmp JOGL tutorials that will end up here:
http://jogamp.org/wiki/index.php/Jogl_Tutorial
matinzk wrote:Also on auto login you described?

Thank you.
If you want the full Debian/Rasbian base functionality like automatic network configuration then add your application as a init script in /etc/init.d and use the update-rc.d tool to start your script/application when the machine reaches runlevel 2.
for more info run
man update-rc.d

You should also look at the init tool that runs these init scripts. If yu want superfast startup then replace init with your application, you application will then be started directly after the linux kernel boots.
for more info run
man init
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby

matinzk
Posts: 35
Joined: Fri Sep 28, 2012 4:26 pm
Location: UK

Re: Android on RPi without Uder Interface

Mon Oct 01, 2012 4:42 pm

Bought a RPi and installed Debian on it.

Gonna do my programming with Python. Is this any good? Is the Python Image Library any good?

Thanks.

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Android on RPi without Uder Interface

Sat Oct 06, 2012 4:20 pm

Now jumping onto the Python train ? What about JogAMP ?
xranby seems always happy to help :D

Try Pi3D if you are sure about Python. And the excellent OpenVG bindings posted on the forum.
Both are on github.com AFAIK


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

matinzk
Posts: 35
Joined: Fri Sep 28, 2012 4:26 pm
Location: UK

Re: Android on RPi without Uder Interface

Sun Oct 07, 2012 12:44 am

After all I went with DexOS. Programming within the OS is assembler. It does exactly what I'd want it to do.

I need a PNG decoder to be able to show PNG images, as the library only supports BMP. Can anyone help at all?

Thanks.

zester
Posts: 8
Joined: Sun Jan 29, 2012 10:00 am

Re: Android on RPi without Uder Interface

Mon Dec 03, 2012 11:53 am

TINY_ANDROID is a super minimal Android build that can be used for kernel development, toolchain work and other development where users only need a console.

Users are able to get source, build it and start running a Linux system with a shell in 10 min (WOW!).

TINY_ANDROID is extensible. Android uses a manifest to organized all its components. The manifest specifies a set of gits and optionally branches of those gits or commits of those gits. The manifest can point to any git (github or android.git.linaro.org or git.linaro.org). To extend a build, simply add the git to the manifest and edit build/core/main.mk to include it in the build.

https://wiki.linaro.org/Platform/Android/UseTinyAndroid

Return to “Android”