为华为荣耀5c(nem-tlooh)编译最新twrp recovery

ubuntu18.04
配置编译环境

apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc unzip
apt-get install openjdk-8-jdk

安装repo

mkdir bin
PATH=$PWD/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > $PWD/bin/repo
chmod a+x $PWD/bin/repo

下载omni6.0源码

mkdir omni6.0
cd omni6.0
git config --global user.name "user"
git config --global user.email "email"
repo init -u git://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git -b twrp-6.0
repo sync -j24
#下载5c设备文件
mkdir -p device/huawei
cd device/huawei
git clone https://github.com/TeamWin/android_device_huawei_nemo.git
mv android_device_huawei_nemo nemo
cd ../../

修改init.rc,否则无法运行

sed -i 's/export LD_LIBRARY_PATH \/sbin/export LD_LIBRARY_PATH \/sbin:\/system\/lib64/g' bootable/recovery/etc/init.rc 

编译recovery,输出文件为out/target/product/nemo/recovery.img

export LC_ALL=C
source build/envsetup.sh
lunch omni_nemo-userdebug
make -j24 recoveryimage

下载编译好的recovery.img (twrp3.3.1-0)https://blog.csdn.net/qq_40169767/article/details/102989973

你可能感兴趣的:(android,rom)