Punkyrol77
Punkyrol77

Reputation: 21

How can I uninstall a package using Monkeyrunner?

What is wrong with this script?

 # Imports the monkeyrunner modules used by this program 
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice 
# Connects to the current device, returning a MonkeyDevice object 
device = MonkeyRunner.waitForConnection() 
 #Uninstall package 
 device.removePackage ('MyApp.apk')

I also tried using the path of the application and didn't work.

Upvotes: 1

Views: 1339

Answers (1)

mxk
mxk

Reputation: 43544

try this:

device.removePackage 'com.mypackage.myapp'

Upvotes: 3

Related Questions