2013-10-24 17:27:55 |
Florian W. |
description |
The Ubuntu rootfs comes without the "compass" user and group. That user is expected to exist in cyanogenmod. The compass/accelerometer/proximity sensor in my port fail to work because the user is missing (unless applying patches to use the system user for the akmd service and device nodes). See [1], there are a few device nodes belonging to the compass user and there are even more in some device-specific ueventd.rc files.
[1] http://phablet.ubuntu.com/gitweb?p=CyanogenMod/android_system_core.git;a=blob;f=rootdir/ueventd.rc;h=ecaa1abdb4f0b99e21ea2c2b938eaa52e278f070;hb=refs/heads/phablet-saucy
The inofficial cyanogen port for my device has a "compass" group as well, I guess it's the same in cyanogenmod, so I hope you can add that group too.
The file /customization/hooks/02-add_user_to_groups.chroot looks like it is the right place to add that user. |
The ueventd.rc file [1] used by Ubuntu for building android packages contains users and groups that don't exist in the Ubuntu rootfs.
[1] http://phablet.ubuntu.com/gitweb?p=CyanogenMod/android_system_core.git;a=blob;f=rootdir/ueventd.rc;hb=HEAD
While udev rules in 70-device.rules can be used to set a proper user/group for these devices on the Ubuntu side, the rules don't seem to take effect in the android container. I think this leads to "Permission denied" errors for android services like sensorservice, or at least I can't think of any other reason right now why sensorservice can't access /dev/cm3602 in my case.
Android container:
> # ls -l /dev/cm*
> crw-r----- compass system 10, 34 2013-10-24 17:05 cm3602
Ubuntu: (Note the 0660 permission instead of 0640, so my udev rule seems to work fine here)
> # ls -l /dev/cm*
> crw-rw---- 1 system system 10, 34 Oct 24 17:05 /dev/cm3602
Logcat error:
> # /system/bin/logcat | grep Permission
> E/Sensors ( 1517): Couldn't open /dev/cm3602 (Permission denied)
> # ps aux | grep 1517
> system 1517 0.0 0.4 5900 1652 ? Sl 17:05 0:00 /system/bin/sen
As far as I know, Ubuntu wants to get rid of android system users, so I hope the ueventd.rc in system/core/rootdir can be changed to not contain any android users/groups we don't have in the Ubuntu roofs as well. |
|