WHAT IS IT?
Android Security List - Simple Secure Boot Mechanism
It control integrity of the SYSTEM partition with SHA-1 algorithm supports on early init and recover files if they was modified or deleted.
For recovery purpose uses asl.img file. It file contains all original files from SYSTEM partition with right permissions.
If asl.img not found - device will be power off.
After boot, you can see ASL Protocol in ASL Monitor app.
HOW BUILD IT?
You need in Android souces (any version Android OS, but better - CyanogenMod 10 and above) ans ASL source code.
Download ASL sources: git clone https://github.com/Scorpio92/ASL.git -b "branch name"
Patch "build" directory from ASL downloaded dir. See commit №2. Dirs: external, system - not necessarily patch.
Patch kernel sources. Prepare kernel_defconfig, include this:
Setup device folder, add string in product.mk line:
$(call inherit-product-if-exists, $(LOCAL_PATH)/asl.mk)
Prepare init.rc for your OS version. Add in top of file:
Add string in product.mk lines:
PRODUCT_COPY_FILES += \
Setup BoardConfig, add:
TARGET_PROVIDES_INIT_RC := true
TARGET_KERNEL_SOURCE := kernel
TARGET_KERNEL_CONFIG := kernel_defconfig
Edit asl/ramdisk/sdcard.conf file. Add block for your EXTERNAL SD Card and FS type. Mount parameters not necessarily change.
make your ROM (from Superuser!!! It is very important! Enter "su" and after "make")
Flash ROM, copy asl.img to SD Card and (it will be better, to DATA partition). Power on your device, wait.
ALSO YOU CAN BUILD KERNEL AND ASL.IMG MANUALLY:
see AMB/run.sh for example and change VARS to YOUR.
My device: Exynos4, CyanogenMod10, ~3900 files in SYSTEM partition. ASL checking + recover process take about 1 min 20 seconds.