yangh / sevensquare

Android screencast wroted in QT
214 stars 56 forks source link

ls return code is not zero #27

Closed ponty closed 5 years ago

ponty commented 5 years ago

My phone is not rooted.

$ ls -d /sys/class/input/input*                                                                                                                                                                         
ls: /sys/class/input/input0: Permission denied
ls: /sys/class/input/input1: Permission denied
ls: /sys/class/input/input2: Permission denied
ls: /sys/class/input/input3: Permission denied
ls: /sys/class/input/input4: Permission denied

ls return code is not zero, so I had to remove the line emit deviceDisconnected() in code:

    args << "shell" << "ls -d" << QString(SYS_INPUT_DIR) + "input*";
    adb.run(args);

    if (! adb.exitSuccess()) {
        emit deviceDisconnected();
        return;
    }

Now the program works without disconnection.

ixenion commented 5 years ago

where is this file in which you remove "emit deviceDisconnected();" ?

ixenion commented 5 years ago

found myself: /path/to/sevensquare/src/adbfb.cpp

yangh commented 5 years ago

Fixed in latest commit 1333e50

For Andriod user build, there is no permission to do so.