toolbox: add setprop, start, and stop
Move these from toybox as they're Android specific and more easily
maintained here.
A few changes during the conversion:
* Report error in setprop if value is not a UTF8 string; this would
previously fail only after attempting to set the property
* Inform users to check dmesg for further failure messages for all
three programs
* Only start/stop zygote_secondary if the device is not single arch
Bug: 117321744
Bug: 133901248
Test: setprop works, start and stop work on single and multi-arch.
Change-Id: Id2194cf2b65221bde38aff91f0e86b33edb37f42
diff --git a/toolbox/Android.bp b/toolbox/Android.bp
index 5289976..9ca5607 100644
--- a/toolbox/Android.bp
+++ b/toolbox/Android.bp
@@ -28,6 +28,8 @@
"toolbox.c",
"getevent.c",
"getprop.cpp",
+ "setprop.cpp",
+ "start.cpp",
],
generated_headers: [
"toolbox_input_labels",
@@ -40,6 +42,9 @@
symlinks: [
"getevent",
"getprop",
+ "setprop",
+ "start",
+ "stop",
],
}