[Unrooted] Quick run down on how to de-bloat your ROM - Xperia Z3 Compact Q&A, Help & Troubleshooting

Hey guys, to the best of my abilities I couldn't find a thread regarding this specific usage of ADB for the Xperia Z range so here I am!
With a little incite from the lovely gentleman that posted this thread I decided to expand on that knowledge to apply to any system app that bothers people.
First of all the disclaimer:
If you don't know what you're doing, do not try this.
If you screw your phone up then it's on you pal!
I am not responsible for things that you do, nor am I responsible for kicking your dog or killing your gold fish.
Anyway the worst possible case scenario would make you need to flash a new FTF using Androxyde Flash Tool, so no biggy
Prerequisites
Grab the basic ADB package from here
Or here (mirror)
Go to this thread and install the Universal ADB Drivers
If you need help installing the Universal ADB Drivers: Go to that thread and ask for help. Keep comments in this thread on topic please.
Unlock the developer options on your phone, by going to settings > about > tap the build number section about 10 times until it says "Congratulations you're a developer!"
Now go back to the main settings page, and open up the new Developer Options section.
Go down to Debugging tab and check "USB debugging"
Now connect your phone via USB connection to your computer
In this section anything with 'quotes' should be typed without quotes, the quotes are just there for readability.
Open CMD (admin privileges) CD to the location of the ADB.exe file you recently extracted (RIGHT?) and (with device connected with Debugging mode enabled via USB connection) type 'adb usb'.
That'll start ADB via usb connection mode.. For interests sake: to list all the ADB commands type 'adb help'
Once started adb in usb mode type 'adb shell' (that'll effectively open a direct terminal connection with your phone).
While inside the shell you can type 'pm' to list all the Package Manager commands.
Pretty simply really, but unless you have root don't bother trying to uninstall system apps... It won't work. Instead just use the 'block' command which effectively does the same thing except it doesn't remove it.
Basic commands I've been using:
pm - lists all commands available for use regarding the package manager built into ADB.
pm list packages -s - lists all system packages
pm list packages -s 'name' - lists system packages with a filter of 'name' (don't use quotes)
pm block 'packagename' - self explanatory
pm unblock 'packagename' - self explanatory
To try and find a specific package name that can't be found using the name filter (some are tricky believe me) use google to the best of your abilities, otherwise simply use very inaccurate filter search results such as listing all of the sony packages..
Ie.. pm list packages -s sony then take your sweet time trying to take a shot at which one it is (make sure to unblock the ones you block that aren't the one you were after)
After you've blocked the ones you were after, type exit
That'll launch you out of the adb shell, then type adb reboot
that will force the phone to reboot. ALL DONE!
If you need help then post in this thread, I'll do my best to help out but I have a life (now anyway) so I'm hoping some kind gents that browse this thread will help you when I'm busy :highfive:
Plus I have instant email notification turned on, so it's by far the fastest way to contact me
Best of luck guys: Keep in mind that if you aren't sure what a package does then please do your best to Google it and find out what it does before blocking it and blowing up Jupiter or destroying earth's orbit.
I kind of like Earth, it's been good to me! But if you block the wrong thing, always keep in mind you can simply UNBLOCK the package. So yeah..
Hit thanks if you're awesome!

So we are not uninstalling bloatwares with this procedure. We are just blocking them, right?

Clever... Can you provide a list of packages you managed to block successfully? This could help avoid some of the duplicate trial and error for readers of this thread.
Sent from my Xperia Z3 Compact

Related

Problem with G1 software - PLEASE HELP!!!

Dear Users,
I am experiencing an issue which has been raised once before and no clear,
simple solution was found.
My current problem is that, after updating my G1 from 'cupcake' to 1.6, all
the calls I make and all the calls I receive are labelled as 'unknown',
despite the fact that these numbers are in my contacts. Here is the link to
the similar issue which was officially declined by Google:
http://code.google.com/p/android/issues/detail?id=2949
In the discussion thread amoung the users, there seem to be two possible
solutions (although this was not confirmed by Google, since the issue was
declined):
1. Complete factory reset.
2. STEPS:
1) Get to a shell prompt. If you're using ADB, it's "adb shell". If
you're using a
terminal/console app, just launch it.
2) Type "rm /data/misc/rild_ril.clip"
3) Reboot the phone.
My phone is currently not rooted and I have no intentions to root it in the
near future. Also, I do not favour the idea of a factory reset, since I
shall have to re-install all my applications, which will take time. The
second method to solve the problem seems the most probable in my case,
however the only problem is that, since I am not very good on the technical
stuff (i.e. 'shell prompt', 'console app', 'ADB'), I cannot figure out how
to perform what that method requests.
I would be very grateful to a person who would explain how to sort the
problem out in clear, step-by-step, user-friendly language.
The first method would be easiest for you but the second method makes the most sense. ADB is easy to set up & there are guides on here for it, also it doesn't require you to be rooted.
PS: This is in the wrong section so expect the mods to move it quickly.
You should start by trying option two.
1. Goto the market and search for Terminal. Downlaod and install the app.
2. Open your app drawer and open Terminal (The app you just installed)
3. Enter the line rm /data/misc/rild_ril.clip and hit enter.
If the command is accepted you'll get a blank prompt, type reboot and hit enter again to reboot the phone. If you get a mesage that says the command can't be completed, read only file system you'll probably need to setup ADB on your computer and enter the commands there. Search XDA for ADB for Dummies to find a thread on how to set up ADB, its really very straightforward.
Good Luck!
You could also go into Application manager and see if you can clear your Dialer or Dialer storage's cache or data (whatever they have there). I assumed that you've tried powering your phone off and on to see if that fixes it, right?
If you dont have root, you wont be able to remove stuff from the system.
It sounds like you have your contacts numbers saved without a 1 or 0 such as,
555-555-5555
1-555-555-5555
Try to edit the numbers and make them appear the same way they do when a contact calls you. I am sure this will solve the problem.

Rooting G1 - Telnet prompt showing question marks in diamonds? Help!

I have rooted my phone once before like a year ago, and it worked like a charm - but when the official 1.6 came out it apparently unrooted me (I assume thats what happened?) All I know is now when I try to run root required apps it tells me I'm not rooted.
So I figured to just start over from the beginning. I downgraded to RC29 no problem, but when I get to the telnet step it shows a pattern of question marks in diamonds, with boxes separating them. Like this:
<?><?>[]<?><?>[]<?><?> <?><?>[]<?><?> #
I run the commands anyway, (with the Recovery Image and HardSPL on the root of my SD card) - with each command returning two hash marks # #. But the commands don't seem to do anything, because even when I finish ROM Manager tells me I'm not rooted.
Back in Telnet, I can 'ls' to see my directories, including a root folder - but I'm not sure that means anything.
Not sure where to go from here - any help would be greatly appreciated...
-TQ
........................................
The following Observation was made :
Wrong Section. Belongs in Q/A
K so when u go in adb and type adb shell do you see # or $
Please let us know.
Apologies for posting in the wrong forum. And thanks for moving it.
I can't connect to my phone via ADB - I just get 'device not found' even though I have the USB drivers downloaded. If I do 'adb devices' it shows a blank list.
I've looked into how to resolve this, but with no luck. The phone shows up in device manager under the 'Disk Drives' category as "HTC Android Phone USB Device" when everywhere I read says it should show up under the ADB interface section as "HTC Dream Composite ADB Interface".
I've tried USBDeview to reinstall it properly - no dice. And I tried manually updating the driver with ones I downloaded, but windows says I already have the best driver installed.
I don't know what to do now...

How to revert ADB commands (e.g. used adb to enable access for an app(s) (ex. GSAM )

Hello!
I have added a couple apps that required special access . I'm not rooted, so I hooked my OnePlus 8 Pro (but could be any phone) to my laptop and installed (for instance) GSAM Battery Monitor, and I used the ADB commands provided. I then later deleted the app off my phone, and I want to revert the special access provided by those ADB commands I entered.
Yes, I clearly am an amateur, and am just trying to be security conscious.
Is there an easy answer? Some other ADB command I could send to "close the hole(s)"?
Thank you all. Please move this post if I've chosen the wrong forum. And I did do more than a few searches trying to find the answer to my query.
Have a Happy Thanksgiving everyone!!

ADB commands not working

Has anyone gotten the ADB commands to work? I'm trying to see if I can get by without root, so I want to enable the enhanced battery stats in GSam battery. It doesn't work for me. I'm using the latest platform tools, and I have the USB file transfer checked.
Does anyone have any suggestions that I can try?
Thanks.
Have you enabled "USB debugging" in developer options? Cause ADB definitely works here, and i haven't done anything special to get it working. Steps i'd personally take if it wouldn't work are:
Make sure USB debugging is enabled and USB is physically plugged in.
Make sure everything is ok with the ADB drivers, double-check the device manager.
Check if the device appears in "adb devices", make sure its authorized on the device.
Try actual adb shell and other relevant adb stuff.
BTW, if you seem to have troubles with ADB drivers, you can try wireless ADB instead. It is only available without root on Android 11 and does require the absolute latest SDK platform tools, but hey, i've tested it, it works, and it doesn't require any special USB drivers. Follow the "Connect to a device over Wi-Fi" steps from https://developer.android.com/studio/command-line/adb to try that.
InfX said:
Have you enabled "USB debugging" in developer options? Cause ADB definitely works here, and i haven't done anything special to get it working. Steps i'd personally take if it wouldn't work are:
Make sure USB debugging is enabled and USB is physically plugged in.
Make sure everything is ok with the ADB drivers, double-check the device manager.
Check if the device appears in "adb devices", make sure its authorized on the device.
Try actual adb shell and other relevant adb stuff.
BTW, if you seem to have troubles with ADB drivers, you can try wireless ADB instead. It is only available without root on Android 11 and does require the absolute latest SDK platform tools, but hey, i've tested it, it works, and it doesn't require any special USB drivers. Follow the "Connect to a device over Wi-Fi" steps from https://developer.android.com/studio/command-line/adb to try that.
Click to expand...
Click to collapse
Thanks!
I had already done everything you suggested, but can't get the battery stats to work. I even tried it using wireless ADB, but had the same results. I get no indication that my command was accepted . I've never enabled permissions like this before, just used root, so I don't know if anything is even supposed to come up.
What command are you trying to use exactly?
InfX said:
What command are you trying to use exactly?
Click to expand...
Click to collapse
I used :
adb shell pm grant com.gsamlabs.bbm android.permission.BATTERY_STATS
and
adb shell settings put global hidden_api_policy 1
According to GSam labs website, I need to enable both of these.
I am going to try to contact the developer and see if I can get an answer as to why it's not working.
EMcTx said:
I used :
adb shell pm grant com.gsamlabs.bbm android.permission.BATTERY_STATS
and
adb shell settings put global hidden_api_policy 1
According to GSam labs website, I need to enable both of these.
I am going to try to contact the developer and see if I can get an answer as to why it's not working.
Click to expand...
Click to collapse
These work for me.
Sent from my Pixel 5 using XDA Labs
EMcTx said:
I used :
adb shell pm grant com.gsamlabs.bbm android.permission.BATTERY_STATS
and
adb shell settings put global hidden_api_policy 1
According to GSam labs website, I need to enable both of these.
I am going to try to contact the developer and see if I can get an answer as to why it's not working.
Click to expand...
Click to collapse
The first command supposed to grant a specific permission (BATTERY_STATS) to a specific app, i am unfamiliar with the second one (it turns a system setting named 'hidden_api_policy' on, but i have no idea what this setting is). I have no idea if those work as expected on Android 11, and Google loves changing stuff like that.
In any case, first, make sure you don't just run those commands from start->run or equivalent, but from a command line window, so if there are any errors you have a chance to read them. And finally, don't forget to force close and restart the app in question.
---------- Post added at 01:44 AM ---------- Previous post was at 01:40 AM ----------
ridobe said:
These work for me.
Click to expand...
Click to collapse
Then the OP just doing something trivial wrong, which is a good thing, since it can be fixed
ridobe said:
These work for me.
Sent from my Pixel 5 using XDA Labs
Click to expand...
Click to collapse
Did you get any text after you entered the commands that indicated you were successful? I've tried it multiple times without success. I may try to clear the data on the app and try again.
InfX said:
The first command supposed to grant a specific permission (BATTERY_STATS) to a specific app, i am unfamiliar with the second one (it turns a system setting named 'hidden_api_policy' on, but i have no idea what this setting is). I have no idea if those work as expected on Android 11, and Google loves changing stuff like that.
In any case, first, make sure you don't just run those commands from start->run or equivalent, but from a command line window, so if there are any errors you have a chance to read them. And finally, don't forget to force close and restart the app in question.
---------- Post added at 01:44 AM ---------- Previous post was at 01:40 AM ----------
Then the OP just doing something trivial wrong, which is a good thing, since it can be fixed
Click to expand...
Click to collapse
I am using the ADB shell in the platform tools folder. Yes, I'm sure I am making some stupid mistake . I had no problem rooting my Pixel 2Xl, so I'm hoping I can figure this out. I'll just keep trying.
EMcTx said:
I am using the ADB shell in the platform tools folder. Yes, I'm sure I am making some stupid mistake . I had no problem rooting my Pixel 2Xl, so I'm hoping I can figure this out. I'll just keep trying.
Click to expand...
Click to collapse
When you do a "adb devices" do you see your phone and are you getting any prompts on your phone?
Tel864 said:
When you do a "adb devices" do you see your phone and are you getting any prompts on your phone?
Click to expand...
Click to collapse
Yes, I do see my device, and I got a prompt on my phone the first time I connected.
I have managed to adjust my AOD brightness with ADB, so it must be something I'm doing wrong with the battery stats. I'm still waiting to see if the developer can give me any pointers. If I can't figure it out, I'll find another battery app.
I finally got it to work. The developer emailed me and told me that since I had the pro version, I needed to add pro after bbm.
Thanks for all the input!
I clearly remember you mentioning getting the package name wrong... the forum migration didn't exactly go smooth for xda, i guess :-/
Edit: WTF, now i see that last post, AFTER posting this one.
I'm having a similar problem.
Typing "adb reboot bootloader" using Windows Powershell, put my USB connected tablet into bootloader mode.
However when then typing "fastboot flash twrp.img" the command line returns "waiting for device" and appears to hang.
I definitely have Debugging ON, and "twrp.img" is in the adb folder.
AussieNordo said:
I'm having a similar problem.
Typing "adb reboot bootloader" using Windows Powershell, put my USB connected tablet into bootloader mode.
However when then typing "fastboot flash twrp.img" the command line returns "waiting for device" and appears to hang.
I definitely have Debugging ON, and "twrp.img" is in the adb folder.
Click to expand...
Click to collapse
fastboot flash boot twrp.img to install twrp, fastboot boot twrp.img to boot twrp
Got it eventually.

How To Guide How to debloat Galaxy Tab S8 ♻️

In this guide we will see step by step how to debloat the Galaxy Tab S8​
First of all we have to enable: Developer Options
Settings->About tablet->Software information->(tap 7 times)Build number
After that we will enable: OEM Unlocking & USB Debbuging
Settings->Developer Options->OEM Unlocking(ON) & USB Debbuging(ON)
On the next step we need to download & install : ADB & Fastboot tools
Once you install the tools, connect your {Tablet} - {PC}
Select: USB Debbuging & Open your: Terminal
We are almost there
Now i will make a short explanation in order to understand what are we doing exactly & how we will do it.
What is ADB?
ADB provides us with commands that can be used to debug Android devices,
installing or uninstalling apps and getting information about a connected device.
adb shell
This command activates the remote shell command console on the connected Android smartphone or tablet.
adb shell pm uninstall -k --user 0
Using this, you can easily uninstall the unwanted system apps. To be able to execute it, you must issue 'adb shell' command first.
You can then use 'pm uninstall -k --user 0' followed by the Android app package name as shown below.
pm uninstall -k --user 0 com.whatsapp_2.20.apk
This command can help you if you want to remove all the bloatware from your phone.
Please note that most system apps don't have the 'Uninstall' option on the device but this command works magically.
If you don't know the app package name for the apps you want to remove, you can use adb shell pm list packages to find it out.
adb shell pm list packages
Using the above ADB Shell command, you can print the list of the app package names for all apps installed on your Android device.
You can use this command with different parameters to get a more specific list of app packages.
For instance, if you want to list the system apps only, use
adb shell pm list packages -s
In order to list all third-party apps installed on your Android phone or tablet, you issue the following command.
adb shell pm list packages -3
Do you want ADB Shell to show the list of all enabled or disabled apps on your device,
try the command with '-d' (disabled apps) and '-e' (for enabled apps) parameter.
adb shell pm list packages -d
adb shell pm list packages -e
Now, if pm list command troubles you or you are unsure that you are making the right choice you should stop right there
(uninstalling the wrong app might harm your tablet's operating system) and use another method for identifying which app you want to uninstall.
(GUI method - Graphical User Interface) For example: APK Inspector will provide you with a detailed list of installed packages (plus their icon) on your device, once you select an app, extra details will be shown to you & that's how you will get the correct name.of.the.app
Thanks for your time ❤​
Reserved
I really appreciate this write-up it has been a big help..
I use my OnePlus 9 pro with ADB and fastboot for Android NDK to debloat..
and that application inspector is a God send so again. thank you
I don't know if it was just a fluke or what but when I rebooted after successfully deleting digital well-being my tablet booted up super fast...
either way I'm good.
Awesome thanks for the tip. Is using "install" put the app back if I screw up something?
So it really doesn't uninstall just uninstalls from your app draw?
striker59 said:
So it really doesn't uninstall just uninstalls from your app draw?
Click to expand...
Click to collapse
For the os, it is like it has been uninstalled. But you don't free disk space, as the data of the app are still there. They just been hidden from os. That's why you can have back the app again just with an adb command again.
Man I used this to shut down numerous apps on all of my Android devices. Samsung and Verizon apps. Thanks!
Went back in to uninstall more apps. Device is recognized but adb shell won't load. The last time I used adb it was for my phone.
Figured it out, had to revoke USB debugging on my tablet. Delete on the computer c:user.android and restart (actual path on the computer could be different than what I stated).
Hi there.
Can anyone confirm, if it is save to remove the phone app from the device since it is connected to this samsung feature "calls/ messages on other Galaxy devices"? Actually i fully wanne get rid of this feature and app since i don´t use a galaxy phone.
Can someone share experiences/ideas according this topic?
Stogie87 said:
Hi there.
Can anyone confirm, if it is save to remove the phone app from the device since it is connected to this samsung feature "calls/ messages on other Galaxy devices"? Actually i fully wanne get rid of this feature and app since i don´t use a galaxy phone.
Can someone share experiences/ideas according this topic?
Click to expand...
Click to collapse
I have Debloated it (adb frozen) months ago. Didn't have any problem. You can always enable it again.
Am I right? If i debloat I don't clean up the system space used from the os ?
nofear5888 said:
Am I right? If i debloat I don't clean up the system space used from the os ?
Click to expand...
Click to collapse
You won't earn more free space. Apps are still there after Debloating.
sosimple said:
For the os, it is like it has been uninstalled. But you don't free disk space, as the data of the app are still there. They just been hidden from os. That's why you can have back the app again just with an adb command again.
Click to expand...
Click to collapse
@striker59
You remove the app for the current user but its still inside system's root directory.
You don't gain storage.
What you can achieve tho if you remove/disable the unnecessary services without causing softbrik or error spamming 'service has stop working' is a lightweight $user who uses less ram, your phone's overall performance is better and the battery reduction is slower.

Categories

Resources