Skip to content

Commit

Permalink
Revert "sagit: add assertion for FBE"
Browse files Browse the repository at this point in the history
This reverts commit 1e427bd.
  • Loading branch information
fahmi182 committed Sep 29, 2017
1 parent feb0984 commit a70695c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 64 deletions.
1 change: 1 addition & 0 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ TARGET_POWERHAL_VARIANT := none
TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/root/fstab.qcom
TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
TARGET_USERIMAGES_USE_EXT4 := true
#TARGET_USERIMAGES_USE_F2FS := true

# Releasetools
TARGET_RECOVERY_UPDATER_LIBS := librecovery_updater_sagit
Expand Down
4 changes: 0 additions & 4 deletions device.mk
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,6 @@ PRODUCT_COPY_FILES += \
PRODUCT_PACKAGES += \
librecovery_updater_sagit

# Releasetools
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/fbe_check.sh:install/bin/fbe_check.sh

# RIL
PRODUCT_PACKAGES += \
librmnetctl \
Expand Down
36 changes: 0 additions & 36 deletions fbe_check.sh

This file was deleted.

24 changes: 0 additions & 24 deletions releasetools.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@

def FullOTA_Assertions(info):
AddModemAssertion(info, info.input_zip)
AddFileEncryptionAssertion(info)
return

def IncrementalOTA_Assertions(info):
AddModemAssertion(info, info.target_zip)
AddFileEncryptionAssertion(info)
return

def AddModemAssertion(info, input_zip):
Expand All @@ -37,25 +35,3 @@ def AddModemAssertion(info, input_zip):
cmd = 'assert(sagit.verify_modem(' + ','.join(['"%s"' % modem for modem in versions]) + ') == "1");'
info.script.AppendExtra(cmd)
return

def AddFileEncryptionAssertion(info):
info.script.AppendExtra('package_extract_file("install/bin/fbe_check.sh", "/tmp/fbe_check.sh");');
info.script.AppendExtra('set_metadata("/tmp/fbe_check.sh", "uid", 0, "gid", 0, "mode", 0755);');
info.script.AppendExtra('if !is_mounted("/data") then');
info.script.Mount("/data");
info.script.AppendExtra('endif;');
info.script.AppendExtra('if run_program("/tmp/fbe_check.sh") != 0 then');
info.script.AppendExtra('ui_print("===========================================");');
info.script.AppendExtra('ui_print("| !!! ERROR !!! ");');
info.script.AppendExtra('ui_print("| ");');
info.script.AppendExtra('ui_print("| File-based Encryption is required. ");');
info.script.AppendExtra('ui_print("| ");');
info.script.AppendExtra('ui_print("| Backup your data (including internal ");');
info.script.AppendExtra('ui_print("| storage) and format the data partition. ");');
info.script.AppendExtra('ui_print("| ");');
info.script.AppendExtra('ui_print("| Chinese: http://t.cn/R92kLm3 ");');
info.script.AppendExtra('ui_print("| English: https://t.co/7jDlsf2y6v ");');
info.script.AppendExtra('ui_print("===========================================");');
info.script.AppendExtra('abort("FBE check failed.");');
info.script.AppendExtra('endif;');
info.script.Unmount("/data");

0 comments on commit a70695c

Please sign in to comment.