How to debug apk ?
I try to understand how the scrcpy-server on Android side works and try modifying the code.
-
Is there a way to debug using AndroidStudio ? As it does not have "activity", it would not allow to debug.
-
I have changed the line in "setScreenPowerMode( )" Ln.i("Device screen turned " + (mode == Device.POWER_MODE_OFF ? "OFF" : "ON"));
I copy the updated apk over but it still showing the original server code which print "[server] INFO: Device screen turned off" on console instead of "OFF"
How should I remove the old scrspy-server and install a updated one ? Thanks a lot for help.
Is there a way to debug using AndroidStudio ? As it does not have "activity", it would not allow to debug.
I just documented it on dev branch: https://github.com/Genymobile/scrcpy/commit/683f7ca848ad4785557d116dcea466f1b5654ef9
How should I remove the old scrspy-server and install a updated one ?
The server is pushed on every startup. The easiest way is to compile everything with:
ninja -Cx
Then run with:
./run x