This guide lists the steps to close apps from the Recents screen using ADB Commands. Nowadays, even mid and budget-tier phones could support a slew of apps running concurrently in the background without any issues. But, in rare instances, if an app isn’t working along the expected lines, then it might have an adverse impact on the overall functioning of the system. This in turn will lead to the device slowing down, crashing or even becoming unresponsive altogether.
When that happens, the user generally closes all the apps running in the backend. However, if the device is currently not responsive, then we would not be able to get this job done. So what else could be done? Well, there does exist a nifty workaround using ADB Commands that don’t even require an interaction with the device but could still close all the apps from the Recents menu on your Android device. So without further ado, let’s check out that tweak right away.
How to Close all Apps from Recents via ADB Command
There’s just one prerequisite that needs to be checkmarked beforehand- USB Debugging should be enabled on the device. If that is not the case, then refer to our detailed guide and get this job done: How to Enable USB Debugging on Android. [However, if the touch is currently unresponsive, then it’s quite obvious that you wouldn’t be able to enable this option and the tweak will not work in that case].
- First off, download and extract Android SDK Platform Tools on your PC.
- Then head over to Settings > System > Tap on Build Number 7 times.
- NOTE: In the case of Xiaomi, you’ll have to tap on MIUI Version/OS Version 7 times.
- This will enable Developer Options. So go to Settings > System > Developer Options.
- Now enable the toggle next to USB Debugging and connect your device to PC via a USB.
- Now head over to the platform-tools folder, type in CMD in the address bar, and hit Enter. This will launch the Command Prompt.
- Now type in the below command in the CMD window to open the Recents App screen:
adb shell input keyevent KEYCODE_APP_SWITCH
- After that, type in the below command and it will highlight the first app.
adb shell input keyevent KEYCODE_DPAD_DOWN
- So keep on executing this command until it highlights the Clear All button.
- Once that happens, type in the below command to tap on the Clear All button
adb shell input keyevent KEYCODE_ENTER
- It will now close all the apps at once running in the background and your task stands complete.
That’s it. These were the steps to close apps from the Recents menu using ADB Commands. Some devices [such as the Pixel] have the Clear All button at the extreme left, so in those cases, you will have to execute the adb shell input keyevent KEYCODE_DPAD_DOWN command quite a lot of times until you reach that button.
On the other hand, if the button is right at the bottom of the Recent screen or even at the bottom of the screen [such as in OnePlus], then you will be able to reach it pretty quickly as you’ll only have to execute that command only a single time. With that said, whether it’s the shorter or the longer route, it’s the only course of action that some users might have, and for them, the length of this fix could take a back seat, till it’s doing its intended job.
ADB Commands: The Best Tool for Tech Enthusiasts
Many users might already be aware of numerous ADB commands and their usage, including but not limited to the ability to boot to Recovery/Bootloader/FastbootD, execute commands in the shell environment, transfer files between PC and device via ADB Push and Pull, and even official OTA updates [for both stock and custom recovery] via the Sideload feature. However, these are just the starting points.
These commands behold a slew of other intriguing features in its arsenal and the one which we have discussed above it’s just the tip of the iceberg. There are literally endless tweaks that you could carry out without even interacting with your device in the first place. The only prerequisite that you need to checkmark is enabling the USB Debugging beforehand. If you have already done so, then go ahead and explore the endless possibilities that ADB has in store for you!