diff options
-rw-r--r-- | etc/init.recovery.logd.rc | 17 | ||||
-rw-r--r-- | prebuilt/Android.mk | 5 | ||||
-rw-r--r-- | toybox/Android.mk | 30 |
3 files changed, 22 insertions, 30 deletions
diff --git a/etc/init.recovery.logd.rc b/etc/init.recovery.logd.rc index 7bdbfb8bc..423039cf0 100644 --- a/etc/init.recovery.logd.rc +++ b/etc/init.recovery.logd.rc @@ -1,20 +1,8 @@ on load_all_props_action start logd - start logd-reinit on load_persist_props_action start logd - start logd-reinit - -on post-fs - start logd - -on post-fs-data - start logd - -on property:vold.decrypt=trigger_load_persist_props - start logd - start logd-reinit service logd /sbin/logd class core @@ -23,8 +11,3 @@ service logd /sbin/logd socket logdw dgram 0222 logd logd group root system seclabel u:r:logd:s0 - -service logd-reinit /sbin/logd --reinit - oneshot - disabled - seclabel u:r:logd:s0 diff --git a/prebuilt/Android.mk b/prebuilt/Android.mk index 0f5f09148..ccfe4f28f 100644 --- a/prebuilt/Android.mk +++ b/prebuilt/Android.mk @@ -21,6 +21,11 @@ else RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/sh RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 23; echo $$?),0) + RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/grep + LOCAL_POST_INSTALL_CMD += $(hide) if [ -e "$(TARGET_RECOVERY_ROOT_OUT)/sbin/egrep" ]; then \ + rm $(TARGET_RECOVERY_ROOT_OUT)/sbin/egrep; fi; ln -sr $(TARGET_RECOVERY_ROOT_OUT)/sbin/grep $(TARGET_RECOVERY_ROOT_OUT)/sbin/egrep; \ + if [ -e "$(TARGET_RECOVERY_ROOT_OUT)/sbin/fgrep" ]; then \ + rm $(TARGET_RECOVERY_ROOT_OUT)/sbin/fgrep; fi; ln -sr $(TARGET_RECOVERY_ROOT_OUT)/sbin/grep $(TARGET_RECOVERY_ROOT_OUT)/sbin/fgrep; RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/toybox ifneq ($(wildcard external/zip/Android.mk),) RELINK_SOURCE_FILES += $(TARGET_OUT_OPTIONAL_EXECUTABLES)/zip diff --git a/toybox/Android.mk b/toybox/Android.mk index c88f360f5..c21a27235 100644 --- a/toybox/Android.mk +++ b/toybox/Android.mk @@ -189,6 +189,15 @@ LOCAL_SRC_FILES := \ toys/posix/wc.c \ toys/posix/xargs.c +ifeq ($(shell test $(PLATFORM_SDK_VERSION) -eq 26; echo $$?),0) +# Android 8.0 had some tools in different paths +LOCAL_SRC_FILES += \ + toys/pending/dmesg.c +else +LOCAL_SRC_FILES += \ + toys/lsb/dmesg.c +endif + ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 23; echo $$?),0) # there are some conflicts here with AOSP-7.[01] and CM-14.[01] # the following items have been removed for compatibility @@ -222,14 +231,6 @@ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 27; echo $$?),0) LOCAL_SRC_FILES += \ toys/pending/xzcat.c endif -ifeq ($(shell test $(PLATFORM_SDK_VERSION) -eq 26; echo $$?),0) -# Android 8.0 had some tools in different paths -LOCAL_SRC_FILES += \ - toys/pending/dmesg.c -else -LOCAL_SRC_FILES += \ - toys/lsb/dmesg.c -endif ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 25; echo $$?),0) # Android 8.0/8.1 had some tools in different paths @@ -319,6 +320,7 @@ LOCAL_SRC_FILES += \ endif LOCAL_CFLAGS += \ + -std=c99 \ -std=gnu11 \ -Os \ -Wno-char-subscripts \ @@ -330,8 +332,13 @@ LOCAL_CFLAGS += \ -ffunction-sections -fdata-sections \ -fno-asynchronous-unwind-tables \ -toybox_version := $(shell sed 's/#define.*TOYBOX_VERSION.*"\(.*\)"/\1/p;d' $(LOCAL_PATH)/main.c) -LOCAL_CFLAGS += -DTOYBOX_VERSION=\"$(toybox_version)\" +ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0) + toybox_version := $(shell git -C $(LOCAL_PATH) rev-parse --short=12 HEAD 2>/dev/null)-android + LOCAL_CFLAGS += -DTOYBOX_VERSION='"$(toybox_version)"' +else + toybox_version := $(shell sed 's/#define.*TOYBOX_VERSION.*"\(.*\)"/\1/p;d' $(LOCAL_PATH)/main.c) + LOCAL_CFLAGS += -DTOYBOX_VERSION=\"$(toybox_version)\" +endif LOCAL_CLANG := true @@ -481,15 +488,12 @@ ALL_TOOLS += \ dd \ df \ diff \ - egrep \ - fgrep \ flock \ freeramdisk \ fsfreeze \ fstype \ ftpget \ ftpput \ - grep \ help \ install \ ionice \ |