An app that mirrors your phone to your compute and maps controller input to the screen

Overview

What is 'Dragalia Control'?

An app that mirrors your phone to your compute and maps controller input to the screen. Inputs are mapped specifically for Dragalia Lost.

How does it work?

  • Detects Android devices and launches an instance of SCRCPY to show the device screen on their PC.
  • Reads controller input from a XBox-like controller and forwards them to the SCRCPY window as useful Dragalia Lost input.

See it in action on YouTube: https://youtu.be/Jt_tPyQo_gA

This targets Windows 10, 64-bit. The buttons are mapped for the Galaxy S9 and Galaxy S10 Plus. For other devices, see the 'What if my device isn't supported?' section.

Since this uses SCRCPY, the requirements are the same. See https://github.com/Genymobile/scrcpy#requirements. This is not optional.

You really want quick turn off (180 and 90).

How to use it

  1. Follow the instructions to enable ADB debugging from https://github.com/Genymobile/scrcpy#requirements. There are a few videos on this as well: https://www.youtube.com/results?search_query=set+up+scrcpy
  2. Download "dragalia_control.zip" from https://github.com/myrhhcaiah/dragalia_control/releases/
  3. Unzip it somewhere.
  4. Open Dragalia Lost on your phone. Yes it needs to be open first.
  5. Run "dragalia_control.exe" from the place you unzipped it.
  6. You'll probably get a prompt on your phone asking you to 'authorize your pc'. Accept.
  7. A very ugly UI should appear with a dropdown list of phones. If you only have one phone, press 'Start'.
  8. It will take a few seconds to start up, but you should see your phone screen in a SCRCPY window.
  9. Pressing your controller buttons should move your mouse around.
  10. Drop into a level and go nuts. Button mappings are described in 'What are the button mappings?' below.

What if my device isn't supported?

You'll want to take screenshots of the game on your phone (Ideally, a normal quest and the skill share menu in Kaleidoscope).

Then you can edit the positions.json file to add support for your device. You can edit an existing entry like this one:

    "2.111": {
        "NOTE": "Galaxy s10+; 1440x3040",
        "C1": [116,260],
        "C2": [116,410],
        "C3": [116,581],
        "C4": [116,725],
        "CENTER": [720,1520],
        "DRAGON": [200,2259],
        "KSS1": [288,1944],
        "KSS2": [586,1944],
        "KSS3": [853,1944],
        "KSS4": [1173,1944],
        "KSS5": [288,2245],
        "KSS6": [586,2245],
        "KSS7": [853,2245],
        "KSS8": [1173,2245],
        "MENU": [1346,234],
        "S1": [512,2601],
        "S2": [800,2601],
        "S3": [1040,2601],
        "S4": [1266,2601],
        "w": 1440,
        "h": 3040
    },

Replace "2.111" with your screen ratio, rounded to three decimal places. If you launch 'dragalia_control.exe' with your device attached, you'll see it there.

Then you want to update 'w' and 'h' to be the width and height of your screenshots.

The rest of the values are coordinate locations. It's the distance from the top left corner to the point on the screen (so, you'll notice that the "MENU" has a high X value and a low Y value; the high X is because it's very far from the left of the screen and the low Y is because it's very close to the top of the screen). I used IrfanView to do these measurements, but it should be possible in any image editor.

The entries "C1", "C2"... are character slots. The buttons on the top left of the screen for switching characters. The entries "S1", "S2"... are skill slots, at the bottom of the screen. The entries "KSS1", "KSS2"... are the skill shares in Kaleidoscope. 1-4 are the top row. 5-8 are the bottom row.

If you end up adding another device successfully, do get in contact with me either here, on youtube or on reddit, I'd be happy to add the position data to the next release.

What are the button mappings?

Note: all actions are performed through manipulating the mouse. There's code to attempt to interleave actions, but you might still get weirdness if you're moving and pressing a skill.

The left stick is for movement. Pressing down quickly will attack. Pressing down for a long time will force strike.

The right stick is for rolling. Flicking the stick quickly will result in a roll. Pressing down will trigger the dragon transformation.

The face buttons (XYAB) are mapped to skills in order (e.g. X = s1, Y = s2, A = s3, B = s4).

When the left shoulder bumper and the left shoulder trigger are held together, the face buttons change to switch characters.

When only the left shoulder bumper is held, the face buttons change to the top row of the Kaleidoscope skill shares.

When only the left shoulder trigger is held, the face buttons change to the bottom row of the Kaleidoscope skill shares.

The Start and Back buttons both map to the Menu button in game.

The right shoulder bumper is for basic attacks. You can hold it down to force strike.

The right shoulder trigger is a debug button. Press it if you've moved the SCRCPY window or if you've updated the positions.json (this will recalculate the app position and the data from positions.json).

