pavitra
Posts: 18
Joined: Tue Mar 01, 2016 9:32 am

android

Thu Mar 03, 2016 6:52 am

Is it possible to run apk files in raspbian os of raspberry pi

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

Re: android

Thu Mar 03, 2016 11:38 am

.apk files is basically only an archive to store java classes converted to the register based .dex notation.

I have been part of the IcedRobot project where we attempted to run .apk files on a regular GNU/Linux systems in combination with OpenJDK, thus i can describe what work and what is hard to do.

The easy part:
It is possible to run an java application stored in an .apk using .dex notation by using the
Daneel classloader from the IcedRobot project in combination with the java JDK shipped with Raspbian.
Every time your application wants to load a class then Daneel looks if the class exist inside the .apk or in one of the .dex files and then automatically convert the class back into a stack based .class and loads it into the JVM.
The sourcecode for this Daneel classloader exist here:
http://icedtea.classpath.org/icedrobot/hg/daneel/
I have written a tutorial how to run .dex files using Daneel in combination with OpenJDK here:
http://labb.zafena.se/?p=393

The hard part:
Running android applications however require that the system you run these .apk file provide all the system services that a typical Android application require.

Android system services require that you run these services on a Android patched Linux kernel, because some of the services needed special support in the kernel in order to implement the Android Binder messaging and the Android security model.

The IcedRobot project contained a part called Ika where we tried to take the Android ASOP system source-code and patch this source-code to make the android system services work on a regular GNU/Linux kernel.

Ika made it possible to use the Android bluetooth stack on a GNU/Linux system. I know some users who still use this as a way to have the same access to bluetooth on GNU/Linux as on Android.
http://www.jroller.com/neugens/entry/icedrobot_news

Writing all these patches turned out to be quite hard and developement of Ika has stopped due to lack of funding and manpower. And eventually we did not have funding to run the icedrobot homepage. http://www.icedrobot.org/
However the soruce-code we wrote for the ika project still exist and is hosted by the nice IcedTea project people!
http://icedtea.classpath.org/icedrobot/hg/ika/
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby

pavitra
Posts: 18
Joined: Tue Mar 01, 2016 9:32 am

Re: android

Sat Mar 05, 2016 6:45 am

can i run my own application which is in .apk file format in the raspbian os of raspberry pi

pavitra
Posts: 18
Joined: Tue Mar 01, 2016 9:32 am

Re: android

Sat Mar 05, 2016 10:28 am

hg clone http://icedtea.classpath.org/icedrobot/hg/daneel/
this command not working it giving 404 not found error.


please help me.....

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

Re: android

Sun Mar 06, 2016 4:42 pm

If you want to run Android on your Raspberry Pi then i recommend that you try this Android build for the Raspberry Pi called RaspAnd:
http://raspex.exton.se/?p=144

This will allow you to run your own .apk applications on the Pi.
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby

pavitra
Posts: 18
Joined: Tue Mar 01, 2016 9:32 am

Re: android

Mon Mar 07, 2016 4:40 am

Iam using official 7 inch raspian touch screen display for pi. i installed android in raspberry pi 2 but touch screen working only for raspbian. it is not working with android may be drivers problem.

so i decided to run apk files in raspbian .

pavitra
Posts: 18
Joined: Tue Mar 01, 2016 9:32 am

Re: android

Mon Mar 07, 2016 5:35 am

we followed above steps to run apk files in raspbian but after mvn package it showing mvn :command not found

Return to “Android”