What are the minimal steps necessary (including retrieving the source code) to compile and run just the Dalvik virtual machine on Linux?
Actually , I got Dalvik working on my elementary OS installation.
First download the Android AOSP source tree using https://source.android.com/source/downloading.html. Wait for it to download (2 hours for me cloning only the current commits and Marshmallow branch)
After running build/envsetup.sh while in the source tree run lunch full_x86-eng. Then type make -jN (replace N with number of cores).
WAIT. This took me about 1 hour on an AMD-4500M laptop. Newer ccomputers may be as low as half and hour and older ones might take half a day.
Change directory to !!AOSP-PATH!!/out/host/linux-x86/bin/ and run export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:!!AOSP-PATH!!/out/host/linux-x86/obj/lib/ or
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:!!AOSP-PATH!!/out/host/linux-x86/lib
or export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:!!AOSP-PATH!!/out/host/linux-x86/lib64
TRY ALL OF THESE
and then
./dalvikvm --32. If you try to run without the --32 option it will crash (don't know why)
Working Marshmallow Dalvik. To get the GUI apps working you will need to do some more porting and coding which is another project which I am working on.
Took me half a day to figure this out.
References
http://milk.com/kodebase/dalvik-docs-mirror/docs/hello-world.html
Use sabayon Linux. This is a distro that can natively run Android programs and all Linux ones too.
Actually, that's rather android running on Dalvik and the underlying system is already linux.
I guess running a bare Dalvik VM on a desktop linux box is just a matter of getting the sources and compile it.
The GUI stuff is something else.
You are not the only one with this idea, and that is great in internet society terms.
This is probably what you are looking for: http://www.android-x86.org/.
Those guys ported android over to x86.
It still works as an OS, so I'm not sure if you can run Linux and Android(Linux) together without using VirtualBox.
Dalvik runs on Android. The authors of Dalvik are only worrying about it running on Android, as far as we are aware.
Various groups have indicated they are working on getting Dalvik outside of Android. You are probably best off finding and talking to them.
In other words, there are no official instructions of the type you seek.
Sorry!
Getting apps designed for Android to run on Linux is going to be tricky. However, it is possible to run a Dalvik VM on Linux. In fact, this GitHub project has a pre-compiled binary of Dalvik VM for Linux, ready to use! Check the associated blog post for information about how the binary was compiled and how to use it.
Learn to program Java \ C \ C++ and other frameworks
Modify the Android source (I think app_process or something) so it shows a windows on the Linux desktop (learn X11 / Wayland APIs)
Below is a simpile base for you to start with
www.android-x86.org/getsourcecode
Getting Android-x86 source code
First, follow this page to configure your build environment. Then
mkdir android-x86
cd android-x86
repo init -u git.android-x86.org/manifest -b $branch
repo sync
Where $branch is any branch name described in the previous section. This will point the projects created or modified by android-x86 to our git server. All the other projects still point to AOSP.
We also have a git mirror server on SourceForge.net. To use it, you only need to change the repo init command to
repo init -u git.code.sf.net/p/android-x86/manifest -b $branch
Related
Im create simple game, remake my old ZX-Spectrum game "m2k"
Love2D is simple engine using LUA.
What i need:
Compile Love2D -> exe files, linux binary, android apk.
Goal is pack Win32, Linux64 bit and android apk WITHOUT possiblity of just unpacking .love file and WITHOUT manual installing love2d engine.
https://pp.userapi.com/c637425/v637425257/4a8a8/QCv9Q5dz_b4.jpg
I cannot found anything useful about it. I found LoveExporter 0.2 by shake but this utilite fails compiling normal binary. It fails with error.
All manuals tell me just create .love file and send it to all. No way.
It's no good for me.
Maybe i can run this utilite. I fails with 0.2 version maybe 0.1 works
http://snake174.github.io/html/programs/love_exporter.html
Partially it works, but it requires Microsoft Windows, and android support is broken. Developer not create new versions about a year +.
I don't want to pay for windows, reboot to windows or another using unsafe OS, and requires Native full work analog.
etc
Compile Love2D -> exe files, linux binary, android apk.
The wiki already has a guide for creating executables for Windows, Linux, Mac and Android. Unless I'm misunderstanding your request, you need this.
I recently switched from Eclipse+ADT to Android Studio. My app is a full native C++ application. I use Android Studio 2.0 Beta 5 and Gradle Experimental 0.6.0-beta4.
The build process of Android Studio is very slow for the native code. I read all questions on Stackoverflow and Internet. I applied all suggested methods (--offline, --daemon, --parallel, -XmxSize, etc..). They mostly addresses to speed up the build of Java code. The compiling process of native C++ files (ndk-build) is still very slow. Even if I write one line C++ code, I wait 5-7 minutes each time I click Run button, where the compiling time of Eclipse was around 15-20 seconds for the same job.
Do you have any suggestion to speed up the compiling process of the native code (C/C++) on Android Studio?
If you're building on linux I've got a hack for you to speed up the NDK build:
cd <ndk-bundle-path>
mv ndk-build ndk-build2
Now create a shell script called "ndk-build" containing the following:
#!/bin/sh
$(dirname $0)/ndk-build2 -j 8 $#
Now set the execute permissions for the new script:
chmod 775 ndk-build
Now, anyone who launch ndk-build (including gradle/android studio) will be force to bang out object files on 8 cores simultaneously. 8 cores is just an example. You must set this to what ever number of cores you have available. If you set it too high compared to the number of available cores you'll usually lose performance. If the CPU have hyper threading you can double the the number of cores.
I am sure there is a equivalent way of doing it on windows with a batch script or something but I don't have a windows machine available atm.
I will give an answer to my old question to close it.
In the end of the story, we integrated cmake into the project. It works as fast as old Eclipse build performance.
I have Lubuntu 12.10 on my machine. All necessary software's are installed for compiling AOSP.
I have android mobile with ver. 2.3 I did not found any ROM ver. 4.0 for it so decided to compile it my self. I am following this guide.
The last commands i ran are:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.4_r2.1
$ repo sync
Now's it's more than 1 day still it's only synchronizing. Download speed is around 50 kbps.
So my Question No.1 :is for compiling to AOSP android-4.0.4_r2.1 is there any other's way that i can skip unnecessary files and download only 4.0 necessary files?
Question No.2 : I found one more link that is for only building kernels here. So if i follow this guide will it be same as repo sync that i ran cause i have specified -b android-4.0.4_r2.1
What will be faster way to download only for AOSP 4.0 and any specific guide to build it?
You should have read the warning on AOSP download page, if your download speed is about 50kb/s, it might take a very long time (~ a few days?) to download about 10GB of different files required to build AOSP.
Also, if you don't have a Google Nexus device, most probably the image you build won't work with your device. It takes a lot of tinkering to add the support for the very specific hardware you have in your phone.
Of course, nobody can forbid you downloading sources and building the image, but I would strongly advise against it, because in your case basically it's pointless waste of time.
Finally found ICS for Karbonn A7. This guy made a tutorial for it. This is update 2.
Tutorial Here.
I would like to use a PCAN with my device.
I have the program for it, and an otg cable, but i need to install the driver first.
And i found a linux driver on the manufacturers site.
I downloaded the kernel source, arm toolchain, and read a few sites about building and compiling but i havent find anything about adding driver.
So my question is, how can i add or install this driver on android?
The device is galaxy tab 10.1 P7510.
Thanks for your help.
Right, what you need to do is this:
Unzip the tarball source
Go into the respective directory of the source - cd peak-linux-driver-7.7/ as quoted by the above PDF
cd peak-linux-driver-x.y
make clean
make su -c “make install”
When the build completes, issue this command
/sbin/modprobe pcan
However, having stated this, I do not see any reference to building with Android, so it looks like a fair bit of messing around with the source to get this to actually work on Android.
From what I can ascertain, this is more orientated towards the desktop PC only...
As is mentioned in a later comment clarifying this answer; the kernel would need to be recompiled from source as an arm v7 or v8 target.
The part not mentioned was that it would also have to be statically linked to avoid requiring glibc in Android or bionic lib c in your computer.
When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error:
/c/Users/Andrew Rabon/bin/repo: line
23: exec: python: not found
I've downloaded repo and put it in ~/bin like it says, and I've installed Python. I wonder what the issue could be.
For reference, I'm using msysgit on Windows Vista, I understand msysgit is limited, but I hope it can at least pull the android source.
I ended up creating a VirtualBox vm with Ubuntu installed. Followed the directions on the source code site and then zipped up the source and copied it over via file share to my windows machine. It's a bulky solution but it's the most straightforward as you don't have to deal with cryptic scripting issues.
I imagine that you could make msysgit and repo work with some tweaking,
In particular, I think there is an advantage in using Cygwin. It seems to have superior handling of case sensistive file names. This might be irrelevant for the main Android code base, but I know for a fact that it is necessary for the Linux kernel.
You cannot build Android on Windows. However, you should be able to use repo to pull the source code. I've done this. I imagine you must be using Cygwin. You'll need Python 2.4 (according to Get Source) and make sure you don't have any other Python installations on Windows or Cygwin that are overriding it. Check your version using the python interactive shell.