update_engine: Run backuptool only in debuggable builds

Change-Id: If4da655396546ac3c13b9eb556055caa58bafcf0
diff --git a/Android.bp b/Android.bp
index a15335b..89bbd0f 100644
--- a/Android.bp
+++ b/Android.bp
@@ -135,6 +135,13 @@
         "libprocessgroup",
         "libselinux",
     ],
+    product_variables: {
+        debuggable: {
+            cflags: [
+                "-DRUN_BACKUPTOOL",
+            ],
+        },
+    },
 }
 
 cc_library_static {
diff --git a/payload_consumer/postinstall_runner_action.cc b/payload_consumer/postinstall_runner_action.cc
index f5756ab..3f905fd 100644
--- a/payload_consumer/postinstall_runner_action.cc
+++ b/payload_consumer/postinstall_runner_action.cc
@@ -152,6 +152,7 @@
   }
 
 #ifdef __ANDROID__
+#ifdef RUN_BACKUPTOOL
   // Check the currently installed /system partition to see if it's ever
   // been mounted R/W. If it has, we'll run backuptool scripts for it
   // since we can safely assume something on the partition has been
@@ -216,6 +217,7 @@
   }
 
   utils::UnmountFilesystem(fs_mount_dir_);
+#endif  // RUN_BACKUPTOOL
 
   // In Chromium OS, the postinstall step is allowed to write to the block
   // device on the target image, so we don't mark it as read-only and should