Open soulspark666 opened 1 year ago
Hmm.. That project seems to be a project specifically designed to debloat non-rooted company-specific android builds; whereas this magisk module was designed for rooted vanilla android builds (meaning the raw open source android builds provided by Android Open Source Project | or slightly modified custom roms like crDroid, etc.).
These vanilla android builds don't usually come with a lot of bloatware to begin with (unlike, i.e., company-specific android builds like MIUI, or One UI, etc.). Still, if you say that i want to install this module on my existing rooted company-specific android device, it would be a hard job for me to provide support for every company-specific android build. Am i wrong?
But, still, i guess there is room for improvement considering that some custom roms also come with a lot of bloatware (i.e. the Pixel Experience rom; so i guess we could extend the existing bloatware list).
Still, since i don't know much about your specific case, i might need help compiling the list (and might also need your help in testing the new script to see if it actually works as expected).
Or, maybe you should consider installing a much cleaner custom rom instead (i.e., crDroid, ArrowOS, etc.)?
:)
Closing this (as we can open up later on if we need to)
@omergoktas sorry for the delayed response, I was trying this on a Custom ROM (in my case Elixir), as you pointed out mods such as foundation
are difficult to be made compatible with stock ROM, I don't intend you to put to extra effort. I will be willing to test if you are looking for experimentation. In the meanwhile, I did modify your script to some extent, and hope you may understand what I meant to ask.
OVERLAY="
/system/app/EasterEgg
/system/app/Stk
/system/product/app/Jelly
/system/product/app/LatinIME
/system/product/app/messaging
/system/product/app/webview
/system/product/etc/permissions/privapp-permissions-hotword.xml
/system/product/etc/sysconfig/com.android.messaging_whitelist.xml
/system/product/etc/sysconfig/google-hiddenapi-package-whitelist.xml
/system/product/etc/sysconfig/google.xml
/system/product/etc/sysconfig/nexus.xml
/system/product/etc/sysconfig/pixel_2016_exclusive.xml
/system/product/lib64/libjni_latinime.so
/system/product/overlay/LatinIME__auto_generated_rro_product.apk
/system/product/priv-app/HotwordEnrollmentOKGoogleHEXAGON
/system/product/priv-app/HotwordEnrollmentXGoogleHEXAGON
/system/system_ext/etc/permissions/com.android.hotwordenrollment.common.util.xml
/system/system_ext/framework/com.android.hotwordenrollment.common.util.jar
/system/system_ext/framework/oat/arm/com.android.hotwordenrollment.common.util.odex
/system/system_ext/framework/oat/arm/com.android.hotwordenrollment.common.util.vdex
/system/system_ext/framework/oat/arm64/com.android.hotwordenrollment.common.util.odex
/system/system_ext/framework/oat/arm64/com.android.hotwordenrollment.common.util.vdex
"
UNINSTALL="
com.android.egg
com.android.hotwordenrollment.okgoogle
com.android.hotwordenrollment.xgoogle
com.android.inputmethod.latin
com.google.android.apps.messaging
com.android.chrome
com.android.dreams.phototable
com.android.bluetoothmidiservice
com.android.messaging
com.android.systemui.plugin.globalactions.wallet
com.android.stk
com.google.android.apps.safetyhub
com.android.webview
com.google.android.webview
com.google.android.gms.location.history
com.coloros.gallery3d
com.google.android.overlay.googlewebview
com.google.ar.core
com.google.android.tag
com.google.android.googlequicksearchbox
com.google.android.marvin.talkback
com.google.android.soundpicker
com.google.android.onetimeinitializer
com.google.android.projection.gearhead
com.google.android.pixel.setupwizard
com.google.android.partnersetup
com.google.android.pixel.setupwizard
com.google.android.printservice.recommendation
com.google.audio.hearing.visualization.accessibility.scribe
org.lineageos.jelly
com.oneplus.filemanager
"
function overlay {
for f in "$@"; do
FULLPATH="$MODPATH$f"
if [[ -d $f ]]; then
mkdir -p $FULLPATH
touch $FULLPATH/.replace
elif [[ -f $f ]]; then
mkdir -p $(dirname $FULLPATH)
touch $FULLPATH
elif [[ -d $FULLPATH ]]; then
touch $FULLPATH/.placeholder
fi
ui_print " Overlaid: $(basename $f)"
sleep 0.1
done
}
function uninstall {
for p in "$@"; do
pm uninstall --user 0 $p &>/dev/null
ui_print " Removed: $p"
sleep 0.1
done
}
# Since I was not interested, and have alternative that I am more accustomed too
# function install {
# for d in $MODPATH/system/app/*/ $MODPATH/system/priv-app/*/ ; do
# pm install -g --user 0 "$d/$(basename $d).apk" &>/dev/null
# ui_print " Installed: $(basename $d).apk"
# sleep 0.1
# done
# }
function clean {
rm -rf /data/resource-cache/*
rm -rf /data/dalvik-cache/*
rm -rf /data/system/package_cache/*
rm -rf /cache/dalvik-cache/*
rm -rf /cache/*
}
function setup {
settings put global development_settings_enabled 1
settings put global adb_enabled 1
settings put global stay_on_while_plugged_in 2
settings put global mobile_data_always_on 0
settings put global wifi_scan_always_enabled 0
settings put global ble_scan_always_enabled 0
settings put global adaptive_battery_management_enabled 0
settings put global captive_portal_detection_enabled 0
settings put global art_verifier_verify_debuggable 0
settings put global verifier_verify_adb_installs 0
settings put global power_sounds_enabled 1
settings put system accelerometer_rotation 0
settings put system dtmf_tone 0
settings put system haptic_feedback_enabled 0
settings put system lockscreen_sounds_enabled 1
settings put system notification_light_pulse 1
settings put system screen_brightness_mode 0
settings put system screen_off_timeout 120000
settings put system sound_effects_enabled 0
settings put system vibrate_when_ringing 1
settings put secure double_tap_to_wake 1
settings put secure wake_gesture_enabled 0
settings put secure notification_badging 1
settings put secure enabled_accessibility_services net.blumia.pineapple.lockscreen.oss/net.blumia.pineapple.accessibility.A11yService
settings put secure enabled_input_methods rkr.simplekeyboard.inputmethod/.latin.LatinIME
settings put secure default_input_method rkr.simplekeyboard.inputmethod/.latin.LatinIME
}
function main {
if $BOOTMODE; then
ui_print "- Uninstalling bloatware..."
uninstall $UNINSTALL
ui_print "- Overlaying artifacts..."
overlay $OVERLAY
ui_print "- Cleaning the cache..."
clean
# ui_print "- Installing replacements..."
# install
ui_print "- Setting up..."
setup
ui_print "- Done!"
ui_print "- Rebooting in 5 secs..."
sleep 5
reboot
else
abort "- Error: Installation through Magisk Manager is required."
fi
}
main
Also attaching the new file structure:
Hmm... Some of those could make ROMs unusable, i.e., see these:
com.google.android.soundpicker
com.google.android.onetimeinitializer
com.google.android.pixel.setupwizard
Your rom might not show you a setup wizard after initial setup if you remove com.google.android.pixel.setupwizard
; or you may not be able to pick a custom ringtone if you remove com.google.android.soundpicker
...
Why? Because if your rom has specifically picked Google's own versions of those packages (i.e., if your rom picked Google's own version of com.google.android.onetimeinitializer
package (the version that is used by Pixel phones) for initializing your phone for the first time after you purchased it -this package lets you set up your phone like selecting language, setting up your google account when you boot it for the first time- instead of vanilla Android's com.android.onetimeinitializer
package) then it is likely that the vanilla Android version of the same package is already removed in favor of Google's own version. Therefore, if we remove the only package that lets you set up the phone after the first boot (meaning, Google's version), then the ROM might not even work properly. So, I'm not in favor of removing anything other than the packages that my module already provides alternatives to. Hence, for example, we can remove com.android.chrome
, because my module already provides Bromite as an alternative browser.
Other than that, I think the rest is just "tastes differ" (i.e., why remove com.google.ar.core
? Maybe somone wants to use it (because if you remove it, the Google Map's compass (direction needle) stops working properly)).
So, I'll add chrome (and maybe a few others) to the bloatware list, but I think most of them should not be added.
Thanks for the effort, though!
Yes, I agree removing:
com.google.android.onetimeinitializer
com.google.android.pixel.setupwizard
these will cause issues that are pointed out by you, and I am aware of those things, but since this module will be flashed after the first boot the first-time flow to the home screen will work as it is, as for when I flash the module, I had no such issues of adding my google account to microG and was also able to proceed with google login in play store and some other apps, though there were issues in some, I think that is mostly due to microG not supporting the login process for that app, as per this:
As for com.google.android.soundpicker
the documentation provided this
Google Sounds. Removable if you already have another media select service.
Which does crash the sound picker and can be skipped.
As for com.google.ar.core
I read through the documentation while debloating and it said this:
"Google Play Services for AR (Augmented Reality)
Note: Disabling it can mess with apps that use it, like Pokemon GO.
https://beta.pithus.org/report/99ea324529f950fe351d22724f8b894cce19c16607fcc9c2855bc906b1f8e644"
And it was in the recommended state, so I did proceed with it and was not aware it may affect the google maps functioning, which I think if you are aware of I can create an issue in that repo.
Would it be possible to use https://github.com/0x192/universal-android-debloater for a comprehensive list of android bloat to have a better experience.