[MAGISK] [Tasker][Release] Motion Sense (Soli/Oslo) Mod

Search This thread

jasonlee0315

Senior Member
Sep 21, 2009
148
19
I cleared my Tasker and imported just the flick profile and got it to register right away. Not sure where the failure is. Is it all profiles or just specific ones?

Um... I found only swipe Intent works for me

OK, I got it working by clearing OsloBridger App data!
 
Last edited:

Balino

Senior Member
Mar 3, 2011
1,714
590
26
Gaeta
Thank you for the update
Does anyone knows how to set the toggle with active edge? I would be really grateful
 
Last edited:

ashergray

Senior Member
Jul 19, 2011
167
92
Rock Hill SC
Updated to Version 1.1.2, fleshed out the GitHub readme with more details and added a few extra service intents to starting and stopping the service. I've also changed the default values for sensor settings to match what Google found to work best with the built in actions.
 

Seanzle

Senior Member
Feb 26, 2011
299
52
Baton Rouge
So I've really tried to sort this out and maybe I'm just slow but can someone slow this down and make it simple for me to get the flick Intent mapped to an actual action? Ive got the option to select flick Intent in the Oslo app but I cant figure out how to map that to an action in tasker. I apologize in advance....tasker is confusing
 

ashergray

Senior Member
Jul 19, 2011
167
92
Rock Hill SC
Hi Seanzle,
can you answer these questions?

Are you using the most recent version of the Magisk module and App?
Have you read the readme on my github completely?
Do you have a task in Tasker to perform?
Is Tasker set to allow external access?
how does your task make use of the %direction variable?

A screenshot or export of your task would be helpful in guiding you but essentially the %direction variable sent by the flick gesture contains 1,3,5,7 for east,north, west, south resepctively. you should have an "if" action where %direction matches the number you want to react to, then under the if you have the action you want to happen, then an "end if" action to close it out. The action under your "if" action might be the play/pause media action or it might be a shell script that swipes the screen to the left, but either way you can build it like this:

Code:
If %direction matches 1
Media Action: Next Track
End if
If %direction matches 5
Media Action: Previous Track
End if

Probably the simplest way of testing that everything is setup is
Code:
Flash %direction



If you're unfamiliar with Tasker and this isn't enough to get you moving there tons of tutorials out there on youtube.
 
Last edited:
  • Like
Reactions: yyz71

yyz71

Senior Member
Mar 27, 2011
2,563
715
Somewhere in Canada ;)
Hi Seanzle,
can you answer these questions?

Are you using the most recent version of the Magisk module and App?
Have you read the readme on my github completely?
Do you have a task in Tasker to perform?
Is Tasker set to allow external access?
how does your task make use of the %direction variable?

A screenshot or export of your task would be helpful in guiding you but essentially the %direction variable sent by the flick gesture contains 1,3,5,7 for east,north, west, south resepctively. you should have an "if" action where %direction matches the number you want to react to, then under the if you have the action you want to happen, then an "end if" action to close it out. The action under your "if" action might be the play/pause media action or it might be a shell script that swipes the screen to the left, but either way you can build it like this:



Probably the simplest way of testing that everything is setup is




If you're unfamiliar with Tasker and this isn't enough to get you moving there tons of tutorials out there on youtube.

Does this app turn on automatically or it has to be enabled after every reboot?
 

ashergray

Senior Member
Jul 19, 2011
167
92
Rock Hill SC
Does this app turn on automatically or it has to be enabled after every reboot?

It's a service that you can start with Tasker or by clicking the play button on OsloBridger app. Keeping it running all the time could cause your gestures to trigger when you don't want them to. My recommendation is to have tasker turn on the service based opening an app (ie: audible, youtube, reddit, etc). the profile to do that would look like this

the intents follow whats on the ReadMe
 
  • Like
Reactions: yyz71

yyz71

Senior Member
Mar 27, 2011
2,563
715
Somewhere in Canada ;)
It's a service that you can start with Tasker or by clicking the play button on OsloBridger app. Keeping it running all the time could cause your gestures to trigger when you don't want them to. My recommendation is to have tasker turn on the service based opening an app (ie: audible, youtube, reddit, etc). the task to do that would look like this

the intents follow whats on the ReadMe
Thank you. Love the app ?
 

azamsahik

New member
Dec 2, 2019
2
0
Also looked into Motion Sense APK. Restriction is phone number country code based, can be bypassed. Also looks like its developers left setting to disable country checks at all. TO do that, you just need to change android setting 'pixel.oslo.allowed_override' to '1' or 'true'. This way modified APK not needed.

I can't try this right now but if you want to check, then connect Pixel 4 with developer mode and execute command in adb shell:
Code:
adb shell setprop pixel.oslo.allowed_override true
or
Code:
adb shell "setprop persist.pixel.oslo.allowed_override true; setprop ctl.restart zygote"
or edit system/build.prop with some app
You need root to do this.

can we unroot the phone after running the code and still have motion sense unlocked?
 

ashergray

Senior Member
Jul 19, 2011
167
92
Rock Hill SC
What action are you guys using with this module? I still couldn't find any practical solution for those gestures

I mostly use it to play/pause audio and volume manipulation when I'm doing dishes. I also setup a test profile for presence that sets a variable after detecting a hand at a specific distance for a few seconds, not sure how to use that yet, maybe continue to hold to lower screen brightness?
I can think of using the swipes to switch tabs in Chrome, or switching panels on the home screen.

Code:
Swipe Along Home (157)
    	Abort Existing Task
    	A1: Variable Set [ Name:%Flickdirection To:%direction Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff Max Rounding Digits:3 ] 
    	A2: If [ %direction ~ 1 ]
    	A3: [X] Run Shell [ Command:input keyevent 21 Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In:%errmsg Store Result In: ] 
    	A4: Run Shell [ Command:input swipe 800 1200 1200 1200 200 Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In:%errmsg Store Result In: ] 
    	A5: End If 
    	A6: If [ %direction ~ 3 ]
    	A7: Status Bar [ Set:Collapsed ] 
    	A8: End If 
    	A9: If [ %direction ~ 5 ]
    	A10: Run Shell [ Command:input swipe 1200 1200 800 1200 200 Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In:%errmsg Store Result In: ] 
    	A11: [X] Run Shell [ Command:input keyevent 22 Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In:%errmsg Store Result In: ] 
    	A12: End If 
    	A13: If [ %direction ~ 7 ]
    	A14: Status Bar [ Set:Expanded ] 
    	A15: End If 
    	A16: If [ %errmsg Set ]
    	A17: Flash [ Text:%errmsg Long:eek:ff ] 
    	A18: End If 
    	A19: [X] Flash [ Text:eek:n Home Long:eek:ff ]
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    Release of OsloBridge v1.1.2 can be found here https://github.com/jcarletto27/magisk_module_motionsense_mod/releases

    The purpose of this is to broadcast intents that Tasker can pick up as events. I plan on sending a PR to TopJohnWu once i hear back on some QA. Please update me here in this thread if you find any bugs! In my own testing I've found that the official apps like Pokemon wave hello and Headed South still function fine.

    This module overwrites the built-in Bridge with a modified one that does not check for Googles signature on the requesting app, essentially letting anyone with knowledge of the bridge api to create an app to use MotionSense. My app which I'm calling OsloBridger (Oslo is the internal name for the MotionSense app) creates a foreground service that works even if the screen is off. I've not noticed any serious battery issues, but time will tell.

    If you have issues please post here with the following and I'll do my best to help:
    Device : (Pixel 4, Pixel 4XL)
    Patch Date: (Oct,Nov,etc)
    Are you Rooted with Magisk? : (Yes, No)
    Other Modules Installed: (Systemless Hosts, edXposed, etc.)
    Do you have Tasker installed ? (Yes, No)
    Is "Allow External Access" checked in the Tasker Misc Preferences? (Yes, No)
    When you start the service in OsloBridger what does it say in the Notification? (Reach, Flick Gestures Active)
    Level of Tasker Experience ? (Novice, Experienced)
    Also, please provide the task your trying to run. The steps to do that are Go to Tasks -> Long Press the Task you want to execute -> Click Three Dots in top right -> Export -> Description to Clipboard and paste it here


    Update Nov 7, 2019 : I've updated the OsloBridger app to now allow the selection of specific tasks from within the app. No more setting up broadcast receivers in Tasker!

    Update Nov 12, 2019: Added 2 new service intent filters to allow the starting and stopping of the Service without needing to use the Toggle intent. Updated the defaults to use what I've found works best (surprise! it's the same settings google uses for the builtin actions)

    Advanced Users:
    The app will still send those same broadcasts if you don't select a task in OsloBridger, so no changes for those setup already. I find this way to be more flexible because you can add multiple conditions to the event in Tasker, but I get that Tasker can have a huge learning curve.
    2
    There's a squeeze action that says shortcut. Choose the Tasker shortcut and pick the task you want executed. You might need to assign an icon for the shortcut to work. Not sure
    Ok thank you very much. I just successfully set everything.
    I'll post a guide on "how to for noobs" like me asap
    2
    Ok, I hear you guys. Tasker can have a pretty steep learning curve. I'll see what I can do about that with the next release of OsloBridger
    2
    Amy news on March update? I think something could have changed as a new gesture has been added. Did anyone try It?
    I've tested the new update and it still works for the original gestures. I'll need to update the bridge to use the new gesture.
    2
    Sorry Balino, sometimes I forget not everyone has the same level of experience. I'm sure someone will come out full guide for using this. I'll try to put a quick start guide together whenever I can get some free time.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone