-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathandroid_setup.sh
More file actions
30 lines (22 loc) · 788 Bytes
/
Copy pathandroid_setup.sh
File metadata and controls
30 lines (22 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/bash
export APK_LIBS="lib"
source setup_android_vars.sh
mkdir -pv bin
echo $BUILD_TOOLS
echo "-------"
ls $BUILD_TOOLS
echo "-------"
ls -la $ANDROID_SDK
echo "-------"
ls -la $ANDROID_SDK/platforms
echo "-------"
ls -la $ANDROID_SDK/platforms/android-$ANDROID_API
echo "-------"
ls -la $ANDROID_SDK/platforms/android-26
echo "-------"
PLATDIR=$(ls -1 $ANDROID_SDK_ROOT/platforms 2>/dev/null | sort -V | head -n1)
echo $PLATDIR
$BUILD_TOOLS/aapt package -f -I "${ANDROID_SDK}/platforms/$PLATDIR/android.jar" -M AndroidManifest.xml -A src/assets -S res -m -F bin/app-unsigned.apk
LIBS=$(find $APK_LIBS -type f -name '*.so' | sed 's/\\/\//g')
$BUILD_TOOLS/aapt add bin/app-unsigned.apk $(echo ${LIBS//.\//})
$BUILD_TOOLS/zipalign -v -f 4 bin/app-unsigned.apk bin/app.apk