Use more specific option to set dark mode

We have switch misc_writer to use more specific flags to set the dark mode.
Modify the caller as well.

Bug: 131775112
Test: set dark mode, check device boots with dark mode
Change-Id: Ib4af8912332c28075fe93a55e62f8b567c4734ad
diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk
index 253d5d6..93ae7e4 100644
--- a/BoardConfig-common.mk
+++ b/BoardConfig-common.mk
@@ -95,9 +95,6 @@
 TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
 TARGET_RECOVERY_UI_LIB := \
     librecovery_ui_pixel \
-    libnos_citadel_for_recovery \
-    libnos_for_recovery \
-    libbootloader_message \
     libfstab
 
 ifneq ($(filter %_mainline,$(TARGET_PRODUCT)),)
diff --git a/init.hardware.rc b/init.hardware.rc
index 2793f62..f972e69 100644
--- a/init.hardware.rc
+++ b/init.hardware.rc
@@ -988,15 +988,13 @@
     setprop persist.radio.multisim.config ""
     stop vendor.qcrild2
 
-# Write the dark theme magic (`theme-dark`, or 0x7468656d652d6461726b in hex string) to /misc
-# partition. Offset 0 in vendor space is effectively offset 2048 in /misc partition.
-service vendor.theme_set /vendor/bin/misc_writer --vendor-space-offset 0 --hex-string 0x7468656d652d6461726b
+# Write the dark theme magic to /misc partition.
+service vendor.theme_set /vendor/bin/misc_writer --set-dark-theme
     disabled
     oneshot
 
-# Clear the 10-byte dark theme magic in /misc partition. Offset 0 in vendor space is effectively
-# offset 2048 in /misc partition.
-service vendor.theme_clear /vendor/bin/misc_writer --vendor-space-offset 0 --hex-string 0x00000000000000000000
+# Clear the dark theme magic in /misc partition.
+service vendor.theme_clear /vendor/bin/misc_writer --clear-dark-theme
     disabled
     oneshot