frida-server: update to 14.2.14
Also create new subpackage frida-dev with libraries and include files. Frida should be built with ndk r22 but I have now patched it to use r21 since we have not switched to r22 yet. Using a lower version might break stuff, but frida-python is already broken anyways since it relies on python3.8 so building with r21 does not make the current situation worse. Updating it now so that the version in the Bintray repos will not be left in guaranteed broken state.
This commit is contained in:
parent
ee84a8911d
commit
9b8cb4d83c
@ -1,6 +1,6 @@
|
||||
--- ./Makefile.linux.mk.orig 2020-07-22 19:15:43.163995037 +0000
|
||||
+++ ./Makefile.linux.mk 2020-07-22 19:19:19.060924976 +0000
|
||||
@@ -241,6 +241,10 @@
|
||||
--- ./Makefile.linux.mk.orig 2020-12-05 10:51:28.873352898 +0100
|
||||
+++ ./Makefile.linux.mk 2020-12-05 10:58:48.332580362 +0100
|
||||
@@ -213,6 +213,10 @@
|
||||
--prefix $(FRIDA)/build/frida-android-arm \
|
||||
--libdir $(FRIDA)/build/frida-android-arm/lib \
|
||||
$(frida_core_flags) \
|
||||
@ -11,7 +11,7 @@
|
||||
frida-core $$builddir || exit 1; \
|
||||
fi
|
||||
@touch $@
|
||||
@@ -269,6 +273,10 @@
|
||||
@@ -241,6 +245,10 @@
|
||||
--prefix $(FRIDA)/build/frida_thin-$* \
|
||||
--libdir $(FRIDA)/build/frida_thin-$*/lib \
|
||||
$(frida_core_flags) \
|
||||
@ -22,10 +22,10 @@
|
||||
frida-core $$builddir || exit 1; \
|
||||
fi
|
||||
@touch $@
|
||||
@@ -326,6 +334,10 @@
|
||||
python-linux-x86-thin: build/tmp_thin-linux-x86/frida-$(PYTHON_NAME)/.frida-stamp ##@python Build Python bindings for Linux/x86 without cross-arch support
|
||||
@@ -301,6 +309,10 @@
|
||||
python-linux-x86_64-thin: build/tmp_thin-linux-x86_64/frida-$(PYTHON_NAME)/.frida-stamp ##@python Build Python bindings for Linux/x86-64 without cross-arch support
|
||||
python-linux-arm64: build/tmp_thin-linux-arm64/frida-$(PYTHON_NAME)/.frida-stamp ##@python Build Python bindings for Linux/ARM64
|
||||
python-linux-armhf: build/tmp_thin-linux-armhf/frida-$(PYTHON_NAME)/.frida-stamp ##@python Build Python bindings for Linux/armhf
|
||||
python-linux-arm64: build/tmp_thin-linux-arm64/frida-$(PYTHON_NAME)/.frida-stamp ##@python Build Python bindings for Linux/arm64
|
||||
+python-android-x86: build/tmp-android-x86/frida-$(PYTHON_NAME)/.frida-stamp ##@python Build Python bindings for Android/x86
|
||||
+python-android-x86_64: build/tmp-android-x86_64/frida-$(PYTHON_NAME)/.frida-stamp ##@python Build Python bindings for Android/x86_64
|
||||
+python-android-arm: build/tmp-android-arm/frida-$(PYTHON_NAME)/.frida-stamp ##@python Build Python bindings for Android/ARM
|
||||
@ -33,11 +33,10 @@
|
||||
|
||||
define make-python-rule
|
||||
build/$2-%/frida-$$(PYTHON_NAME)/.frida-stamp: build/.frida-python-submodule-stamp build/$1-%/lib/pkgconfig/frida-core-1.0.pc
|
||||
@@ -366,13 +378,32 @@
|
||||
@@ -346,6 +358,22 @@
|
||||
export PYTHONPATH="$(shell pwd)/build/frida_thin-linux-arm64/lib/$(PYTHON_NAME)/site-packages" \
|
||||
&& cd frida-python \
|
||||
&& ${PYTHON} -m unittest discover
|
||||
-
|
||||
+check-python-android-x86: build/tmp_thin-android-x86/frida-$(PYTHON_NAME)/.frida-stamp ##@python Test Python bindings for Android/x86
|
||||
+ export PYTHONPATH="$(shell pwd)/build/frida_thin-android-x86/lib/$(PYTHON_NAME)/site-packages" \
|
||||
+ && cd frida-python \
|
||||
@ -55,11 +54,12 @@
|
||||
+ && cd frida-python \
|
||||
+ && ${PYTHON} -m unittest discover
|
||||
|
||||
|
||||
node-linux-x86: build/frida-linux-x86/lib/node_modules/frida build/.frida-node-submodule-stamp ##@node Build Node.js bindings for Linux/x86
|
||||
node-linux-x86_64: build/frida-linux-x86_64/lib/node_modules/frida build/.frida-node-submodule-stamp ##@node Build Node.js bindings for Linux/x86-64
|
||||
node-linux-x86-thin: build/frida_thin-linux-x86/lib/node_modules/frida build/.frida-node-submodule-stamp ##@node Build Node.js bindings for Linux/x86 without cross-arch support
|
||||
@@ -354,6 +382,10 @@
|
||||
node-linux-x86_64-thin: build/frida_thin-linux-x86_64/lib/node_modules/frida build/.frida-node-submodule-stamp ##@node Build Node.js bindings for Linux/x86-64 without cross-arch support
|
||||
node-linux-arm64: build/frida_thin-linux-arm64/lib/node_modules/frida build/.frida-node-submodule-stamp ##@node Build Node.js bindings for Linux/ARM64
|
||||
node-linux-armhf: build/frida_thin-linux-armhf/lib/node_modules/frida build/.frida-node-submodule-stamp ##@node Build Node.js bindings for Linux/armhf
|
||||
node-linux-arm64: build/frida_thin-linux-arm64/lib/node_modules/frida build/.frida-node-submodule-stamp ##@node Build Node.js bindings for Linux/arm64
|
||||
+node-android-x86: build/frida_thin-android-x86/lib/node_modules/frida build/.frida-node-submodule-stamp ##@node Build Node.js bindings for Android/x86
|
||||
+node-android-x86_64: build/frida_thin-android-x86_64/lib/node_modules/frida build/.frida-node-submodule-stamp ##@node Build Node.js bindings for Android/x86_64
|
||||
+node-android-arm: build/frida_thin-android-arm/lib/node_modules/frida build/.frida-node-submodule-stamp ##@node Build Node.js bindings for Android/ARM
|
||||
@ -67,9 +67,9 @@
|
||||
|
||||
define make-node-rule
|
||||
build/$1-%/lib/node_modules/frida: build/$1-%/lib/pkgconfig/frida-core-1.0.pc build/.frida-node-submodule-stamp
|
||||
@@ -417,6 +448,14 @@
|
||||
$(call run-node-tests,frida_thin-linux-x86_64,$(FRIDA),$(NODE_BIN_DIR),$(NODE),$(NPM))
|
||||
check-node-linux-arm64: node-linux-arm64 ##@node Test Node.js bindings for Linux/ARM64
|
||||
@@ -400,6 +432,14 @@
|
||||
$(call run-node-tests,frida_thin-linux-armhf,$(FRIDA),$(NODE_BIN_DIR),$(NODE),$(NPM))
|
||||
check-node-linux-arm64: node-linux-arm64 ##@node Test Node.js bindings for Linux/arm64
|
||||
$(call run-node-tests,frida_thin-linux-arm64,$(FRIDA),$(NODE_BIN_DIR),$(NODE),$(NPM))
|
||||
+check-node-android-x86: node-android-x86 ##@node Test Node.js bindings for Android/x86
|
||||
+ $(call run-node-tests,frida_thin-android-x86,$(FRIDA),$(NODE_BIN_DIR),$(NODE),$(NPM))
|
||||
@ -82,10 +82,10 @@
|
||||
|
||||
|
||||
tools-linux-x86: build/tmp-linux-x86/frida-tools-$(PYTHON_NAME)/.frida-stamp ##@tools Build CLI tools for Linux/x86
|
||||
@@ -424,6 +463,10 @@
|
||||
tools-linux-x86-thin: build/tmp_thin-linux-x86/frida-tools-$(PYTHON_NAME)/.frida-stamp ##@tools Build CLI tools for Linux/x86 without cross-arch support
|
||||
@@ -408,6 +448,10 @@
|
||||
tools-linux-x86_64-thin: build/tmp_thin-linux-x86_64/frida-tools-$(PYTHON_NAME)/.frida-stamp ##@tools Build CLI tools for Linux/x86-64 without cross-arch support
|
||||
tools-linux-arm64: build/tmp_thin-linux-arm64/frida-tools-$(PYTHON_NAME)/.frida-stamp ##@tools Build CLI tools for Linux/ARM64
|
||||
tools-linux-armhf: build/tmp_thin-linux-armhf/frida-tools-$(PYTHON_NAME)/.frida-stamp ##@tools Build CLI tools for Linux/armhf
|
||||
tools-linux-arm64: build/tmp_thin-linux-arm64/frida-tools-$(PYTHON_NAME)/.frida-stamp ##@tools Build CLI tools for Linux/arm64
|
||||
+tools-android-x86: build/tmp-android-x86/frida-tools-$(PYTHON_NAME)/.frida-stamp ##@tools Build CLI tools for Android/x86
|
||||
+tools-android-x86_64: build/tmp-android-x86_64/frida-tools-$(PYTHON_NAME)/.frida-stamp ##@tools Build CLI tools for Android/x86_64
|
||||
+tools-android-arm: build/tmp-android-arm/frida-tools-$(PYTHON_NAME)/.frida-stamp ##@tools Build CLI tools for Android/ARM
|
||||
@ -93,7 +93,7 @@
|
||||
|
||||
define make-tools-rule
|
||||
build/$2-%/frida-tools-$$(PYTHON_NAME)/.frida-stamp: build/.frida-tools-submodule-stamp build/$2-%/frida-$$(PYTHON_NAME)/.frida-stamp
|
||||
@@ -463,6 +506,23 @@
|
||||
@@ -451,6 +495,23 @@
|
||||
export PYTHONPATH="$(shell pwd)/build/frida_thin-linux-arm64/lib/$(PYTHON_NAME)/site-packages" \
|
||||
&& cd frida-tools \
|
||||
&& ${PYTHON} -m unittest discover
|
||||
@ -117,45 +117,44 @@
|
||||
|
||||
|
||||
.PHONY: \
|
||||
@@ -492,27 +552,41 @@
|
||||
@@ -479,26 +540,40 @@
|
||||
check-core-linux-x86 check-core-linux-x86_64 \
|
||||
check-core-linux-x86-thin check-core-linux-x86_64-thin \
|
||||
check-core-linux-arm64 \
|
||||
check-core-linux-armhf check-core-linux-arm64 \
|
||||
+ check-core-android-x86 check-core-android-x86_64 \
|
||||
+ check-core-android-arm check-core-android-arm64 \
|
||||
frida-core-update-submodule-stamp \
|
||||
python-linux-x86 python-linux-x86_64 \
|
||||
python-linux-x86-thin python-linux-x86_64-thin \
|
||||
python-linux-arm64 \
|
||||
python-linux-armhf python-linux-arm64 \
|
||||
+ python-android-x86 python-android-x86_64 \
|
||||
+ python-android-arm python-android-arm64 \
|
||||
check-python-linux-x86 check-python-linux-x86_64 \
|
||||
check-python-linux-x86-thin check-python-linux-x86_64-thin \
|
||||
check-python-linux-arm64 \
|
||||
check-python-linux-armhf check-python-linux-arm64 \
|
||||
+ check-python-android-x86 check-python-android-x86_64 \
|
||||
+ check-python-android-arm check-python-android-arm64 \
|
||||
frida-python-update-submodule-stamp \
|
||||
node-linux-x86 node-linux-x86_64 \
|
||||
node-linux-x86-thin node-linux-x86_64-thin \
|
||||
node-linux-arm64 \
|
||||
node-linux-armhf node-linux-arm64 \
|
||||
+ node-android-x86 node-android-x86_64 \
|
||||
+ node-android-arm node-android-arm64 \
|
||||
check-node-linux-x86 check-node-linux-x86_64 \
|
||||
check-node-linux-x86-thin check-node-linux-x86_64-thin \
|
||||
check-node-linux-arm64 \
|
||||
check-node-linux-armhf check-node-linux-arm64 \
|
||||
+ check-node-android-x86 check-node-android-x86_64 \
|
||||
+ check-node-android-arm check-node-android-arm64 \
|
||||
frida-node-update-submodule-stamp \
|
||||
tools-linux-x86 tools-linux-x86_64 \
|
||||
tools-linux-x86-thin tools-linux-x86_64-thin \
|
||||
tools-linux-arm64 \
|
||||
tools-linux-armhf tools-linux-arm64 \
|
||||
+ tools-android-x86 tools-android-x86_64 \
|
||||
+ tools-android-arm tools-android-arm64 \
|
||||
check-tools-linux-x86 check-tools-linux-x86_64 \
|
||||
check-tools-linux-x86-thin check-tools-linux-x86_64-thin \
|
||||
check-tools-linux-arm64 \
|
||||
check-tools-linux-armhf check-tools-linux-arm64 \
|
||||
+ check-tools-android-x86 check-tools-android-x86_64 \
|
||||
+ check-tools-android-arm check-tools-android-arm64 \
|
||||
frida-tools-update-submodule-stamp \
|
||||
glib glib-symlinks \
|
||||
v8 v8-symlinks
|
||||
frida-tools-update-submodule-stamp
|
||||
.SECONDARY:
|
||||
|
@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://www.frida.re/
|
||||
TERMUX_PKG_DESCRIPTION="Dynamic instrumentation toolkit for developers, reverse-engineers, and security researchers"
|
||||
TERMUX_PKG_LICENSE="wxWindows"
|
||||
TERMUX_PKG_MAINTAINER="Henrik Grimler @Grimler91"
|
||||
_MAJOR_VERSION=12
|
||||
_MINOR_VERSION=11
|
||||
_MICRO_VERSION=18
|
||||
_MAJOR_VERSION=14
|
||||
_MINOR_VERSION=2
|
||||
_MICRO_VERSION=14
|
||||
TERMUX_PKG_VERSION=${_MAJOR_VERSION}.${_MINOR_VERSION}.${_MICRO_VERSION}
|
||||
TERMUX_PKG_GIT_BRANCH=$TERMUX_PKG_VERSION
|
||||
TERMUX_PKG_SRCURL=https://github.com/frida/frida.git
|
||||
@ -12,6 +12,7 @@ TERMUX_PKG_DEPENDS="libiconv, python"
|
||||
TERMUX_PKG_BUILD_DEPENDS="openssl"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_HOSTBUILD=true
|
||||
TERMUX_PKG_NO_STATICSPLIT=true
|
||||
TERMUX_PKG_EXTRA_MAKE_ARGS="ANDROID_NDK_ROOT=$NDK"
|
||||
TERMUX_PKG_CONFFILES="var/service/frida-server/run var/service/frida-server/down"
|
||||
|
||||
@ -47,9 +48,9 @@ termux_step_make () {
|
||||
else
|
||||
arch=${TERMUX_ARCH}
|
||||
fi
|
||||
CC= CXX= PATH=${TERMUX_PKG_HOSTBUILD_DIR}/bin:$PATH \
|
||||
CC=gcc CXX=g++ PATH=${TERMUX_PKG_HOSTBUILD_DIR}/bin:$PATH \
|
||||
make python-android-${arch} ${TERMUX_PKG_EXTRA_MAKE_ARGS}
|
||||
CC= CXX= PATH=${TERMUX_PKG_HOSTBUILD_DIR}/bin:$PATH \
|
||||
CC=gcc CXX=g++ PATH=${TERMUX_PKG_HOSTBUILD_DIR}/bin:$PATH \
|
||||
make tools-android-${arch} ${TERMUX_PKG_EXTRA_MAKE_ARGS}
|
||||
}
|
||||
|
||||
@ -63,9 +64,9 @@ termux_step_make_install () {
|
||||
build/frida-android-${arch}/bin/frida-ps \
|
||||
build/frida-android-${arch}/bin/frida-trace \
|
||||
${TERMUX_PREFIX}/bin/
|
||||
install build/frida-android-${arch}/lib/{frida-gadget.so,libfrida-gumpp-*.so} ${TERMUX_PREFIX}/lib/
|
||||
install build/frida-android-${arch}/lib/{*.so,*.a} ${TERMUX_PREFIX}/lib/
|
||||
cp -r build/frida-android-${arch}/lib/{pkgconfig,python*} ${TERMUX_PREFIX}/lib/
|
||||
cp -r build/frida-android-${arch}/include/{capstone,frida-*} ${TERMUX_PREFIX}/include/
|
||||
cp -r build/frida-android-${arch}/include/frida-* ${TERMUX_PREFIX}/include/
|
||||
cp -r build/frida-android-${arch}/share/vala ${TERMUX_PREFIX}/share/
|
||||
}
|
||||
|
||||
|
26
root-packages/frida-server/compiler.patch
Normal file
26
root-packages/frida-server/compiler.patch
Normal file
@ -0,0 +1,26 @@
|
||||
--- ./releng/setup-env.sh.orig_CC 2020-12-05 16:35:01.103852860 +0100
|
||||
+++ ./releng/setup-env.sh 2020-12-05 16:35:07.473842975 +0100
|
||||
@@ -929,9 +929,9 @@
|
||||
echo "export VALAC=\"$VALAC\""
|
||||
echo "export CPP=\"$CPP\""
|
||||
echo "export CPPFLAGS=\"$CPPFLAGS\""
|
||||
- echo "export CC=\"$CC\""
|
||||
+ echo "export CC=\"gcc\""
|
||||
echo "export CFLAGS=\"$CFLAGS\""
|
||||
- echo "export CXX=\"$CXX\""
|
||||
+ echo "export CXX=\"g++\""
|
||||
echo "export CXXFLAGS=\"$CXXFLAGS\""
|
||||
echo "export LD=\"$LD\""
|
||||
echo "export LDFLAGS=\"$LDFLAGS\""
|
||||
@@ -990,9 +990,9 @@
|
||||
echo "export PKG_CONFIG_PATH=\"\""
|
||||
echo "export VALAC=\"$VALAC\""
|
||||
echo "export CPPFLAGS=\"$CPPFLAGS\""
|
||||
- echo "export CC=\"$CC\""
|
||||
+ echo "export CC=\"gcc\""
|
||||
echo "export CFLAGS=\"$CFLAGS\""
|
||||
- echo "export CXX=\"$CXX\""
|
||||
+ echo "export CXX=\"g++\""
|
||||
echo "export CXXFLAGS=\"$CXXFLAGS\""
|
||||
echo "export LDFLAGS=\"$LDFLAGS\""
|
||||
echo "export AR=\"$AR\""
|
10
root-packages/frida-server/frida-dev.subpackage.sh
Normal file
10
root-packages/frida-server/frida-dev.subpackage.sh
Normal file
@ -0,0 +1,10 @@
|
||||
TERMUX_SUBPKG_DESCRIPTION="Development files for frida"
|
||||
TERMUX_SUBPKG_CONFLICTS="frida-server (<< 14.2.13)"
|
||||
TERMUX_SUBPKG_REPLACES="frida-server (<< 14.2.13)"
|
||||
TERMUX_SUBPKG_INCLUDE="
|
||||
lib/*.so
|
||||
lib/*.a
|
||||
lib/pkgconfig
|
||||
include/frida-*
|
||||
share/vala
|
||||
"
|
@ -8,7 +8,7 @@
|
||||
elif host_os_family != 'windows'
|
||||
--- ./Makefile.linux.mk.orig 2020-07-22 19:15:43.163995037 +0000
|
||||
+++ ./Makefile.linux.mk 2020-07-22 19:19:19.060924976 +0000
|
||||
@@ -336,8 +348,8 @@
|
||||
@@ -333,8 +333,8 @@
|
||||
--cross-file build/$1-$$*.txt \
|
||||
--prefix $$(FRIDA)/build/$1-$$* \
|
||||
--libdir $$(FRIDA)/build/$1-$$*/lib \
|
||||
@ -18,4 +18,4 @@
|
||||
+ -Dpython_incdir=@TERMUX_PREFIX@/include/python@PYTHON_VERSION@ \
|
||||
frida-python $$$$builddir || exit 1; \
|
||||
fi; \
|
||||
$$(NINJA) -C $$$$builddir install || exit 1
|
||||
$$(NINJA) -C $$$$builddir install || exit 1; \
|
||||
|
@ -2,6 +2,7 @@ TERMUX_SUBPKG_DESCRIPTION="Python bindings for Frida"
|
||||
TERMUX_SUBPKG_INCLUDE="lib/python*"
|
||||
|
||||
termux_step_create_subpkg_debscripts() {
|
||||
_PYTHON_VERSION=$(source $TERMUX_SCRIPTDIR/packages/python/build.sh; echo $_MAJOR_VERSION)
|
||||
echo "#!$TERMUX_PREFIX/bin/sh" > postinst
|
||||
echo "pip3.8 install wcwidth colorama pygments" >> postinst
|
||||
echo "pip${_PYTHON_VERSION} install wcwidth colorama pygments" >> postinst
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ bin/frida-trace
|
||||
"
|
||||
|
||||
termux_step_create_subpkg_debscripts() {
|
||||
_PYTHON_VERSION=$(source $TERMUX_SCRIPTDIR/packages/python/build.sh; echo $_MAJOR_VERSION)
|
||||
echo "#!$TERMUX_PREFIX/bin/sh" > postinst
|
||||
echo "pip3.8 install prompt_toolkit colorama pygments" >> postinst
|
||||
echo "pip${_PYTHON_VERSION} install prompt_toolkit colorama pygments" >> postinst
|
||||
}
|
||||
|
11
root-packages/frida-server/ndk_version.patch
Normal file
11
root-packages/frida-server/ndk_version.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ./releng/setup-env.sh.orig 2021-03-21 14:30:27.958066126 +0000
|
||||
+++ ./releng/setup-env.sh 2021-03-28 13:17:51.665477424 +0000
|
||||
@@ -106,7 +106,7 @@
|
||||
fi
|
||||
|
||||
if [ "$host_os" == "android" ]; then
|
||||
- ndk_required=22
|
||||
+ ndk_required=21
|
||||
if [ -n "$ANDROID_NDK_ROOT" ]; then
|
||||
if [ -f "$ANDROID_NDK_ROOT/source.properties" ]; then
|
||||
ndk_installed_version=$(grep Pkg.Revision "$ANDROID_NDK_ROOT/source.properties" | awk '{ split($NF, v, "."); print v[1]; }')
|
@ -1,6 +1,6 @@
|
||||
--- ./releng/setup-env.sh.orig 2020-07-22 19:22:28.247685514 +0000
|
||||
+++ ./releng/setup-env.sh 2020-07-22 19:23:37.730108226 +0000
|
||||
@@ -527,26 +527,26 @@
|
||||
--- ./releng/setup-env.sh.orig 2021-03-21 14:30:27.958066126 +0000
|
||||
+++ ./releng/setup-env.sh 2021-03-28 13:17:51.665477424 +0000
|
||||
@@ -628,26 +628,26 @@
|
||||
host_cflags=""
|
||||
case $host_arch in
|
||||
x86)
|
||||
|
Loading…
Reference in New Issue
Block a user