add emulate arm functions and better apt key handler