~/talk

Learning How Android Controls Hardware via GPIO

TalkinJapaneseat DroidKaigi 2023 · 2023-09-14..09-16· [embedded-and-hardware, android]
name:Takasshi
links:none on file
slides:none on file

Demonstrates controlling hardware GPIO on a TinkerBoard 2S from Android by toggling /sys/class/gpio (export → direction=out → value) to drive a watchdog timer-relay, verified with a voltmeter. Compares methods: invoking root shell commands from an app; building a privileged app via sharedUserId and platform signature; isolating GPIO access into a small privileged service app; and persisting permissions with unitrc plus SELinux domain changes, and recommends implementing a proper HAL/driver and framework service instead of letting apps write GPIO files directly.

AI-written summary · about

  1. 0:00Introduction
  2. 1:50GPIO background challenges
  3. 3:14Finding GPIO files commands
  4. 4:39GPIO control with root
  5. 5:42Minimizing permissions privileged apps
  6. 7:09Privileged app creation signing
  7. 9:57Principle of least privilege isolation
  8. 12:26Privileged app implementation testing
  9. 13:48Identifying test keys signing
  10. 17:23GPIO file permission issues fixes
  11. 18:49SELinux UnitRC permissions
  12. 19:52Android GPIO architecture
  13. 21:58Ideal GPIO control architecture
  14. 23:26Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.