Skip to content

Commit

Permalink
catfish: android-init: Remove duplicate services, set Bluetooth MAC a…
Browse files Browse the repository at this point in the history
…ddress and fix GPS.

The hybris files now provide a base set of services removing the need for explicit definition here.
Additionally, the Bluetooth service now requires a valid MAC address (previously it used the chips' default).
Start the two GPS services when the Broadcom GPS chip is used.

Signed-off-by: Darrel Griët <[email protected]>
  • Loading branch information
MagneFire committed Nov 22, 2022
1 parent cc147d4 commit db88893
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ro.bt.bdaddr_path=/persist/bt_nv.bin
37 changes: 18 additions & 19 deletions meta-catfish/recipes-android/android-init/android-init/init.rc
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,18 @@ on init

chown system root /sys/class/timed_output/vibrator/enable

chown system root /dev/hwbinder
chown system root /dev/vndbinder

chmod 777 /dev/hwbinder
chmod 777 /dev/vndbinder

load_system_props
restorecon_recursive /persist

mkdir /data/
mkdir /data/system/
mkdir /data/system/gps/
mkdir /data/vendor
mkdir /data/vendor/sensor
mkdir /data/vendor/sensor/nanohub_lock
Expand All @@ -27,31 +35,22 @@ on init
chown 1000 root /dev/nanohub_comms
chown 1000 root /dev/nanohub_custom_flash

setprop init.svc.bluetooth running

class_start core

service logd /usr/libexec/hal-droid/system/bin/logd
class core
socket logd stream 0666 logd logd
socket logdr seqpacket 0666 logd logd
socket logdw dgram 0222 logd logd
file /proc/kmsg r
file /dev/kmsg w
user logd
group logd system readproc
class_start hal

service rmt_storage /vendor/bin/rmt_storage
class core

service servicemanager /usr/libexec/hal-droid/system/bin/servicemanager
setenv LD_PRELOAD /usr/libexec/hal-droid/system/lib/libselinux_stubs.so
class core
on property:ro.gps_hardware.name=brcm
start lhd
start gpsd

service hwservicemanager /system/bin/hwservicemanager
setenv LD_PRELOAD /usr/libexec/hal-droid/system/lib/libselinux_stubs.so
# SensorHub (Location Hub) different lhd.conf
service lhd /vendor/bin/lhd /vendor/etc/lhd.conf
class core
disabled

service bt /vendor/bin/hw/[email protected]
# GPS use special version of gps.xml for 4774 to work with LHD
service gpsd /vendor/bin/gpsd -c /vendor/etc/gps.xml
class core
oneshot
disabled
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
FILESEXTRAPATHS:prepend:catfish := "${THISDIR}/${PN}:"

SRC_URI:append:catfish = " file://nonplat_property_contexts \
file://plat_property_contexts"
file://plat_property_contexts \
file://default.prop"

do_install:append:catfish() {
install -m 0644 ${WORKDIR}/nonplat* ${D}/
install -m 0644 ${WORKDIR}/plat* ${D}/
install -m 0644 ${WORKDIR}/default.prop ${D}/
}

FILES:${PN} += "/nonplat* /plat*"
FILES:${PN} += "/nonplat* /plat* /default.prop"

0 comments on commit db88893

Please sign in to comment.