Thursday, March 28, 2013

Since so many people were enquiring about it, improving YouTube on Android (root only.)


Saw this one Reddit (original ) and thought it would be best to post here in exact words

As I'm coming to learn, this may do nothing, this may make things worse, you'll need to some trial and error and even if it works fine one day, another day it may make things worse. Also, with the AFWall+/Android Firewall method, make sure it's not set to white list in the main interface unless you know what you're doing, otherwise no app will have internet access. You must also select apply in the menu after inputting the script/making changes or it will not change anything.
As many of you know, yesterday there was a post here in about how buffering issues with the YouTube app made someone wonder if Google was killing it, of it was an issue on their end. It was not a case of either of them, but due to throttling of cached videos with many ISPs. The top comment gave you a fix for Windows. I gave an answer about how to fix it with Android, and for visibility sake I'm making a self-post about it.
Onto the fix. You have two methods that I know of, the first is the fix I figured out and it requires a firewall app like

or
. If you use Droidwall I highly recommend switching to one of these apps as Droidwall is no longer being worked on, and both these apps are based off of Droidwall. We will firstly want to press on the menu in the app, there is an option that states Set custom script. When you press on it you are presented with a page that gives you an area to type your scripts in, you'll want to input these two lines:



Code:



$IPTABLES -A "afwall" --destination "206.111.0.0/16" -j "afwall-reject"


Code:



$IPTABLES -A "afwall" --destination "173.194.55.0/24" -j "afwall-reject"

The second method is one that I came across . uses any old terminal app, such as , to modify the iptables. Just input these three lines and it will have the same effect:

suiptables -A OUTPUT -d 173.194.55.0/24 -j DROPiptables -A OUTPUT -d 206.111.0.0/16 -j DROPWhich one you should use will depend on what you have installed. However, I cannot help you if later you decided to stop blocking these IP ranges with terminal. If you wish to stop blocking with AFWall+ or Android Firewall, all you have to do is delete the two lines from the custom script.

Here is another way do to it (shown in the full post on edit 3)

For all those rooted people out there, I created a init.d script to execute these commands at phone startup. The only pre-requisites are:

• A kernel with init.d support. (Not sure what it is? [Look for a folder called "init.d" inside "/system/etc/", if it is there you are good to go!]).

• Root Explorer

Steps to follow:
• Download S99youtube from here:

• Copy over this file to "/system/etc/init.d/".

• Using any root explorer give it permissions like this:

• Lastly again using Root Explorer change owner to to:

• Reboot.

VOILA! No need to execute these commands at startup everytime or use any third-party app!

NOTE: On the "S99youtube" file, I have not tried this method yet since from the sounds of it I need to run a kernel that's not stock(running the one that came with my Sprint S3) so if you are running stock go ahead and make the "init.d" folder, I'm not sure if will work though, you'll have to test it with this command (under Terminal Emulator):

su


iptables -L -n

And after that search for the IPs that are to be blocked, if they're there, the script executed successfully


Read more...

forums.androidcentral.com

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...