Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run android application with instrumentation turned on

Tags:

android

I have created a customised version of android.app.Instrumentation and have modified my AndroidManifest.xml to use it.

However when I run the application from eclipse it does not seem to load my instrumentation object (am logging and settings global (I know horrible, just for now I swear!) variables that I later check)

I think I need to run it using adb and telling it to use instrumentation but I can't find the correct instructions for doing this (and I have read so much about instrumentation the last few days I am start to go nuts!)

like image 934
Derek Ekins Avatar asked Oct 17 '25 18:10

Derek Ekins


1 Answers

Run

   $ adb shell pm list instrumentation

to verify that your instrumentation is there. You will receive something like

   instrumentation:my.pkg.text/my.instr (target=my.pkg)

then run

 $ adb shell am instrument -w my.pkg.test/my.instr
like image 120
Diego Torres Milano Avatar answered Oct 20 '25 09:10

Diego Torres Milano



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!