Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

You can get the values easily but can't set them without root access because the files are read-only (rw-r-r) for "others".

##Get the values

  1. Use D. Gibbs's answer to setup ADB.

  2. Launch Terminal/cmd in PC and enter:

     adb shell  
     find /proc/sys/net/ -type f | while read -r file; do echo $file $(cat $file); done
    
  • find will find the files under the location /proc/sys/net/. Tweak the location if the need arises.
  • while read will read each line of the previous output as a file,
  • do will allow execution of tasks (echo "filename" and show its value using cat),
  • done to complete the task.
  • Sources: 11, 22.

Snippet of output:

    /proc/sys/net/core/dev_weight 64
    /proc/sys/net/core/message_burst 10
    /proc/sys/net/core/message_cost 5
    /proc/sys/net/core/netdev_budget 300
    /proc/sys/net/core/netdev_max_backlog 1000
    /proc/sys/net/core/netdev_tstamp_prequeue 1
  1. You may save the output into a file by using > <FILENAME> at the end of the step 2's last command.
  2. Some files won't be saved or shown because of file permissions. In that case, root the device and repeat the aforesaid steps using su after adb shell command.

Set the values

Now that you've a table of file -> value, you can change the value using echo, provided that you've root access.

  1. In the terminal, enter:

     adb shell 
     su 
     echo <VALUE> > <FILE_PATH>
    

Change <VALUE> with the value you want to set and <FILEPATH> with the path of the file. E.g.

    echo 46 > proc/sys/net/core/dev_weight 

You can apply the steps in a terminal app on Android as well. Just make minor changes relevant to the environment, like > <FILENAME> in find command, and not using adb shell.

You can get the values easily but can't set them without root access because the files are read-only (rw-r-r) for "others".

##Get the values

  1. Use D. Gibbs's answer to setup ADB.

  2. Launch Terminal/cmd in PC and enter:

     adb shell  
     find /proc/sys/net/ -type f | while read -r file; do echo $file $(cat $file); done
    
  • find will find the files under the location /proc/sys/net/. Tweak the location if the need arises.
  • while read will read each line of the previous output as a file,
  • do will allow execution of tasks (echo "filename" and show its value using cat),
  • done to complete the task.
  • Sources: 1, 2.

Snippet of output:

    /proc/sys/net/core/dev_weight 64
    /proc/sys/net/core/message_burst 10
    /proc/sys/net/core/message_cost 5
    /proc/sys/net/core/netdev_budget 300
    /proc/sys/net/core/netdev_max_backlog 1000
    /proc/sys/net/core/netdev_tstamp_prequeue 1
  1. You may save the output into a file by using > <FILENAME> at the end of the step 2's last command.
  2. Some files won't be saved or shown because of file permissions. In that case, root the device and repeat the aforesaid steps using su after adb shell command.

Set the values

Now that you've a table of file -> value, you can change the value using echo, provided that you've root access.

  1. In the terminal, enter:

     adb shell 
     su 
     echo <VALUE> > <FILE_PATH>
    

Change <VALUE> with the value you want to set and <FILEPATH> with the path of the file. E.g.

    echo 46 > proc/sys/net/core/dev_weight 

You can apply the steps in a terminal app on Android as well. Just make minor changes relevant to the environment, like > <FILENAME> in find command, and not using adb shell.

You can get the values easily but can't set them without root access because the files are read-only (rw-r-r) for "others".

##Get the values

  1. Use D. Gibbs's answer to setup ADB.

  2. Launch Terminal/cmd in PC and enter:

     adb shell  
     find /proc/sys/net/ -type f | while read -r file; do echo $file $(cat $file); done
    
  • find will find the files under the location /proc/sys/net/. Tweak the location if the need arises.
  • while read will read each line of the previous output as a file,
  • do will allow execution of tasks (echo "filename" and show its value using cat),
  • done to complete the task.
  • Sources: 1, 2.

