diff options
author | Steve Pfetsch <spfetsch@google.com> | 2020-08-31 20:54:34 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-08-31 20:54:34 +0000 |
commit | 685dd7e18c7caa33004b6522a3140f7d5a592b5c (patch) | |
tree | 73a79abb321cfc538dcf976faf8a84eee4a3280e | |
parent | 8df214576aa430658f41550e2df233ed8bb3eee1 (diff) | |
parent | fbd8955df534b20fc2b00aa64923624c343ff61a (diff) | |
download | redbull-685dd7e18c7caa33004b6522a3140f7d5a592b5c.tar.gz |
Merge "redbull: enable twoshay study" into rvc-qpr-dev
-rw-r--r-- | device-common.mk | 1 | ||||
-rw-r--r-- | init.hardware.rc | 13 | ||||
-rwxr-xr-x | init.twoshay.sh | 8 |
3 files changed, 22 insertions, 0 deletions
diff --git a/device-common.mk b/device-common.mk index e612f1c3..cf36679c 100644 --- a/device-common.mk +++ b/device-common.mk @@ -109,6 +109,7 @@ PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/init.radio.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.radio.sh \ $(LOCAL_PATH)/init.hardware.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_PLATFORM).usb.rc \ $(LOCAL_PATH)/init.sensors.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.sensors.sh \ + $(LOCAL_PATH)/init.twoshay.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.twoshay.sh \ $(LOCAL_PATH)/ueventd.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \ $(LOCAL_PATH)/init.ramoops.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.ramoops.sh diff --git a/init.hardware.rc b/init.hardware.rc index 3fe871b1..82a02a7c 100644 --- a/init.hardware.rc +++ b/init.hardware.rc @@ -277,6 +277,9 @@ on late-fs # Init sensor specific services start init-sensors-sh + # Init twoshay + start init-twoshay-sh + # turn off vblank irq immediately after turning off write /sys/module/drm/parameters/vblankoffdelay -1 @@ -793,6 +796,16 @@ on property:vendor.all.modules.ready=1 on property:persist.vendor.enable_twoshay=1 enable twoshay +service init-twoshay-sh /vendor/bin/init.twoshay.sh + class main + user root + group root system + disabled + oneshot + +on property:vendor.twoshay.study_group=1 + enable twoshay + # bugreport is triggered by holding down volume down, volume up and power service bugreport /system/bin/dumpstate -d -p -z class main diff --git a/init.twoshay.sh b/init.twoshay.sh new file mode 100755 index 00000000..65f85a4f --- /dev/null +++ b/init.twoshay.sh @@ -0,0 +1,8 @@ +#!/vendor/bin/sh + +# Implementation of A/B group selection - See b/161398758 +seedfile=$(cat /sys/devices/platform/soc/soc:qcom,dsi-display-primary/panel_info/panel0/serial_number) +sum=$(sha1sum $(seedfile)) +result=$(expr $((16#${sum:1:1})) % 2) + +setprop vendor.twoshay.study_group $result |