View Single Post
Old 11-28-2022, 12:14 AM   #8
fennectech
Connoisseur
fennectech will become famous soon enoughfennectech will become famous soon enoughfennectech will become famous soon enoughfennectech will become famous soon enoughfennectech will become famous soon enoughfennectech will become famous soon enoughfennectech will become famous soon enough
 
Posts: 57
Karma: 748
Join Date: Aug 2016
Device: Kobo Clara HD, Kobo Clara E2, Kindle 4 Keyboard 3G
NickelMenu toggle and status for this!

I have put together a snippet for nickelmenu it stores the flag in /tmp as it resets to default on reboot and tmp is destroied on reboot

Code:
menu_item : main : USB OTG Status : cmd_output : 500 : quiet : test -e /tmp/otg_enabled
      chain_success : dbg_toast : USB OTG IS ENABLED
      chain_failure : dbg_toast : USB OTG IS DISABLED

menu_item : main : Toggle USB OTG : cmd_output : 500 : quiet : test -e /tmp/otg_enabled
      chain_success : skip : 5
      chain_always : cmd_spawn : quiet: touch /tmp/otg_enabled
      chain_always : cmd_spawn : quiet: mount -t debugfs none /sys/kernel/debug
      chain_always : cmd_spawn : quiet: echo host > /sys/kernel/debug/ci_hdrc.0/role
      chain_always : dbg_toast : USB OTG IS NOW ENABLED
      chain_always : skip : 3
      chain_always : cmd_spawn : quiet: rm /tmp/otg_enabled
      chain_always : cmd_spawn : quiet: echo gadget > /sys/kernel/debug/ci_hdrc.0/role
      chain_always : dbg_toast : USB OTG IS NOW DISABLED
fennectech is offline   Reply With Quote