Guest Delnar_Ersike Posted August 11, 2010 Report Posted August 11, 2010 Is it possible to compile from source on Android devices themselves? I don't mean compiling the OS, I mean compiling programs that are hypothetically supposed to work on any Linux-based kernel, provided the dependencies are satisfied (I'm thinking that might be the hardest part). For example, could I just dump the source code for, say, a Hello World program (echoes "Hello World" in Terminal) onto the SD card, then cd to /sdcard/HelloWorld/ with a Terminal emulator, then ./configue && make && make install (I'm assuming su is a must)?
Guest sss_ddk Posted August 11, 2010 Report Posted August 11, 2010 Is it possible to compile from source on Android devices themselves? I don't mean compiling the OS, I mean compiling programs that are hypothetically supposed to work on any Linux-based kernel, provided the dependencies are satisfied (I'm thinking that might be the hardest part). For example, could I just dump the source code for, say, a Hello World program (echoes "Hello World" in Terminal) onto the SD card, then cd to /sdcard/HelloWorld/ with a Terminal emulator, then ./configue && make && make install (I'm assuming su is a must)? You'd have to have the compiler and the standard libraries installed. It takes a lot of space, and then compiling on the device would take a lot of time. I'm guessing it won't happen (especially since i don't see the need for such a thing)
Guest Delnar_Ersike Posted August 11, 2010 Report Posted August 11, 2010 The compiler could be included with ROMs (or pushed with adb), the libraries could be placed on the SD card and then symlink'ed to the correct directories. Compiling might take a long time for larger programs, but usually those aren't programs that run exclusively in the Terminal. For example, if you exclude all the libraries required, ntfs-3g is only about 256 kB large, which wouldn't take that long to compile. But in case compiling on device really isn't feasible, is it possible to compile something on a computer, then push it over with adb and have it run on the device (once again, provided the dependencies are met)?
Guest koudelka Posted August 11, 2010 Report Posted August 11, 2010 The compiler could be included with ROMs (or pushed with adb), the libraries could be placed on the SD card and then symlink'ed to the correct directories. Compiling might take a long time for larger programs, but usually those aren't programs that run exclusively in the Terminal. For example, if you exclude all the libraries required, ntfs-3g is only about 256 kB large, which wouldn't take that long to compile. But in case compiling on device really isn't feasible, is it possible to compile something on a computer, then push it over with adb and have it run on the device (once again, provided the dependencies are met)? yes, there is build tools for that. Thats how all the applications we have now are built. http://www.androidenea.com/2009/04/closer-...ject-build.html and other blogs probably have the information you are looking for =)
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now