< Getting the logs from target application >

28 views
Skip to first unread message

Dev.SachiAndroid

unread,
Jul 12, 2011, 2:39:51 PM7/12/11
to Robotium Developers
Hi Everybody [Robotium Developer]

i want to get the logs from the target application and save it to the
storage system by including  following permission in my robotium test
application's manifest:

<uses-permission android:name="android.permission.READ_LOGS"" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

I only have apk of the target application (source code not
accessible).
I tried to run robotium test application with above permissions but
those doesn't work. How to achieve it? 


Thanks,
Sachi.

marekdef

unread,
Jul 12, 2011, 3:59:54 PM7/12/11
to Robotium Developers
I think that test takes permissionsfrom target app.
The only way of saving logs is to create a service that has the
permiśions and bind to it from test.

garry

unread,
Jul 18, 2011, 6:38:54 PM7/18/11
to Robotium Developers
I had same problem. I wrote the service but It never binds, following
lines always give returns false:

boolean ret = getInstrumentation().getContext().bindService(intent,
mServiceConnection, Context.BIND_AUTO_CREATE);

Am I doing something wrong to bind the service.

marekdef

unread,
Jul 20, 2011, 1:53:58 AM7/20/11
to Robotium Developers
What is in the intent ?

Did you specified intent filter in your service ?
Is it in the manifest of your service ?

garry

unread,
Jul 21, 2011, 2:50:59 PM7/21/11
to Robotium Developers
There was not intent filter. I find the work around, I created a
broadcast receiver with the service application and then I send the
broadcast from my test application to start the service. It works.
Thanks
Reply all
Reply to author
Forward
0 new messages