View Single Post
Old 11-24-2022, 06:58 PM   #905
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
Quote:
Originally Posted by NiLuJe View Post
@fennectech: My usual answer to failing to make complex chains behave is: "write a shell script and run that instead".

But, given the subject matter, I also have more questions:

On which device are you trying this? (your Device block is... unhlepful at attempting a guess).

What you've tried is specific to Mk. 7/9/10 devices. If you have a Mk. 8, they work differently, and if you have something older, you'll (potentially) have to build a kernel module yourself.
Its a Kobo Clara HD. ive been exprementing wiht sucsess and failure. im just looking for help making this chain behave. i want to just have a button that toggles between running the first two commands and the second command im trying to impliment it with a toggle. Its really a single if else statement

If flag exists
run command set one
report otg disabled to user
remove flag
Else.
run command set two
report otg enabled to user
create flag

Ive tested all the theory here. checked that NM runs as root so it can both execute the commands and create the flag in /tmp (and we put it there because the gadget is re enabled after a reboot

Last edited by fennectech; 11-24-2022 at 07:10 PM.
fennectech is offline   Reply With Quote