Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
PizzaG committed Dec 22, 2023
1 parent b4df527 commit 0f6239b
Showing 1 changed file with 21 additions and 74 deletions.
95 changes: 21 additions & 74 deletions Moto-Common-Setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,30 +65,26 @@ if [ -f vendor/$ROM_BUILD_NAME/tools/changelog ]; then
# Copy Changelog Template Files
echo "Copying Device Specific Changelog Templates..."
echo ""
echo "1/6..."
echo "1/5..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/Changelog/Changelog.txt.Amogus Changelog.txt.Amogus
sleep 5
echo "2/6..."
echo "2/5..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/Changelog/Changelog.txt.Borneo Changelog.txt.Borneo
sleep 5
echo "3/6..."
echo "3/5..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/Changelog/Changelog.txt.Guamna Changelog.txt.Guamna
sleep 5
echo "4/6..."
echo "4/5..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/Changelog/Changelog.txt.Milanf Changelog.txt.Milanf
sleep 5
echo "5/6..."
echo "5/5..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/Changelog/Changelog.txt.Osaka Changelog.txt.Osaka
sleep 5
echo "6/6..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/Changelog/Changelog.txt.Rhodep Changelog.txt.Rhodep
sleep 5
elif [ -f vendor/$ROM_BUILD_NAME/tools/changelog.sh ]; then
echo "Rom changelog.sh Found, Hijacking For Custom Changelog Ability..."
echo ""
Expand All @@ -109,30 +105,26 @@ elif [ -f vendor/$ROM_BUILD_NAME/tools/changelog.sh ]; then
# Copy Changelog Template Files
echo "Copying Device Specific Changelog Templates..."
echo ""
echo "1/6..."
echo "1/5..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/Changelog/Changelog.txt.Amogus Changelog.txt.Amogus
sleep 5
echo "2/6..."
echo "2/5..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/Changelog/Changelog.txt.Borneo Changelog.txt.Borneo
sleep 5
echo "3/6..."
echo "3/5..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/Changelog/Changelog.txt.Guamna Changelog.txt.Guamna
sleep 5
echo "4/6..."
echo "4/5..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/Changelog/Changelog.txt.Milanf Changelog.txt.Milanf
sleep 5
echo "5/6..."
echo "5/5..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/Changelog/Changelog.txt.Osaka Changelog.txt.Osaka
sleep 5
echo "6/6..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/Changelog/Changelog.txt.Rhodep Changelog.txt.Rhodep
sleep 5
elif [ -f vendor/$ROM_BUILD_NAME/build/tools/changelog.sh ]; then
echo "Rom changelog.sh Found, Hijacking For Custom Changelog Ability..."
echo ""
Expand All @@ -153,30 +145,26 @@ elif [ -f vendor/$ROM_BUILD_NAME/build/tools/changelog.sh ]; then
# Copy Changelog Template Files
echo "Copying Device Specific Changelog Templates..."
echo ""
echo "1/6..."
echo "1/5..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/Changelog/Changelog.txt.Amogus Changelog.txt.Amogus
sleep 5
echo "2/6..."
echo "2/5..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/Changelog/Changelog.txt.Borneo Changelog.txt.Borneo
sleep 5
echo "3/6..."
echo "3/5..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/Changelog/Changelog.txt.Guamna Changelog.txt.Guamna
sleep 5
echo "4/6..."
echo "4/5..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/Changelog/Changelog.txt.Milanf Changelog.txt.Milanf
sleep 5
echo "5/6..."
echo "5/5..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/Changelog/Changelog.txt.Osaka Changelog.txt.Osaka
sleep 5
echo "6/6..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/Changelog/Changelog.txt.Rhodep Changelog.txt.Rhodep
sleep 5
fi

# General Moto-Common Setup
Expand Down Expand Up @@ -213,31 +201,27 @@ sed -i '/# Custom APN Mechanism/ a ifeq ($(CUSTOM_APN), true)\nDEFAULT_APNS_FILE
sleep 5
echo "Copying & Setting Up Modified Common Device Tree Files..."
echo ""
echo "1/7..."
echo "1/6..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/device/motorola/sm4250-common device/motorola
sleep 5
echo "2/7..."
echo "2/6..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/device/motorola/sm4350-common device/motorola
sleep 5
echo "3/7..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/device/motorola/sm6150-common device/motorola
sleep 5
echo "4/7..."
echo "3/6..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/device/motorola/targets/include/kernel/source.mk device/motorola/targets/include/kernel
sleep 5
echo "5/7..."
echo "4/6..."
echo ""
rm -rf device/motorola/targets/scripts
sleep 5
echo "6/7..."
echo "5/6..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/device/motorola/targets/scripts device/motorola/targets
sleep 5
echo "7/7..."
echo "6/6..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/device/motorola/targets/Update_Rom_Symlinks.sh device/motorola/targets
sleep 5
Expand Down Expand Up @@ -511,43 +495,6 @@ cp -r $A_TEAM_PACKAGE_LOCATION/kernel/motorola/msm-5.4/arch/arm64/configs/vendor
sleep 5


# Rhodep Setup
##########################################################################################################

# Move Files To Location
echo "Copying Rhodep Files Into Device Tree..."
echo ""
echo "1/1..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/device/motorola/rhodep/rro_overlays device/motorola/rhodep
sleep 5

# Patch device.mk
echo "Patching Rhodep device.mk In Device Tree..."
echo ""
echo "1/2..."
echo ""
sed -i 's/PRODUCT_MODEL := moto g(82)/PRODUCT_MODEL := Moto G82 5G/g' device/motorola/rhodep/device.mk
sleep 5
echo "2/2..."
echo ""
sed -i '/DEVICE_CHARACTERISTICS += hfr/ a\\ \n# Disable Adaptive Brightness\nPRODUCT_PACKAGES += rhodepSettingsProviderOverlay' device/motorola/rhodep/device.mk
sleep 5

# Backup & Copy rhodep_defconfig File
echo "Backing Up Original rhodep_defconfig In Device Tree..."
echo ""
echo "1/1..."
echo ""
mv kernel/motorola/msm-5.4/arch/arm64/configs/vendor/rhodep_defconfig kernel/motorola/msm-5.4/arch/arm64/configs/vendor/rhodep_defconfig.bak >/dev/null 2>&1
sleep 5
echo "Copying Modified rhodep_defconfig Into Device Tree..."
echo ""
echo "1/1..."
echo ""
cp -r $A_TEAM_PACKAGE_LOCATION/kernel/motorola/msm-5.4/arch/arm64/configs/vendor/rhodep_defconfig kernel/motorola/msm-5.4/arch/arm64/configs/vendor
sleep 5


##########################################################################################################
echo ""
Expand Down

0 comments on commit 0f6239b

Please sign in to comment.