Skip to content

Commit

Permalink
Merge branch 'dev' into dependabot/gradle/com.android.library-8.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Xtr126 authored Feb 22, 2024
2 parents a51eefc + 13a5f48 commit 06edc32
Show file tree
Hide file tree
Showing 36 changed files with 726 additions and 525 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
version: 2
updates:
- package-ecosystem: "gradle" # See documentation for possible values
directory: "/" # Location of package manifests
directory: "/app" # Location of package manifests
schedule:
interval: "weekly"
registries:
Expand Down
34 changes: 0 additions & 34 deletions .github/workflows/android.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Build Documentation

on:
workflow_call:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v4
with:
repository: Xtr126/XtMapper-docs

- name: Install, build, and upload your site
uses: withastro/action@v2
with:
node-version: 20
package-manager: pnpm@latest
64 changes: 64 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build and Release APK

on:
workflow_dispatch:
push:
paths:
- '**.yml'

jobs:
build-docs:
uses: ./.github/workflows/build-docs.yml

build:
needs:
- build-docs

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Write key
run: |
if [ ! -z "${{ secrets.KEYSTORE }}" ]; then
{
echo storePassword='${{ secrets.KEYSTORE_PASSWORD }}'
echo keyPassword='${{ secrets.KEY_PASSWORD }}'
echo keyAlias='${{ secrets.KEY_ALIAS }}'
echo storeFile='../keystore.jks'
} > keystore.properties
echo '${{ secrets.KEYSTORE }}' | base64 -d > keystore.jks
fi
- name: Download artifacts
uses: actions/download-artifact@v4

- name: Move artifact to assets
run: |
cd ./github-pages
tar xvf artifact.tar && rm artifact.tar
cd ../
mkdir ./app/src/main/assets
mv ./github-pages ./app/src/main/assets/XtMapper-docs
- name: Build with Gradle
run: ./gradlew assembleRelease

- name: Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
app/build/outputs/apk/release/*.apk
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
/build
/app/build
output*.json
keystore.properties
keystore.jks
46 changes: 5 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,44 +20,8 @@
</a>
</p>

## About

Introducing XtMapper, the ultimate keymapper for Android on PC gaming designed to revolutionize your gaming experience with unparalleled features that set it apart from the rest. It offers a comprehensive set of features unmatched by other keymapper available.

Unlike other keymappers that often inject ads or having users to pay, XtMapper is committed to providing a clean and user-friendly experience. With its extensive feature set, user-friendly interface, and commitment to it's userbase, XtMapper stands as the keymapper of choice for Android-x86 gaming enthusiasts.

It is free and open-source software boasting a comprehensive array of functionalities that cater to Android-x86 users diverse needs for mouse/keyboard/touchpad input, making it a standout choice among keymapping applications that usually only target mobile phone hardware.

There is literally just no match for it among other Android keymappers in the context of Android-x86.
As you might have already experienced, most other keymappers for Android are usually Adware / Paid closed source software that don't even support Android-x86 natively.

XtMapper is included in Bliss OS and featured on [BlissLabs](https://blisslabs.org).

## Key Features

Multi-touch emulation from keyboard/mouse and enhancing control precision in various gaming scenarios: Providing a seamless and immersive touch experience for games that demand intricate touch inputs.

Mouse-to-touch emulation: Utilize your mouse as a touch pointer, enabling control in games that don't support direct mouse input.

Keyboard-to-touch emulation: Configure keyboard keys to trigger touch events, allowing you to play games that don't haven ative support for keyboard.

Aiming assistance: Enhance your aiming accuracy in FPS games with mouse-based aiming assistance while mapping mouse buttons and movement to various in-game functions.

Gesture emulation: Perform pinch-to-zoom gestures using keyboard shortcuts and mouse movements.

Smooth scrolling: Experience smooth and pixel-perfect scrolling emulation with your mouse wheel. Provides a more smooth and responsive scrolling experience than the android system defaults.

Swipe emulation: Execute swipes conveniently using designated keyboard keys, replicating touch-based gestures. Adds more versatility to your gaming controls.

Advanced touchpad support: Choose between direct touch or relative mode for touchpad input, catering to a variety of user preferences.

Low latency and high performance: Xtmapper provides low-latency, high-performance keymapping that ensures your inputs are registered with precision and speed. Enjoy a responsive and lag-free gaming experience.

Automatic profile switching: Automatically switch between keymapper profiles based on the active app, streamlining your gaming setup for each specific game.

Open-source development: Contribute to the ongoing development of XtMapper and benefit from its open-source nature.

XtMapper ensures a stable and reliable experience across most Android-x86 systems as long as it is Android 9 or newer. Older Android versions are not supported.
## About and features
https://xtr126.github.io/XtMapper-docs/guides/about

## Development

Expand All @@ -73,9 +37,8 @@ You can ask about XtMapper on Bliss OS in
BlissLabs discord server: https://discord.com/invite/F9n5gbdNy2
Telegram: https://t.me/blissx86


## Waydroid support
Due to how XtMapper works by reading input events directly from the kernel, there are certain difficulties in implementing support for android containers.
Due to how XtMapper works by reading input events directly from the kernel, there are certain limitations in implementing support for Android containers.
An experimental solution was developed: https://github.com/Xtr126/wayland-getevent
It is mostly a "hack" that we have to rely on due to how wayland/waydroid works.
https://youtube.com/watch?v=yvZD2E7kgG0
Expand All @@ -84,11 +47,12 @@ https://youtube.com/watch?v=yvZD2E7kgG0
Open source libraries used:
- [Material Design Components](https://github.com/material-components/material-components-android) used for the app user interface.
- [FloatingActionButtonSpeedDial](https://github.com/leinardi/FloatingActionButtonSpeedDial)
- [libsu](https://github.com/topjohnwu/libsu)

[Some code](./app/src/main/java/com/genymobile/scrcpy) from the [scrcpy](https://github.com/Genymobile/scrcpy) project was used for implementing multi-touch support in the keymapper.

## Copyright and License
This project is licensed under the GPL v3.
The source code is licensed under the GPL v3.
Do not publish unofficial APKs to the play store.
```
XtMapper
Expand Down
80 changes: 64 additions & 16 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,62 @@ plugins {
id 'com.android.application'
}

// Create a variable called keystorePropertiesFile, and initialize it to your
// keystore.properties file, in the rootProject folder.
def keystorePropertiesFile = rootProject.file("keystore.properties")

// Initialize a new Properties() object called keystoreProperties.
def keystoreProperties = new Properties()

// Load your keystore.properties file into the keystoreProperties object.
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

android {
namespace 'xtr.keymapper'
compileSdk 34

defaultConfig {
applicationId "xtr.keymapper"
minSdk 28
targetSdk 33
versionCode 10
versionName '2.1.0'
targetSdk 34
versionCode 11
versionName '2.1.1'

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
abiFilter 'x86_64'
}

aaptOptions {
ignoreAssetsPattern ''
}
}
externalNativeBuild {
ndkBuild {
path 'Android.mk'

signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}

externalNativeBuild {
ndkBuild {
path 'Android.mk'
}
}

applicationVariants.configureEach {
it.outputs.every {
it.outputFileName = "XtMapper-${it.name}-v${defaultConfig.versionName}.apk"
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
Expand All @@ -43,19 +68,42 @@ android {
}
packagingOptions.jniLibs.useLegacyPackaging true

splits {

// Configures multiple APKs based on ABI.
abi {
// Enables building multiple APKs per ABI.
enable true

// Resets the list of ABIs for Gradle to create APKs for to none.
reset()

// Specifies a list of ABIs for Gradle to create APKs for.
include "x86_64", "x86", "armeabi-v7a", "arm64-v8a"

// Specifies that we don't want to also generate a universal APK that includes all ABIs.
universalApk false
}
}

ndkVersion '26.1.10909125'

dependenciesInfo {
// Disables dependency metadata when building APKs.
includeInApk = false
// Disables dependency metadata when building Android App Bundles.
includeInBundle = false
}
}

dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
implementation "androidx.coordinatorlayout:coordinatorlayout:1.2.0"
implementation 'com.google.android.material:material:1.10.0'
implementation 'com.google.android.material:material:1.11.0'
implementation "com.leinardi.android:speed-dial:3.3.0"
implementation 'androidx.webkit:webkit:1.8.0'
// The core module that provides APIs to a shell
implementation "com.github.topjohnwu.libsu:core:5.2.1"
// Optional: APIs for creating root services. Depends on ":core"
implementation "com.github.topjohnwu.libsu:service:5.2.1"
implementation 'androidx.webkit:webkit:1.10.0'
implementation "com.github.topjohnwu.libsu:core:5.2.2"
implementation "com.github.topjohnwu.libsu:service:5.2.2"
compileOnly project(path: ':app:hidden-api')
}
5 changes: 4 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.INTERNET" />


<queries>
<intent>
<action android:name="android.intent.action.MAIN" />
Expand Down Expand Up @@ -49,7 +51,8 @@

<service
android:name="TouchPointer"
android:enabled="true" />
android:enabled="true"
android:foregroundServiceType="specialUse"/>

<!-- Declares the input method service. -->
<service android:name=".service.InputListenerService"
Expand Down
Loading

0 comments on commit 06edc32

Please sign in to comment.