r2-studio / robotmon-scripts

Run Javascript on Android. Screenshot, Touch, ...
Apache License 2.0
78 stars 66 forks source link

TsumBeta Release v67 #528

Closed mcs closed 2 months ago

mcs commented 2 months ago

Fixes #527 UI bug introduced by new Home screen (like JP one, but without a "Square" tab). Also optionally allows to ping a (usually locally running) HTTP service for health checking the script (in case it freezes like it sometimes does on PC Android emulators).

Sean-Hsueh commented 2 months ago

wow Tsum monitor, that's awesome! Do you have a step by step guide somewhere we can share with all the users?

mcs commented 2 months ago

Cool! Thanks for merging it into master :-)

Working on monitor documentation is something I wanted to start with when it got approved, because I was very unsure about approval if it conflicted too hard with Xrobotmon as a product.

I am using a simple (partially GPT-generated) Golang program on my computer for three months now: https://github.com/mcs/robotmon-alive-monitor/blob/main/main.go

My LDplayer is set-up in a way that it automatically starts the Robotmon service, then Robotmon itself, starts the TsumBeta script and then starts it. The script itself is capable of starting TsumTsum itself - not super reliable, but good enough for me (if it fails on the initial daily "what's new" banners, the monitor will just try it again 10 minutes later).

My main headache is that the above project compiles to a Windows executable file whose build should be as transparent and reproducible as possible due to computer security reasons. Nobody should have to rely on me being a "nice guy". For that reason, I am looking for a "Github actions" based way of compiling and releasing the executable so everyone knows that the downloadable binary file is built from exactly this source code and doesn't have any unwanted functions in it. But until then, I will probably work on a short simple manual on how to build that executable. And a video which shows the setup steps for LDplayer (Nox should offer similar macro features, so I think Nox users can adapt).

On Sun, Jun 30, 2024 at 4:51 AM Han Hsueh @.***> wrote:

wow Tsum monitor, that's awesome! Do you have a step by step guide somewhere we can share with all the users?

— Reply to this email directly, view it on GitHub https://github.com/r2-studio/robotmon-scripts/pull/528#issuecomment-2198413140, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAIC26FKGMWZWXYZABUOQTZJ5XEZAVCNFSM6AAAAABKC7CI7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJYGQYTGMJUGA . You are receiving this because you authored the thread.Message ID: @.***>

alfredoheights commented 2 months ago

I was trying to work on that UI bug, but couldn't figure out how to get it to update over adv, so thanks.

Do you know when we'll see the updated version on the script store?

mcs commented 2 months ago

It is already there, maybe you need to "pull down" the script store in order to update the listed versions.

But I already got informed that on some real mobile devices the bugfix or something else doesn't work. After having played one game, the script stops with an error when landing on the Home screen. I am trying to get the log files from these persons to understand what's going on. On my Windows emulated Android v67 works fine.

As soon as I know what happens I'll create a new Pull Request. Edit: Opened #529

alfredoheights commented 2 months ago

Thanks, pulling down worked, and it also is working fine on my mobile (OnePlus 8t).

If I want to contribute, is there a guide on getting started? I tried running the bash script to update the index.html and index.js on the device but it does not change the script (I changed the logged strings but it doesn't show them as changed).

mcs commented 2 months ago

Running ./build.sh without any arguments combines the source files into index.html and index.js and then puts them into index.zip. Depending on the used mobile device / emulator, one either needs to copy the zip file or the source files to /sdcard/Download/Robotmon/scripts/com.r2studio.TsumBeta/. Within LDplayer the content looks like this:

grafik

The build script can try to copy the files automatically using adb if it is called with the -a parameter. Executing adb devices should look like this for ./build.sh -a to work:

$ adb devices
List of devices attached
emulator-5554   device

Indeed the script heavily lacks developer documentation, so it is not quite easy to start contributing 😞

Sean-Hsueh commented 2 months ago

I am terribly sorry for the poor documentation, in fact I have no idea how @mcs go this far 🤣

Before we update the documentation, here is how I update script (index.js):

  1. edit the index.js in vscode
  2. download "Robotmon" extension in vscode, as shown on the left
image
  1. You may need to "start service"

    image
  2. Connect to the emulator and tap play to start streaming

    image
  3. Once finished editing, tap "Run" on the button to see how it works

    image

Video recording as it is a bit complicated: https://github.com/r2-studio/robotmon-scripts/assets/10364737/d1578e0c-34c7-497a-af36-08d94a156289

To see the change in index.html is another story. We need to follow the stpes like @mcs mentioned:

  1. use Chrome to see if index.html works as expected
  2. ./build.sh to zip index.js and index.html into index.zip
  3. adb push the zip into robotmon folder (like /sdcard/Download/Robotmon/scripts/com.r2studio.TsumBeta/)
  4. run using Robomon floating UI