Remove all apps from all your connected android device except the white list.
git clone https://github.com/x13945/uninstall-all-app-from-device
cd uninstall-all-app-from-device
You can add some app's pacakge name that will not uninstall into the config's white list attribute. Like below:
config.json
{
"whiteList":[
"org.lstec",
"com.github"
]
}
Run the script from command line with nodejs
node ./uninstallAllApkFromDevice.js
Then, you will get some result like this:
➜ uninstall-all-app-from-device git:(master) ✗ node ./uninstallAllApkFromDevice.js
Get white list:
[ 'org.lstec' ]
====================================
Get device list:
[ 'emulator-5556', 'emulator-5554' ]
====================================
====================================
Get app list from emulator-5554
[ 'com.fengwu' ]
====================================
Trying to uninstall com.fengwu from emulator-5554
Success