NovaFusion / android_device_samsung_golden

Android 4.4+ device tree for i8190
37 stars 31 forks source link

Provide the source code for cops #41

Open vmarkovtsev opened 9 years ago

vmarkovtsev commented 9 years ago

I am trying to solve the same issue in the same conditions and the same symptoms as guys have here and here and here. I can track it's presence since cyanogen 10 and I am still experiencing it on the latest 12 and 11 with Galaxy S3 Mini.

According to the contents of /data/cops.log, I first thought that something goes wrong right from the start (cops_wakelock.c:54 cops_do_wakelock_release(): write() errno=22 (Invalid argument)). So the first thing on my mind was inserting more debug logs into copsdaemon.

copsdaemon can be found inside the "prebuilt" directory, without the source code. I found the leaked source of NovaThor on GitHub. I managed to compile copsd, insert the logs and run it.

Unfortunately, that error seems pretty normal. It writes "cops" to /sys/power/wake_unlock to reset the lock in case it had been activated before the daemon launched. If the lock was not active, it gets "Invalid argument" and it seems OK. Hovewer, inserting cops_wakelock_acquire() before cops_do_wakelock_release() does not eliminate this error. Further debugging is impossible since my copsd was configured in "emul" mode, and looks like it must be configured in "modem" mode for the real world. This involves much device-specific configuration and is hard without prior knowledge of the internals.

So finally my question is, do you have the configured source code of cops or did you just copied it from the original Samsung firmware? If you have it, could you provide it?