What if I don't have an Xbox-like Controller?

Most controllers know how to pretend to be an Xbox Controller. So, if you have a Logitech or something, it probably just works.

If not, there is usually a way to make your controller pretend to be an Xbox Controller. For example, there's an app for Joycons and the Switch Pro Controller: https://github.com/Davidobot/BetterJoy

Related projects and credits

"Dragalia Controller" is a project with a similar intention and almost the same architecture. I ended up taking the window computation code. Check it out here: https://github.com/thinkaliker/dragalia-controller

The bulk of the Android phone interaction is mediated by scrcpy. It's incredible for mirroring your phone to your computer even if you're not doing something weird like this: https://github.com/Genymobile/scrcpy

The Xbox controller detection code is based off of code in 'TensorKart', which is a deep learning MarioKart project: https://github.com/kevinhughes27/TensorKart/

A small amount of code to read in data from the Android device was based on http://ktnr74.blogspot.com/2013/06/emulating-touchscreen-interaction-with.html. Note that the blog is largely concerned with using 'sendevent' for input, which is the first thing I tried.

What else?

  • I'd like to get rid of the debug button; it should be automatic.
  • There's also been reports that the stick isn't completely smooth. It seems like hardware thing, but I'd like to figure out how to alleviate it.
  • Multitouch. Even if you usually play with one finger, being able to move and tap a skill seems like the right thing with a controller.
  • Force striking is awkward. I'd like it to be "flick the right stick with a modifier".
You might also like...
A turtlebot auto controller allows robot to autonomously explore environment.

A turtlebot auto controller allows robot to autonomously explore environment.

This tool for beginner and help those people they gather information about Email Header Analysis, Instagram Information, Instagram Username Check, Ip Information, Phone Number Information, Port Scan

This tool for beginner and help those people they gather information about Email Header Analysis, Instagram Information, Instagram Username Check, Ip Information, Phone Number Information, Port Scan. This tool shows your hostname and public IP first, then user give input and according to option this tool work. This tool work diffrent Oprating system.

uMap lets you create maps with OpenStreetMap layers in a minute and embed them in your site.

uMap project About uMap lets you create maps with OpenStreetMap layers in a minute and embed them in your site. Because we think that the more OSM wil

The Google Assistant on a rotary phone

Google Assistant Rotary Phone Shoutout to my dad who had this idea a year ago and I'm only now getting around to doing it. Notes This is the code used

 FileTransfer - to exchange files from phone to laptop
FileTransfer - to exchange files from phone to laptop

A small website I locally host on my network to exchange files from my phone and other devices to my laptop.

Capture screen and download off Roku based devices

rokuview Capture screen and download off Roku based devices Tested on Hisense TV with Roku OS built-in No guarantee this will work with all Roku model

WaterAndScreenBreakReminders - A small python program that reminds to take a water break every 15 minutes and a screen break every 30 minutes A lighweight screen color picker tool
A lighweight screen color picker tool

tkpick A lighweigt screen color picker tool Availability Only GNU/Linux 🐧 Installing Install via pip (No auto-update): [sudo] pip install tkpick Usa

Scientific color maps and standardization tools
Scientific color maps and standardization tools

Scicomap is a package that provides scientific color maps and tools to standardize your favourite color maps if you don't like the built-in ones. Scicomap currently provides sequential, bi-sequential, diverging, circular, qualitative and miscellaneous color maps. You can easily draw examples, compare the rendering, see how colorblind people will perceive the color maps. I will illustrate the scicomap capabilities below.

