Busybox accessing from Android app

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Busybox accessing from Android app

跳至解决方案
3,804 次查看
mbp
Contributor V

Running Android on an Mx5x platform and trying to access and run several (built-in) busybox commands from inside an app. 

Many work fine, a couple of examples:

  • Runtime.getRuntime().exec("ls -l")
  • Runtime.getRuntime().exec("ping www.google.com")

But any busybox command does not (e.g.);

  • Runtime.getRuntime().exec("busybox traceroute 74.125.225.115")

They fail immediate with exit=1, as if hte command does not exist.  I have created a soft link for the command which provides a (permissions 777) linked traceroute command.  I.e. to allow this;

  • Runtime.getRuntime().exec("traceroute 74.125.225.115")

Still no-go.  Immediate exit=1 from the .exec()   ?????????

I'm STUMPED!  Any input would be most appreciated!

标签 (4)
0 项奖励
回复
1 解答
3,087 次查看
CommunityBot
Community Manager
This an automatic process.

We are marking this post as solved, due to the either low activity or any reply marked as correct.

If you have additional questions, please create a new post and reference to this closed post.

NXP Community!

在原帖中查看解决方案

0 项奖励
回复
14 回复数
3,088 次查看
CommunityBot
Community Manager
This an automatic process.

We are marking this post as solved, due to the either low activity or any reply marked as correct.

If you have additional questions, please create a new post and reference to this closed post.

NXP Community!
0 项奖励
回复
3,087 次查看
teddy123
Contributor III

Hi Mike,

I am also facing the same above mentioned issue. Have you found any solution to this problem?

0 项奖励
回复
3,087 次查看
mbp
Contributor V

No.

Frustrating because the BusyBox traceroute is well implemented and should be accessible.

Also been thinking about implementing a duplicate function in the kernel - which I could call by Android - but concerned about the ensuring that a kernel function output can be readily captured by a calling Android app.

Alternatively  I'm thinking I might have to implement a half-baked trace-route by a function chaining a series of ping's.

Any ideas?

0 项奖励
回复
3,087 次查看
YixingKong
Senior Contributor IV

Mike

This discussion is closed since no activity. If you still need help, please feel free to reply with an update to this discussion, or create another discussion.

Thanks,

Yixing

0 项奖励
回复
3,087 次查看
mbp
Contributor V

Sorry I've been out of town.

This issue is NOT answered.  JayTu recreated precisely the issue I have.  The QUESTION I have posted is HOW can I work-around this limitation with busybox?

It seems there is a means to allow access to this command with sufficient permissions to execute it!  I'd expect someone knows this technique.  My question here is to poll those who have run into this and found a solution.

Please mark this NOT ANSWERED and STILL OPEN!

Thanks,

mike

0 项奖励
回复
3,087 次查看
JayTu
NXP Employee
NXP Employee

If so, I don't have any idea. Sorry for the noise and I've deleted my post.

0 项奖励
回复
3,087 次查看
mbp
Contributor V

No apologies needed - your time & effort is appreciated.

There is a solution - I'm polling for what others have done to address this!

Thanks,

mike

0 项奖励
回复
3,087 次查看
YixingKong
Senior Contributor IV

Mike

What is the progress of this issue? Do you want to keep this one open or otherwise we should close this?

Thanks,

Yixing

0 项奖励
回复
3,087 次查看
mbp
Contributor V

Yixing,

Please keep this open until someone at least points a way or suggests a probable solution!

Thanks,

Mike

0 项奖励
回复
3,087 次查看
YixingKong
Senior Contributor IV

Mike

Is the reply from our AE good? If you still need help, please feel free to reply with an update to this discussion, or create another discussion.

Thanks,

Yixing

0 项奖励
回复
3,087 次查看
YixingKong
Senior Contributor IV

Mike

We are sorry for getting back to you so late. Are you still stuck with the issue? If you have somehow resolved the issue, can we close the discussion? If you still need help, please feel free to reply with an update to this discussion.

Thanks,

Yixing

0 项奖励
回复
3,087 次查看
mbp
Contributor V

No this is still an issue in review....  Any input/suggestions would be most welcome!

mike

0 项奖励
回复
3,087 次查看
YixingKong
Senior Contributor IV

JayTu, could you help in answering the questions?

Thanks,

Yixing

0 项奖励
回复
3,087 次查看
JayTu
NXP Employee
NXP Employee

ok, I'll check it soon.

0 项奖励
回复