Entering ADB commands There are a few ways to run adb commands on your phone, the simplest one is using ADB shell app which works only if you're on Android 11+. If you're using android 10 or below, you'll have to use USB debugging. You can also use USB debugging on android 11+ if you're having trouble with wireless debugging. A)USB debugging using a PC/Mac: Spoiler On your phone: 1-Enable Developer mode and enable USB debugging: https://www.howtogeek.com/129728/how-to-access-the-developer-options-menu-and-enable-usb-debugging-on-android-4.2/ 2-Enable: "Disable permission monitoring". This is usually the last option in Developer mode. It's not present in some phones especially the the very old ones:https://pasteboard.co/JF6u4Pn.png On Xiaomi phones, also activate USB Debugging (Security Mode) and installations via usb. (not sure if those options are present on other phones) 3-Change the USB option to Media Device/MTP. You could do that after connecting your phone to your PC by a USB cable as you usually get a notification to choose the USB option. You could also swipe down the status bar of your phone to set the USB options after you plug in the phone. If you still can't find it, typing "usb" in the search bar in your settings app could help. On your PC: 1- Download the latest version of ADB ZIP file: Windows (13 MB): https://dl.google.com/android/repository/platform-tools-latest-windows.zip MacOS:https://dl.google.com/android/repository/platform-tools-latest-darwin.zip Linux:https://dl.google.com/android/repository/platform-tools-latest-linux.zip (There are versions of ADB for macOS or linux: https://www.xda-developers.com/install-adb-windows-macos-linux On macOS & Linux, all commands starting with adb have to be preceded with ./ Example: macOS and Linux: Code: ./adb devices while on windows cmd: Code: adb devices 2-Extract that zip file directly into your C: drive, so that you get a folder named platform-tools in your C: drive. 3-From windows start menu open cmd 4-Use the following code in cmd to change the directory to the platform-tools folder(the one in your C: drive): Code: cd C:\platform-tools 5-Use this code to check that adb recognizes your device connected by the USB cable: Code: adb devices ADB is now connected and ready for action. UPDATE: you can use this web app to enter adb commands directly form your browser to your phone, still needs usb debugging enabled: https://app.webadb.com/shell B)Wireless debugging using another android phone/PC (Android 11+): Spoiler You could install the ADB Shell app mentioned above on another android phone and connect your main phone and the other phone to the same wifi network. Now pair and connect your main phone to the ADB shell app on the other phone using the same steps. Debugging using a PC on the same WiFi network: (The following guide uses powershell instead of cmd, so all commands starting with adb will be preceded with ./ ) https://www.unlockbase.com/blog/enable-wireless-adb-in-samsungs-one-ui-3-0/ D)Local adb using ADB shell app + wireless debugging(Android 11+) Produces errors on Android 13: Spoiler 1-Install ADB Shell app on your phone. https://play.google.com/store/apps/details?id=com.github.standardadb&hl=en 2-Activate developer options on your phone by searching for Build Number in your settings app, then tab Build Number 7 times. Pair and connect (video): Pair and connect (Text version): Open developer options from settings>Enable Wireless debugging, then click on Wireless debugging. Click on pair device with pairing code. You will get and IP and a port, in addition to a pairing code. Example: Pairing code: 228448 IP and port: 192.168.1.9:726354 (Note that if you click cancel or click home button, the pairing code and port will be changed. So open recent apps(the button beside home in your phone) then hold the settings app and open it in popup view.) If your phone doesn't support popup view, then you could either: -Install ADB shell app on another android phone and connect your main phone and the other phone to the same wifi. This way you could enter commands from the other phone to your main phone. -Use USB debugging (discussed later). 3-Open the ADB Shell app, click on local shell and enter this (change the IP & port to the ones you got from your phone): adb pair 192.168.1.9:726354 It will ask you for the pairing code, just enter it. The device should now be paired. Now click on cancel in the popup in wireless debugging. 4-The next step after pairing is connecting. Go back to wireless debugging, you'll see Device name and under it, you'll find IP address and port, note that they are different than the ones that you used for pairing. Example: Device name: Galaxy S20 IP address & port: 192.168.1.9:99322 -Go back to local shell and enter this (change the IP and port to yours): adb connect 192.168.1.9:99322 -Now you're ready to enter the adb commands that you want. As long as @localhostis present in the list of paired devices on your phone (you could check it under wireless debugging), you could just start from the adb connect step next time you want to enter commands.
You could use ADB to do a lot of things. For example, you could use it to disable system apps or set an app as device admin. This is a part of another thread: https://forum.nofap.com/index.php?threads/android-device-policy-management-dpc.304668/
well afaik it can be done without adb or pc, my brother sent me a trick couple of weeks back how to do it, i didn't open the link but he has applied that on his phone
Hi, I have a Redmi Note 9 Pro and I can't find an option called "Disable permission monitoring". The closest thing I've read is Logging Level, which is off (other options are debug or verbose), but I guess it's another thing. Can you help me on this? Thanks in advance.
I tried to do it today by connecting the phone to the PC , and running the command "adb devices" and I got this: 'adb' is not recognized as an internal or external command, operable program or batch file. than I checked and noticed that the folder "platform-tools" had another folder inside: "platform-tools". so the files were 1 layer too deep and the computer didn't found them. It might be useful to give a warning about this in the guide.
I finally found an effective way to lockdown my Android Phone with a modified version of Test DPC (which asks to set the password before opening the app) For users like myself who always look for sneaky ways around VPNs and can turn off the device admin apps like Truple Porn Filter / Blocker or App Lockers (disable draw over apps); this is the most bulletproof Android option I have found. I got this Test DPC file from someone online who was working on a fork from Github (not sure if he's part of the NoFap Community but his name is Michael) https://github.com/googlesamples/android-testdpc/issues/131 https://github.com/routerdieb - github user profile Pre-requisites - Need a Cleanbrowsing Pro 50 subscription - Android Phone with Android 11 or higher software - Allow android phone to install unknown apps - Android ADB / usb debugging enabled - A backup usb to secure the Test DPC password 1 - Install The Custom Test DPC Apk File (which has password lock enabled) I have uploaded this Test DPC file to my google drive, if you have any issues downloading / installing please PM me https://drive.google.com/file/d/1YP0bwrHglYz2gpIRzYoriAqm73ZJezXY/view?usp=share_link 2 - Setup Test DPC as Device Owner (using adb) plug your phone into you PC / Mac and configure a new profile for Test DPC dpm set-device-owner com.afwsamples.testdpc/.DeviceAdminReceiver make sure you have removed all other accounts from your android phone 3 - Open The Test DPC App (should be called Applock DPC) + Copy Password remember to copy / paste the password and put it somewhere (it gives you a random password, so remember this code!) disable uninstall apps in Test DPC disable configure dns option 4 - Copy Your Custom DNS From The Cleanbrowsing Portal Under network settings you should see something like this DNS over TLS (DoT): customd4bcaaa123.dot.cleanbrowsing.org copy and paste the dns url into your private dns setting set the DNS config in Test DPC Your phone should now be unable to use any VPNs, Porn, Adult sites etc that Cleanbrowsing blocks You will be unable to disable your Android DNS settings either because its locked Hope this guide helps some Android users, I know its definitely helped me out cc: sinner76.354636
I haven't tried factory resetting the phone, but if you do that everything on your Android Phone gets uninstalled / removed. Never gone that far (yet) but yeah if users do factory reset all applications will be removed. There is an option in Test DPC to prevent factory reset, once the password has been set + you've locked the permissions the system settings will be un-editable without the password.