# RPMB Mock
on post-fs-data
    mkdir /data/vendor/ss
    chown root system /data/vendor/ss
    chmod 0770 /data/vendor/ss
    rm /data/vendor/ss/rpmb_sock
    start rpmb_mock_init
    start rpmb_mock

    # Storage proxy
    start storageproxyd

service storageproxyd /vendor/bin/storageproxyd -d /dev/trusty-ipc-dev0 \
        -r /data/vendor/ss/rpmb_sock -p /data/vendor/ss -t sock
    class main
    disabled
    user root

service rpmb_mock_init /vendor/bin/rpmb_dev --dev /data/vendor/ss/RPMB_DATA --init --size 2048
    disabled
    user system
    group system
    oneshot

service rpmb_mock /vendor/bin/rpmb_dev --dev /data/vendor/ss/RPMB_DATA --sock /data/vendor/ss/rpmb_sock
    class main
    disabled
    user system
    group system
