

After the slash is the name of the Main Activity, which unless you’ve edited your (and some other fundamentals of your app) is always. Before the slash is the package name, just like for uninstalling it. Now we use the Android Activity Manager (AM). Now if you want to run it, things get a little more interesting. When a user updates an app from the App store, or installs it via most any other means, then it performs a reinstall, which leaves the data intact. This results in all the data being cleaned out, which can be useful during development to be sure you don’t leave anything behind from the previous run. One note, when Delphi deploys your app to run it, it performs an uninstall first. BTW, the pm in there is the Android Package Manager. If you changed it under Project Options -> Version Info -> Package, then use that value instead.
MAC ANDROID EMULATOR COMMAND LINE APK
Now if you want to uninstall your apk you can do that too: adb shell pm uninstall -k Īgain, is the default name of the package.

The great thing about the -r is it works even if it wasn’t already installed.
MAC ANDROID EMULATOR COMMAND LINE INSTALL
If your apk is already installed, then use the following command to “reinstall” it, leaving the data intact: adb install -r path\ProjectName.apk The apk usually has the same name as the project.

In this example path\ProjectName.apk is the full relative path to the apk. See the end for notes on multiple devices or if you are running both an emulator and device.įirst to install your app: adb install path\ProjectName.apk They should work on both Mac and Windows. These all assume adb (Android Debug Bridge) is on your system path and you only have one Android device (or emulator) attached. Delphi automatically installs and runs your app for you, but sometimes it is nice to do manually from the command-line.
