diff options
-rw-r--r-- | core/Makefile | 4 | ||||
-rw-r--r-- | envsetup.sh | 17 | ||||
-rwxr-xr-x | tools/releasetools/sign_target_files_apks.py | 4 |
3 files changed, 23 insertions, 2 deletions
diff --git a/core/Makefile b/core/Makefile index c06a392..585b2e9 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1232,6 +1232,10 @@ endef $(BUILT_SYSTEMIMAGE): $(FULL_SYSTEMIMAGE_DEPS) $(INSTALLED_FILES_FILE) $(call build-systemimage-target,$@) +ifndef I_WANT_A_QUAIL_STAR +$(BUILT_SYSTEMIMAGE): checkapi +endif + INSTALLED_SYSTEMIMAGE := $(PRODUCT_OUT)/system.img SYSTEMIMAGE_SOURCE_DIR := $(TARGET_OUT) diff --git a/envsetup.sh b/envsetup.sh index 517573f..bb46faf 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -2182,6 +2182,19 @@ function repodiff() { 'echo "$REPO_PATH ($REPO_REMOTE)"; git diff ${diffopts} 2>/dev/null ;' } +# Return success if adb is up and not in recovery +function _adb_connected { + { + if [[ "$(adb get-state)" == device && + "$(adb shell test -e /sbin/recovery; echo $?)" == 0 ]] + then + return 0 + fi + } 2>/dev/null + + return 1 +}; + # Credit for color strip sed: http://goo.gl/BoIcm function dopush() { @@ -2189,10 +2202,10 @@ function dopush() shift adb start-server # Prevent unexpected starting server message from adb get-state in the next line - if [ $(adb get-state) != device -a $(adb shell test -e /sbin/recovery 2> /dev/null; echo $?) != 0 ] ; then + if ! _adb_connected; then echo "No device is online. Waiting for one..." echo "Please connect USB and/or enable USB debugging" - until [ $(adb get-state) = device -o $(adb shell test -e /sbin/recovery 2> /dev/null; echo $?) = 0 ];do + until _adb_connected; do sleep 1 done echo "Device Found." diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py index a95af16..632c36f 100755 --- a/tools/releasetools/sign_target_files_apks.py +++ b/tools/releasetools/sign_target_files_apks.py @@ -221,6 +221,10 @@ def ProcessTargetFiles(input_tf_zip, output_tf_zip, misc_info, print("rewriting %s with new keys." % info.filename) new_data = ReplaceCerts(data) common.ZipWriteStr(output_tf_zip, out_info, new_data) + elif info.filename.startswith("SYSTEM/etc/permissions/"): + print("rewriting %s with new keys." % info.filename) + new_data = ReplaceCerts(data) + common.ZipWriteStr(output_tf_zip, out_info, new_data) elif info.filename in ("SYSTEM/recovery-from-boot.p", "SYSTEM/bin/install-recovery.sh"): rebuild_recovery = True |