Skip to content

Commit

Permalink
Stupid Firefox requires extracting native libs
Browse files Browse the repository at this point in the history
  • Loading branch information
phhusson committed Apr 5, 2020
1 parent e771aa0 commit 16644af
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ set -e
repo="https://f-droid.org/repo/"

addCopy() {
addition=""
if [ "$2" == org.mozilla.fennec_fdroid ];then
unzip bin/$1 lib/*
addition="
LOCAL_PREBUILT_JNI_LIBS := \\
$(unzip -lv bin/$1 |grep -v Stored |sed -nE 's;.*(lib/arm64-v8a/.*);\t\1 \\;p')
"
fi
cat >> Android.mk <<EOF
include \$(CLEAR_VARS)
LOCAL_MODULE := $2
Expand All @@ -12,13 +21,14 @@ LOCAL_SRC_FILES := bin/$1
LOCAL_MODULE_CLASS := APPS
LOCAL_CERTIFICATE := PRESIGNED
LOCAL_OVERRIDES_PACKAGES := $3
$addition
include \$(BUILD_PREBUILT)
EOF
echo -e "\t$2 \\" >> apps.mk
}

rm -Rf apps.mk
rm -Rf apps.mk lib
cat > Android.mk <<EOF
LOCAL_PATH := \$(my-dir)
Expand Down

0 comments on commit 16644af

Please sign in to comment.