Giter Club home page Giter Club logo

networktoggler's Introduction

NetworkToggler

An quick settings tile for toggling 5G on Android phones.

Important Information

This currently does not work. While I am able to flip the 'Preferred Network Type' setting between 'Global' and 'LTE' in Android settings, I can't get the radio mode to acutally switch, therefore rendering the app mostly useless, unless you like randomly pressing a button that does close to nothing. If anybody does know how to do it though, feel free to implement it and open a PR.

Setup

Disclaimer: ADB can be scary. I don't assume any reponsibility or liability for anything you screw up on your phone; this is all done at your own discretion. I've tested this on my own phone and can confirm that the information provided below does work for my device, a Google Pixel 5.

Since this modifies the global settings, it requires that you give the app android.permission.WRITE_SECURE_SETTINGS over adb to work. The code might also need some tweaking depending on your phone. If you have a Pixel 5, you are good to go, as that is what I wrote this for.

For all other phones, you will need to see which PREFERRED_NETOWRK_MODE value corresponds to your SIM. To do so:

  1. Start up adb for your device, and run adb shell settings list global | grep preferred_network_mode

    The output should look something like:

    $ adb shell settings list global | grep preferred_network_mode
    preferred_network_mode2=27
    preferred_network_mode3=27
    preferred_network_mode27,27
    
  2. Change your preferred network type on your device to something different.

  3. Run the command in step 1 again.

  4. Compare the values outputted with the previous values. The name of the setting that changed is the name that you will need to replace preferred_network_mode3 in QuickSettingsTile.kt with.

networktoggler's People

Contributors

cominatyou avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.