solution for error: insufficient permissions for device