[OnePlus 7 Pro ROMs, Kernels, Recoveries, & Other D] Tomatot-:
Hello guys,

Introduction

I'm the proud owner of a OnePlus 6. For many reasons, I don't plan to switch to one of its successor in the near future.

My debloater is quite popular and appreciated by the OP6 community and so I've decided to adapt it to make it fully compatible with the 7.

There are two things you need to know:

-Since I don't have the device, I can't try new stuff myself. Therefore, expect limited support for me.

-Overall, apps on the OP7 are almost the same. There are only a few new apps (and a few apps don't exist anymore)

-Regarding custom ROMs, you can always check my scripts available on the OP6 thread: (	https://xdaforums.com/oneplus-6/development/tool-tomatot-debloater-basic-script-to-t3869427/ )

Note: the rest of this post is just a copy/paste from the original thread.

What can you expect from flashing my script?

I think my script is interesting because its utility is completely complementary with a custom ROM or kernel: what it does has nothing to do with the kernel, so it doesn't interfere at all. And it's concrete stuff, not some supposed-to-be optimization where you're not even sure it's going to do something. I'm usually not a huge fan of these apps / modules.

-You'll get more privacy: I've removed Qualcomm telemetry, OnePlus telemetry as well as some Google Telemetry (but you can't expect too much as long as you use gapps)

-You'll get better battery life: less apps running in the background, less wakelocks, less services communicating with servers to send telemetry.

-You'll get better performance: for the same reasons. Don't expect a huge difference as our phone is very smooth already.

-The feeling of having a clean device. And this has no price. :cool:

As a proof, see this (both screenshots were taken after a fresh boot):

Extreme script: https://i.imgur.com/2O47su8.jpg 1

9 system apps running, for a total of of 31 services running

. I'm not counting Google Play services as the number of services running keep changing.

No script: https://i.imgur.com/E5cEr7P.jpg

36 apps running, for a total of 60 services running!

I find the difference quite huge.

What does it do?

The point is to be very very basic. Obviously I don't intend to to share something as powerful and exhaustive as xXx. My objective is to only focus on bloatwares, not features.

Also, I wanted to make a script simple enough so anybody can use it,

understand it

and modify it depending on your needs.

I think I can call myself a flasholoic, as I flash ROMs quite often, even when I'm happy with the current one. There are many time consuming and boring tasks when it comes to clean flash a new ROM. However, for most of them, there's a solution. For example, Titanium Backup, to mention just one.

With this script, you'll be able to skip the very boring process of removing/freezing all the system apps you don't use.

You can use this script with no worries whenever you flash your new ROM.

Why don't i Freeze apps instead of removing them?

Ideally, I would prefer to only freeze apps so the setup can stick after an update or a dirty flash, however, I don't know how to do it from recovery. Freezing works with the command from package manager "pm disable {package_name}", however, it's only available when the phone is running.

What version should I install?

-Invisible script: Install it, enjoy. I basically removed only apps related to telemetry or that don't have any function. You should still have all the apps you're using and all the features you like.

-Light Script: Invisible + apps that I consider rarely use (because they're useless or because alternatives are much popular). It should fit to 80% people without any change to make.

-Extreme script: Invisible + light + a few Google Apps (most of them can be reinstalled) and features that are not absolutely necessary but useful for some people, like face unlock for example. I wouldn't recommend it to anyone who hasn't check the .txt file first. The light script is almost as good anyway.

Where can I get more info?

Check the .txt file in the download section. It lists all the apps included in the different scripts AND all the apps not included (so you can see what apps you want to potentially add, it's much easier to work like that)

How are the apps sorted in the .txt file?

-First, by categories (each category starting with #) (invisible, light, extreme, etc.)

-Then, they're sorted by their type (reserve / app / priv-app / other)

-Then, simply by alphabetic order.

-At the end of the document file, there are some explanations about some apps that can sound... mysterious about whether it's safe or not to delete them.

How to Install?

Simply reboot to TWRP, flash the zip, reboot and enjoy.

If this doesn't work, you can try three different things:

-Try to mount system in recovery before flashing my .zip.

-Try to install Magisk and this module: https://github.com/Magisk-Modules-Repo/busybox-ndk

-Try to install the script on both slots

At least one of these options should fix things for you.

Known incompatibilities

-If the script doesn't do anything, check installing instructions.

-If an app keeps force closing when you try to open it (for example the Google app, gmail, amazon, etc.), it's because you don't have any webview selected. You can select one in the developer settings and if you don't have any you can install one from the play store (Android System Webview).

-If some apps are remaining, it's because it's system apps you updated and they became user apps. You can just uninstall them like any other user apps and it will completely disappear.

-If an app that is included in the script freezes, but it's also available in the playstore, uninstall it with Titanium Backup, reboot and reinstall the app from play store.

-If you're using substratum, you must edit my script and remove this line: "/system/system/app/OpSkin",

-If your bank app doesn't work, you can try to add back Stk (sim toolkit), as the app helps for authentication.

-In general, search this thread if you want more details / understand why.

F.A.Q.

-I don't want to use this debloater anymore or it broke something I miss, how can I go back to normal?

=> Dirty flash your current setup (ROM, twrp, reboot to twrp, magisk, kernel, anything else you want)

-Does this script work for X or Y ROM? Can you make a debloater for X or Y ROM?

=> If you understand how my tool work, then you will understand that my scripts can potentially work on any ROMs, but each ROM has its specific apps so some bloatware won't be removed, most likely. I won't support any new ROM except if I end up trying it myself. I prefer to avoid to create new scripts blindly especially if I've never experienced the ROM.

-I flashed your deblaoter and now some apps keep force closing

=> "If an app keeps force closing when you try to open it (for example the Google app, gmail, amazon, etc.), it's because you don't have any webview selected. You can select one in the developer settings and if you don't have any you can install one from the play store (Android System Webview)."

How to edit the script and make it work? (TUTORIAL)

Prerequisites

-Root (ideal but not mandatory)

-File manager (ideal but not mandatory, I recommend Amaze https://play.google.com/store/apps/details?id=com.amaze.filemanager&hl=en_AU )

-TWRP

Then you have two alternatives

a) Use your computer (Windows): you will need Zip Builder https://xdaforums.com/android/software-hacking/tool-zip-builder-v4-2-1-build-sign-t3739556

b) Use your phone: then you will need MiXplorer ( https://xdaforums.com/showthread.php?t=1523691 )

Steps to follow

1) Download my script.

2) Unzip it. Browse to META-INFcomgoogleandroid and open "updater-script" in a notepad. (I'd recommend you notepad++ ( https://notepad-plus-plus.org/download/ )

3) Add some apps you want to delete, or remove the apps you want to keep. To see what apps are on your device, use a file manager that can use root and check the apps you have in /system/app and system/priv-app. The priv-app are usually more sensitive so be cautious with them.

4) Don't forget that on every line, you need a comma at the end, except for the last app of the list.

5) You don't need to touch any other lines, except if you want to have fun and change what TWRP will display: it's the lines with

ui_print("")

6) Save your file.

7) a) Windows alternative. Follow instructions to install properly Zip Builder. Then shift + right click on the parent folder of the META-INF folder and click on "Build Zip...". If Zip Builder is set up properly, you will see the option I just mentioned. You can also open the program and browse to the parent folder where META-INF is.

Copy the .zip to your phone and you're good to go! :)

7) b) Android alternative: Install MiXplorer. Long press on the META-INF folder. Confirm the creation of the archive, pick the name you want and make sure that "store" is selected, below "zip". Then select the newly created zip, and click on the "Sign" option. Choose Testkey. It will create yourzip-signed.zip. That's the file you need to flash in TWRP. :)

8) Flash in TWRP

Let me know if you need any help or if something is not clear to you.

Downloads, risks, credits

Where to download?

Check the attachments!

What are the risks, or why is it actually pretty safe to use it?

1) If you use my scripts, as I've tried all builds, I can assure you in the worst scenario you will loose a few features you might have wanted to keep.

2) If you try to make your own script:

a) You misspell a system folder: (it's case sensitive, careful): well the script will just ignore it and try to remove a folder which doesn't exist, so no consequence at all, just a useless line in your script.

b) you mess up with how you're meant to write the script: for example, you forget a comma or you leave it on the line of the last app you want to delete. Well, no worries, TWRP will just not flash the script so nothing happens. Just check your code to find the mistake.

c) Your script is fine but delete a core app that the system needs. Again, no worries! You will bootloop. In this case, you need to dirty flash your current setup (for example, flash OOS, flash TWRP, reboot to recovery, flash Magisk, flash your favorite kernel, reboot). Then you can try to find the culprit in your code, remove it, and try again your script. :)

Just in case, you know the XDA saying: "flash at your own risk!"

Credits!

First of all, I'd like to credit [MENTION=4958579]Primokorn[/MENTION] for his tutorial which helped me a lot. Basically everything in my script I owe him. I've just made it even more simple and focused on only debloating. Also, and obviously, it's adapted for our OnePlus 6. Right now, it's optimized for OOS 9.0.3, but depending on how the project evolves and how popular it will get, I could make "special editions" for open betas as well as AOSP ROMs.

I would also like to thank [MENTION=2777334]TKruzze[/MENTION] for his amazing tool "Zip Builder", which makes me save a lot of time everytime I want to try / build a new script. :)

Thanks to [MENTION=8937081]Zios01[/MENTION] for inspiring me about "optimizing" OOS.

Thanks to [MENTION=1030560]xXx[/MENTION] for always being available to help me.

XDA:DevDB Information

Tomatot Debloater, Tool/Utility for the OnePlus 7 Pro

Contributors

Tomatot-

Version Information

Status: Stable

Created 2019-05-28

Last Updated 2019-07-17