[Q] looking for a guide to how to cross compile C program to Android BIN file. - General Questions and Answers

Hi all,
i'm new here, but i'm not new to android.
well i program in C, C++ and JAVA. and i'm wrinting an APP that needs some low level programing that use the Bluetooth.
now i have the code already running on my PC but i want to make a bin file that i can run through the terminal in my HTC desire.
my question is, where can i find a good guide that can explain me how to cross compile C code into an ARM arch, so that later on i can use in my android?
thanks to all!

Related

1.0 SDK and 1.1 SDK differences

Does anyone know the changes from sdk 1.0_r2 to 1.1_r1?
I tried using a jar compare tool to figure it out without much luck. I used jarc http://www.extradata.com/products/jarc/ .
Does anybody know of a better jar compare tool out there, preferably one that outputs to a file instead of the console like jarc.

[Q] Any way to compile java programs in android ?

Is there a way to compile .java file to .class file and execute it
I wanted to compile c/c++/java programs, not for my phone but in my phone...
I searched but did not find an easy way for it.
At last I found out a real easy way to compile c/c++ by using adosbox for android.
I copied the turbo c 'tc' folder from my pc to my sdcard and used adosbox like command promt to go to 'bin' folder in tc and start tc.exe...
Then I could easily write and compile programs just like i did on the pc
But still no luck for java programs...
I copied the reqired java folder and then used adosbox to run the command "javac file.java" but it said "This Program Cannot Be Run in DOS Mode"
So if there is any other way to compile java programs in my phone
please help
Thanx in advance
Try looking at Eclipse, although Eclipse is a large desktop IDE, it includes its own Java compiler written in Java (in the part called "JDT core"), and if (as I hope) that Java compiler is not copyrighted by Sun/Oracle, you (or someone else already maybe) may be able to compile that part of Eclipse into a "native" Dalvik/Android App.
Googling the issue, I see that others have been asking for an Android port of Eclipse too, so maybe there will be some momentum going for this soon.

[Q] zImage Editor..?

Hi all!
Does anyone have something editor program which can edit zImage easily?
In Linux Ubuntu or In Windows 7 ...?
plz... I need something easy program to edit zImage because I don't know how to use c+, c++ ...?
If anyone have any good zImage editor then can you tell me the program name?
Thanks
Hey man, you can't edit a zImage and you don't need to know about c+ or c#. If you have linux installed you can easily download the kernel source for your mobile phone and re-compile it for your needs.
OK thanks, but zImage can be edited in JetDroid..
maybe on some phones cant..?

[Q] Need help to get started with Android Studio

Hi,
I'm trying to learn Android programming.
In order to do so, I have extracted an apk in order to understand how it works.
My goal is to enhance an existing apk, for personal purpose, and I taught that it is the best way to start.
So now I have my source extracted from an apk.
How can I add it to Android Studio so I can start to debug it and later add the new functionalities that I will like to add to it ?
Thanks
MagicReg

How to decompile library (.so) android on windows

how to decompile file *.so (library) android on windows? what tool can I used? any ideas??
saigetshu said:
how to decompile file *.so (library) android on windows? what tool can I used? any ideas??
Click to expand...
Click to collapse
Decompiling a library is not easy even on Linux! This is not something you will learn overnight. It takes years to master this.
For starters, forget about cross-decompiling. Install Linux, even a virtual machine will be better than nothing.
A .so is a compiled library. Usually generated from C or C++ source code but these days it may have been generated directly from Go source, D or some other minor language.
Then, Google "linux decompiler" and try it. But you will need to learn quite a bit of C, C++, Assembler and Linux API. Also, use readelf to find out the dependencies (DT_NEEDED ELF header).
You probably want to read Ulrich Drepper's paper on Linux shared objects and the ELF specification.
pgquiles said:
Decompiling a library is not easy even on Linux! This is not something you will learn overnight. It takes years to master this.
For starters, forget about cross-decompiling. Install Linux, even a virtual machine will be better than nothing.
A .so is a compiled library. Usually generated from C or C++ source code but these days it may have been generated directly from Go source, D or some other minor language.
Then, Google "linux decompiler" and try it. But you will need to learn quite a bit of C, C++, Assembler and Linux API. Also, use readelf to find out the dependencies (DT_NEEDED ELF header).
You probably want to read Ulrich Drepper's paper on Linux shared objects and the ELF specification.
Click to expand...
Click to collapse
thanks for advice, it's possible to convert architecture library? example from architecture arm v7a to x86.
saigetshu said:
thanks for advice, it's possible to convert architecture library? example from architecture arm v7a to x86.
Click to expand...
Click to collapse
It's not impossible but it's very complex. It's not a path you want to pursue unless you are in the business of providing a solution to run ARM code on x86.
Use qemu or a vendor-provided ARM virtualization/emulation solution (e. g. WindRiver Simics) if you want to debug ARM code on x86. Or just start gdb server on the ARM device and remotely debug, here you have a nice guide that will get you started:
https://sourceware.org/gdb/wiki/BuildingCrossGDBandGDBserver
thats really helping me, thanks again for your advice

Categories

Resources