Releases(1.0.5)
  • 1.0.5(Jan 10, 2022)

    For info about how to use Dragalia Control, check https://github.com/myrhhcaiah/dragalia_control

    Changes in this release:

    • Fixes for UI jankiness (e.g. locking up, nicer shutdown behavior).
    • 'Minitouch' optionally allows for sending Controller Input directly to the phone instead of through the mouse. It should be slightly lower latency and more accurate, but it has a bit of a startup time.
    Source code(tar.gz)
    Source code(zip)
    dragalia_control.1.0.5.zip(42.80 MB)
  • 1.0.3(Jan 4, 2022)

    For info about how to use Dragalia Control, check https://github.com/myrhhcaiah/dragalia_control

    Hotfix (1.04):

    • Fix an issue where rolls were snapping to corners,
    • Fix an issue where the 'drag region' was too large.

    User-facing changes in this release:

    • The debug button (e.g. the right trigger) can now be used to hot reload the posiitons.json. You can now edit the touch data without closing and reopening Dragalia Control. There's also a bunch of logging for it,
    • The right bumper can now be used to force strike.
    • Improve handling rapid movements, esp change in direction. Remember to turn off Quick Turn in game.
    • Improve deadzone handling.
    • Fix an issue where skills weren't being activated if they were pressed too quickly.
    Source code(tar.gz)
    Source code(zip)
    dragalia_control.1.0.4fix.zip(41.13 MB)
  • 1.0.0(Jan 2, 2022)

    THERE WAS A HOTFIX. Download the updated build below.

    What is this?

    The first version of "Dragalia Control":

    • Detects Android devices and launches an instance of SCRCPY to show the device screen on their PC.
    • Reads controller input from a XBox-like controller and forwards them to the SCRCPY window as useful Dragalia Lost input.

    See it in action on YouTube: https://youtu.be/Jt_tPyQo_gA

    This targets Windows 10, 64-bit. The buttons are mapped for the Galaxy S9 and Galaxy S10 Plus. For other devices, see the 'What if my device isn't supported?' section.

    Since this uses SCRCPY, the requirements are the same. See https://github.com/Genymobile/scrcpy#requirements. This is not optional.

    You really want quick turn off (180 and 90).

    How to use it

    1. Follow the instructions to enable ADB debugging from https://github.com/Genymobile/scrcpy#requirements. There are a few videos on this as well: https://www.youtube.com/results?search_query=set+up+scrcpy
    2. Download "dragalia_control.zip" from below.
    3. Unzip it somewhere.
    4. Open Dragalia Lost on your phone. Yes it needs to be open first.
    5. Run "dragalia_control.exe" from the place you unzipped it.
    6. You'll probably get a prompt on your phone asking you to 'authorize your pc'. Accept.
    7. A very ugly UI should appear with a dropdown list of phones. If you only have one phone, press 'Start'.
    8. It will take a few seconds to start up, but you should see your phone screen in a SCRCPY window.
    9. Pressing your controller buttons should move your mouse around.
    10. Drop into a level and go nuts. Button mappings are described in 'What are the button mappings?' below.

    What if my device isn't supported?

    You'll want to take screenshots of the game on your phone (Ideally, a normal quest and the skill share menu in Kaleidoscope).

    Then you can edit the positions.json file to add support for your device. You can edit an existing entry like this one:

        "2.111": {
            "NOTE": "Galaxy s10+; 1440x3040",
            "C1": [116,260],
            "C2": [116,410],
            "C3": [116,581],
            "C4": [116,725],
            "CENTER": [720,1520],
            "DRAGON": [200,2259],
            "KSS1": [288,1944],
            "KSS2": [586,1944],
            "KSS3": [853,1944],
            "KSS4": [1173,1944],
            "KSS5": [288,2245],
            "KSS6": [586,2245],
            "KSS7": [853,2245],
            "KSS8": [1173,2245],
            "MENU": [1346,234],
            "S1": [512,2601],
            "S2": [800,2601],
            "S3": [1040,2601],
            "S4": [1266,2601],
            "w": 1440,
            "h": 3040
        },
    

    Replace "2.111" with your screen ratio, rounded to three decimal places. If you launch 'dragalia_control.exe' with your device attached, you'll see it there.

    Then you want to update 'w' and 'h' to be the width and height of your screenshots.

    The rest of the values are coordinate locations. It's the distance from the top left corner to the point on the screen (so, you'll notice that the "MENU" has a high X value and a low Y value; the high X is because it's very far from the left of the screen and the low Y is because it's very close to the top of the screen). I used IrfanView to do these measurements, but it should be possible in any image editor.

    The entries "C1", "C2"... are character slots. The buttons on the top left of the screen for switching characters. The entries "S1", "S2"... are skill slots, at the bottom of the screen. The entries "KSS1", "KSS2"... are the skill shares in Kaleidoscope. 1-4 are the top row. 5-8 are the bottom row.

    If you end up adding another device successfully, do get in contact with me either here, on youtube or on reddit, I'd be happy to add the position data to the next release.

    What are the button mappings?

    The left stick is for movement. Pressing down quickly will attack. Pressing down for a long time will force strike. The right stick is for rolling. Flicking the stick quickly will result in a roll. Pressing down will trigger the dragon transformation.

    The face buttons (XYAB) are mapped to skills in order (e.g. X = s1, Y = s2, A = s3, B = s4). When the left shoulder bumper and the left shoulder trigger are held together, these buttons change to switch characters. When only the left shoulder bumper is held, these buttons change to the top row of the Kaleidoscope skill shares. When only the left shoulder trigger is held, these buttons change to the bottom row of the Kaleidoscope skill shares.

    The Start and Back buttons both map to the Menu button in game. The right shoulder bumper is for basic attacks. You cannot hold it down to forcestrike. The right shoulder trigger is a debug button. Press it if you've moved the SCRCPY window or if it's otherwise behaving poorly.

    Source code(tar.gz)
    Source code(zip)
    dragalia_control.1.0.2hotfix.zip(41.12 MB)
tool to automate exploitation of android degubg bridge vulnerability

DISCLAIMER DISCLAIMER: ANY MALICIOUS USE OF THE CONTENTS FROM THIS ARTICLE WILL NOT HOLD THE AUTHOR RESPONSIBLE HE CONTENTS ARE SOLELY FOR EDUCATIONAL

6 Feb 12, 2022
Personal Assistant Tessa

Personal Assistant Tessa Introducing our all new personal assistant Tessa..... An intelligent virtual assistant (IVA) or intelligent personal assistan

Anusha Joseph 4 Mar 08, 2022
Example teacher bot for deployment to Chai app.

Create and share your own chatbot Here is the code for uploading the popular "Ms Harris (Teacher)" chatbot to the Chai app. You can tweak the config t

Chai 1 Jan 10, 2022
Linux Pressure Stall Information (PSI) Status App

Linux Pressure Stall Information (PSI) Status App psistat is a simple python3 program to display the PSIs and to capture/display exception events. psi

Joe D 3 Sep 18, 2022
All Assignments , Test , Quizzes and Exams with solutions from NIT Patna B.Tech CSE 5th Semester.

A 🌟 to repo would be delightful, just do it ✔️ it is inexpensive. All Assignments , Quizzes and Exam papers at one place with clean and elegant solut

LakhanKumawat ᵖ⁺ 16 Dec 05, 2022
Async-first dependency injection library based on python type hints

Dependency Depression Async-first dependency injection library based on python type hints Quickstart First let's create a class we would be injecting:

Doctor 8 Oct 10, 2022
A simply dashboard to view commodities position data based on CFTC reports

commodities-dashboard A simply dashboard to view commodities position data based on CFTC reports This is a python project using Dash and plotly to con

71 Dec 19, 2022
A script that will warn you, by opening a new browser tab, when there are new content in your favourite websites.

web check A script that will warn you, by opening a new browser tab, when there are new content in your favourite websites. What it does The script wi

Jaime Álvarez 52 Mar 15, 2022
A data driven app for bicycle hiring in London(UK)

bicycle_hiring_app_deployed A data driven app for bicycle hiring in London(UK). It predicts expected number of bicycle hire in London. It asks users t

Rajarshi Roy Raju 1 Dec 10, 2021
Protocol Buffers for the Rest of Us

Protocol Buffers for the Rest of Us Motivation protoletariat has one goal: fixing the broken imports for the Python code generated by protoc. Usage He

Phillip Cloud 76 Jan 04, 2023
Cylc: a workflow engine for cycling systems

Cylc: a workflow engine for cycling systems. Repository master branch: core meta-scheduler component of cylc-8 (in development); Repository 7.8.x branch: full cylc-7 system.

The Cylc Workflow Engine 205 Dec 20, 2022
CountdownTimer - Countdown Timer For Python

Countdown Timer This python script asks for the user time (input) in seconds, an

Arinzechukwu Okoye 1 Jan 01, 2022
Osintgram by Datalux but i fixed some errors i found and made it look cleaner

OSINTgram-V2 OSINTgram-V2 is made from Osintgram which is made by Datalux originally but i took the script and fixed some errors i found and made the

2 Feb 02, 2022
Compiler Final Project - Lisp Interpreter

Compiler Final Project - Lisp Interpreter

2 Jan 23, 2022
Script for resizing MTD partitions on a QNAP device in order to be available to upgrade from buster to bullseye

QNAP partitions resize for kirkwood devices. As explained by Marin Michlmayr, Debian bullseye support on kirkwood QNAP devices was dropped due to [mai

Arnaud Mouiche 26 Jan 05, 2023
Context-free grammar to Sublime-syntax file

Generate a sublime-syntax file from a non-left-recursive, follow-determined, context-free grammar

Haggai Nuchi 8 Nov 17, 2022
Simple macOS StatusBar app to remind you to unplug your laptop when sufficiently charged

ChargeMon Simple macOS StatusBar app to monitor battery charge status and remind you to unplug your Mac when the battery is sufficiently charged Overv

Rhet Turnbull 5 Jan 25, 2022
Shell scripts made simple 🐚

zxpy Shell scripts made simple 🐚 Inspired by Google's zx, but made much simpler and more accessible using Python. Rationale Bash is cool, and it's ex

Tushar Sadhwani 492 Dec 27, 2022
Data Poisoning based on Adversarial Attacks using Non-Robust Features

Data Poisoning based on Adversarial Attacks using Non-Robust Features Usage python main.py [-h] [--gpu | -g GPU] [--eps |-e EPSILON] [--pert | -p PER

Jonathan E. 1 Nov 02, 2021
Simulation-Based Inference Benchmark

This repository contains a simulation-based inference benchmark framework, sbibm, which we describe in the associated manuscript "Benchmarking Simulation-based Inference".

SBI Benchmark 58 Oct 13, 2022