-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvendorsetup.sh
executable file
·59 lines (46 loc) · 2.14 KB
/
vendorsetup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
# ROM source patches
color="\033[0;32m"
end="\033[0m"
blue="\e[0;34m"
base64 -d device/xiaomi/spes/configs/camera/secret > device/xiaomi/spes/configs/camera/st_license.lic
echo -e "${color}Syncing dependencies${end}"
sleep 1
echo -e "${blue}Removing Unwanted stuff${blue}"
# Remove pixel headers to avoid conflicts
rm -rf hardware/google/pixel/kernel_headers/Android.bp
#Remove compat stuff to avoid errors
rm -rf hardware/lineage/compat
#Remove already synced stuff
rm -rf hardware/xiaomi
rm -rf vendor/xiaomi
rm -rf kernel/xiaomi
echo -e "${blue}Syncing bootctrl(1/7)${blue}"
#Sync qcom-caf bootctrl
rm -rf hardware/qcom-caf/bootctrl
git clone https://github.com/LineageOS/android_hardware_qcom_bootctrl.git -b lineage-19.1-caf hardware/qcom-caf/bootctrl
echo -e "${blue}Syncing hardware(2/7)${blue}"
#sync Hardware tree
git clone https://github.com/CHRISL7/hardware_xiaomi.git hardware/xiaomi
echo -e "${blue}Syncing vendor(3/7)${blue}"
#Sync Vendor tree
git clone https://github.com/shripad-jyothinath/vendor_xiaomi_spes.git vendor/xiaomi/spes
echo -e "${blue}Syncing Kernel(4/7)${blue}"
#Sync Kernel tree
git clone https://github.com/mi-sdm680/android_kernel_xiaomi_sm6225.git kernel/xiaomi/sm6225
echo -e "${blue}Syncing Camera(5/7)${blue}"
rm -rf device/xiaomi/sm6225-common-miuicamera
git clone https://github.com/CHRISL7/android_device_xiaomi_sm6225-common-miuicamera.git device/xiaomi/sm6225-common-miuicamera
echo -e "${blue}Updating ota(6/7)${blue}"
rm -rf vendor/risingOTA
git clone https://github.com/shripad-jyothinath/android_vendor_RisingOTA vendor/risingOTA
rm -rf packages/apps/Updater
git clone https://github.com/shripad-jyothinath/android_packages_apps_Updater.git packages/apps/Updater
echo "${blue}Syncing webview (7/7)${blue}"
rm -rf external/chromium-webview/prebuilt/*
rm -rf .repo/projects/external/chromium-webview/prebuilt/*.git
rm -rf .repo/project-objects/LineageOS/android_external_chromium-webview_prebuilt_*.git
#Change some things (Might or might not work!)
rm -rf external/chromium-webview
git clone https://github.com/LineageOS/android_external_chromium-webview.git external/chromium-webview
echo -e "${color}Finished sync!${end}"