LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   make command on android (https://www.linuxquestions.org/questions/linux-general-1/make-command-on-android-4175510309/)

amboxer21 07-06-2014 05:43 PM

make command on android
 
Is it possible to manually install/build the make command on an android device. Before you suggest it, botbrew doesn't want to work for my Nexus 5 or TMO SGS4. Thanks in advanced!

pan64 07-08-2014 05:33 AM

what is the goal of it?

amboxer21 07-09-2014 11:44 PM

Quote:

Originally Posted by pan64 (Post 5200418)
what is the goal of it?

I would like to be able to build native C software and run it on my android(Nexus 5). It's a tarball with header and C files. Also a make and configure file. Someone suggested to cross compile. If this is the case, then where would I start? I know nothing about cross compilation. Thanks!

EDIT:
The Nexus uses the Armv7 I'm doing this on my Mint Mate machine.

pan64 07-10-2014 12:15 AM

yes, usually it is made on a "normal" pc using cross compiler. what kind of linux do you have (ubuntu, suse...?)

amboxer21 07-10-2014 09:47 AM

Quote:

Originally Posted by pan64 (Post 5201516)
yes, usually it is made on a "normal" pc using cross compiler. what kind of linux do you have (ubuntu, suse...?)

I'll be building on Linux Mint Mate. I was looking into it last night and seen cmake could be used to CC. Think you could point me in the right direction?

pan64 07-11-2014 12:24 AM

You can start for example here: http://wiki.osdev.org/GCC_Cross-Compiler or here, but it is not so simple....

amboxer21 07-11-2014 06:03 PM

Quote:

Originally Posted by pan64 (Post 5202103)
You can start for example here: http://wiki.osdev.org/GCC_Cross-Compiler or here, but it is not so simple....

Maybe my post is a bit ambiguous. What I am trying to do is port over a Linux userspace keylogger. It's called LKL and can be found on SourceForge. It is written in the C programming language. I recently have figured out how to pull my SQL formatted SMS/MMS DB from my rooted Nexus 5 and retrieve deleted text messages. I am kind of taking it one step further and going to try and port a keylogger. I needed a project and data forensics is very interesting!!

So far I have found that I needed to install the Android NDK, which I did. I also had to set up a standalone toolchain. The use of Cmake is a must!!

Now that I have everything up and running, I think I need to port the linux x86 specific calls from libs like io.h over to armv7 or find equivalent calls.

One of the errors I am getting.

ERROR
Code:

In file included from /home/anthony/Documents/tar_gz/lkl/lkl.h:25:0,
                from /home/anthony/Documents/tar_gz/lkl/lkl.c:29:
/home/anthony/android-toolchain/sysroot/usr/include/sys/io.h: In function 'ioperm':
/home/anthony/android-toolchain/sysroot/usr/include/sys/io.h:33:35: error: expected declaration specifiers before '__THROW'
/home/anthony/android-toolchain/sysroot/usr/include/sys/io.h:38:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__THROW'
/home/anthony/android-toolchain/sysroot/usr/include/sys/io.h:44:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/home/anthony/android-toolchain/sysroot/usr/include/sys/io.h:53:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/home/anthony/android-toolchain/sysroot/usr/include/sys/io.h:62:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/home/anthony/android-toolchain/sysroot/usr/include/sys/io.h:71:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/home/anthony/android-toolchain/sysroot/usr/include/sys/io.h:80:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/home/anthony/android-toolchain/sysroot/usr/include/sys/io.h:89:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/home/anthony/android-toolchain/sysroot/usr/include/sys/io.h:97:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/home/anthony/android-toolchain/sysroot/usr/include/sys/io.h:103:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/home/anthony/android-toolchain/sysroot/usr/include/sys/io.h:110:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token

The ioperm function is apart of the sys/io header. Defined there. I guess sys/io is not supported on armv7.

Any advice?


All times are GMT -5. The time now is 03:09 AM.