2

I want to use tools from Linux which not available in Android by default such as iw and iperf. I saw Android applications that use this tools (like this). There are two ways to do it.

First: get root rights on device and put file of the tool to the system/bin/ folder.

Second: put file of the tool to assets folder of Android project and somehow use it.

Applications from Play Market use second way. But I don't know, how it cuold be done. Is there any description of implementation of second way?

Dropper
  • 159
  • 13

1 Answers1

2

https://xjaphx.wordpress.com/2011/10/02/store-and-use-files-in-assets/

This the best example of what you want to do.

For putting executable in assest see https://stackoverflow.com/a/5642593/775964

Community
  • 1
  • 1
Jeegar Patel
  • 26,264
  • 51
  • 149
  • 222
  • Jeegar Patel, thank you for your reply. I know how to open and to use usual file, but I don't know how can I use these tools which represented like files without any extension and was built using C++ source code specially for Android – Dropper Dec 10 '15 at 08:26
  • those files are just executable files compiled for ARM architecture for android. so you can use it just like another executable. – Jeegar Patel Dec 10 '15 at 08:30
  • I didn't see second link. I'll try to use your advice and than accept you answer. It looks like very useful. Thank you. – Dropper Dec 10 '15 at 08:44
  • That link is 1st answer of this question http://stackoverflow.com/questions/5583487/hosting-an-executable-within-android-application/5642593#5642593 – Jeegar Patel Dec 10 '15 at 08:44