Make avbtool a python_binary_host

By making avbtool a python_binary_host we can run it with the embedded
launcher. This is useful for running the tool outside of the tree on
hosts without the correct version of python installed.

Test: m droid
Bug: 127859062
Change-Id: I4c0ee434e553601ef25296560eae1340dd4b8991
diff --git a/Android.bp b/Android.bp
index 64774a5..7245161 100644
--- a/Android.bp
+++ b/Android.bp
@@ -74,12 +74,27 @@
     ],
 }
 
-cc_prebuilt_binary {
+python_binary_host {
     name: "avbtool",
-    srcs: ["avbtool"],
+    srcs: [":avbtool_py"],
+    main: "avbtool.py",
     required: ["fec"],
-    device_supported: false,
-    host_supported: true,
+    version: {
+        py2: {
+            enabled: true,
+            embedded_launcher: true,
+        },
+        py3: {
+            enabled: false,
+        },
+    },
+}
+
+genrule {
+  name: "avbtool_py",
+  srcs: ["avbtool",],
+  out: ["avbtool.py"],
+  cmd: "cp $(in) $(out)",
 }
 
 // Build libavb - this is a static library that depends