Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f70aaef1 authored by Rohit Sekhar's avatar Rohit Sekhar Committed by Rohit Sekhar
Browse files

FP6: init: Setup bluetooth MAC address

parent badfa754
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -169,6 +169,7 @@ PRODUCT_PACKAGES += \

# Init
PRODUCT_PACKAGES += \
    init.bt_mac.sh \
    init.class_main.sh \
    init.qcom.early_boot.sh \
    init.qcom.sh \
@@ -177,6 +178,7 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
    fstab.qcom \
    fstab.qcom.vendor_ramdisk \
    init.bt_mac.rc \
    init.qcom.rc \
    init.recovery.qcom.rc \
    init.target.rc \
+13 −0
Original line number Diff line number Diff line
@@ -10,6 +10,13 @@ prebuilt_etc {
    vendor_ramdisk_available: true,
}

prebuilt_etc {
    name: "init.bt_mac.rc",
    src: "init.bt_mac.rc",
    sub_dir: "init",
    vendor: true,
}

prebuilt_etc {
    name: "init.qcom.rc",
    src: "init.qcom.rc",
@@ -52,6 +59,12 @@ prebuilt_etc {
    sub_dir: "init/hw",
}

sh_binary {
    name: "init.bt_mac.sh",
    src: "init.bt_mac.sh",
    vendor: true,
}

sh_binary {
    name: "init.class_main.sh",
    src: "init.class_main.sh",

init/init.bt_mac.rc

0 → 100644
+7 −0
Original line number Diff line number Diff line
service init.bt_mac /vendor/bin/init.bt_mac.sh
    class core
    group root system
    oneshot

on post-fs
    mkdir /mnt/vendor/persist/trace_info 0777 root system

init/init.bt_mac.sh

0 → 100644
+4 −0
Original line number Diff line number Diff line
#!/vendor/bin/sh
BT_MACADDR=/mnt/vendor/persist/trace_info/bt_macaddr

setprop persist.vendor.service.bdroid.bdaddr $(cat "$BT_MACADDR")