Neither user <APP> nor current process has android.permission.CHANGE_WIFI_STATE (Black Box , APK)

975 views
Skip to first unread message

Ram payasi

unread,
Mar 30, 2016, 2:33:22 PM3/30/16
to Robotium Developers
I am trying to write a script without having source code. now i want to change twhe network status like wifi on\off or mobile network on\off before running my TC

I am adding below permission in Test project, but my apk dont have these permission. the AUT have only View wifi state and internet permission

 <uses-permission android:name= "android.permission.CHANGE_WIFI_STATE" />
    <uses-permission android:name = "android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name = "android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name = "android.permission.CHANGE_NETWORK_STATE" />
    <uses-permission android:name = "android.permission.INTERNET"/>

now my tc throws
java.lang.SecurityException: WifiService: Neither user <APP ID> nor current process has android.permission.CHANGE_WIFI_STATE.

Could you please help on this. how i can add permission in AUT if i dont have surce code

Thanks
Ram

Renas Reda

unread,
Apr 1, 2016, 10:31:05 AM4/1/16
to Robotium Developers
You might be able to hack something. Not sure. The permission tags need to be in the app under test. 
Reply all
Reply to author
Forward
0 new messages