Lines Matching defs:android
0 ;;; android-host.el --- Module to use host binaries from an Android dev tree.
3 ;; Copyright (C) 2009 The Android Open Source Project
24 ;; In your .emacs load this file (e.g (require 'android-host)) then
27 ;; (global-set-key [f8] 'android-adb-sync)
30 ;; M-x android-adb-sync
33 ;; C-x a a android-adb-root
34 ;; C-x a r android-adb-remount
35 ;; C-x a s android-adb-sync
36 ;; C-x a b android-adb-shell-reboot-bootloader
37 ;; C-x a f android-fastboot-flashall
39 ;; android-fastboot-flashall is still work in progress, check the
40 ;; associated buffer (*Android Output*) for errors when you use it.
44 (require 'android-common)
46 (defvar android-host-command-map (make-sparse-keymap))
48 (defun android-host-key-prefix-set (var val)
52 (define-key global-map (read-kbd-macro val) android-host-command-map)
55 (let ((map android-host-command-map))
56 (define-key map (kbd "a") 'android-adb-root)
57 (define-key map (kbd "r") 'android-adb-remount)
58 (define-key map (kbd "s") 'android-adb-sync)
59 (define-key map (kbd "b") 'android-adb-shell-reboot-bootloader)
60 (define-key map (kbd "f") 'android-fastboot-flashall))
62 (defcustom android-host-key-prefix "C-x a"
63 "Prefix keystrokes for Android commands."
64 :group 'android
66 :set 'android-host-key-prefix-set)
68 (defun android-adb-remount ()
71 (android-adb-command "remount"))
73 (defun android-adb-root ()
76 (android-adb-command "root"))
78 (defun android-adb-shell-reboot-bootloader ()
81 (android-adb-shell-command "reboot bootloader"))
83 (defun android-adb-sync ()
88 (android-adb-root)
89 (android-adb-remount)
90 (android-adb-command "sync" 'p))
92 (defun android-fastboot-sentinel (process event)
100 (defun android-fastboot-flashall (arg)
106 (when (get-buffer android-output-buffer-name)
107 (with-current-buffer android-output-buffer-name
113 android-output-buffer-name
114 (concat (android-fastboot) " flashall -w"))
116 "fastboot" android-output-buffer-name
117 (concat (android-fastboot) " flashall")))))
118 (set-process-sentinel proc 'android-fastboot-sentinel)))
121 (provide 'android-host)
122 ;;; android-host.el ends here