On Tue, Jan 27, 2009 at 2:01 AM, Cédric Berger <[email protected]> wrote:
> I tried to write a little android application to be able to monitor the > charge from usb for my Freerunner (to use a car charger...) Very useful, thanks! > I do not think that in current version there is a way via android API (?) Can't really say. > But trying to change usb charge via exec(sh -c "echo 500 > > /sys/class/i2c-adapter/i2c-0/0-0073/pcf50633-mbc/force_usb_limit_dangerous") > fails > : > "permission denied" (this is the error I get in the shell process) You application is run as the user "system" not as the user root. I'm not sure if you can easily change that, I haven't really looked into that. The interface in question is by default writable by root only. You can force as someone else suggested, but in this particular case the operation is in fact dangerous, so it's not a good idea... think for example about the situation where someone figures out that Freerunners running Android have this "property", it would be easy to write an application to fry hardware under certain conditions :-( This is why some of the low level interfaces are so rigid. My guess is that this belongs in the "settings" application that's constantly running... Marcelo _______________________________________________ android-freerunner mailing list [email protected] http://android.koolu.org/listinfo.cgi/android-freerunner-koolu.org