Snippet of output:

    /proc/sys/net/core/dev_weight 64
    /proc/sys/net/core/message_burst 10
    /proc/sys/net/core/message_cost 5
    /proc/sys/net/core/netdev_budget 300
    /proc/sys/net/core/netdev_max_backlog 1000
    /proc/sys/net/core/netdev_tstamp_prequeue 1
  1. You may save the output into a file by using > <FILENAME> at the end of the step 2's last command.
  2. Some files won't be saved or shown because of file permissions. In that case, root the device and repeat the aforesaid steps using su after adb shell command.

Set the values

Now that you've a table of file -> value, you can change the value using echo, provided that you've root access.

  1. In the terminal, enter:

     adb shell 
     su 
     echo <VALUE> > <FILE_PATH>
    

Change <VALUE> with the value you want to set and <FILEPATH> with the path of the file. E.g.

    echo 46 > proc/sys/net/core/dev_weight 

You can apply the steps in a terminal app on Android as well. Just make minor changes relevant to the environment, like > <FILENAME> in find command, and not using adb shell.

replaced http://android.stackexchange.com/ with https://android.stackexchange.com/
Source Link

You can get the values easily but can't set them without root access because the files are read-only (rw-r-r) for "others".

##Get the values

  1. Use D. Gibbs's answerD. Gibbs's answer to setup ADB.

  2. Launch Terminal/cmd in PC and enter:

     adb shell  
     find /proc/sys/net/ -type f | while read -r file; do echo $file $(cat $file); done
    
  • find will find the files under the location /proc/sys/net/. Tweak the location if the need arises.
  • while read will read each line of the previous output as a file,
  • do will allow execution of tasks (echo "filename" and show its value using cat),
  • done to complete the task.
  • Sources: 1, 2.

Snippet of output:

    /proc/sys/net/core/dev_weight 64
    /proc/sys/net/core/message_burst 10
    /proc/sys/net/core/message_cost 5
    /proc/sys/net/core/netdev_budget 300
    /proc/sys/net/core/netdev_max_backlog 1000
    /proc/sys/net/core/netdev_tstamp_prequeue 1
  1. You may save the output into a file by using > <FILENAME> at the end of the step 2's last command.
  2. Some files won't be saved or shown because of file permissions. In that case, root the device and repeat the aforesaid steps using su after adb shell command.

Set the values

Now that you've a table of file -> value, you can change the value using echo, provided that you've root access.

  1. In the terminal, enter:

     adb shell 
     su 
     echo <VALUE> > <FILE_PATH>
    

Change <VALUE> with the value you want to set and <FILEPATH> with the path of the file. E.g.

    echo 46 > proc/sys/net/core/dev_weight 

You can apply the steps in a terminal app on Android as well. Just make minor changes relevant to the environment, like > <FILENAME> in find command, and not using adb shell.

You can get the values easily but can't set them without root access because the files are read-only (rw-r-r) for "others".

##Get the values

  1. Use D. Gibbs's answer to setup ADB.

  2. Launch Terminal/cmd in PC and enter:

     adb shell  
     find /proc/sys/net/ -type f | while read -r file; do echo $file $(cat $file); done
    
  • find will find the files under the location /proc/sys/net/. Tweak the location if the need arises.
  • while read will read each line of the previous output as a file,
  • do will allow execution of tasks (echo "filename" and show its value using cat),
  • done to complete the task.
  • Sources: 1, 2.

Snippet of output:

    /proc/sys/net/core/dev_weight 64
    /proc/sys/net/core/message_burst 10
    /proc/sys/net/core/message_cost 5
    /proc/sys/net/core/netdev_budget 300
    /proc/sys/net/core/netdev_max_backlog 1000
    /proc/sys/net/core/netdev_tstamp_prequeue 1
  1. You may save the output into a file by using > <FILENAME> at the end of the step 2's last command.
  2. Some files won't be saved or shown because of file permissions. In that case, root the device and repeat the aforesaid steps using su after adb shell command.

