Ramdisk modules install to correct location
Install to recovery/root/first_stage_ramdisk if BOARD_USES_RECOVERY_AS_BOOT,
otherwise ramdisk. In addition, append /system if not InstallInRoot().
Test: pass
Bug: 147347110
Change-Id: Ie5895ac61a3d5d85f5d958a27c7980d6c79d997e
diff --git a/android/paths.go b/android/paths.go
index 7bfd8e1..da579d5 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -1256,8 +1256,14 @@
} else if ctx.InstallInTestcases() {
partition = "testcases"
} else if ctx.InstallInRamdisk() {
- // TODO(elsk): should be conditional on RECOVERY_AS_BOOT
- partition = "ramdisk"
+ if ctx.DeviceConfig().BoardUsesRecoveryAsBoot() {
+ partition = "recovery/root/first_stage_ramdisk"
+ } else {
+ partition = "ramdisk"
+ }
+ if !ctx.InstallInRoot() {
+ partition += "/system"
+ }
} else if ctx.InstallInRecovery() {
if ctx.InstallInRoot() {
partition = "recovery/root"