Install recovery etc files to recovery/root/system/etc.

They used to be installed under recovery/root/etc. This CL moves the
files to the new location and creates a symlink from /etc to /system/etc
(done by the rule in system/core/rootdir). This gives similar layout
between normal boot and recovery, and allows installing prebuilt_etc
files with Soong (`recovery_available: true`).

As part of the change, we no longer need the whitelisting rule for
mke2fs.conf.

Bug: 112780007
Test: Build with other changes in the topic (aosp_taimen-userdebug).
      Check the generated files under recovery (/etc being a symlink to
      /system/etc).
Test: Boot into recovery. Verify basic functionalities (`adb shell` and
      `adb sideload`, factory reset).
Test: `build/soong/build_test.bash --dist`
Change-Id: Ibb6dea6f179a339f0c2d0fd8ba05ec0085b79a12
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 4195900..e543857 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -239,11 +239,11 @@
 
   system_root_image = d.get("system_root_image") == "true"
   if d.get("no_recovery") != "true":
-    recovery_fstab_path = "RECOVERY/RAMDISK/etc/recovery.fstab"
+    recovery_fstab_path = "RECOVERY/RAMDISK/system/etc/recovery.fstab"
     d["fstab"] = LoadRecoveryFSTab(
         read_helper, d["fstab_version"], recovery_fstab_path, system_root_image)
   elif d.get("recovery_as_boot") == "true":
-    recovery_fstab_path = "BOOT/RAMDISK/etc/recovery.fstab"
+    recovery_fstab_path = "BOOT/RAMDISK/system/etc/recovery.fstab"
     d["fstab"] = LoadRecoveryFSTab(
         read_helper, d["fstab_version"], recovery_fstab_path, system_root_image)
   else:
diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py
index 393c33d..5c6c8e1 100755
--- a/tools/releasetools/sign_target_files_apks.py
+++ b/tools/releasetools/sign_target_files_apks.py
@@ -370,13 +370,14 @@
       OPTIONS.rebuild_recovery = True
 
     # Don't copy OTA keys if we're replacing them.
-    elif (OPTIONS.replace_ota_keys and
-          filename in (
-              "BOOT/RAMDISK/res/keys",
-              "BOOT/RAMDISK/etc/update_engine/update-payload-key.pub.pem",
-              "RECOVERY/RAMDISK/res/keys",
-              "SYSTEM/etc/security/otacerts.zip",
-              "SYSTEM/etc/update_engine/update-payload-key.pub.pem")):
+    elif (
+        OPTIONS.replace_ota_keys and
+        filename in (
+            "BOOT/RAMDISK/res/keys",
+            "BOOT/RAMDISK/system/etc/update_engine/update-payload-key.pub.pem",
+            "RECOVERY/RAMDISK/res/keys",
+            "SYSTEM/etc/security/otacerts.zip",
+            "SYSTEM/etc/update_engine/update-payload-key.pub.pem")):
       pass
 
     # Skip META/misc_info.txt since we will write back the new values later.
@@ -635,7 +636,7 @@
         pubkey)
     common.ZipWriteStr(
         output_tf_zip,
-        "BOOT/RAMDISK/etc/update_engine/update-payload-key.pub.pem",
+        "BOOT/RAMDISK/system/etc/update_engine/update-payload-key.pub.pem",
         pubkey)
 
   return new_recovery_keys