"APN settings are not available for this user" My phone is a stock Nexus 4 from Google with the 5.0.1 Lollipop image from Google.

I've mistakenly hit "reset APN settings". Instead of resetting them to defaults, it wiped them off and grayed out the "add access point" button. I don't know what to do to gain access to this back. 

I've tried launching the "Settings" activity from the terminal with root access (using the "su" command), see this answer, but the "Settings" activity crashes right after its launch.

What can I do? There seems to be a user permission problem. I'm using the only user account configured on this phone, besides the "guest" user.
I've found the problem: I had bad permissions on various MMS-related files that I've copied from a backup, especially inside data/data/com.android.providers.telephony/databases/.

Files inside data/data/com.android.providers.telephony/ have to belong to the radio group and be owned by the radio user. CHMOD has to be at least 761.