The system() call implemented in bionic/libc/unistd/system.c
depends on paths.h which sets _PATH_BSHELL to "/system/bin/sh"
which is incorrect for recovery - recovery cannot
depend on /system being mounted or even sane because /system
could be corrupt when recovery is used.
We need _PATH_BSHELL to be pointing to /sbin/sh - and
therefore bootable/recovery has its own __system() call
implemented in bootable/recovery/libcrecovery that sets
_PATH_BSHELL as well as makes sure environ is used in
the call to execve.
Change-Id: I2e5fd9c259e4fd0a9aad826a297fd3233a50a7c1
There is a max length for system property names at 32 characters. The
old recovery property name was over this length.
Renamed the property to one much shorter so it is read properly.
Change-Id: Iecadd1218a64cab0c4fb94c5e910b920217580f1
The change switches is_safe_to_format() from a hard coded list
to a list that can be overwritten by system property.
Change-Id: Ie536044a912c3e88462831851d288a60fdc30e2b
For the Power menu,
frameworks/base/core/jni/android_os_Power.cpp#L180
already uses TARGET_RECOVERY_PRE_COMMAND if
TARGET_RECOVERY_PRE_COMMAND is defined in the
BoardConfig.mk for a device to make a system() call before
calling __reboot() for recovery. This commit adds
the same thing to the other places that we know we are
getting into recovery using __reboot().
Change-Id: Ifd0394fed1e87b63d80d95e0e2a049004518e27e
Stock sd-card that ships with LG-P500 formatted with no partitions.
This issue can be handled with device2 in recovery.fstab.
But UMS didn't.
We will try to mount second device (if it was defined) if first failed.
Change-Id: Ia8b58b9fdfa3e63f703a1dd5870cb76936cec88e
Don't allow formatting of special partitions like radio, bootloader,
or misc. No sense in formatting recovery from recovery either dawg.
Change-Id: I0f935aad103574b17be237993730afaeae623871
This is checked at runtime to see if /boot is a mountable parition (i.e not mtd), if so it adds an entry into /etc/fstab.
This will allow us to mount /boot from an edify script and push certain files without completely imaging the parition which can contain other files such as the bootloader (u-boot), and recovery kernel and ramdisks as is the case with the encore (NookColor)
Test on NookColor and passion. Correct entry was added to the NC and not added to the passion as expected.
Change-Id: I9850dee866b77653bf400bb5193905e55da3f25f
Exable uses in BoardConfig.mk:
BOARD_HAS_SDCARD_INTERNAL := true
BOARD_SDCARD_DEVICE_INTERNAL := /dev/block/mmcblk3p1
Setting BOARD_SDCARD_DEVICE_SECONDARY to the same value as
BOARD_SDCARD_DEVICE_INTERNAL will allow the device to
"fall back" to the internal SD card for other actions.
Change-Id: I2cf8ab4b1d385ac714f5b7416b915d059033d94b