Add fallback loader

Change-Id: Ice2619fc2332b424a89df5eda1aa6d61e6d05a07
merge changes from CyanogenMod 10.2 into local branch