Skip to content

Commit

Permalink
Merge pull request #2 from massimo-rnd/manufacturer-specific-debloats
Browse files Browse the repository at this point in the history
Manufacturer specific debloats
  • Loading branch information
massimo-rnd authored Jan 18, 2025
2 parents bce0dd0 + 87fd88a commit 0f59d8a
Show file tree
Hide file tree
Showing 23 changed files with 1,733 additions and 130 deletions.
52 changes: 39 additions & 13 deletions .idea/.idea.AndroidDebloater/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 68 additions & 6 deletions AndroidDebloater.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
<RuntimeIdentifiers>osx-x64</RuntimeIdentifiers>
<PackageIcon>test-icon.ico</PackageIcon>
<Version>1.1.0</Version>
<Authors>Massimo</Authors>
<AssemblyVersion>1.1</AssemblyVersion>
<FileVersion>1.1</FileVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -41,9 +45,6 @@
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Components\Scripts\bash\full.sh">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="Components\Scripts\bash\google.sh">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
Expand All @@ -53,9 +54,6 @@
<EmbeddedResource Include="Components\Scripts\bash\thirdparty.sh">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="Components\Scripts\windows\full.bat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="Components\Scripts\windows\google.bat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
Expand Down Expand Up @@ -85,6 +83,70 @@
<EmbeddedResource Include="Components\adb\windows\AdbWinUsbApi.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<None Remove="Components\Scripts\bash\googlem.sh" />
<EmbeddedResource Include="Components\Scripts\bash\googlem.sh">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<None Remove="Components\Scripts\windows\googlem.bat" />
<EmbeddedResource Include="Components\Scripts\windows\googlem.bat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<None Remove="Components\Scripts\windows\huawei.bat" />
<EmbeddedResource Include="Components\Scripts\windows\huawei.bat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<None Remove="Components\Scripts\bash\huawei.sh" />
<EmbeddedResource Include="Components\Scripts\bash\huawei.sh">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<None Remove="Components\Scripts\bash\oneplus.sh" />
<EmbeddedResource Include="Components\Scripts\bash\oneplus.sh">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<None Remove="Components\Scripts\windows\oneplus.bat" />
<EmbeddedResource Include="Components\Scripts\windows\oneplus.bat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<None Remove="Components\Scripts\bash\oppo.sh" />
<EmbeddedResource Include="Components\Scripts\bash\oppo.sh">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<None Remove="Components\Scripts\windows\oppo.bat" />
<EmbeddedResource Include="Components\Scripts\windows\oppo.bat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<None Remove="Components\Scripts\bash\realme.sh" />
<EmbeddedResource Include="Components\Scripts\bash\realme.sh">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<None Remove="Components\Scripts\bash\samsung.sh" />
<EmbeddedResource Include="Components\Scripts\bash\samsung.sh">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<None Remove="Components\Scripts\windows\realme.bat" />
<EmbeddedResource Include="Components\Scripts\windows\realme.bat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<None Remove="Components\Scripts\windows\samsung.bat" />
<EmbeddedResource Include="Components\Scripts\windows\samsung.bat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<None Remove="Components\Scripts\windows\vivo.bat" />
<EmbeddedResource Include="Components\Scripts\windows\vivo.bat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<None Remove="Components\Scripts\bash\vivo.sh" />
<EmbeddedResource Include="Components\Scripts\bash\vivo.sh">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<None Remove="Components\Scripts\bash\xiaomi.sh" />
<EmbeddedResource Include="Components\Scripts\bash\xiaomi.sh">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<None Remove="Components\Scripts\windows\xiaomi.bat" />
<EmbeddedResource Include="Components\Scripts\windows\xiaomi.bat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
Expand Down
82 changes: 0 additions & 82 deletions Components/Scripts/bash/full.sh

This file was deleted.

57 changes: 57 additions & 0 deletions Components/Scripts/bash/googlem.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/bin/bash

ADB_EXECUTABLE="$1"

# Check if adb path was provided
if [ -z "$ADB_EXECUTABLE" ]; then
echo "Error: ADB executable path not provided."
exit 1
fi

# Declare the package array
declare -a arr=(
"com.android.hotwordenrollment.okgoogle"
"com.google.android.apps.googleassistant"
"com.google.android.apps.magazines"
"com.google.android.inputmethod.latin"
"com.google.android.inputmethod.pinyin"
"com.google.android.inputmethod.japanese"
"com.google.android.inputmethod.korean"
"com.google.android.apps.docs"
"com.google.android.apps.photos"
"com.google.android.apps.tachyon"
"com.google.android.apps.translate"
"com.google.android.apps.youtube"
"com.google.android.apps.books"
"com.google.android.feedback"
"com.google.android.apps.magazines"
"com.google.android.apps.maps"
"com.google.android.projection.gearhead"
"com.google.android.apps.messaging"
"com.google.android.apps.walletnfcrel"
"com.google.android.apps.wallet"
"com.google.android.apps.youtube.music"
"com.google.android.apps.nbu.paisa.user"
"com.google.android.googlequicksearchbox"
"com.google.android.printservice.recommendation"
"com.google.android.apps.subscriptions.red"
"com.google.android.apps.podcasts"
"com.google.android.music"
"com.google.ar.lens"
"com.google.android.apps.wellbeing"
)

# Command to remove the package
rm_pkg="shell pm uninstall --user 0"

# Loop through the packages and uninstall them
for i in "${arr[@]}"
do
echo "Uninstalling $i..."
"$ADB_EXECUTABLE" $rm_pkg "$i"
if [ $? -ne 0 ]; then
echo "Failed to uninstall $i"
else
echo "Successfully uninstalled $i"
fi
done
Loading

0 comments on commit 0f59d8a

Please sign in to comment.