I used @viulian's port of PHP 5.3.8 and 5.4.2 of PHP and lighttpd on my Galaxy S2. It ran like a charm on Android 2.3.3.
But since I upgraded to ICS 4.0.3 the PHP didn't run anymore and reported it to @viulian. He discovered he used the wrong compiler switches and recompiled it and it ran again but some functions regarding directories (dir(), scandir() ) don't run properly due to a 64 bits filename problem. This is also described in https://bugs.php.net/bug.php?id=27792 . Thanks, @viulian for your effort ! He could not test it as he has no ICS test development yet.
Now I decided to compile PHP myself. I have downloaded the sources from php.net and installed the Android dev kit with cross compilers and installed the ARM cross compiler on Macports as well (I use a Mac running Lion 10.7, but I have Ubuntu 12.04 in a VMware session if that suits better) .
Can somebody tell me what to do to properly compile PHP myself to make a single PHP binary ?
I cannot find proper answers by googling around.
Related
Hey All,
I'm curious about compiling a native Linux app for the Nexus One, and wondering what the best way is to go about it in Ubuntu. I found this link for the G1:
http://android-dls.com/wiki/index.php?title=Compiling_for_Android
Since the Snapdragon is also ARM I'm assuming this will work, but is there a decent way to do this on Ubuntu or is my best bet to install Debian in Virtualbox and compile it there?
Thanks,
-Dan
overridex said:
Hey All,
I'm curious about compiling a native Linux app for the Nexus One, and wondering what the best way is to go about it in Ubuntu. I found this link for the G1:
http://android-dls.com/wiki/index.php?title=Compiling_for_Android
Since the Snapdragon is also ARM I'm assuming this will work, but is there a decent way to do this on Ubuntu or is my best bet to install Debian in Virtualbox and compile it there?
Thanks,
-Dan
Click to expand...
Click to collapse
There's a certain amount of vagueness associated with your generalized request.
That said ... ubuntu is sooo very very closely related to debian in the linux fam!
Almost all things described in the link your reference will carry-over/hold-true in ubuntu as they are stated in debian.
But ... the real kicker is the specific app you're trying to compile.
Depending on what the app you want to build depends on ... will determine your overall success. While the reference posted link is insightful, you must understand the need to link against libraries being used. Many of these libraries (at least the basic 'c' ones) you'll find in the AOSP code in android's git repo.
I would suggest taking a look at the "external" projects found in the AOSP code to see how they utilize the makefile setup and build-environment and how they leverage bionic and others to build against.
The way those projects build out, would be essentially what you're looking for .. (I assume) again, I state this without knowing the specific app you have in mind.
Hope that helps.
~enom~
How well would a linux disto made for desktop PCs work with touch screen mouse inputs and no keboard support? (im assuming the Android VK doesnt work when you press on a textbox in a Linux Emulator)
enomther said:
There's a certain amount of vagueness associated with your generalized request.
Click to expand...
Click to collapse
Sorry, I should have been more specific - by Linux native I didn't mean any app in particular, I just meant not a java Android app. I'm really just looking to compile a HelloWorld in C and run it at the shell on the Nexus at this point.
My main concern with the link I posted is that although Ubuntu is based on Debian, Ubuntu does not maintain an ARM version, and the package mentioned in that tutorial is not included in Ubuntu because of this.
So I'm just wondering if anyone has come up with a good solution for compiling for the Nexus in Ubuntu, or if I'm better off installing Debian in a virtual machine.
Thanks,
-Dan
http://android-tricks.blogspot.com/2009/02/hello-world-c-program-on-using-android.html
I think this is more of what I was looking for, I'll build AOSP and try out the agcc script.
-Dan
Another idea: find the Android source wherever Google hides it, I have forgotten, sorry! But they give instructions for setting up a whole ARM cross-compiling environment on x86/x64 Ubuntu, and as I recall, it was really easy, quick and automatic! (so easy, I did it just so I could compile some ARM apps myself, I really didn't need to compile Android, I don't build phones! )
After that, you too should be able to compile your own apps into native ARM binaries.
overridex said:
Sorry, I should have been more specific - by Linux native I didn't mean any app in particular, I just meant not a java Android app. I'm really just looking to compile a HelloWorld in C and run it at the shell on the Nexus at this point.
Click to expand...
Click to collapse
To do this, you need a version of the ARM tools appropriate for your platform and then use them for building a static binary for Linux. You can find such tools at CodeSourcery (http://www.codesourcery.com/sgpp/lite/arm). Given that you sound like you have Ubuntu, then the Linux version from this page, http://www.codesourcery.com/sgpp/lite/arm/portal/[email protected]=lite, would be what you want. The key is to use the --static parm when you build the binary.
From there, just get your binary over onto the target and run it from the command shell.
Remember that static binaries are HUGE. They have to include all library functions linked in.
If you are looking for tiny binaries, look into the NDK and use the BUILD_EXECUTABLE rule for Android.mk.
A few more useful links, but not much that hasn't already been stated in previously referenced links:
http://benno.id.au/blog/2007/11/13/android-native-apps
http://honeypod.blogspot.com/2007/12/dynamically-linked-hello-world-for.html
http://honeypod.blogspot.com/2007/12/initialize-libc-for-android.html
Hi
I'm looking for a little help in regards to compiling my own kernel , i have all the tools like make etc installed on my ubuntu machine with the latest update2 from samsung but i'm stuck on how to install the toolchain and setting the paths etc i have both the tar.bz2 and the .bin version , i know you can also use the prebuilt in android source but as my broadband is sooooo slow (only 1mb) its a no go to download (only looking @ kernel development)
If any dev or any member with the know how would like to give me a shove in the right direction i would be much appreciated
Mark
I'm quite new there (its actually my first post), but you could consider those:
eheh, I cannot even post an outside link... so you'll have to rebuld them yourself
- install SDK r13: developer.android.com /sdk /installing.html (I used SDK Platform Android 2.3.3, API 10, revivion 2, as it is the same as in 2.3.4 I am running)
(could be a good idea to run as superuser 'sudo ./android')
- install NDK r6b: developer.android.com /sdk /ndk /index.html[/url]
Could read android.serverbox.ch /?p=285
Unless you get a good recipe from someone else, you could start with that.
Hello guys, before the question, i am sorry if i am little english. i look some website that running Ubuntu on Android Device.
I am sorry i am new user in this site, so i can't using outside links in this posting, but you will find if you search on google about this.
i have some question about this case:
1. i am using Samsung Galaxy S Wifi 4.0 a.k.a Samsung YP-G1CW/XSE what ubuntu can running on my device?
2. How with OS Windows? what windows can running on my Device? Windows XP may be, or Windows 7..
Please Help me, i need to running other OS on my Android Device.. Thank's Before for your answer
There are two ways to run another OS on your device: chroot and qemu. You can run Ubuntu (or any Linux distribution that supports ARM processors) with little effort using the chroot method. Look up "Ubuntu installer free" in the store and it will walk you through. It may not work on the stock kernel, so make sure you have the kernel from these forums that fits your device.
The only way to run an OS like Windows is by virtualization through qemu, because it doesn't natively support the chip in your Galaxy S Wifi. This method requires a version of qemu compiled for ARM and additional libraries, which I have not gotten to work successfully on this device. (Anyone else?)
So I'd suggest just trying to get Ubuntu running. It won't be very fast or easy to use on a device that small, but it will work.
Sent from my YP-G70
Mevordel said:
There are two ways to run another OS on your device: chroot and qemu. You can run Ubuntu (or any Linux distribution that supports ARM processors) with little effort using the chroot method. Look up "Ubuntu installer free" in the store and it will walk you through. It may not work on the stock kernel, so make sure you have the kernel from these forums that fits your device.
The only way to run an OS like Windows is by virtualization through qemu, because it doesn't natively support the chip in your Galaxy S Wifi. This method requires a version of qemu compiled for ARM and additional libraries, which I have not gotten to work successfully on this device. (Anyone else?)
So I'd suggest just trying to get Ubuntu running. It won't be very fast or easy to use on a device that small, but it will work.
Sent from my YP-G70
Click to expand...
Click to collapse
Thanks Very much for your solution, i will try search, qemu method or chroot methode.. hope i will can do it, because i am new for it. i am not a developer, or programmer. i just want to know more about gad-get
so thanks a lot.
Hi,
I own a Galaxy Ace 2 running CyanogenMod, with the drivers/firmware from http://bcmon.blogspot.be/ I have working monitor mode/injection.
Included in the package are amongst other applications airodump-ng, aireplay-ng, ...
I wanted to be able to use mdk3 (http://homepages.tu-darmstadt.de/~p_larbig/wlan/) for testing purposes on my phone.
What is the easiest way to compile this (and in the future other) C applications for my phone?
1) Set up a cross-compiling toolchain for Android (Seems pretty difficult, need to re-write Makefiles,...)
2) Compile it on the phone itself (I saw you can chroot ubuntu on Android, so maybe compile it there, and copy the binaries over?)
3) Another way?
Thanks!
I also want one But I don't know how to compile
Hi there!
I would like to compile android apps and ROMs on my nexus 9, but to do so I would need to emulate a 64 bit system like amd64: I know I can use AIDE to create apps but I prefer using Android studio and I would also like to compile multirom for another device, and as far as I know there is no way to run an android build environment natively in android, so I was thinking of emulating an amd64 in my kali nethunter chroot using qemu. I installed qemu-user-static and executed the qemu-debootstrap command to create a basic ubuntu amd64 rootfs, but then the second stage gave me an error that basically meant that qemu couldn't emulate amd64.
Now my question is: does anybody know where can I find the qemu-system-amd64 binary for aarch64 (or how can I build it)?
Thanks in advance,
Daniil Gentili
The nexus 9 can't emulate AMD64
Well as far as I know
I believe there aren't any prebuilt binaries. AArch64 is relatively new in the Linux world.
It's possible, but will be really slow (I don't own a Nexus 9, using common sense and knowledge here)
Doing it won't be easy. You have two options:
- create a proper Linux chroot on your device, then install qemu in it
Previously I created a Gentoo armv7 chroot on a Tegra 3 device. It worked surprisingly well. Things compile, albeit very slowly.
- Compile QEMU directly on Android, however Android uses bionic libc, not glibc. You may need to port it yourself, AFAIK no one's done that.
Sent from my LG-H812 using Tapatalk