How to change preferred network type over adb android?

How to change your preferred network type using ADB?

Example: set Use only GSM, use only WCDMA, use only LTE or automatically.

+6
source share
3 answers

This works for my devices:

adb shell sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update global SET value = 1 WHERE name = 'preferred_network_mode'" adb shell sqlite3 /data/data/com.android.providers.settings/databases/settings.db "select value FROM secure WHERE name = 'preferred_network_mode'" adb shell settings put global airplane_mode_on 1 adb shell am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true sleep 5; adb shell settings put global airplane_mode_on 0 adb shell am broadcast -a android.intent.action.AIRPLANE_MODE --ez state false 
+1
source

Hope this helps:

GSM only:

 adb shell sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update global SET value=1 WHERE name='preferred_network_mode'" adb shell sqlite3 /data/data/com.android.providers.settings/databases/settings.db "select value FROM secure WHERE name='preferred_network_mode'" adb reboot 

For LTE, change value = 11 For WCDMA, change value = 2

0
source

Source: https://habr.com/ru/post/973845/


All Articles