Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucaber committed Oct 6, 2022
0 parents commit 6262dc8
Show file tree
Hide file tree
Showing 11 changed files with 82 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.apk
*.zip
*.idsig
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
PLATFORM=30

freesplitscreen.zip: magiskmodule/system/product/overlay/de.lucaber.android.freesplitscreen.apk
rm $@
cd magiskmodule && zip -r ../$@ .

build/de.lucaber.android.freesplitscreen.unaligned.apk: overlay/res/values/config.xml
aapt package -f -F $@ -M "overlay/AndroidManifest.xml" -S "overlay/res" -I ${ANDROID_HOME}/platforms/android-$(PLATFORM)/android.jar

build/de.lucaber.android.freesplitscreen.aligned.apk: build/de.lucaber.android.freesplitscreen.unaligned.apk
zipalign -f -p 4 $< $@

magiskmodule/system/product/overlay/de.lucaber.android.freesplitscreen.apk: build/de.lucaber.android.freesplitscreen.aligned.apk
echo "123123" | apksigner sign --ks build/apkkey.keystore --out $@ $<

clean:
rm -f build/*.apk magiskmodule/system/product/overlay/*
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# FreeSplitScreen

Magsik module to enable the free snap mode in split screen view.
This allows to freely position the divider of two apps.
Binary file added build/apkkey.keystore
Binary file not shown.
33 changes: 33 additions & 0 deletions magiskmodule/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 magiskmodule/META-INF/com/google/android/updater-script
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#MAGISK
7 changes: 7 additions & 0 deletions magiskmodule/module.prop
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
id=freesplitscreen
name=FreeSplitScreen
version=v1.0
versionCode=1
author=Lucaber
description=Free SplitScreen

Empty file.
3 changes: 3 additions & 0 deletions overlay/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="de.lucaber.android.freesplitscreen" android:versionCode="1" android:versionName="1.0">
<overlay android:targetPackage="android" android:priority="1" android:isStatic="true" />
</manifest>
7 changes: 7 additions & 0 deletions overlay/res/values-land/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="config_dockedStackDividerFreeSnapMode">true</bool>
<integer name="config_dockedStackDividerSnapMode">1</integer>
<fraction name="docked_stack_divider_fixed_ratio">10.0%</fraction>
<dimen name="default_minimal_size_resizable_task">10dp</dimen>
</resources>
7 changes: 7 additions & 0 deletions overlay/res/values/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="config_dockedStackDividerFreeSnapMode">true</bool>
<integer name="config_dockedStackDividerSnapMode">1</integer>
<fraction name="docked_stack_divider_fixed_ratio">10.0%</fraction>
<dimen name="default_minimal_size_resizable_task">10dp</dimen>
</resources>

0 comments on commit 6262dc8

Please sign in to comment.