代码拉取完成,页面将自动刷新
#!/bin/bash
if [ $# != 1 ] ; then
echo -e "\033[31m USAGE: phytium_env.sh ANDROID_PATH_ROOT \033[0m"
echo -e "\033[31m example: ./phytium_env.sh /home/phytium/aosp \033[0m"
exit 1;
fi
ANDROID_PATH=$1
if [ ! -d $ANDROID_PATH ];then
echo -e "\033[31mMake sure the android_path_root exist! \033[0m"
exit 1;
fi
echo -e "\033[32mTHE ANDROID_PATH_ROOT $ANDROID_PATH \033[0m"
echo -e "\033[32m #### sync phytium env start! #### \033[0m"
CURRENTPWD=$(pwd)
#sync system_core
echo -e "\033[32m #### sync system_core #### \033[0m"
rm $ANDROID_PATH/system/core/* -rf
cp system_core/* $ANDROID_PATH/system/core/ -R
echo -e "\033[32m #### sync system_core end #### \033[0m"
#sync device_phytium_ft2004
echo -e "\033[32m #### sync device_phytium_ft2004 #### \033[0m"
mkdir -p $ANDROID_PATH/device/phytium/ft2004
cp device_phytium_ft2004/* $ANDROID_PATH/device/phytium/ft2004/ -R
echo -e "\033[32m #### sync device_phytium_ft2004 end #### \033[0m"
#sync hardware_libaudio
echo -e "\033[32m #### sync hardware_libaudio #### \033[0m"
mkdir -p $ANDROID_PATH/hardware/libaudio
cp hardware_libaudio/* $ANDROID_PATH/hardware/libaudio/ -R
echo -e "\033[32m #### sync hardware_libaudio end #### \033[0m"
#sync hardware_libcamera
echo -e "\033[32m #### sync hardware_libcamera #### \033[0m"
mkdir -p $ANDROID_PATH/hardware/libcamera
cp hardware_libcamera/* $ANDROID_PATH/hardware/libcamera -R
echo -e "\033[32m #### sync hardware_libcamera end #### \033[0m"
#sync hardware_interfaces
echo -e "\033[32m #### sync hardware_interfaces #### \033[0m"
rm $ANDROID_PATH/hardware/interfaces/* -rf
cp hardware_interfaces/* $ANDROID_PATH/hardware/interfaces/ -R
echo -e "\033[32m #### sync hardware_interfaces end #### \033[0m"
#sync external_alsa-lib
echo -e "\033[32m #### sync external_alsa-lib #### \033[0m"
mkdir -p $ANDROID_PATH/external/alsa-lib
cp external_alsa-lib/* $ANDROID_PATH/external/alsa-lib/ -R
echo -e "\033[32m #### sync external_alsa-lib end #### \033[0m"
#sync external_alsa-utils
echo -e "\033[32m #### sync external_alsa-utils #### \033[0m"
mkdir -p $ANDROID_PATH/external/alsa-utils
cp external_alsa-utils/* $ANDROID_PATH/external/alsa-utils/ -R
echo -e "\033[32m #### sync external_alsa-utils end #### \033[0m"
#sync external_shaderc
echo -e "\033[32m #### sync external_shaderc #### \033[0m"
rm $ANDROID_PATH/external/shaderc/* -rf
cp external_shaderc/* $ANDROID_PATH/external/shaderc/ -R
echo -e "\033[32m #### sync external_shaderc end #### \033[0m"
#sync external_toybox
echo -e "\033[32m #### sync external_toybox #### \033[0m"
rm $ANDROID_PATH/external/toybox/* -rf
cp external_toybox/* $ANDROID_PATH/external/toybox/ -R
echo -e "\033[32m #### sync external_toybox end #### \033[0m"
echo -e "\033[32m #### apply patch ####\n \033[0m"
cd $ANDROID_PATH
failed_patches= ;for patch in $CURRENTPWD/phytium_android11_patch/0*.patch; do patch -Np1 -i \
$patch || failed_patches="$failed_patches $patch"; done; \
if [[ -n $failed_patches ]]; then echo "Failed Patches:"$failed_patches; fi;
echo -e "\033[32m #### apply patch end ####\n \033[0m"
echo -e "\033[32m #### sync phytium end! #### \033[0m"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。