Originally Posted by rmein
That looks like it is working fine now, but I don't really understand how it could have been broken in the first place. What changes did you make to get it working originally?
As far as I can see it would have needed a new src/com/martinborjesson/o2xtouchlednotifications/touchled/devices/TouchLEDP990ics.java file based on the original TouchLEDP990 file, but with the new location of the brightness file. You would also need a couple of extra lines in the src/com/martinborjesson/o2xtouchlednotifications/touchled/TouchLED.java file:
That is what happened with previous commits to add support for new devices, I still haven't had time to set up an android SDK environment yet, so haven't done any proper testing.
That's what I thought. Briefly, this is what I've done.
In the v1, I had just modified the TouchLEDP990.java to test the existence of the new WLED_FILE (ICS) and the old, to keep compatibility. Now it works when it started as an app, but when booting, the service was always waiting for the process (su + chmod) to close. So I removed the process.waitFor, because adding an "exit\n" doesn't do it. (The new process wouldn't end.) So now the service starts, but it does nothing. I believe it is because the hasPermission returned false since the native process didn't wait the chmod to be done. So, I had to make the hasPermission return always true, otherwise the service wouldn't wait for chmod to be done.
So I did change the touchled file, and modified the superuser.java to remove the process wait. If you have the time to find another solution, good luck!