Added htc logging functions (ported from CyanogenMod)

Change-Id: I8dd9eef986189d25179d282ae12ff111d4f91b3f