Hong
Hong

Reputation: 18501

java.net.BindException: bind failed: EACCES (Permission denied) on a rooted device

The following code throws "java.net.BindException: bind failed: EACCES (Permission denied)" on a rooted tablet:

 DatagramSocket ds = new DatagramSocket(67);

I thought binding to privileged port 67 was allowed on a rooted device. Could anyone shed some light on this?

Upvotes: 1

Views: 1797

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317497

Just because a device is "rooted", that does not give permission to arbitrary apps to do anything they want with root privileges. Rooted devices merely allow arbitrary apps to request to use the su command line to execute new processes with root privileges via a command line.

See this, for example.

Upvotes: 1

Related Questions