Android: Read APN using ADB shell

A.G. picture A.G. · Jan 29, 2014 · Viewed 7.7k times · Source

According to this post, manually-entered APNs are contained here:

/data/data/com.android.settings/shared_prefs/com.android.settings_preferences.x­ml

However, this file can't be accessed using adb shell cat or adb pull.

Is there any workaround for a non-rooted device?

Answer

Solata picture Solata · May 1, 2020

On non-rooted devices is not possible to read system files.

On rooted devices with more recent Android version, this worked for me:

sqlite3 /data/data/com.android.providers.telephony/databases/telephony.db "select * from carriers;"