Does an Android Device have to be rooted in order

2019-08-03 19:10发布

问题:

I created a ServerSocket that listens to port 9000 in my app, and I want to telnet to that port. It works on my rooted test device, but I need it to work on non-rooted devices, which it doesn't seem to do. I need to know if this only works on rooted devices, or if it should work on unrooted droids as well, implying that I just made a mistake in my code.

回答1:

It should work on any device, rooted or otherwise. As long as you aren't actually trying to access a privileged port (< 1024 if I recall correctly) or trying to use a port that's already in use.