Alune icon indicating copy to clipboard operation
Alune copied to clipboard

Using Real Device - dosn't do anything

Open Dastano opened this issue 1 year ago • 8 comments

Hey guys,

I am using Alune with a Real Device, put Game language on english and everything, but it actually dosn't play.

It stuck at :

2024-10-27 16:51:26.895 | INFO - The bot will play out games. This is recommended for passes that get experience for play time, like the event passes. 2024-10-27 16:51:37.659 | INFO - TFT was not in the foreground, setting it as active. 2024-10-27 16:51:46.815 | INFO - TFT was not in the foreground, setting it as active.

and thats it.

Attempting to connect to ADB session with device 192.168.178.43:5555 2024-10-27 16:46:40.239 | INFO - Changing screen size from 1080x2280 to 1280x720. 2024-10-27 16:46:40.658 | INFO - Changing dpi from 420 to 240. 2024-10-27 16:46:49.749 | INFO - Connected to ADB and device is set up correctly, starting main loop.

Dastano avatar Oct 27 '24 15:10 Dastano

If you start TFT yourself, does it catch that? There's also a debug log in your alune-output/logs folder.

akshualy avatar Oct 27 '24 17:10 akshualy

2024-10-27 18:31:22.171 | INFO | main:check_version:510 - You are running the latest version. 2024-10-27 18:31:22.172 | INFO | alune.adb:_connect_to_device:105 - Attempting to connect to ADB session with device localhost:5555 2024-10-27 18:31:22.313 | DEBUG | main:main:547 - ADB is connected, checking phone and app details 2024-10-27 18:31:22.313 | DEBUG | main:check_phone_preconditions:448 - Checking screen size 2024-10-27 18:31:22.388 | DEBUG | main:check_phone_preconditions:457 - Checking screen density 2024-10-27 18:31:22.460 | DEBUG | main:check_phone_preconditions:463 - Checking memory 2024-10-27 18:31:22.504 | DEBUG | main:check_phone_preconditions:467 - Checking if TFT is installed 2024-10-27 18:31:22.588 | DEBUG | main:check_phone_preconditions:471 - Checking TFT app version 2024-10-27 18:31:25.809 | DEBUG | main:check_phone_preconditions:485 - Checking if TFT is active 2024-10-27 18:31:25.932 | DEBUG | main:check_phone_preconditions:487 - TFT is not active, starting it 2024-10-27 18:31:26.009 | INFO | main:main:549 - Connected to ADB and device is set up correctly, starting main loop. 2024-10-27 18:31:26.009 | INFO | main:main:557 - The bot will play out games. This is recommended for passes that get experience for play time, like the event passes.

Here is the full log, nothing else happens.

My assumption is, he cant read the screen, because its not in landscape mode, I tried to force it into landscape mode, but that didnt worked.

Dastano avatar Oct 27 '24 17:10 Dastano

As I asked, have you tried starting TFT first and then starting Alune? That should allow you to decide whether it's landscape or not as well

akshualy avatar Oct 27 '24 17:10 akshualy

Sorry didnt got it.

I booted up game in Landscape mode, then ran the bot. It changed the DPI and Resolution, that causes the app to reboot / Crash.

Now I am back at same, Emulator works fine. But I through I can test Real Device as well, since its prob. more save then using an Emulator.

Also: Can you add ADB Commands to change back Resolution / DPI when quitting? I currently run them manually.

EDIT: (flipped both values) but I think its def. the issue with Landscape mode, I had the Resolution set to: 720x1280 (so it works in landscape mode) And it semi-worked.

Dastano avatar Oct 27 '24 18:10 Dastano

Edit: I got it to work.

shell wm size 1280x720 adb shell settings put system accelerometer_rotation 1 adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:1 shell wm size 720x1280

Not it works on my phone. I will report back if it keep working, but for now looks good. (on a Real Phone it seems we need to flip the resolution)

Dastano avatar Oct 27 '24 18:10 Dastano

Also: Can you add ADB Commands to change back Resolution / DPI when quitting? I currently run them manually.

Yeah of course

Edit: I got it to work. shell wm size 1280x720 adb shell settings put system accelerometer_rotation 1 adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:1 shell wm size 720x1280

Thanks for the research and providing a solution :) I'll hook up my phone one of these days; I only knew in theory that it'd work on physical phones.

akshualy avatar Oct 27 '24 20:10 akshualy

I also tried USB with chatGPT but the LibUSB seems not to be supported.

Next step would be to have a fixed tactic. Feels looking so bot like not collecting items and putting front row guys to back xD

Maybe we can work out a list which hero should be in which row.

Edit: use some phone you don't need. Since you have to get rid of screen lock etc. the Bot don't keep screen active.

enaske avatar Oct 27 '24 20:10 enaske

USB is not supported at the moment. It is relatively easy to support it though.

akshualy avatar Oct 27 '24 20:10 akshualy