run android apps on linux - Android General

Hi
Im working currently on an open source project, that brings android apps to linux.
There were some attempts made in the past to do this, like IcedRobot, which AFAIK is abandoned now. An other solution is the Alien/Turbo dalvik from Myriad but it has a proprietary license.
My project is based on the AOSP, but without bionic and runs without any android kernel modules.
So far I replaced the android build system with cmake/ant and I'm working currently on the standalone wrapper for the android app. ART (dalvik successor) is already running on my x86-64 gentoo linux machine.
The wrapper is able to parse and launch a simple Hello World apk from the console, but no GUI is available.
I'm working on the wayland interface and hope I can release the wrapper soon. The problem is that the framework-base repository is too large (>1Gb) for google code, so maybe I'll only upload a patch.
gentoo users can install the overlay with layman:
layman -a gentroid
Repositories are hosted on https://code.google.com/p/gentroid.
Regards,
Simon

Update
I made a video, which demonstrates the "Hello World" app from the Android Studio running on Linux:
youtube.com/watch?v=8mdiUHNbPFs
I only ported the hardware accelerated interface, because with EGL/GLES2 provided by mesa3d, I can use a common interface. Software rendering is a bit more complex. Next step will be connecting the input driver to Wayland.
apropd (running on the top left terminal) is a daemon, which handles the getProperty requests by the android framework.
Until the next release of Gnome I have to start Weston first. With Gnome 3.14, the Gnome Shell will operate as a Wayland compositor.

gentroid said:
I made a video, which demonstrates the "Hello World" app from the Android Studio running on Linux:
youtube.com/watch?v=8mdiUHNbPFs
I only ported the hardware accelerated interface, because with EGL/GLES2 provided by mesa3d, I can use a common interface. Software rendering is a bit more complex. Next step will be connecting the input driver to Wayland.
apropd (running on the top left terminal) is a daemon, which handles the getProperty requests by the android framework.
Until the next release of Gnome I have to start Weston first. With Gnome 3.14, the Gnome Shell will operate as a Wayland compositor.
Click to expand...
Click to collapse
Hi, great work! I'm very interested in this. Let me know if you'd need any testing

Related

Best Computer OS for Android Development?

Hey guys, I'm new here and new to Android Development. I would like to try my hand at it. Can you guys suggest the best OS for Developing Android Apps.
Linux (Which Distro)
Windows
Thanks
Andrew
I to have been curious as to the best linux distro for android development. I'm not looking for afull blown linus os...more along the lines of dsl for android and app development. I have only dabbled with linux, mainly dsl and phlak livecds. I want something a little more capable then that.
avacomputers said:
Hey guys, I'm new here and new to Android Development. I would like to try my hand at it. Can you guys suggest the best OS for Developing Android Apps.
Linux (Which Distro)
Windows
Thanks
Andrew
Click to expand...
Click to collapse
UBUNTU IS THE BEST OS because android is developed under linux with java base...
if you tray windoze you must to adjust a lot of thinks and make compatibilities... don´t complicate and try UBUNTU 10
An answer of one ubuntu lover!
sorry somtimes my english is poor
Linux is best os android development application. Android is an operating system based on Linux and a robot body or synthetic. It is open source as a Java library. It is a software stack for mobile devices because it includes an operating system and middleware, application key.
I think the best Linux for Developing Android is Ubuntu. There is a new version, 11.04. Try it
i know linux is the obvious choice for android development as it has the same base as android. i also understand ubuntu is the most popular of the linux brands, but i dont really need a full blown linux os. i curently use my mobile-ap for internet with about 2 bars if that...so internet speeds are slow. i dont want to spend alot of time and bandwidth downloading a linux os with features i will probably never use. or is there a light version of ubuntu with just a basic environment i need to develop for android?
as for my other computing needs, im still a windows fan!
Is Fedora on GNOME 3.0 a good platform for development?
yea i like linux mint its more user friendly than ubuntu
Since you might be using Eclipse as IDE, there shouldn't be too much difference using a windows or linux OS.
We're using windows and we're satisfied...
Just try different OSs. You'll notice windows is slow when compiling Java. Why is that - the OS, or the usual virus scanners sitting on it - don't know. I'm pulling my hair right know why my Macbook Pro on a 7000 rpm drive is much (3x) faster to compile than windows XP on a 10K rpm drive. My office buddy's telling me Linux is faster then windows.
Wow... some of the answers in this thread are just... wow...
Ok listen up people!
For just pure development it doesn't matter which OS you choose. You can code just as well in Linux, Windows or Mac since they all run the JDK, Eclipse and the Android SDK just as well. HOWEVER:
Linux has some advantages over the two:
1. The Android emulator will run better on certain versions of Linux depending on how they are set up. The AVD works by using an emulation technology called qemu which is now integrated in the Linux kernel giving it direct access to the processor thus improving the speed of the emulator significantly. Windows and MacOS don't have qemu integrated in their kernel as far as I know therefore the emulator works like S**t.
2. Linux distributions by default are optimised to work faster on hardware than Windows. Take note of the words "than Windows". MacOS is highly optimised to work as fast as possible on Macs therefore it can't really compete in this category. But for PC users, if you invest the time and effort to make your Linux machine tweaked accordingly to your hardware settings it will blow windows away when it comes to processing speed, therefore enhancing the quickness of your IDE as a result.
Now that we got that out of the way, I do have a warning: Linux Is Hard To Configure Properly! Unless you know exactly what you are doing you will brake it over and over and over again until you get it working. If you really must use Linux, here are the distributions I recommend for developing Android apps:
Linux Beginners: Ubuntu - any version above 10.04 I think. Take your pick at what works best for you
Linux Intermediate: Spend some time configuring a Slackware Machine with Eclipse + ADT + JDK + qemu. You won't be sorry.
Linux Advanced: Gentoo or Archbang depending on preferance
Linux Experts: The bloody hell are you doing on this thread?
taranasus said:
Wow... some of the answers in this thread are just... wow...
Ok listen up people!
For just pure development it doesn't matter which OS you choose. You can code just as well in Linux, Windows or Mac since they all run the JDK, Eclipse and the Android SDK just as well. HOWEVER:
Linux has some advantages over the two:
1. The Android emulator will run better on certain versions of Linux depending on how they are set up. The AVD works by using an emulation technology called qemu which is now integrated in the Linux kernel giving it direct access to the processor thus improving the speed of the emulator significantly. Windows and MacOS don't have qemu integrated in their kernel as far as I know therefore the emulator works like S**t.
2. Linux distributions by default are optimised to work faster on hardware than Windows. Take note of the words "than Windows". MacOS is highly optimised to work as fast as possible on Macs therefore it can't really compete in this category. But for PC users, if you invest the time and effort to make your Linux machine tweaked accordingly to your hardware settings it will blow windows away when it comes to processing speed, therefore enhancing the quickness of your IDE as a result.
Now that we got that out of the way, I do have a warning: Linux Is Hard To Configure Properly! Unless you know exactly what you are doing you will brake it over and over and over again until you get it working. If you really must use Linux, here are the distributions I recommend for developing Android apps:
Linux Beginners: Ubuntu - any version above 10.04 I think. Take your pick at what works best for you
Linux Intermediate: Spend some time configuring a Slackware Machine with Eclipse + ADT + JDK + qemu. You won't be sorry.
Linux Advanced: Gentoo or Archbang depending on preferance
Linux Experts: The bloody hell are you doing on this thread?
Click to expand...
Click to collapse
Awe but Archbang is easy, how about pure Arch Linux ;D
is ubuntu still best OS to develop android apps?
how to take back up of only videos on my Android device?
taranasus said:
Wow... some of the answers in this thread are just... wow...
Ok listen up people!
For just pure development it doesn't matter which OS you choose. You can code just as well in Linux, Windows or Mac since they all run the JDK, Eclipse and the Android SDK just as well. HOWEVER:
Linux has some advantages over the two:
1. The Android emulator will run better on certain versions of Linux depending on how they are set up. The AVD works by using an emulation technology called qemu which is now integrated in the Linux kernel giving it direct access to the processor thus improving the speed of the emulator significantly. Windows and MacOS don't have qemu integrated in their kernel as far as I know therefore the emulator works like S**t.
2. Linux distributions by default are optimised to work faster on hardware than Windows. Take note of the words "than Windows". MacOS is highly optimised to work as fast as possible on Macs therefore it can't really compete in this category. But for PC users, if you invest the time and effort to make your Linux machine tweaked accordingly to your hardware settings it will blow windows away when it comes to processing speed, therefore enhancing the quickness of your IDE as a result.
Now that we got that out of the way, I do have a warning: Linux Is Hard To Configure Properly! Unless you know exactly what you are doing you will brake it over and over and over again until you get it working. If you really must use Linux, here are the distributions I recommend for developing Android apps:
Linux Beginners: Ubuntu - any version above 10.04 I think. Take your pick at what works best for you
Linux Intermediate: Spend some time configuring a Slackware Machine with Eclipse + ADT + JDK + qemu. You won't be sorry.
Linux Advanced: Gentoo or Archbang depending on preferance
Linux Experts: The bloody hell are you doing on this thread?
Click to expand...
Click to collapse
Could you guide me how to take back up of only videos on my Android device
using own made program or application software.
Means from where to begin ?
What to cover first ?
File system of Android ?
Or direct using system calls I can copy videos directly ?
regards
matt
You suggested its worth time & effort to properly setup Slackware it would be worth our while. Ok found u page2. Let's see is the needed software list still valid 2015?
Where can I go for support setting up Slackware for android development.
Plus FYI can't watch tutorial video be.cause Flash no longer supports Linux.
I have UBUNTU 16.04.
I've noticed a lot of people saying to use Ubuntu 10. is that because the post is old or is the 10th generation Ubuntu the best for android development. i also am a noob. i can root, i have successfully flashed a lg stylo once with katana rom. i still use it to this day,,,,, bc my gf "accidentally" broke my 500gig hdd that i was booting windows ten from via usb on my dell inspiron. i was using mainly odin and lg flash tool which i rem was hard to get up and running on Ubuntu which if i rem correctly is why i went to windows when i am flashing. Any suggestions or refferences would help greatly. i fig if im starting over id better do it the correct way. My end goal is to try my hand at learning android development. Ty LOVE THE SITE

[Q] Running a C++ binary

So this is probably a silly question.
I have this rather complicated app that would be a heck of a lot of work to convert to Java.
It runs in the command line and works fine in Linux.
Trying to run it fails, but x86 bytecode probably isn't very ARM friendly.
Is there a specific way I need to compile the application?
Is it even possible to run it from a console emulator?
Thanks.
Try Android NDK
I am also new to Android Dev ( 15+ years Linux, 10+ years Java, etc.)
I am not an expert but for your purposes you need the "Android NDK" in addition to the "Android SDK" that most developers utilize.
"The Android NDK is a toolset that lets you embed components that make use of native code in your Android applications.
Android applications run in the Dalvik virtual machine. The NDK allows you to implement parts of your applications using native-code languages such as C and C++. "
Basically the tools are needed to cross compile C++ source code for the target ARM environment.
I am prevented from posting the download URL for some bizarre reason, but it is listed under "Native Development Tools" on the left side of the web page for the standard "Android SDK" download.
Yeah that's because you are new. It's a system to prevent spammers from posting URLs.
When you have a couple of posts the restriction will disappear
Anyway; found it, seems to be what I'm looking for.
I'll check it out in the morning.
Big thanks
Dmitry Moskalchukhas written a patch for the ndk to better support c++ see crytax dot net there are posts on google groups android-ndk talking about it
Thxs for the info. I was aware that the NDK did not include all of the libs that desktop Linux/UNIX developers expect. The suggested patched version adds the STL libs back in.
Sent from my PC36100 using XDA App
There are A LOT of libraries missing
I guess I'll just keep it a hosted app.
Thanks for all the input

[Project] Linux on Android

Hello gents and ladies,
Since the announcement that Canonical made on making Ubuntu on Android a release for OEMs to put on their devices, there has been quite a stir and interest on when we are getting to get this on our phones. Sadly, while the distro of Ubuntu is open-sourced, the programs that were created to achieve this method are not available to the public due to Canonical outsourcing the work to a 3rd party company.
Some users here may already say that we have Ubuntu on our phones but the method that is most commonly used by the community is to load up a virtual environment or Chroot inside of Android then remote into the interface via a VNC connection app. While this does work, it is a pretty sloppy method that is resource intensive and does not benefit from any hardware acceleration for the Linux desktop environment that is used. Plus, there is no way to pipe audio thru a VNC connection so using any audio/video programs in VNC is pointless.
Lastly, Ubuntu on Android is actually nothing new to the world of Android, as its been around for about a year and a half. It came in the form called Webtop that Motorola had launched on their Atrix/Bionic/RAZR lineup of phones. Webtop is essentially a stripped down version of Ubuntu with a lot of Linux tools taken out along with a very limited desktop environment. Webtop does everything that Ubuntu on Android does but in a neutered manner but there are different groups on each phone that have accomplished bringing back many of the linux tools that were taken out. Check out the thread below to see what I mean.
http://forum.xda-developers.com/showthread.php?t=1397583
It is believed that the same methods and tools that are present in Webtop are the same ones being used by Ubuntu on Android and possibly made by the same company. This can be seen in the demo video of Ubuntu on Android where the demonstrator had replaced the Webtop distro with a full Ubuntu 12.04 distro on a Motorola Atrix 2. So to debunk the myth that Ubuntu on Android can be easily loaded up on a phone as shown on video, no cause it was initially was setup with the required framework and partition space to load Ubuntu on Android even before Canonical announced Ubuntu on Android.
With all that is said, Canonical is targeted OEMs and Carriers to launch their Ubuntu on Android on select model phones and probably will not release the necessary tools as open-source code so the development community can compile their own working Ubuntu on Android. Now, all hope is not lost because some of the work has already been done but needs to come together into a package that can be ported from one phone to another.
Here are different parts that are needed:
1) Ubuntu image
There are many working images out there that run in a chroot environment but there is one universal image that is being implemented that is made by zacthespack that works on a variety of different devices - See attached thread
http://forum.xda-developers.com/showthread.php?t=1467811
2) X Server Port
Instead of using a VNC client and server model which is very resource intensive and does not benefit from GPU acceleration/Framebuffer. Using a X Server windows management system like they do on home PCs and laptop will greatly increase speed and functionality of a Linux distro opposed to VNC. This is how Webtop on the Motorola phones work is by using a port of X Server which pipes the display out to the HDMI port to be used with the Laptop dock or home dock. There is a group at AndroiX.org that is working on a port of X Server for Android that is looking very promising so hopefully anybody that can contribute to project to speed it up as it is the most crucial part for Linux in Android.
3) Sound
The biggest drawback of VNC is the lack of any sound processing which can be very annoying when trying to watch any videos or listen to sound clips on the web. What they are using on Webtop and Ubuntu on Android is a custom compiled version of PulseAudio module to pipe audio thru Android's audio manager system. No projects have yet been started on this so if anybody knows of one, feel free to post a link.
4) Android in Window
As demo'ed in the video and on Webtop, you have the ability to see whats on your Android display but in a window within Ubuntu when Webtop/Ubuntu on Android is engaged. This is a cool feature that maybe a X client app within android that pipes the display to a window in Ubuntu or maybe VNC client/server scenario. This is not really necessary to Linux in Android but non the less a cool feature to have.
5) Contacts/Text messages/Call logs
This is more shown in Ubuntu on Android opposed to Webtop where in Ubuntu mode, you can look at your Contacts or call logs in a program as opposed a Android view in a window. They also demo'ed a special program in Ubuntu to where you can send/receive text messages in a interface designed for Unity. They accomplished this by using a server application in Android, more commonly known as Motorola Phone Portal, that can relay information from the phone to applets inside of Webtop/Ubuntu on Android using a web interface API on localhost:8080 or on a remote computer on the same network. Like I said before, not really necessary but another cool function to have.
All and all, this pretty much sums up all the different parts for a project like this to take place. I am in no way a seasoned developer, just a person throwing out concepts that I have learned and done myself on the Bionic Webtop phone which hopefully some skilled individuals can run with as I am no Linux expert by any means. Anywho, let me know what you guys think about this and what can be improved.
Ubuntu on arm.
I've been looking into the development of something like this and have found a few resources that may prove beneficial:
Linux 4 Tegra (nVidia)
System Requirements
Host PC running Ubuntu Linux version 9.04 or higher.
Tegra Linux Driver Package providing a kernel image, bootloader, NVIDIA drivers, and flashing utilities. For more information, see the Release Notes.
Sample filesystem (example provided derived from Ubuntu 12.04)
Click to expand...
Click to collapse
Please note that nVidia currently provides driver packages for each model of the Tegra (Tegra 2 and 3).
As well as:
Ubuntu on Smartphones
Now. I've been playing with both an Ubuntu and Debian chroot and have ran into the issues you speak about (in a chroot with only vnc support is very limited, no sound, no camera, etc.) and would like the ability to dual boot at least.
[Q&A] Ubuntu on the Transformer (eMMC install) (xda-developers)
Basically, the creator of this thread is working from another dev's work to get ubuntu running on an Asus eeePad.

