Using
ifconfig eth0 down; ... ; ifconfig eth0 up
in one line solved the problem.
Thanks a lot!
> On 10-nov.-2014, at 19:35, Isaac Dunham <[email protected]> wrote:
>
> On Mon, Nov 10, 2014 at 06:52:04PM +0100, Eline Vanrykel wrote:
>> Hi,
>>
>> I’m using an android emulator and would like to change it’s MAC
>> address. Busybox is installed and I try to modify it as follows:
>> adb shell
>> busybox ip link set dev eth0 addr 00:01:02:03:04:05
>> but this always results in the following error message:
>> ip: SIOCSIFHWADDR: Device or resource busy
>> Okay, let’s solve this by putting the interface down before modification
>> busybox iplink set eth0 down
>> However, my terminal gets stuck after this command. Killing the process
>> and starting a new shell is also impossible, the shell just doesn’t react
>> anymore. The only way to get access to the shell again is to restart the
>> emulator altogether.
>>
>> Does anyone have an idea how to solve this?
>>
>> PS: I know that there are several different commands: ip link (with space),
>> iplink (without space) or ifconfig to do the same thing. They all result in
>> the same problem however.
>
> adb works over network connections. If you kill the network connection,
> you will not be able to use the shell.
>
> In theory, it *might* be possible to work around this by something like this:
>
> ifconfig eth0 down; ... ; ifconfig eth0 up
>
> (where ... stands for any commands that need to run while eth0 is down.)
> You would probably also need to kill adb from another terminal,
> then run adb shell again.
>
> But really, I'd suggest reading the documentation for your emulator to
> see if the emulator allows configuring the MAC address.
>
> HTH,
> Isaac Dunham
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox