-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port mouse to Android Phones? #3
Comments
Whoever is interested, here is a simple port for phones Should work best with Android N onwards, but have added support for legacy actions (please note that these are totally unreliable and might not even work in many cases) for Android M. |
I have tested this new phone version on the LG Exalt but there is a problem. The UI of these phones is severely dumbed down and the only way to grant permissions is through ADB due to the option being missing from the settings. I have granted the overlay permission through adb successfully. When granting accessibility to the app the process which has worked for other accessibility apps (e.g. Voice Access) is to set the app as enabled_accessibility_services (with adb shell settings put secure enabled_accessibility_services package.name.here/service.name.here) that works no problem. But when trying to start the accessibility service (adb shell am startservice package.name.here/service.name.here) it throws an error Error: Requires permission android.permission.BIND_ACCESSIBILITY_SERVICE. And android.permission.BIND_ACCESSIBILITY_SERVICE cannot be granted with adb. The app therefore remains on the first screen and says Accessibility Permissions: Not Granted Accessibility Services: Not Running. |
I haven't seen this error before. My best guess would be that the drawing over other screen permission is missing. |
Yes I have granted the drawing over other apps permission successfully. |
@lgexalter unfortunately we're out of luck here. I don't think I can do much without being able to actually see what's happening. Sorry mate. Leaving this issue open, just in case some developer who owns a similar device and happens to be interested in this comes across this thread. |
@lgexalter what were the exact commands that you used to; thanks |
@LGExalt What Commands did you do to get it working? |
I granted overlay but when I start accessibility it says: "Requires permission android.permission.BIND_ACCESSIBILITY_SERVICE"?? |
I tried the app on the Sonim Xp3, which is easy to allow accesibility services without adb commands, it does not have a mute button, but I was able to change that with the override setting. However I had 2 issues, one minor one that the cursor size was pretty big no matter ther size setting, but the main issue is that the select button does not click on anything, I had this problem before with other cursors, apparently the select button on the XP3 Is different than most phones. The key code is 66 and the scan code is 352. If someone can modify the code to make that select hopefully would work |
@LGExalt can you elaborate a bit on the steps to install? |
Thanks @XP3R for reporting, I'll update the app for phone with these modifications and update here. [1] https://gitter.im/virresh/community?at=605cdeab68921b62f4874241 |
Since exact commands are not shared here, I request all the folks here to please try out the following:
and let me know if these work? |
Thanks! Where can I find the updated version? (I guess I can adjust the mouse size like you posted here https://gitter.im/virresh/community?at=605cdeab68921b62f4874241 but I still would have the select button not working) |
@XP3R I've not had the chance to update the app |
#9 Solves these issues and makes the app fully usable on LG Phones |
Thanks a lot @greatjack1 for chipping in! I'll do a release over the weekend along with your contributions. Thanks! |
Thanks to all those who contributed to make this happen. 2 Once I ran the adb commands, the dedicated key to turn on voice access didn't work anymore. This may be an issue with the phone (LG Exalt). Because I had a similar issue when using button mapper. Once a enabled button mapper, I couldn't set a key for voice access. |
When enabling services with adb you need to put in all services you want enabled at once, so typing adb shell settings put secure enabled_accessibility_services io.github.virresh.matvt/.services.MouseEventService would turn off voice access and button mapper. You need to enable them at once separated by a colon, such as pkg1/service1:pkg2/service2 |
I've done that. And the voice access app works. I'm talking about setting a dedicated key to start it. For example the camera key. |
It won't work because matvt grabs all accessibility keys already. So you can't double select in accessibility what a key should do. Supposedly by the LG classic you can. But I have not tested it. |
I tested it on the classic and it worked perfectly, and I was still able to set a voice access key. Not sure what the difference is. They seem to be based on the same OS. |
Hmm, matvt returns any key strokes back to the system if it cannot find a use for it. Here's another pre-release snapshot version: @XP3R @LGExalt @kfmdmteam Can you folks please test it on the various flip phones that you have for sanity? This version has some rudimentary support for long touch (should work on Android 6, doesn't trigger on Android 7+) |
The vn220 is android 6 while the lg classic is android 8 |
@virresh I see this version doesn't have the options like the v1.03 would it be possible to make the phone version built in the newer one? |
Yep, I'm working on backporting them. Asking for some early feedback so that I can incorporate more changes if required with the next major release itself :D |
Looking great! |
Did it work without package manipulation on the exalt phone? |
No
…On Fri, Apr 2, 2021, 1:00 PM Viresh Gupta ***@***.***> wrote:
Did it work without package manipulation on the exalt phone?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATMGT5XKWLQBMOMFQVWYYCLTGXZ4JANCNFSM4YWZJPJA>
.
|
Ah okay. Thanks for the heads up. It has the required package manipulation
|
Okay I'll try but can you set the DPI for the wording in the GUI for 10 DPI
instead of 20 DPI
…On Fri, Apr 2, 2021, 1:09 PM Viresh Gupta ***@***.***> wrote:
Ah okay. Thanks for the heads up.
Can you try with this version:
https://github.com/virresh/matvt/releases/download/phone-v1.01/matvt-phone-app-release-v1.01-snapshot-2.apk
It has the required package manipulation
adb shell appops set com.android.cts.virresh.matvt SYSTEM_ALERT_WINDOW allow
adb shell settings put secure accessibility_enabled 1
adb shell settings put secure enabled_accessibility_services com.android.cts.virresh.matvt/com.android.cts.virresh.matvt.services.MouseEventService
adb shell am startservice com.android.cts.virresh.matvt/com.android.cts.virresh.matvt.services.MouseEventService
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATMGT5Q57H43OIYFNIN6CULTGX23NANCNFSM4YWZJPJA>
.
|
Seems like there's an issue the package name is still not Android CTS
…On Fri, Apr 2, 2021, 1:14 PM kf mdm ***@***.***> wrote:
Okay I'll try but can you set the DPI for the wording in the GUI for 10
DPI instead of 20 DPI
On Fri, Apr 2, 2021, 1:09 PM Viresh Gupta ***@***.***>
wrote:
> Ah okay. Thanks for the heads up.
> Can you try with this version:
> https://github.com/virresh/matvt/releases/download/phone-v1.01/matvt-phone-app-release-v1.01-snapshot-2.apk
>
> It has the required package manipulation
>
> adb shell appops set com.android.cts.virresh.matvt SYSTEM_ALERT_WINDOW allow
> adb shell settings put secure accessibility_enabled 1
> adb shell settings put secure enabled_accessibility_services com.android.cts.virresh.matvt/com.android.cts.virresh.matvt.services.MouseEventService
> adb shell am startservice com.android.cts.virresh.matvt/com.android.cts.virresh.matvt.services.MouseEventService
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#3 (comment)>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ATMGT5Q57H43OIYFNIN6CULTGX23NANCNFSM4YWZJPJA>
> .
>
|
sure
I've put the service in the cts package. Is there any special signing requirement also? Thanks a lot for bearing with the testing Service FQN: |
Can you also change the package name in the manifest?
…On Fri, Apr 2, 2021, 1:35 PM Viresh Gupta ***@***.***> wrote:
Okay I'll try but can you set the DPI for the wording in the GUI for 10 DPI
sure
Seems like there's an issue the package name is still not Android CTS
I've put the service in the cts package. Is there any special signing
requirement also?
Did some more changes in packages, alongside dpi
https://github.com/virresh/matvt/releases/download/phone-v1.01/matvt-phone-app-release-v1.01-snapshot-3.apk
Thanks a lot for bearing with the testing
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATMGT5U5WYC6ZZYIYHSJMDLTGX56HANCNFSM4YWZJPJA>
.
|
Sorry about the confusion Everything (including changes in manifest) are there in the above |
Great I'll check it out soon. Gotta go buy a new LG classic...
…On Fri, Apr 2, 2021, 2:16 PM Viresh Gupta ***@***.***> wrote:
Sorry about the confusion
Android Studio caching caused splits in the package
https://github.com/virresh/matvt/releases/download/phone-v1.01/matvt-phone-app-release-v1.01-snapshot-4.apk
Everything (including changes in manifest) are there in the above
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATMGT5Q7C3P5K3HAE6VQZ23TGYCW3ANCNFSM4YWZJPJA>
.
|
I got these errors. C:\Users\Home\Desktop\All Desktop\platform-tools>adb shell am startservice com.android.cts.virresh.matvt/com.android.cts.virresh.matvt.services.MouseEventService |
it's |
I'm happy to report that the snapshot works great on the Sonim XP3, it even works on waze [some people reported it not working on waze on other phones]. The only issue I see is that in scroll mode it scrolls all the way to the bottom\top with each click. I didnt see any difference in performance between snapshot one and snapshot 4, except snapshot one had all the settings in the accessability section in addition to on the app itself, but either way is fine. It also worked with other dedicated keys for switchboard and voice access. Long pressing clicks does not seem to work though, the XP3 runs android 8.1, it would be nice if it worked, but not especially neccasary. Thanks so much! |
The mouse for exalt still needs modding. waze not working. |
Just tested it on the LG classic flip,
Works great!
|
Thanks everyone for the feedback
@Bo-Exalt can you explain a bit what kind of modding was required to make it work with the app you mentioned?
Thanks @LGExalt for the errors. |
It installs perfectly fine, just for a lot of things it doesn't click i.e. waze |
Thanks @LGExalt for the errors.
|
The only issue I see is that in scroll mode it scrolls all the way to the bottom\top with each click. |
Ah I see. I presume this to be happening on Android 6 devices. I'm a bit limited on Android 6 without root access, will see if something can be done about it.
There's a video made by Tech Doctor UK (https://youtu.be/UC7bPw2tG4c) that explains how MATVT works on a TV. It's the same principle, just ported to phone. You can customize the key based from settings GUI based on whatever works best for your device. Let me know if you still face issues enabling it.
Thanks, I presume this only happening on Android 7+ ? |
I should point out its not automatically all the way to the bottom, it just scrolls A LOT but if it's a really long page it won't go all the way to the bottom. Slowing down the scroll speed a lot should help. Thanks a million! |
Just realized that the activation key is set by default to holding down the star key. |
I've completed a port to Flipphones Please test Thanks to everyone who made this happen! |
Keeping in mind the above comment, I've opened seperate issues for the bugs reported as they are common for the TV and phone version. Closing this issue. Feel free to comment / re-open if required. |
Requested by Samuel ([email protected]) over email for Android phones without a touchscreen
Example model -- https://www.lg.com/us/cell-phones/lg-VN220-verizon-exalt#
Expectation -- Mouse enabled via VoiceCommand button [key 60 TV_INPUT_HDMI_1]
Since these models look like they're dumbed down version Android 6, I'm not too hopeful of them supporting most APIs
Also since it's Android 6, it'll not have support for gesture API, so we're stuck with Android getting things right via the performAction API (which IMO is highly unreliable)
The text was updated successfully, but these errors were encountered: