 In a previous video I showed you how to reinstall the stock firmware on a phone, in this case in particular a Motorola G-Stylus from 2020. The problem with the stock firmware is it comes pre-installed with a bunch of stuff you don't want. Ideally you can get a custom ROM like Lineage OS or OmniOS or there's many different custom ROMs out there for Android devices. Thing is sometimes it's difficult. You would think Motorola they let you unlock the boot loader, it should be pretty simple to find a custom ROM out there. I've looked so far I haven't seen a custom ROM for this Sophia P Motorola G-Stylus phone. Maybe some unofficial one out there I haven't come across it yet. It would be great if I would just compile my own custom ROM for it which is supposedly a doable thing but when I've read through the instructions of it it's just you gotta download so many files and it takes so long to do I just haven't gotten into it. But next best option, not a perfect option is you can clean up the stock ROM. You can disable at least some of the pre-installed apps. A lot of the pre-installed apps are on read only partitions so unless you modify those partitions which is an option you can't really remove them. But I'm going to show you a simple easy way to at least disable them. You don't need to root the device, you don't even need to unlock the boot loader. All you need to do is enable ADB connected to your computer and I'm going to show you the commands to run and in particular I've made a list of commands for this Motorola G-Stylus that uninstall disables a lot of the default applications and cleans up the phone quite a bit. In fact, I'm going to try to remove as much as I can and even the default home screen and keyboard which means we're going to have to install a new launcher and keyboard. I will keep the Motorola launcher installed and I'll explain why later. Again, this is not a perfect solution. Some of these APKs you're going to disable, other packages might re-enable them. And as I said, even though they're disabled or not installed for this user anymore technically they're still in the system. It's not the best option but if you're stuck with the default firm or the stock firmware on a device, pretty much any Android device, you can do this to most of the pre-installed apps. There's going to be some things that if you disable, the phone won't boot, in which case you just do another factory reset. Not a big deal, that's why you do this at the beginning once you have the stock firmware on there. But let's go ahead and I'm just going to show you the basic concept and then I'll show you the pay spin where I have a list of files for this particular phone where I remove most of the basically Google and Motorola applications that are pre-installed. There's still going to be some left but we'll talk about that at the end. So here are my notes, I called these notes Moto G Stylus Minifier. And again, if you look through here, I'm going to go over this but you can see that I'm basically just removing a whole bunch of things that have the name Google in it and Motorola. I did write a script once that went through and just removed anything that said Google or Motorola in the name and it removed them all and then when I rebooted the device it wouldn't boot. Again, just did a factory reset and reset all that because you're actually not uninstalling these things. Again, most of these things are on a read-only partition and so what we're actually doing is just disabling them. And I'll explain this a little bit more but let's go ahead and quickly look at the device here. If I come here, let me turn on my screen. It is, this is the stock install on this Moto G and I have done nothing other than go through the basic startup screen where I just kind of click skip everything and then I enabled ADB debugging mode so I can hook to my computer here. But if we go into settings and we click on apps, you can see here that there's 41 apps installed which isn't too bad. I've seen some stock devices that have over 70 installed and also you'll notice in here there are things like that you don't see in your app drawer like Android Auto. If I go to my app drawer here, Android Auto doesn't show up in here. It's just running in the background but we're going to remove that as well. So let's go ahead. I'm going to maximize this and go back to my notes here. Again, since we're disabling everything, I'm going to install all the default keyboards, all the Google keyboards and I also want to put in my own launcher. So I'm going to download a simple keyboard and install it and then for a launcher, I like the lawn chair launcher. Now I'm going to be pulling it down from the asteroid repositories which is actually an older version of it. The newer versions aren't pushed to asteroid. I don't know if that's a licensing thing. The newer version does have some newer features but this is the easiest for me just to pull down with Wget. So that's what's in my notes but you can go to their website lawn chair and get newer versions. In fact, I say all this in the notes up here. So real quick, I am going to download this APK just to this empty directory I'm in. And then again, I have ADB installed and if I type in ADB install, I give it that APK name and it'll install it and something else I'm going to do that isn't in my notes. So that line we just did is in my notes. I actually like adding in dash G which says grants all permissions. Because as I mentioned in previous videos, I think the whole idea, the whole concept of app, apps having their own permissions rather than users is just a flawed idea. Doesn't make any sense and drives me crazy. So any app I install as an app, I have looked at and trusted. If I don't trust it, I'm not going to install it. And if I trust it, I'm going to grant it all the permissions. That's my own view. You don't have to put that G in there but I'm going to install it and grant it. Next, I'm going to do the same thing for the lawn chair. So lawn chair launcher, I'm going to download it and I'm going to install it with ADB install dash G and the name of the APK. So give it a second download. Sometimes the FDroid website runs a little slow but it should download here in a second. Almost there, connected. There we go. And usually it works a little bit faster but sometimes their website does run a little slow if you've ever searched items on it, you know that. But I'm going to do ADB install and again, say dash G because your launcher does need some permissions for widgets and drawing over applications and stuff like that. But I'm going to install that APK. She'll only take a second. And again, now if I turn on the screen on my phone here again, I can click my button here. It's going to ask, what do I want to use as my default launcher? I'm going to choose a lawn chair and this is lawn chair right here. It's a very nice setup. But now we just want to remove all these apps. And like I said, we're going to pretty much remove everything that you'll see here and you're going to actually watch them disappear as I install them. Now again, we're really just kind of labeling them but let me explain what I have going on here. I've gone through and I've selected these for this particular device. And what we're going to do first is we're going to do ADB, Sheldon PM for package manager. We're going to try to uninstall, for example here, Chrome, okay? Probably 99% of these, that's not going to work but that's the best option because that will actually uninstall it. But again, most of these are on a read-only partition. So what I have after that is I have the two pipe symbols which means if the previous failed command failed then run this next command. And what this is doing is ADB, Sheldon package manager uninstall for the default user. So user zero. So it's still the APK is going to be there but it's going to be disabled for the default user. So again, not ideal but this will clean up your stock image quite a bit. There's also a disable option but for most of these apps that's not going to work either so I just left that out. So now all I have to do is I'm going to copy these lines and again, there's going to be other APKs on this device that I didn't disable but this is the majority of them. So let me go ahead and turn on my screen so we can see this in action. Open up my app drawer. I'm just going to paste all that code and hit enter and we will see one by one as these icons all disappear. And again, there were 41 apps installed by default. I installed two, our new launcher and the simple keyboard because you kind of need a keyboard to do things. You can see, look, they're all just disappearing. It's beautiful, isn't it? And the only thing that's going to be left here is the simple keyboard and settings. So now if we go into settings and we click on apps you can see there's only eight installed. Let's see what they are. So this CQA test, I'm pretty sure is part of Android and is required for making phone calls. Same with this SIM toolkit. Although I'm not going to be using this as a phone right now. If you are, you're going to want to leave those in there. I believe this ISM is also important for that and then wireless emergency. So you could disable these and then the styles and wallpaper probably could have been removed. So you might also say, Chris, why did you leave the Motorola app launcher in there? I'll explain that in a moment. But let's go back here and I'm going to say, so you can see it's saying, oh, which do you want to use? I'm just going to say always for launcher because that's what I want to be my launcher. And you can see we have nothing, like not even the dialer and you can install your own dialer. You can install FDroid at this point or just download the packages and install it. If I click here, I don't get a keyboard. Let me go ahead and double click on this and it's just saying yes, I want this keyboard to be activated because you kind of need a keyboard if you're going to do anything on a device. And now I have the simple keyboard and I have my launcher, but my device is very, very clean. It also thinks that it's October 9th, 2021, which it's not actually January, but I haven't even hooked this device up to Wi-Fi yet. So that's the default date that it gives. I flash this one a couple of times. If I don't connect to the internet, it starts off on October of 2021. Okay, so yeah, we have here, this is just saying I'm hooked to my computer through ADB, but we have a fairly clean system. So why? Why did I leave the Motorola launcher in there? So again, if I go to settings here, I go to apps and we can see all and we have this one. I can come in here and I could disable this. In fact, let me go ahead and do that. I actually have a little script I think I may have talked about in previous videos, but if I type in Android uninstall, it's actually gonna connect through ADB, give me a list of packages. And I'm gonna type in moto and I'm just gonna type in launcher. So yeah, moto launcher three, I think this will remove that if I hit that. It basically does the same thing we just did. So I just removed that launcher. I'm not using it, right? So what does it matter? Well, this is why it matters. So let me open up like this and let me open up this. So I have two windows open. Watch when I click the square here. I also disable gestures because I hate it, but it doesn't matter whether I'm using gestures or this. If I click this square down here or do whatever gesture I do to display the apps that are open or previous history of apps, it doesn't work unless on this particular device, unless I leave the moto launcher installed, which is a little annoying. So I'll show you, let me go ahead and look at my notes here real quick. If I go to pay spin, I click on my pastes and I look through here for my notes on Android install, remove unwanted apps. This is kind of like a step by step on how to do what we just did for different packages. You can see if a package is already installed, we can run this command. So we'll do that. We'll come back here. And so let's make this full screen so you can read it. ADB shell, CMD package, install-existing. So if it exists, which this package is, you need the package name, I'm gonna click this. And now let's go back and we'll click this. So that's reinstalled now. So it's installed for user one because again, never really was removed. Now, oh, my screen went off. Let's turn that back on. Now if I click the square down here, now I get my app switcher. So for this functionality work on this particular device, I need that. If anybody knows an app that will allow me to do that, it's free and open source that I can replace this launcher with, please let me know. But I've tried searching open source app switcher. I don't even know what you would call this. Yeah. And I'm sure there is something because obviously, maybe if I just look at like a lineage OS, I can see what they're using. You would think that'd be part of your launcher. So launcher in my case, but it's not. But yeah, so look, I have launcher, which is my launcher, which I don't know why the icon took so long to show up here, but I have that. Settings and my keyboard and everything else within reason is uninstalled. Again, there's still gonna be a few Motorola and Google stuff installed in the background, which is not ideal. But if you are stuck with the stock ROM, you can go through these steps to clean up device quite a bit, which is really nice, especially if I'll lock down device like an Amazon Fire tablet, for example. It best if you don't buy a device like that. But if you get it, because they're such good deals, you can at least do this. And again, in my case here, I really like Motorola devices because you can unlock them. Motorola lets you unlock them, which gives you freedom to do basically whatever you want. But if someone hasn't created custom ROM for it, you have to do it, which seems like a long tedious process that I just haven't gotten into myself. But if anyone knows a simple way to do it, please let me know. And now I'm just gonna talk for a little bit. The tutorial's pretty much over, but I just wanna say, I really wish Android was more like just desktop system where you have one image that can work on multiple pieces of hardware. I know that's not how it is. I wish it was. It seems to me like Android is Android. And the biggest issue is basically some of the drivers on the driver partition. And I think basically when you make a custom ROM, like you take Linny and Joes and you take it for a device, you basically compile it the same way and then you pull the drivers over and put them into a certain folder or partition for different devices. I wish I could just extract the image and copy over it and not have to compile stuff myself. But all the directions I read, you have to download. I wanna say it's like 50 gigs worth of source code. And then it takes, depending on your hardware, a day or two to compile. And I just, I don't have the patience for that sort of thing. I really wish that I did. I've started the process a few times and like 45 minutes and I'm like, I'm done. I'm not even a fraction of the way done. Anyway, so thanks for watching. I hope you find this useful. Again, I'll link to this in the description. So the code we went over was my called MotoGStyle Minifier. It's called that just because specifically a lot of these are Motorola apps that are on this device but a lot of them are probably on other Motorola devices, a lot of these Google ones. So this, you copy and paste this on pretty much any device and it'll probably remove a lot of junk even if it's not a Motorola device. It will just give you an error on the ones that aren't installed. If you did go to filmsbychris.com which is my website, there's a support section where you can go and you can donate to me which is awesome if you can do that. But I wanted to show you in here there's a few different options like GitHub, my scripts, my notes. If you click on notes, it's gonna bring you here which actually searches through all my PaySpin posts. And so if I was to type in Android APK, you can see right there MotoGStyle Minifier. So you can search through my code here, you click on that and it'll bring you to PaySpin. So check that out. I do thank you for watching. And as always, I hope that you have a great day.