Skip to content
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

Script cannot run with AccessibilityService #370

Open
MrTroika opened this issue Apr 24, 2020 · 9 comments
Open

Script cannot run with AccessibilityService #370

MrTroika opened this issue Apr 24, 2020 · 9 comments
Labels

Comments

@MrTroika
Copy link

https://imgur.com/a/LGcfEnC

Not sure what could be causing this; accessability is enabled.

@reconman
Copy link
Collaborator

The script is currently incompatible with accessibility mode, it seems. Can you try daemon or root mode? See the installation page in the documentation.

@MrTroika
Copy link
Author

Not an option, unfortunately; I use Bluestacks and I don't think there's a way to choose your android version in that.

@MrTroika
Copy link
Author

Further information: this issue appears to happen when the script has to drag the friends list to find a particular Servant.

@reconman
Copy link
Collaborator

See https://ankulua.boards.net/thread/628/daemon-bluestacks. It should work, but I haven't tried it myself.

@MrTroika
Copy link
Author

MrTroika commented Apr 25, 2020

See https://ankulua.boards.net/thread/628/daemon-bluestacks. It should work, but I haven't tried it myself.

That thread is 3 years old and the method described therein doesn't work.

To clarify on this, there is currently no way to root Bluestacks and thus daemon can't be installed.

@reconman
Copy link
Collaborator

You don't need root to install the daemon, you only need USB debugging, which should be activatable in Bluestacks, I assume.

@MrTroika
Copy link
Author

The USB debug method does not work for installing the daemon, at least not for me. Despite all indications that it's functional on the Windows end, it won't actually install itself and be activateable in Bluestacks.

@reconman reconman added the bug label Apr 25, 2020
@reconman reconman changed the title Script crashing randomly after a few iterations of autoskill Script cannot run with AccessibilityService Apr 25, 2020
@reconman reconman mentioned this issue Apr 25, 2020
@potchy
Copy link
Collaborator

potchy commented Apr 26, 2020

Support option preferred won't work without manualTouch support.
Change to first or manual or use Nox with daemon instead of Bluestacks.

Edit:
Actually, accessibility mode is supported on higher Android versions.
I used it before rooting my phone and it worked great.
I don't know if it's possible to use 8.0+ on Bluestacks, but you could try it, if it's available.

@MathewSachin
Copy link
Contributor

For Android 7 you can use swipe instead of manualTouch
With accessibility, manualTouch only works on Android 8+, swipe works on Android 7+.

local touchActions = {
{ action = "touchDown", target = game.SUPPORT_SWIPE_START_CLICK },
{ action = "touchMove", target = game.SUPPORT_SWIPE_END_CLICK },
{ action = "wait", target = 0.4 },
{ action = "touchUp", target = game.SUPPORT_SWIPE_END_CLICK },
{ action = "wait", target = 0.5 } -- leaving some room for animations to finish
}
-- the movement has to be as accurate as possible
setManualTouchParameter(5, 5)
manualTouch(touchActions)

Try changing to:

swipe(game.SUPPORT_SWIPE_START_CLICK, game.SUPPORT_SWIPE_END_CLICK)

It might not work as smoothly as manualTouch though. You might want to adjust game.SUPPORT_SWIPE_END_CLICK if you find that it scrolls too much.

game.SUPPORT_SWIPE_END_CLICK = SUPPORT_SWIPE_END_CLICK_LIST[GameRegion]

This works for me:

game.SUPPORT_SWIPE_END_CLICK = Location(5, 660)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants