Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cgiraldo committed Jan 23, 2021
0 parents commit 6e748e4
Show file tree
Hide file tree
Showing 6 changed files with 519 additions and 0 deletions.
33 changes: 33 additions & 0 deletions META-INF/com/google/android/update-binary
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/sbin/sh

#################
# Initialization
#################

umask 022

# echo before loading util_functions
ui_print() { echo "$1"; }

require_new_magisk() {
ui_print "*******************************"
ui_print " Please install Magisk v20.4+! "
ui_print "*******************************"
exit 1
}

#########################
# Load util_functions.sh
#########################

OUTFD=$2
ZIPFILE=$3

mount /data 2>/dev/null

[ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk
. /data/adb/magisk/util_functions.sh
[ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk

install_module
exit 0
1 change: 1 addition & 0 deletions META-INF/com/google/android/updater-script
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#MAGISK
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Gamesir X2 usb-c Xbox layout

TLDR; This module changes Gamesir X2 usb-c from NS layout to Xbox layout.

## Installation

zip the contents of this repo and install it in your rooted phone with magisk-Manager.

## Details

Gamesir X2 is an usb-c otg gamepad from [gamesir](https://www.gamesir.hk/).
The X2 button layout is the same as Nintendo Switch.

To use Gamesir X" as an Xbox controller we remap the next buttons in a new keylayout file:
- A->B
- B->A
- X->Y
- Y->X

This module injects the keylaout file in /system/usr/keylayout.
Binary file added gamesir-x2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions module.prop
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
id=gamesir-x2-xbox
name=Gamesir x2 xbox layout
version=0.1.0
versionCode=1
author=Carlos Giraldo
description=Change Gamesir X2 usb-c from NS layout to Xbox layout
Loading

0 comments on commit 6e748e4

Please sign in to comment.