Set the values

Now that you've a table of file -> value, you can change the value using echo, provided that you've root access.

  1. In the terminal, enter:

     adb shell 
     su 
     echo <VALUE> > <FILE_PATH>
    

Change <VALUE> with the value you want to set and <FILEPATH> with the path of the file. E.g.

    echo 46 > proc/sys/net/core/dev_weight 

You can apply the steps in a terminal app on Android as well. Just make minor changes relevant to the environment, like > <FILENAME> in find command, and not using adb shell.

You can get the values easily but can't set them without root access because the files are read-only (rw-r-r) for "others".

##Get the values

  1. Use D. Gibbs's answer to setup ADB.

  2. Launch Terminal/cmd in PC and enter:

     adb shell  
     find /proc/sys/net/ -type f | while read -r file; do echo $file $(cat $file); done
    
  • find will find the files under the location /proc/sys/net/. Tweak the location if the need arises.
  • while read will read each line of the previous output as a file,
  • do will allow execution of tasks (echo "filename" and show its value using cat),
  • done to complete the task.
  • Sources: 1, 2.

Snippet of output:

    /proc/sys/net/core/dev_weight 64
    /proc/sys/net/core/message_burst 10
    /proc/sys/net/core/message_cost 5
    /proc/sys/net/core/netdev_budget 300
    /proc/sys/net/core/netdev_max_backlog 1000
    /proc/sys/net/core/netdev_tstamp_prequeue 1
  1. You may save the output into a file by using > <FILENAME> at the end of the step 2's last command.
  2. Some files won't be saved or shown because of file permissions. In that case, root the device and repeat the aforesaid steps using su after adb shell command.

Set the values

Now that you've a table of file -> value, you can change the value using echo, provided that you've root access.

  1. In the terminal, enter:

     adb shell 
     su 
     echo <VALUE> > <FILE_PATH>
    

Change <VALUE> with the value you want to set and <FILEPATH> with the path of the file. E.g.

    echo 46 > proc/sys/net/core/dev_weight 

You can apply the steps in a terminal app on Android as well. Just make minor changes relevant to the environment, like > <FILENAME> in find command, and not using adb shell.

Source Link
Firelord
  • 25.3k
  • 21
  • 126
  • 292

You can get the values easily but can't set them without root access because the files are read-only (rw-r-r) for "others".

##Get the values

  1. Use D. Gibbs's answer to setup ADB.

  2. Launch Terminal/cmd in PC and enter:

     adb shell  
     find /proc/sys/net/ -type f | while read -r file; do echo $file $(cat $file); done
    
  • find will find the files under the location /proc/sys/net/. Tweak the location if the need arises.
  • while read will read each line of the previous output as a file,
  • do will allow execution of tasks (echo "filename" and show its value using cat),
  • done to complete the task.
  • Sources: 1, 2.

Snippet of output:

    /proc/sys/net/core/dev_weight 64
    /proc/sys/net/core/message_burst 10
    /proc/sys/net/core/message_cost 5
    /proc/sys/net/core/netdev_budget 300
    /proc/sys/net/core/netdev_max_backlog 1000
    /proc/sys/net/core/netdev_tstamp_prequeue 1
  1. You may save the output into a file by using > <FILENAME> at the end of the step 2's last command.
  2. Some files won't be saved or shown because of file permissions. In that case, root the device and repeat the aforesaid steps using su after adb shell command.

Set the values

Now that you've a table of file -> value, you can change the value using echo, provided that you've root access.

  1. In the terminal, enter:

     adb shell 
     su 
     echo <VALUE> > <FILE_PATH>
    

Change <VALUE> with the value you want to set and <FILEPATH> with the path of the file. E.g.

    echo 46 > proc/sys/net/core/dev_weight 

You can apply the steps in a terminal app on Android as well. Just make minor changes relevant to the environment, like > <FILENAME> in find command, and not using adb shell.