Skip to content

Commit 6c6c6d9

Browse files
committed
hopefully this works
1 parent 6c43a69 commit 6c6c6d9

File tree

2 files changed

+6
-19
lines changed

2 files changed

+6
-19
lines changed

root-module/btl2capfix.zip

-40 Bytes
Binary file not shown.

root-module/customize.sh

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
#!/system/bin/sh
22

3-
# Define variables
43
API_URL="https://aln.kavishdevar.me/api"
54
TEMP_DIR="$TMPDIR/aln_patch"
65
PATCHED_FILE_NAME=""
76
SOURCE_FILE=""
8-
LIBRARY_NAME="" # To store the name of the library being patched
9-
10-
# Create temporary directory
7+
LIBRARY_NAME=""
118
mkdir -p "$TEMP_DIR"
129

13-
# Function to log messages
1410
log() {
15-
echo "[ALN Patch] $1"
11+
echo "[Bluetooth L2CAP Patch] $1"
1612
}
1713

18-
# Identify the library type
1914
if [ -f "/apex/com.android.btservices/lib64/libbluetooth_jni.so" ]; then
2015
SOURCE_FILE="/apex/com.android.btservices/lib64/libbluetooth_jni.so"
2116
LIBRARY_NAME="libbluetooth_jni.so"
@@ -41,8 +36,8 @@ else
4136
exit 1
4237
fi
4338

44-
# Upload the library to the API
4539
log "Uploading $LIBRARY_NAME to the API for patching..."
40+
log "If you're concerened about privacy, you can review the source code of the API at https://github.com/kavishdevar/aln/blob/main/root-module-manual/server.py"
4641
PATCHED_FILE_NAME="patched_$LIBRARY_NAME"
4742

4843
curl -s -X POST "$API_URL" \
@@ -51,18 +46,12 @@ curl -s -X POST "$API_URL" \
5146
-o "$TEMP_DIR/$PATCHED_FILE_NAME" \
5247
-D "$TEMP_DIR/headers.txt"
5348

54-
# Check if the patched file was downloaded successfully
5549
if [ -f "$TEMP_DIR/$PATCHED_FILE_NAME" ]; then
5650
log "Received patched file from the API."
57-
58-
# Move the patched file to the module's directory
5951
log "Installing patched file to the module's directory..."
6052
mkdir -p "$MODPATH/system/lib/"
61-
cp "$TEMP_DIR/$PATCHED_FILE_NAME" "$MODPATH/system/lib/"
62-
63-
# Set permissions
64-
chmod 644 "$MODPATH/system/lib/$PATCHED_FILE_NAME"
65-
53+
cp "$TEMP_DIR/$PATCHED_FILE_NAME" "$MODPATH/$LIBRARY_NAME"
54+
chmod 644 "$MODPATH/$LIBRARY_NAME"
6655
log "Patched file has been successfully installed at $MODPATH/system/lib/$PATCHED_FILE_NAME"
6756
else
6857
ERROR_MESSAGE=$(grep -oP '(?<="error": ")[^"]+' "$TEMP_DIR/headers.txt")
@@ -71,7 +60,5 @@ else
7160
exit 1
7261
fi
7362

74-
# Cleanup
7563
rm -rf "$TEMP_DIR"
76-
77-
exit 0
64+
exit 0

0 commit comments

Comments
 (0)