Running shell script in Android adb shell
问题 I'm trying to create a script to find and remove my app from the Android emulator through the adb shell. This is what I've got: adb shell " cd data/app for app in com.mycompany.*.apk; do echo $app bundle=$(echo $app | sed 's/-[0-9]//g') echo 'bundle name is $bundle' if [ '$bundle' != '' ];then adb uninstall $bundle else echo 'No apps found' fi done exit " But it doesn't seem to work as expected. my for loop doesn't iterate through anything. If I manually run the commands exactly as above in