We're no longer updating This wiki!!

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
en:c2_app_launch_via_gpio_on_android [2017/03/15 15:40]
luke.go
en:c2_app_launch_via_gpio_on_android [2017/05/24 16:58]
codewalker
Line 1: Line 1:
 ==== Application launching with GPIO trigger on Android ==== ==== Application launching with GPIO trigger on Android ====
  
 +<WRAP center round important>​
 ** You must install the Android release V2.9(C2)/​V4.5(XU4) or higher to launch app via GPIO. ** \\ ** You must install the Android release V2.9(C2)/​V4.5(XU4) or higher to launch app via GPIO. ** \\
-** In that case you can skip step 1 ~ for your easier life LOL** \\+** In that case you can skip step 1 ~ for your easier life LOL** \\
  
 +** If you installed higher version of the Android Marshmallow version v2.9, Please do just step 3 and 4, and skip to 7 ** \\
 ** Please check the revision of PCB. This page is based on the board revision 0.2.(C2) ** ** Please check the revision of PCB. This page is based on the board revision 0.2.(C2) **
 +</​WRAP>​
  
-This page explains how to launch an app via GPIO input. \\ All of software stuff(Step 1 to 6) was included ​since Android image Ver2.9 released.\\+This page explains how to launch an app via GPIO input. \\ All of software stuff(Step 1 to 7) was included ​from Android image Ver2.9 ​to Ver3.4 and Marshmallow Ver2.4 ​released.\\
 \\ \\
 **1. Enable the GPIO key driver as a built-in.**\\ **1. Enable the GPIO key driver as a built-in.**\\
Line 24: Line 27:
 <​code>​ <​code>​
 gpio_keys_polled { gpio_keys_polled {
 +   ​status = "​disabled";​
    ​compatible =    ​compatible =
     "​gpio-keys-polled";​     "​gpio-keys-polled";​
Line 62: Line 66:
 <​code>​ <​code>​
 gpio_keys_polled { gpio_keys_polled {
 +   ​status = "​disabled";​
    ​compatible =    ​compatible =
     "​gpio-keys-polled";​     "​gpio-keys-polled";​
Line 91: Line 96:
 </​code>​ </​code>​
  
-**3. Build the kernel source. and flash the kernel image to the board.(C2)** \\+**3. Enable GPIO Key map.** \\ 
 +<​code>​ 
 +gpio_keys_polled { 
 +   ​status = "​okay";​ 
 +   . 
 +   . 
 +}; 
 +</​code>​ 
 + 
 +**4. Build the kernel source. and flash the kernel image to the board.(C2)** \\
 <​code>​ <​code>​
 $ cd kernel $ cd kernel
Line 104: Line 118:
 </​code>​ </​code>​
  
-**4. Add key event keycode to system/​usr/​keylayout/​Vendor_0001_Product_0001.kl file.** \\ You can find keycode table from [[http://​www.comptechdoc.org/​os/​linux/​howlinuxworks/​linux_hlkeycodes.html|reference]] \\+**5. Add key event keycode to system/​usr/​keylayout/​Vendor_0001_Product_0001.kl file.** \\ You can find keycode table from [[http://​www.comptechdoc.org/​os/​linux/​howlinuxworks/​linux_hlkeycodes.html|reference]] \\
 ** ODROID-C2 **\\ ** ODROID-C2 **\\
 [[https://​github.com/​codewalkerster/​android_device_hardkernel_odroidc2/​commit/​7b49c29162c884491df262a3ec3d96f08942e231|commit]] \\ [[https://​github.com/​codewalkerster/​android_device_hardkernel_odroidc2/​commit/​7b49c29162c884491df262a3ec3d96f08942e231|commit]] \\
Line 119: Line 133:
 </​code>​ </​code>​
  
-**5. Apply the patch that intercept key event to frameworks/​base & ODROID Utility App.** \\+**6. Apply the patch that intercept key event to frameworks/​base & ODROID Utility App.** \\
 ** ODROID-C2 **\\ ** ODROID-C2 **\\
 [[https://​github.com/​codewalkerster/​android_frameworks_base/​commit/​6fe6d88e6715e16d891b046a41f7d7fa2588d48c|frameworks/​base commit]] \\ [[https://​github.com/​codewalkerster/​android_frameworks_base/​commit/​6fe6d88e6715e16d891b046a41f7d7fa2588d48c|frameworks/​base commit]] \\
Line 126: Line 140:
 [[https://​github.com/​codewalkerster/​android_frameworks_base/​commit/​c8f8974e657f9cc4471a3825fed8bd15718f556d|frameworks/​base commit]] \\ [[https://​github.com/​codewalkerster/​android_frameworks_base/​commit/​c8f8974e657f9cc4471a3825fed8bd15718f556d|frameworks/​base commit]] \\
 [[https://​github.com/​codewalkerster/​android_packages_apps_Utility/​commit/​f33e6124571df1e201167589ecccb3b218bc3c0f|ODROID Utility commit]]\\ [[https://​github.com/​codewalkerster/​android_packages_apps_Utility/​commit/​f33e6124571df1e201167589ecccb3b218bc3c0f|ODROID Utility commit]]\\
-**6. Build the Android image and flash it.** \\+**7. Build the Android image and flash it.** \\
 [[en:​c2_building_android#​build|ODROID-C2 build method]] [[en:​c2_building_android#​build|ODROID-C2 build method]]
 [[en:​xu3_building_android#​installation|ODROID-XU3/​4 install method]] [[en:​xu3_building_android#​installation|ODROID-XU3/​4 install method]]
Line 138: Line 152:
 \\ \\
 \\ \\
-**7. Connect a few buttons to the GPIOs with 10KOhm pull-up resistors. ** **Click images to enlarge it.** \\+**8. Connect a few buttons to the GPIOs with 10KOhm pull-up resistors. ** **Click images to enlarge it.** \\
  
 ** ODROID-C2 **\\ ** ODROID-C2 **\\
Line 153: Line 167:
 {{:​en:​gpio_shortcut_xu4_schem.png?​direct&​200|}} {{:​en:​gpio_shortcut_xu4_schem.png?​direct&​200|}}
  
-**8. Set the launch app by using ODROID Utility app.**+**9. Set the launch app by using ODROID Utility app.**
  
-{{:​en:​screen.png?​direct&​200|}}+{{:​en:​screen.png?​direct&​500|}}
  
-[[https://​www.youtube.com/​watch?​v=tU6-Fz6twAM|How it works in video !]]+{{youtube>tU6-Fz6twAM}}
en/c2_app_launch_via_gpio_on_android.txt · Last modified: 2017/05/24 17:10 by codewalker
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0