Android how to disable 2g, 3g or change preferred network type

Introduction

Sometimes you want to make sure that your phone never uses 2g or 3g. One of the reason is to avoid hoppig o rouge cell (something common in security confereces).

Solution

Go to phone an write on the dialer (you don't need to call):

*#*#4636#*#*

You will have a menu like this one:

Android settings for *#*#4636#*#*

To change network preferred type go to: "Phone Information 1" (or the one you want to change). Then you need to change the settings called "Set Preferred Network Type" to LTE only or the option you want.