Recovery partition has same layout as system
Recovery partition has same layout as system. In other words, executables are installed to <recovery_root>/system/bin and libs are installed to ../system/lib. This is made possible because the recovery partition is now self-contained, i.e., shell, adbd, etc. are hosted in the recovery partition and thus we no longer has to mount the real system.img to /system. So /system is now available to executables built for recovery mode. Bug: 63673171 Test: `adb reboot recovery; adb devices` shows the device ID Test: Select 'mount /system' in the recovery mode, then `adb shell`. $ lsof -p `pidof adbd` shows that libm.so, libc.so, etc. are loaded from the /lib directory. Change-Id: I6c4f903ad21fd3dd10a07c4588be85d3d678c099
This commit is contained in:
parent
6a25de47dc
commit
2e6743176a
|
@ -950,7 +950,8 @@ func PathForModuleInstall(ctx ModuleInstallPathContext, pathComponents ...string
|
|||
if ctx.InstallInData() {
|
||||
partition = "data"
|
||||
} else if ctx.InstallInRecovery() {
|
||||
partition = "recovery/root"
|
||||
// the layout of recovery partion is the same as that of system partition
|
||||
partition = "recovery/root/system"
|
||||
} else if ctx.SocSpecific() {
|
||||
partition = ctx.DeviceConfig().VendorPath()
|
||||
} else if ctx.DeviceSpecific() {
|
||||
|
|
|
@ -357,11 +357,6 @@ func (binary *binaryDecorator) link(ctx ModuleContext,
|
|||
}
|
||||
|
||||
func (binary *binaryDecorator) install(ctx ModuleContext, file android.Path) {
|
||||
// <recovery>/bin is a symlink to /system/bin. Recovery binaries are all in /sbin.
|
||||
if ctx.inRecovery() {
|
||||
binary.baseInstaller.dir = "sbin"
|
||||
}
|
||||
|
||||
binary.baseInstaller.install(ctx, file)
|
||||
for _, symlink := range binary.Properties.Symlinks {
|
||||
binary.symlinks = append(binary.symlinks,
|
||||
|
|
Loading…
Reference in New Issue