Revert "Add a check that the staging directories don't..."

Revert submission 2773149-partition_file_list_check

Reason for revert: b/305103467, b/305103783, b/305103468
Reverted changes: /q/submissionid:2773149-partition_file_list_check

Change-Id: I2fab3b4d7d24af4488e777ad84e12e280c42dcc0
diff --git a/tools/Android.bp b/tools/Android.bp
index 42bf8fe..b8ab162 100644
--- a/tools/Android.bp
+++ b/tools/Android.bp
@@ -18,59 +18,56 @@
 }
 
 python_binary_host {
-    name: "generate-self-extracting-archive",
-    srcs: ["generate-self-extracting-archive.py"],
+  name: "generate-self-extracting-archive",
+  srcs: ["generate-self-extracting-archive.py"],
 }
 
 python_binary_host {
-    name: "post_process_props",
-    srcs: ["post_process_props.py"],
+  name: "post_process_props",
+  srcs: ["post_process_props.py"],
 }
 
 python_test_host {
-    name: "post_process_props_unittest",
-    main: "test_post_process_props.py",
-    srcs: [
-        "post_process_props.py",
-        "test_post_process_props.py",
-    ],
-    test_config: "post_process_props_unittest.xml",
-    test_suites: ["general-tests"],
+  name: "post_process_props_unittest",
+  main: "test_post_process_props.py",
+  srcs: [
+    "post_process_props.py",
+    "test_post_process_props.py",
+  ],
+  test_config: "post_process_props_unittest.xml",
+  test_suites: ["general-tests"],
 }
 
 python_binary_host {
-    name: "extract_kernel",
-    srcs: ["extract_kernel.py"],
+  name: "extract_kernel",
+  srcs: ["extract_kernel.py"],
 }
 
 genrule_defaults {
-    name: "extract_kernel_release_defaults",
-    tools: [
-        "extract_kernel",
-        "lz4",
-    ],
-    out: ["kernel_release.txt"],
-    cmd: "$(location) --tools lz4:$(location lz4) --input $(in) --output-release > $(out)",
+  name: "extract_kernel_release_defaults",
+  tools: ["extract_kernel", "lz4"],
+  out: ["kernel_release.txt"],
+  cmd: "$(location) --tools lz4:$(location lz4) --input $(in) --output-release > $(out)"
 }
 
 cc_binary_host {
-    name: "build-runfiles",
-    srcs: ["build-runfiles.cc"],
+  name: "build-runfiles",
+  srcs: ["build-runfiles.cc"],
 }
 
 python_binary_host {
-    name: "check_radio_versions",
-    srcs: ["check_radio_versions.py"],
+  name: "check_radio_versions",
+  srcs: ["check_radio_versions.py"],
 }
 
 python_binary_host {
-    name: "check_elf_file",
-    srcs: ["check_elf_file.py"],
+  name: "check_elf_file",
+  srcs: ["check_elf_file.py"],
 }
 
 python_binary_host {
-    name: "generate_gts_shared_report",
-    srcs: ["generate_gts_shared_report.py"],
+  name: "generate_gts_shared_report",
+  srcs: ["generate_gts_shared_report.py"],
 }
 
 python_binary_host {
@@ -80,20 +77,10 @@
         "list_files.py",
     ],
     version: {
-        py3: {
-            embedded_launcher: true,
-        },
-    },
-}
-
-python_binary_host {
-    name: "compare_file_list_to_staging_dir",
-    srcs: ["compare_file_list_to_staging_dir.py"],
-    version: {
-        py3: {
-            embedded_launcher: true,
-        },
-    },
+      py3: {
+        embedded_launcher: true,
+      }
+    }
 }
 
 python_test_host {
diff --git a/tools/compare_file_list_to_staging_dir.py b/tools/compare_file_list_to_staging_dir.py
deleted file mode 100755
index 0692b25..0000000
--- a/tools/compare_file_list_to_staging_dir.py
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/env python3
-
-import argparse
-import os
-import sys
-
-def main():
-    parser = argparse.ArgumentParser()
-    parser.add_argument('partitions_were_clean_at_start_of_build')
-    parser.add_argument('file_list')
-    parser.add_argument('staging_dir')
-    args = parser.parse_args()
-
-    with open(args.partitions_were_clean_at_start_of_build, 'r') as f:
-        contents = f.read().strip()
-        if contents not in ['true', 'false']:
-            sys.exit('failed to read ' + args.partitions_were_clean_at_start_of_build)
-        if contents == 'false':
-            # Since the partitions weren't clean at the start of the build, the test would
-            # arbitrarily fail if we tried to run it. This is only for builds that directly follow
-            # an `m installclean`. (Like most ci builds do)
-            return
-
-    with open(args.file_list, 'r') as f:
-        files_in_file_list = set(f.read().strip().splitlines())
-
-    files_in_staging_dir = set()
-    for root, _, files in os.walk(args.staging_dir):
-        for f in files:
-            fullpath = os.path.join(root, f)
-            files_in_staging_dir.add(os.path.relpath(fullpath, args.staging_dir))
-
-    # backslashes aren't allowed in expression parts of f-strings
-    sep = '\n  '
-    if files_in_staging_dir != files_in_file_list:
-        sys.exit(f'''Files in staging directory did not match files in file list after an installclean.
-Note that in order to reproduce this error, you must run `m installclean` directly before `m`.
-Files in the staging dir but not in the file list:
-  {sep.join(sorted(files_in_staging_dir - files_in_file_list))}
-Files in the file list but not in the staging dir:
-  {sep.join(sorted(files_in_file_list - files_in_staging_dir))}
-''')
-
-if __name__ == "__main__":
-    main()