Weekly cleanout Redmi Note 8 Gingko


mankokoma

Members
Aug 5, 2019
145
55
Our old device smooth with debloating. Cleaning things up - better to put it here. Shame and blame on me. Had it in the weekly section...

So the slow under-ram-ed mobile is running really fine with the new swap-idea (Memory Extension)!

Some mentioned Gallery in the recent weeklies. It's laggy and battery draining on my device so one of the first things I backup and delete by script along many other apps. it's replaced with the orange one from simplemobiletoolsDOTcom which does an excellent job.
The miui scanner app never worked on mine and several other annoying things, like using nextcloud, so I don't need the miui "notes" app on my phone. Prefer K9Mail etc. etc.

I have to stress out it's NOT to blame the wonderful work of the Devs here, alright?!

As my phone is kept unrooted I have to do changes in TWRP.
Gonna share my easy script here as an

IDEA! DO NOT USE IT AS IS!

E.g. take care with Mms app as you gonna need it, when you wanna replace it with "signal" to receive a confirmation SMS :-/ - once I had to facepalm myself, haha.
In the system folder in "afterinst" on the sdcard1 are beside busybox fresh /system/etc/hosts several ringtones and so on.
After usual dirty flashing
I just execute it in the TWRP Terminal with "sh /sdcard1/scriptnamewhatever.sh" and it never let me down, yet.

