wangxigui
wangxigui

Reputation: 35

how to transplant linux shell command from linux to android

Can anyone tell me how to transplant linux shell command (such as : ls ,cat and tar) from linux to android. what i think is to do as follow:

1、download the sourcecode

2、execute the command :./configure ( with some params ) CC=arm-linux-android(use cross-compile)

3、./build or make it

4、then ,we can copy the object files and executables to the android

is it right way to do it? thanks in advance !

Upvotes: 0

Views: 294

Answers (2)

dudebrobro
dudebrobro

Reputation: 1317

Essentially those steps would work... you would just have to figure out the right configure commands. Getting the ndk, checking out AOSP, even checking out CM would probably get you the cross-compilers you would need. AOSP and CM would probably be overkill but they include what you would get with the ndk. If you are only planning on porting utilities the ndk might be all you need though.

Hope that helps.

Upvotes: 0

Ankit Pise
Ankit Pise

Reputation: 1259

First of all you need to root your android to extend its limits. Then get busybox to get all possible commands and you can get compilers for c in play store...

Upvotes: 0

Related Questions