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: I4a0395018bbab043f93546c4664f2c66e305236c
diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk
index 1946d8f..b002a90 100644
--- a/BoardConfig-common.mk
+++ b/BoardConfig-common.mk
@@ -76,9 +76,6 @@
 TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
 TARGET_RECOVERY_UI_LIB := \
     librecovery_ui_pixel \
-    libnos_citadel_for_recovery \
-    libnos_for_recovery \
-    libbootloader_message \
     libfstab
 
 # Enable chain partition for system.
diff --git a/init.hardware.rc b/init.hardware.rc
index 3980fda..c705d27 100644
--- a/init.hardware.rc
+++ b/init.hardware.rc
@@ -905,15 +905,13 @@
     group audio system
     disabled
 
-# 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