[Xiaomi Mi A3 Guides, News, & Discussion] evanB70:
ADB is an immensely powerful tool & it allows you to do a lot of things that would otherwise require root. Today I'm going to share some of the tweaks I use on my device and the best part is, none of these requires root access. This is a post for non-experienced android users. The tweaks / apps discussed here should work on all Android devices.

This post took a looong time to compile. It's a work-in-progress; I do have some more ADB tweaks in mind; but I have to test them myself before posting them here. I'll update this post with relevant screenshots soon. So stay tuned and hit the Thanks button if you think this post is useful.

For the content ahead, I’m going to assume you have ADB installed on your PC. Always use the latest version of ADB; some commands won't work with older ADB binaries. You can grab the latest version of platform-tools from HERE, directly from Google. If you want to learn how to setup & run adb on your PC, take a look at the first part of THIS article.

Contents

1. Debloat your device: Remove & disable unwanted system apps

2. Freeze Any App’s Background Processes

3. System-wide Ad-blocking without using any apps

4. Use Android 10’s native gesture navigation with any 3rd party launcher

5. Change the height of the navigation bar

6. Add Left/Right Keyboard Cursors to the Nav Bar during Text Input

7. App: Greenify

8. App: Quick Settings

9. Stop Vibrations from Any Android App on Your Phone

10. Advanced app permission management with Shizuku & AppOps

11. Control your phone from your PC

12. Advanced device stats & hardware monitoring: coming soon

13. Backup your apps+data with ADB: Needs testing, coming soon

1. Debloat your device: Remove & disable unwanted system apps

Source: This article on XDA, also THIS

Removing system apps with ADB is very easy & safe. It doesn’t modify your system partition, so OTA updates are not affected. There is a very easy to follow guide available on XDA about this, click here to read that post. I'll just mention the commands here:

adb shell
pm uninstall -k --user 0 <package_to_uninstall>

You just have to replace ‘<package_to_uninstall>’ with the actual package name of your target app. You can use a tiny app called App Inspector from the Google Play Store to find out the package name of your target app. You can also use the following adb command to list all the app packages on your device, including system apps:

adb shell
pm list packages

Warning:

Do NOT disable/uninstall Quickstep, Android's built-in launcher. A10's stock gesture navigation is an integrated part of this launcher. If you disable/uninstall it, your phone will continue to function but stock gestures won't work anymore & the recent apps switcher button on your navbar will stop functioning. The good news is, it's possible to reinstall the launcher using the reinstall command given below.

To Re-Install an Uninstalled App, open a command prompt and enter the following command:

adb shell cmd package install-existing <name of package>

Here is a list of package names of all stock apps for MI A3, as requested by @pajos.gabros:

(it will be useful if you mistakenly uninstall an important system app & want to restore it)

com.factory.mmigroup
com.android.cts.priv.ctsshim
com.qualcomm.qti.qms.service.telemetry
com.google.android.youtube
com.android.internal.display.cutout.emulation.corner
com.google.android.ext.services
com.android.internal.display.cutout.emulation.double
com.android.providers.telephony
com.android.dynsystem
com.google.android.googlequicksearchbox
com.android.providers.calendar
com.android.providers.media
com.qti.service.colorservice
com.android.theme.icon.square
com.google.android.onetimeinitializer
com.google.android.ext.shared
com.android.internal.systemui.navbar.gestural_wide_back
com.android.wallpapercropper
com.bsp.catchlog
com.xiaomi.cameratools
com.android.theme.color.cinnamon
com.android.protips
com.android.theme.icon_pack.rounded.systemui
com.wt.secret_code_manager
com.android.externalstorage
com.qualcomm.uimremoteclient
com.android.htmlviewer
com.factory.cit
com.qualcomm.qti.uceShimService
com.android.companiondevicemanager
com.android.mms.service
com.qualcomm.qti.qms.service.connectionsecurity
com.android.providers.downloads
com.google.android.apps.messaging
com.android.networkstack.inprocess
com.android.theme.icon_pack.rounded.android
vendor.qti.hardware.cacert.server
com.qualcomm.qti.callenhancement
com.qualcomm.qti.telephonyservice
com.android.partnerbrowsercustomizations.tmobile
com.android.theme.icon_pack.circular.themepicker
com.google.android.overlay.gmsgsaconfig
vendor.qti.iwlan
com.google.android.configupdater
com.qualcomm.qti.optinoverlay
com.google.android.overlay.modules.permissioncontroller
com.qualcomm.uimremoteserver
com.qti.confuridialer
android.qvaoverlay.common
com.google.ar.core
com.google.ar.lens
android.autoinstalls.config.xiaomi.laurel_sprout
com.android.providers.downloads.ui
com.android.vending
com.android.pacprocessor
com.android.simappdialog
android.overlay.common
com.android.internal.display.cutout.emulation.tall
com.android.certinstaller
com.android.theme.color.black
com.android.carrierconfig
com.google.android.marvin.talkback
com.android.theme.color.green
com.android.theme.color.ocean
com.android.theme.color.space
com.android.internal.systemui.navbar.threebutton
com.google.android.apps.work.oobconfig
com.qti.qualcomm.datastatusnotification
com.qualcomm.qti.callfeaturessetting
com.qualcomm.wfd.service
com.android.theme.icon_pack.rounded.launcher
com.qti.qualcomm.deviceinfo
com.android.egg
com.android.mtp
com.android.nfc
com.android.ons
com.android.stk
com.android.launcher3
com.android.backupconfirm
com.google.android.deskclock
com.android.internal.systemui.navbar.twobutton
org.codeaurora.ims
com.android.statementservice
com.android.hotspot2
com.google.android.gm
android.overlay.target
com.google.android.apps.tachyon
com.qti.pasrservice
com.android.settings.intelligence
com.android.internal.systemui.navbar.gestural_extra_wide_back
com.google.android.permissioncontroller
com.wingtech.setupwizardext
com.qualcomm.qti.dynamicddsservice
com.google.android.setupwizard
com.qualcomm.qcrilmsgtunnel
com.android.providers.settings
com.android.sharedstoragebackup
com.google.android.music
com.android.printspooler
com.qualcomm.qti.services.systemhelper
com.android.theme.icon_pack.filled.settings
com.android.dreams.basic
com.google.android.overlay.modules.ext.services
com.miui.bugreport
com.android.se
com.android.inputdevices
com.google.android.apps.wellbeing
com.google.android.dialer
com.android.bips
com.qti.dpmserviceapp
com.google.android.apps.nbu.files
com.android.theme.icon_pack.circular.settings
com.wing.wtsarcontrol
com.android.importsafetyinfo
com.qti.xdivert
com.android.musicfx
com.google.android.overlay.gmsconfig
com.google.android.apps.docs
com.google.android.apps.maps
com.google.android.modulemetadata
com.android.cellbroadcastreceiver
com.google.android.webview
com.android.theme.icon.teardrop
com.qualcomm.qti.simsettings
com.google.android.contacts
com.android.server.telecom
com.google.android.syncadapters.contacts
com.android.keychain
com.android.camera
com.google.android.calculator
com.android.chrome
com.android.theme.icon_pack.filled.systemui
com.google.android.packageinstaller
com.google.android.gms
com.google.android.gsf
com.google.android.ims
com.google.android.tag
com.google.android.tts
com.google.android.gmsintegration
com.android.phone.overlay.common
com.qualcomm.qti.qtisystemservice
com.android.carrierconfig.overlay.common
com.android.calllogbackup
com.google.android.partnersetup
com.android.systemui.overlay.common
com.android.server.telecom.overlay.common
com.android.localtransport
com.google.android.videos
com.android.carrierdefaultapp
com.dsi.ant.server
com.qualcomm.qti.remoteSimlockAuth
com.android.theme.font.notoserifsource
com.mi.global.bbs------> Mi Community
com.android.theme.icon_pack.filled.android
com.android.proxyhandler
com.sensetime.faceunlock
com.android.theme.icon_pack.circular.systemui
com.miui.spock
com.google.android.overlay.modules.permissioncontroller.forframework
com.google.android.feedback
com.google.android.printservice.recommendation
com.google.android.apps.photos
com.google.android.calendar
com.android.managedprovisioning
com.google.android.documentsui
com.android.dreams.phototable
com.goodix.fingerprint.setting
com.android.providers.partnerbookmarks
com.android.smspush
com.android.wallpaper.livepicker
com.mi.AutoTest
com.android.theme.icon.squircle
com.android.batterywarning
com.android.storagemanager
com.android.bookmarkprovider
com.android.settings
com.qualcomm.qti.cne
com.qualcomm.qti.ims
com.qualcomm.qti.lpa
com.android.theme.icon_pack.filled.launcher
com.android.networkstack.permissionconfig
com.google.android.projection.gearhead
com.qualcomm.location
com.google.android.apps.turbo
com.android.cts.ctsshim
com.android.theme.icon_pack.circular.launcher
com.caf.fmradio
com.android.vpndialogs
com.qualcomm.location.XT
com.google.android.keep
com.android.music
com.android.phone
com.android.shell
com.android.theme.icon_pack.filled.themepicker
com.android.wallpaperbackup
com.android.providers.blockednumber
com.android.providers.userdictionary
com.android.emergency
com.qualcomm.qti.seccamservice
com.qualcomm.qti.qmmi
com.google.android.gms.location.history
com.android.internal.systemui.navbar.gestural
com.android.location.fused
com.android.theme.color.orchid
com.android.systemui
com.android.theme.color.purple
com.android.bluetoothmidiservice
com.qualcomm.qti.confdialer
com.qualcomm.qti.poweroffalarm
com.qti.ltebc
com.qualcomm.qti.networksetting
com.android.traceur
com.android.apppredictionservice
com.qualcomm.qti.qms.service.trustzoneaccess
com.google.android.apps.magazines
com.android.bluetooth
com.qualcomm.timeservice
com.qualcomm.atfwd
com.android.wallpaperpicker
com.qualcomm.embms
com.android.providers.contacts
com.android.captiveportallogin
com.android.theme.icon.roundedrect
com.android.internal.systemui.navbar.gestural_narrow_back
com.android.cellbroadcastreceiver.overlay.common
com.android.theme.icon_pack.rounded.settings
com.google.android.inputmethod.latin
com.android.bluetooth.overlay.common
com.android.theme.icon_pack.circular.android
com.google.android.apps.restore
com.google.android.overlay.searchlauncherconfig

I’ve uninstalled a lot of pre-installed apps using this method, so far so good. No issues whatsoever. However, your mileage may vary, backup your important stuff first. Don’t just start removing apps blindly; If anything goes wrong try to reinstall it with the given ADB command. If that fails, do a factory reset.

I can’t be held responsible for any sort of damage.

Here is a list of apps that I’ve uninstalled (I’ve included the full ADB command, just copy & paste):

Note: You might want to keep some of the apps marked with an asterisk (*)

adb shell
pm uninstall -k --user 0 com.google.android.calendar (*Stock Google Calendar)
pm uninstall -k --user 0 com.android.chrome (*Google Chrome)
pm uninstall -k --user 0 com.google.android.googlequicksearchbox (*Google App/Assistant)
pm uninstall -k --user 0 com.google.android.gm (*Gmail)
pm uninstall -k --user 0 com.google.android.apps.nbu.files (*Files by Google, install a 3rd party file manager before uninstalling it)
pm uninstall -k --user 0 com.google.android.youtube (*Youtube)
pm uninstall -k --user 0 com.google.ar.lens (*Google Lens, uninstalling Google app will make it unusable anyway)
pm uninstall -k --user 0 com.google.android.apps.photos (*Google Photos)
pm uninstall -k --user 0 com.android.stk (*Sim Toolkit, might be important. I've removed it tho)
pm uninstall -k --user 0 com.google.android.apps.docs (*Google Drive)
pm uninstall -k --user 0 com.google.android.marvin.talkback
pm uninstall -k --user 0 com.google.android.projection.gearhead
pm uninstall -k --user 0 com.android.bookmarkprovider
pm uninstall -k --user 0 com.google.android.apps.turbo
pm uninstall -k --user 0 com.google.android.apps.wellbeing
pm uninstall -k --user 0 com.google.android.tts
pm uninstall -k --user 0 com.google.android.tag
pm uninstall -k --user 0 com.miui.bugreport
pm uninstall -k --user 0 com.android.protips
pm uninstall -k --user 0 com.google.android.feedback
pm uninstall -k --user 0 com.google.android.apps.restore
pm uninstall -k --user 0 com.google.android.ext.shared
pm uninstall -k --user 0 com.google.android.setupwizard
pm uninstall -k --user 0 android.autoinstalls.config.xiaomi.laurel_sprout
pm uninstall -k --user 0 com.qualcomm.qti.qms.service.telemetry
pm uninstall -k --user 0 com.android.dreams.basic
pm uninstall -k --user 0 mi.global.bbs
pm uninstall -k --user 0 com.miui.spock
pm uninstall -k --user 0 com.google.android.apps.work.oobconfig
pm uninstall -k --user 0 com.android.providers.partnerbookmarks
pm uninstall -k --user 0 com.android.dreams.phototable
pm uninstall -k --user 0 com.android.dreams.basic

Note: You can also disable an app if you don’t want to uninstall it. Use the following command:

adb shell pm disable-user --user 0 <package_to_disable>

To enable an app:

adb shell pm enable <package_to_enable>

Here is a list of apps I’ve disabled with no side effects (again, your mileage may vary):

adb shell pm disable-user --user 0 com.android.partnerbrowsercustomizations.tmobile (*T-mobile users leave this alone)
adb shell pm disable-user --user 0 com.google.android.feedback
adb shell pm disable-user --user 0 com.android.bookmarkprovider

2. Freeze Any App’s Background Processes

There is an article on XDA on this subject, click here. From the article:

‘A simple trick you can do to manually prevent an application from ever running in the background – and it doesn’t require root or a third-party application. This is more powerful than what Greenify or apps like Brevent offer, as without root access those apps are fairly limited in what they can do. But with this trick, now you can block apps such as Facebook or Hangouts from ever running in the background – they will only work when they are actively being used!’

Okay, follow the article if you want to know more. I’m just sharing the commands here:

adb shell
cmd appops set <package_name> RUN_IN_BACKGROUND ignore

You just have to replace ‘<package_name>’ with the actual package name of your target app.

3. System-wide Ad-blocking without using any apps

Google introduced Private DNS mode with Android 9, making it very easy to use a custom DNS provider. You can block ads using a DNS provider that supports AdBlock. I use AdGuard. These days free apps are riddled with full-screen ads & I haven't seen a single ad on any app after switching to this service. Still, DNS based ad-blocking may not be 100% reliable all the time (It hasn't failed me yet), so for best results, use AdGuard DNS with a browser that also supports ad-blocking, such as Brave, Bromite, Firefox with uBlock Origin etc.

To setup AdGuard DNS, go to:

Settings → Network & internet → Advanced → Private DNS

Now, select the Private DNS provider hostname option & enter:

dns.adguard.com

To make sure your DNS is properly configured, visit this page, scroll down a little & it should say “You are using Default AdGuard configuration”

Note:

Let me make this clear. AdGuard is a Russian service. That does NOT make it less trustworthy by default IMHO, but If you decide to use their service, you’re basically giving them a complete log of every site you visit on the internet. However, it’s the only mainstream DNS provider I could find that supports blocking ads. Make your choice.

4. Use Android 10’s native gesture navigation with any 3rd party launcher

Google has introduced native gesture-based navigation in Android 10. But as you probably have noticed, it doesn’t work with 3rd party launchers. Well, there is a simple ADB command that can activate A10 gestures on any 3rd party launcher (I use Nova Prime). The command is:

adb shell cmd overlay enable com.android.internal.systemui.navbar.gestural

However, there is a catch. The swipe up & hold gesture for recent apps menu doesn’t work with 3rd party launchers, it simply goes to your launcher’s home screen. As a workaround, I have configured Nova to launch recent apps menu with double tap on the home screen (alternatively, you can use Android Accessibility Suite’s recent app switcher). Another thing is, Android switches to its default nav bar after every reboot; so, basically you have to run this command every time you reboot your device.

A better approach would be to ditch Android 10’s half-baked gestures completely and using a better app like Fluid NG/ Edge Gestures. I don’t like using an extra app just for this purpose, so I’m sticking with the ADB method.

5. Change the height of the navigation bar

[Source]

Android’s default nav bar takes up too much space on your screen. You can adjust its height with a simple command. Fortunately, it is not affected by reboot. The command is:

adb shell wm overscan 0,0,0,-59

I’m using –59, but you can tune it to your liking. A positive value would push the navigation bar up, while negative value would push it down (partially/fully hiding it even, of course).

To reset the original height of the navigation bar:

adb shell wm overscan 0,0,0,0

6. Add Left/Right Keyboard Cursors to the Nav Bar during Text Input

This super handy tweak adds left/right keyboard cursors to the nav bar while the keyboard is showing, making it super easy to edit typos/scroll through words quickly. This article on XDA describes it in detail.

7. App: Greenify

Greenify is one of the few apps that can actually improve your device’s battery life. To utilize this amazing app to its full potential, you’re going to need root access and Xposed framework. But most of its features can be activated using ADB. And it’s all a one-time process, so that’s very convenient. You should disable battery optimization for Greenify & enable notification access, accessibility service & device admin option for Greenify to get the best results. These are the adb commands to activate Greenify without root: [Source: This article]

Note:

[On some Chinese devices (MIUI, ColorOS etc), you need to enable "USB debugging (Security settings)" from developer settings before executing the adb commands given below. The source article didn't mention this]

adb -d shell pm grant com.oasisfeng.greenify android.permission.WRITE_SECURE_SETTINGS
adb -d shell pm grant com.oasisfeng.greenify android.permission.DUMP
adb -d shell pm grant com.oasisfeng.greenify android.permission.READ_LOGS
adb -d shell pm grant com.oasisfeng.greenify android.permission.GET_APP_OPS_STATS

Now force stop Greenify to let the granted permission take effect and then turn on the accessibility service manually. You can force stop the app using the following command:

adb -d shell am force-stop com.oasisfeng.greenify

Here is a list of apps I've greenified: Click this link too see the SS gallery

Naptime by Francisco Franco is another great app which works with ADB but I think Greenify alone is enough, for me at least.

8. App: Quick Settings

Download Link : HERE

This app is tiny but extremely powerful. It allows you to add some really useful buttons to your quick settings panel. You can activate immersive mode, so you can hide status bar / navigation bar (or both) with a single click; useful if you want to use a dedicated gesture navigation app.

I have enabled screenshot button, reverse portrait, screen off toggle, caffeine, power button, volume control and a bunch of other super useful toggles using this app. To use Quick Settings app without root access, just connect your device to ADB and type (one-time process):

adb shell pm grant it.simonesestito.ntiles android.permission.WRITE_SECURE_SETTINGS

And yes, make sure to follow the in-app YouTube video to learn how to activate the quick settings tiles and disable battery optimization for this app & turn the accessibility service on.

9. Stop Vibrations from Any Android App on Your Phone:

This one is taken from THIS xda article.

Some apps & malicious ads on the web tend to abuse the vibration permission. Don't you find it kinda funny when a random ad pops up (with intense vibrations ) telling you Microsoft technical support needs to be contacted immediately to remove the Windows virus from your Android device :p:p:p You can disable vibration with this simple tweak :)

10. Advanced app permission management with Shizuku & App Ops

Android has a native app permission management system. By default, there is no user accessible way of manipulating it without root access. That’s where these two apps come in handy. Shizuku is the framework & App Ops is the app that we can use to manipulate app permissions. First of all, download the apps:

Shizuku: CLICK HERE

App Ops: CLICK HERE

Setup: SOURCE

First of all, go to:

- Settings → Apps & notification → SEE ALL APPS → Shizuku

Click on ‘Permissions’ and you’ll see ‘Additional permissions’. Click on it, and allow it the permission called ‘Shizuku’

- Now repeat the previous steps for the 2nd app, App Ops

At this point, you have to start Shizuku server via ADB. Open a command prompt and enter the following command:

adb shell sh /data/user_de/0/moe.shizuku.privileged.api/start.sh

Note: You have to execute this command every time you reboot your device

Open Shizuku and the app should say “Shizuku is running Version 8, adb” & “Authorized 1 application” – that means Shizuku has been configured correctly; see the SS:

​

Now launch App Ops, choose ADB mode (the first option), finish the intro and you’re good to go. You’ll see a list of your apps. You can view an app’s permissions by clicking on it & enable / disable them.

Note: This step is not mandatory; but if Shizuku keeps closing in the background, you should read the paragraph called "5. Shizuku randomly stops?" on this page.

11. Scrcpy - Control your phone from your PC

This application makes it very easy to mirror you phone’s screen to your PC/laptop’s monitor. It’s a very useful tool in my opinion. Once you use this program, you will find new reasons to keep using it :p It even supports copy-pasting from your PC to android & vice versa. And it works over Wi-Fi too.

From the project’s GitHub readme:

This application provides display and control of Android devices connected on USB (or over TCP/IP). It does not require any root access. It works on GNU/Linux, Windows and macOS.

It focuses on:

- lightness (native, displays only the device screen)

- performance (30~60fps)

- quality (1920×1080 or above)

- low latency (35~70ms)

- low startup time (~1 second to display the first image)

- non-intrusiveness (nothing is left installed on the device)

Download: CLICK HERE to check & download the latest version OR, CLICK HERE to download v1.14 directly

How to use: Using this application is very easy. This program comes with adb binary, so just extract the zip file in a convenient location, connect your phone to your PC, and open a command prompt in that folder & type:

adb devices
scrcpy

You should see a window with your device’s screen. It’s that simple.

Okay, this application has a ton of options & keyboard shortcuts. Follow the project’s GitHub page to learn more. I’m just listing the most useful controls here:

- Left mouse click = selects items

- Middle Mouse click (clicking the scroll wheel) = sends the current app to background

- The scroll wheel scrolls thru content

- You can write using your PC’s keyboard

- Right mouse click = back button

- Ctrl+r = Rotates the screen

- Ctrl+p acts like power button. Pressing this combo once will lock your device & pressing it again will wake the device up and bring up the lock screen. You can unlock the device without touching it; just draw the pattern with your mouse / type in the PIN.

- By default, scrcpy keeps you device’s screen on. I find that annoying. Thankfully, the dev has thought of it. Pressing Ctrl+o will turn off the display, but Scrcpy will keep mirroring the screen.

You can also limit the frame rate, reduce the resolution and bit rate to improve mirroring performance. I’d suggest reducing the bit rate first if your device’s output seems laggy. It’s also possible to record the screen while mirroring. I won’t discuss these here; follow the project’s README.md on GitHub to learn more.

As mentioned earlier, this post is a work-in-progress. I'm trying new adb tweaks & I'll update this post as I find more working ones for Mi A3. If you have some useful ADB tweaks, please share them with us. Thanks and have a nice day :)