lxxgreat / roottools

Automatically exported from code.google.com/p/roottools
0 stars 0 forks source link

Add a Busybox path setter #43

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

In my application, I have embedded my own version of Busybox.

The reason is that I don't want to ask to the user to install Busybox before 
using my application.

This Busybox is inside /data/data/myapp.package.name/files/busybox

Moreover the Busybox versions available on the Play Store doesn't work on some 
devices.

Rootools use for some command Busybox.

It would be an easy and really usefull feature of Rootools library to be able 
to set the path to the executable we want to use.

Regards

Original issue reported on code.google.com by mich...@benesty.fr on 11 Jul 2013 at 10:28

GoogleCodeExporter commented 8 years ago
I am not sure if this is the best way to handle this.

Ideally I think that you should probably create a symlink to your BB and use 
that. The other option would be to temporarily alter the PATH variable so that 
your application dir is first. That way any calls to busybox would use yours 
instead of any others that might reside in the other directories specified 
within PATH.

Original comment by Stericso...@gmail.com on 11 Jul 2013 at 7:57

GoogleCodeExporter commented 8 years ago
Thank you for the tips.

Regarding the symlink idea, on some devices which have Busybox already 
installed, it may be a source of issues as another Busybox can exist for the 
same path and I want my application to be as neutral as possible for the device.

I will try the PATH idea.

But I am wondering, why not implement a setter which would work this way?

So this solution would be easy to use for everybody.

I can commit a patch to the lib when I will have something working. Would you 
be interested?

Regards

Original comment by mich...@benesty.fr on 12 Jul 2013 at 8:14