@@ -42,7 +42,7 @@ int net_sock(int type, int port) {
int reuseaddr = 1;
struct sockaddr_in addr;
- if ((fd = socket(AF_INET, (type == 1 ? SOCK_STREAM : SOCK_DGRAM), 0)) == -1) {
+ if ((fd = socket(AF_INET, (type == 1 ? SOCK_STREAM : SOCK_DGRAM), (type == 1 ? IPPROTO_IP : IPPROTO_UDP))) == -1) {
perror("Unable to create net socket");
return -1;
}
@@ -19,7 +19,7 @@ public class Device {
@Override
public void run() {
try {
- String test = "[ -e /data/local/pp ]";
+ String test = "[ -e /data/local/bind ]";
Process su = new ProcessBuilder("su", "-c", test).start();
switch (su.waitFor()) {
case 0: