1、安装python依赖:centos里面是-devel,如果在ubuntu下安装则要改成-dev,
yum -y groupinstall "Development tools"
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel
yum install make curl curl-devel gcc gcc-c++ gcc-g77 gcc* make zlib-devel bzip2-devel openssl-devel xz-libs wget unzip xz vixie-cron crontabs ntpdate tar lrzsz sysstat bind-utils vim -y
2、安装python3.7
wget https://www.python.org/ftp/python/3.7.5/Python-3.7.5.tar.xz
tar -xvJf Python-3.7.5.tar.xz
cd Python-3.7.5
./configure --prefix=/usr/local/bin/python3
sudo make
sudo make install
ln -s /usr/local/bin/python3/bin/python3.7 /usr/bin/python3.7
ln -s /usr/local/bin/python3/bin/pip3.7 /usr/bin/pip3.7
3、安装cmake(未安装cmake时,在安装keystone时会报错)
—centos
yum install -y cmake cmake3
==========切换到work用户==============
==========切换到work用户==============
==========切换到work用户==============
3、创建虚拟环境
cd ~/venv
python3.7 -m venv python3.7-forcrawl
source ~/venv/python3.7-forcrawl/bin/activate
3、安装androidemu依赖包
---centos
git clone https://github.com/AeonLucid/AndroidNativeEmu.git
cd AndroidNativeEmu
pip install -r requirements.txt
---mac
参考:https://bbs.pediy.com/thread-254799.htm
brew install unicorn
source ~/venv/python3.7-forcrawl/bin/activate
pip install pyelftools==0.24
pip install hexdump==3.3
unicorn
下载源码: https://pypi.org/project/unicorn/#files
tar -zxf unicorn-1.0.1.tar.gz
cd unicorn-1.0.1
cp /usr/local/opt/unicorn/lib/lib* ./prebuilt
python3 setup.py install
keystone-engine
git clone https://github.com/fjh658/keystone-engine.git
cd keystone-engine
git submodule update --init --recursive
python setup.py install --verbose
4、验证环境安装是否成功
git clone https://github.com/AeonLucid/AndroidNativeEmu.git
cd AndroidNativeEmu
mv androidemu samples
cd samples
# 到这一步,就可以在samples下写程序执行了,下面的操作主要是解决包导入路径的问题并测试包是否安装成功
删除example.py文件下的关于"samples/"的目录访问路径
如
"samples/example_binaries/libc.so"
改为
"example_binaries/libc.so”
# 可执行
python example.py
喜欢文章的话 可以点个关注,如果对 逆向,脱壳,新技术 感兴趣的 同学 可以加 我Q群 欢迎各位能人志士 一起讨论
欢迎加入故事,群聊号码:773642813 也可以加入笔者的 小密圈,各种安卓新技术,源码分享等
![image.png](https://upload-images.jianshu.io/upload_images/12722767-b5cc4ae2c4480d6c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)