本文基于ubuntu 21.04操作
frida 将默认分支从 master 切换到 main,如果编译出现
参考此commit: https://github.com/frida/frida/commit/e4c6a1e646666284ea77c36d61f20558504847b5
ndk版本与你想要编译的版本相关,在其/releng/setup-env.sh
注明了需要的NDK版本
这里以最新版的frida ndk依赖22 进行
ndk下载网址:https://developer.android.com/ndk/downloads?hl=zh-cn
https://github.com/nvm-sh/nvm
当前最新版本是:15.1.5
Apply hluda patch
编译:
编译时会自动下载 对应的toolchain和sdk。
when compile completed, into build/frida-android-arm/bin
,you will see:
看了看Patchs 的commit message、时间,基本就能知道commit对应的patch,对应哪些版本:
看看编译14.2.12怎么弄
这里有个坑,当checkout的时候,仅frida这个仓库回滚到14.2.12,其中的submodule 依然是最新的,要让所有submodule也是14.2.12时的版本才行:
检查一下需要的ndk版本,依然是22:
checkout Patchs 到 14.2.12:
Apply hluda patch:
check一下,没报错就行。
接下来和之前的编译步骤一样
Git History - https://githistory.xyz/ 在某些情况下确实有用:
参考:
make[
1
]:
*
*
*
No rule to make target
'.git/refs/heads/master'
, needed by
'build/frida-version.h'
. Stop.
make[
1
]:
*
*
*
No rule to make target
'.git/refs/heads/master'
, needed by
'build/frida-version.h'
. Stop.
sudo apt update
sudo apt
-
get install build
-
essential tree ninja
-
build gcc
-
multilib g
+
+
-
multilib lib32stdc
+
+
-
9
-
dev flex bison xz
-
utils ruby ruby
-
dev python3
-
requests python3
-
setuptools python3
-
dev python3
-
pip libc6
-
dev libc6
-
dev
-
i386
-
y
sudo gem install fpm
-
v
1.11
.
0
-
-
no
-
document
python3
-
m pip install lief
sudo apt update
sudo apt
-
get install build
-
essential tree ninja
-
build gcc
-
multilib g
+
+
-
multilib lib32stdc
+
+
-
9
-
dev flex bison xz
-
utils ruby ruby
-
dev python3
-
requests python3
-
setuptools python3
-
dev python3
-
pip libc6
-
dev libc6
-
dev
-
i386
-
y
sudo gem install fpm
-
v
1.11
.
0
-
-
no
-
document
python3
-
m pip install lief
wget https:
/
/
dl.google.com
/
android
/
repository
/
android
-
ndk
-
r22b
-
linux
-
x86_64.
zip
unzip android
-
ndk
-
r22b
-
linux
-
x86_64.
zip
wget https:
/
/
dl.google.com
/
android
/
repository
/
android
-
ndk
-
r22b
-
linux
-
x86_64.
zip
unzip android
-
ndk
-
r22b
-
linux
-
x86_64.
zip
sudo mv android
-
ndk
-
r22b
/
opt
/
export ANDROID_NDK_ROOT
=
'/opt/android-ndk-r22b'
sudo mv android
-
ndk
-
r22b
/
opt
/
export ANDROID_NDK_ROOT
=
'/opt/android-ndk-r22b'
curl
-
o
-
https:
/
/
raw.githubusercontent.com
/
nvm
-
sh
/
nvm
/
v0.
39.0
/
install.sh | bash
nvm install
10
curl
-
o
-
https:
/
/
raw.githubusercontent.com
/
nvm
-
sh
/
nvm
/
v0.
39.0
/
install.sh | bash
nvm install
10
git clone
-
-
recurse
-
submodules https:
/
/
github.com
/
frida
/
frida
git clone
-
-
recurse
-
submodules https:
/
/
github.com
/
frida
/
frida
git clone https:
/
/
github.com
/
AAAA
-
Project
/
Patchs.git
cd frida
/
frida
-
core
/
git am ..
/
..
/
Patchs
/
strongR
-
frida
/
frida
-
core
/
*
.patch
cd ..
git clone https:
/
/
github.com
/
AAAA
-
Project
/
Patchs.git
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!
最后于 2022-3-16 15:04
被lushanu编辑
,原因: update