Once again, take it as inspiration, nothing else please! I'm not responsible, when your device reaches critical mass and causes a thermonuclear disaster!
Code:
#!/bin/sh
# (adb shell )cmd package bg-dexopt-job
cp /sdcard1/afterinst/system/bin/busybox /sbin/
chmod 755 /sbin/busybox
mount /dev/block/mmcblk0p86
mount /dev/block/mmcblk0p87
cp -a /sdcard1/afterinst/system/* /system/
rm /data/data/org.fdroid.fdroid/files/*.apk
rm -rf /data/system/package_cache
tar -cvf /sdcard1/sdcardbak/Email.tar /system/app/Email
rm -rf /system/app/Email
tar -cvf /sdcard1/sdcardbak/Health.tar /system/app/Health
rm -rf /system/app/Health
tar -cvf /sdcard1/sdcardbak/Lens.tar /system/app/Lens
rm -rf /system/app/Lens
tar -cvf /sdcard1/sdcardbak/LiveWallpapersPicker.tar /system/app/LiveWallpapersPicker
rm -rf /system/app/LiveWallpapersPicker
tar -cvf /sdcard1/sdcardbak/Notes.tar /system/app/Notes
rm -rf /system/app/Notes
tar -cvf /sdcard1/sdcardbak/MiPlayClient.tar /system/app/MiPlayClient
rm -rf /system/app/MiPlayClient
tar -cvf /sdcard1/sdcardbak/NextPay.tar /system/app/NextPay
rm -rf /system/app/NextPay
tar -cvf /sdcard1/sdcardbak/PaymentService.tar /system/app/PaymentService
rm -rf /system/app/PaymentService
tar -cvf /sdcard1/sdcardbak/Calendar.tar /system/priv-app/Calendar
rm -rf /system/priv-app/Calendar
tar -cvf /sdcard1/sdcardbak/MiBrowserGlobal.tar /system/priv-app/MiBrowserGlobal
rm -rf /system/priv-app/MiBrowserGlobal
tar -cvf /sdcard1/sdcardbak/MiuiGallery.tar /system/priv-app/MiuiGallery
rm -rf /system/priv-app/MiuiGallery
tar -cvf /sdcard1/sdcardbak/MiuiScanner.tar /system/priv-app/MiuiScanner
rm -rf /system/priv-app/MiuiScanner
tar -cvf /sdcard1/sdcardbak/Mms.tar /system/priv-app/Mms
###rm -rf /system/priv-app/Mms
tar -cvf /sdcard1/sdcardbak/Music.tar /system/priv-app/Music
rm -rf /system/priv-app/Music
tar -cvf /sdcard1/sdcardbak/QuickSearchBox.tar /system/priv-app/QuickSearchBox
rm -rf /system/priv-app/QuickSearchBox
rm -rf /data/system/package_cache
rm /system/media/bootanimation.zip
 
  • Like
Reactions: dexterv

mankokoma

Members
Aug 5, 2019
145
55
While preparing for the EOL of redmi note 8 I tried something and added these lines to my script which results in an extraordinary increase of battery life...

Bash:
tar -cvf /sdcard1/sdcardbak/AndroidAutoStub.tar /system_root/system/product/priv-app/AndroidAutoStub
rm -rf /system_root/system/product/priv-app/AndroidAutoStub
tar -cvf /sdcard1/sdcardbak/MiGalleryLockscreen.tar /system_root/system/app/MiGalleryLockscreen
rm -rf /system_root/system/app/MiGalleryLockscreen
tar -cvf /sdcard1/sdcardbak/BookmarkProvider.tar /system_root/system/app/BookmarkProvider
rm -rf /system_root/system/app/BookmarkProvider
tar -cvf /sdcard1/sdcardbak/MiuiContentCatcher.tar /system_root/system/app/MiuiContentCatcher
rm -rf /system_root/system/app/MiuiContentCatcher
tar -cvf /sdcard1/sdcardbak/MiDrive.tar /system_root/system/app/MiDrive
rm -rf /system_root/system/app/MiDrive
tar -cvf /sdcard1/sdcardbak/MiuiBugReport.tar /system_root/system/app/MiuiBugReport
rm -rf /system_root/system/app/MiuiBugReport
tar -cvf /sdcard1/sdcardbak/MiuiCompass.tar /system_root/system/app/MiuiCompass
rm -rf /system_root/system/app/MiuiCompass
tar -cvf /sdcard1/sdcardbak/FileExplorer.tar /system_root/system/app/FileExplorer
rm -rf /system_root/system/app/FileExplorer
tar -cvf /sdcard1/sdcardbak/GoogleFeedback.tar /system_root/system/system_ext/priv-app/GoogleFeedback
rm -rf /system_root/system/system_ext/priv-app/GoogleFeedback
tar -cvf /sdcard1/sdcardbak/GoogleOneTimeInitializer.tar /system_root/system/system_ext/priv-app/GoogleOneTimeInitializer
rm -rf /system_root/system/system_ext/priv-app/GoogleOneTimeInitializer
tar -cvf /sdcard1/sdcardbak/FM.tar /system_root/system/system_ext/app/FM
rm -rf /system_root/system/system_ext/app/FM
tar -cvf /sdcard1/sdcardbak/GoogleRestore.tar /system_root/system/product/priv-app/GoogleRestore
rm -rf /system_root/system/product/priv-app/GoogleRestore
tar -cvf /sdcard1/sdcardbak/SoundPickerGoogle.tar /system_root/system/product/app/SoundPickerGoogle
rm -rf /system_root/system/product/app/SoundPickerGoogle
tar -cvf /sdcard1/sdcardbak/Joyose.tar /system_root/system/app/Joyose
rm -rf /system_root/system/app/Joyose
tar -cvf /sdcard1/sdcardbak/MiuiVideoGlobal.tar /system_root/system/app/MiuiVideoGlobal
rm -rf /system_root/system/app/MiuiVideoGlobal
tar -cvf /sdcard1/sdcardbak/MiLinkService.tar /system_root/system/app/MiLinkService
rm -rf /system_root/system/app/MiLinkService
tar -cvf /sdcard1/sdcardbak/CloudService.tar /system_root/system/app/CloudService
rm -rf /system_root/system/app/CloudService
tar -cvf /sdcard1/sdcardbak/MiCloudSync.tar /system_root/system/app/MiCloudSync
tar -cvf /sdcard1/sdcardbak/GoogleContactsSyncAdapter.tar /system_root/system/product/app/GoogleContactsSyncAdapter
rm -rf /system_root/system/product/app/GoogleContactsSyncAdapter
tar -cvf /sdcard1/sdcardbak/GoogleCalendarSyncAdapter.tar /system_root/system/product/app/GoogleCalendarSyncAdapter
rm -rf /system_root/system/product/app/GoogleSyncAdapter
rm -rf /system_root/system/app/MiCloudSync
tar -cvf /sdcard1/sdcardbak/CloudBackup.tar /system_root/system/priv-app/CloudBackup
rm -rf /system_root/system/priv-app/CloudBackup
tar -cvf /sdcard1/sdcardbak/CloudServiceSysbase.tar /system_root/system/priv-app/CloudServiceSysbase
rm -rf /system_root/system/priv-app/CloudServiceSysbase