Thoughts on Qt 5.1

Qt 5.1 is scheduled to come out soon with fully integrated android and iOS support. Has anyone worked with Qt/Necessitas for android development. I really want to pick up a C++ cross platform tootkit over the summer and Qt seems like the best option. I am fluent in Java but figure if I can get results that are just as good as the default SDK using Qt that I might persue it further.
Hi,
I have released two 2D games for Android using Qt/Necessitas. Those were made for Symbian and Meego originally, so using Necessitas to port them to Android was quite ease. I really like using Qt C++ / QML (compared to "standard "C++). But I cannot recommend Qt to every job. For instance 3D game development is much easier using full-blown game engine, such as Unity.
Qt 5 apps can also be run on natively Ubuntu Touch with little to no modification
RC is now availible: http://blog.qt.digia.com/blog/2013/...m_campaign=qt-5-1-release-candidate-available
What about speed? How close it is to a native app???
Lyonsbane said:
What about speed? How close it is to a native app???
Click to expand...
Click to collapse
What do you mean by "native app"? Qt apps on android are in fact NDK apps, so they work as fast as any Android app implemented in native code. I personally use Qt 5.2 for Android, works like a charm.
Features of Qt 5.1
Qt 5.1 is mend for the static Qt builds. Apart from this the Perl dependency is also removed in the Qt 5.1. Online installer packages are available for Qt 5.1. It has improved c++11 code editing feature. There are few new modules like quick layouts, sensors, quick dialogs etc in Qt 5.1.

[Guide&Review] Installing Linux using UserLAnd on DEX

As LinuxOnDex won’t run on my faithful S8, I just tried an alternative solution with the UserLAnd app. I thought I’ll share my experiences.
TL;DR: Userland is a good alternative to have a basic Linux desktop experience on a Galaxy phone and it completes well the Dex desktop for more complex apps than you can get on Android. However you shouldn’t expect miracles in terms of performance from a phone and UserLAnd isn’t a replacement for a full Linux desktop.
​
Installation
UserLAnd is easy to install, doesn’t require any special permissions (like root). It proposes several distros (Debian, Ubuntu, Arch) and some apps that can be automatically installed. I selected Debian and VNC connection. It downloaded a minimal Debian image (the latest,
kernel rom info pls my phone sm-g950f hades kernel hardes rom app crash userland closing..

Categories

Resources