Skip to content

Instantly share code, notes, and snippets.

@semafor
Created May 21, 2015 22:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save semafor/1e4ecd4b865d62875826 to your computer and use it in GitHub Desktop.
Save semafor/1e4ecd4b865d62875826 to your computer and use it in GitHub Desktop.
# Find the context that you want to remove.
# Note: ril_0 is the first sim slot, ril_1 is the second. We'll be using the first.
gdbus call --system -d org.ofono -o /ril_0 -m org.ofono.ConnectionManager.GetContexts | tr ',' '\n'
# Outputs:
#([(objectpath '/ril_0/context2'
# {'Name': <'Bad MMS APN'>
# 'Active': <false>
# 'Type': <'mms'>
# 'Protocol': <'ip'>
# 'AccessPointName': <'mmsapn'>
# 'Username': <'mmsuser'>
# 'Password': <'mmspass'>
# 'MessageProxy': <'10.11.12.13:8080'>
# 'MessageCenter': <'http://mms.example.com:8000'>
# 'Settings': <@a{sv} {}>
# 'IPv6.Settings': <@a{sv} {}>})]
#)
# Grab the path of the context you want to remove. Normally in the form /ril_n/context/n
gdbus call --system -d org.ofono -o /ril_0 -m org.ofono.ConnectionManager.RemoveContext /ril_0/context2
# Outputs ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment