Wireless adb debugging

Wireless adb debugging

images (2)
In my attempts to make terminal clients of whatsapp and paytm, I was consistently asked that if we had to connect it via USB, there is not much fun. So I made this entire experience wireless. This article will explain how to do wireless adb debugging over a network.

What do you need?

  1. Connectbot app: To power wireless connection over ssh.

  2. Adb setup: Use this google guide to set this up.

  3. Same Wifi network for phone and laptop.


Lets do it.

  1. Note down ip address of your system. (use ifconfig on linux).

  2. Open Connectbot, Enter your username@hostname for ssh field.


You should be able to connect to your system terminal after basic authentication clearance.

  1. Long press your newly made connection and select Edit host. Inside Post login automation, add this

adb connect localhost:5555


ensure to enter an extra [ENTER] after this command and press ok.

  1. Again go back to your connection, long press it and select Edit port forward this time. (Yes, We are going to use port forwarding to make it wireless)

Use settings button to add new port forward and enter this

Nickname: ADB

Type: Remote

Source Port: 5555

Destination: localhost:5555


save the settings and mobile part is done.

  1. Connect your android to system and enter below command to allow tcpip on 5555 port for adb.

adb tcpip 5555

And you are done. Go wireless now and type adb devices on your system. you should see something like this.

Screen Shot 2014-09-28 at 4.39.54 PM


Now go out and try Wireless terminal Whatsapp and Seemless mobile recharge via Paytm.

Bendgate – Rivals trolling Apple

“Steve Jobs! You’re being missed!”, looks like a buzzword in Apple’s office. True that Apple creates products that it loves whether they are liked by its customers or not but iPhone 6 is turning out to be one of the most epic failures.

A phone that bends in your pocket! That’s not what you’re paying for. Let’s have a look at how competitors took upon this news rather ‘opportunity’. Introducing ‘Bendgate’, a new buzz word.

The first one to react was definitely Samsung. Flaunting about its curves!!!01

This shows that you just can’t make a mistake in today’s world


Well, is ASUS trying to ‘support’ Apple in difficult times?


Flexing on purpose, LG!!!04

Nokia Users! Please don’t try this at home.


Tim Cooks should have ended his presentation in typical Steve Jobs style like this.



Must buy accessories for iPhone 6. Coming Soon!


And the new interface for the website!


Looking for some celebrity endorsements? Here are a few suggestions.




One thing is for sure. Bendgate definitely went viral.11 12

The great Indian contradictions

The great Indian contradictions

India, Where every one wants his country to succeed, but no one wants their neighbor’s success. Here are a few other popular Indian contradictions..


Irony is when People kill their own girls in womb and seek out neighbor’s girls for ‘Kanya Puja’!!!


You have to look both ways to cross a one-way road.


Parents want their children to stand out in a crowd but expect them to do what the crowd is doing.

Coach stage

The Hindus have to prove that they are secular, while the Muslims have to prove that they are patriotic.


Everyone’s in a hurry, but no one reaches on time.


In India YOU do not cast your vote, you vote YOUR caste.

Abu Abraham Vote Your Caste Here

Where  education loan has higher interest rate than car loan.

download (5)

You can’t be a peon in any organization without 8th pass but you can be Chief Minister / Prime-minister / President of our country without any education, even with a proven criminal track-record. .


Students with 45% get in elite institutions thru quota system and those with 90% get out because of merit.


We live in a system where people who post on social media gets imprisoned while the rapists and murderers roam freely.



Do You find any great indian contradiction? Share it with us.

Paytm AndroidTerminal – Seamless recharge via linux

Paytm AndroidTerminal – Seamless recharge via linux

download (4)

In continuation to my previous attempt to control Whatsapp via command line (If you haven’t read that, Please do before continuing), This guide will allow you to recharge your mobile number via command line using Paytm.



With all prerequisites as in previous guide still valid (including Android phone attached via data cable to Linux machine), couple of additional ones are

  1. Paytm app – Download here.

  2. A logged in user with paytm wallet balance – Yeah, this guide is not a free recharge guide and will be using Paytm cash from user’s account.

Terminal Commands

1. To unlock your phone

adb shell input keyevent 82

If your phone is locked, this command will unlock it for you. For those who are using screen-locks, it can also be automated but it is again beyond scope of this tutorial.

2. Open Paytm app

As we did for whatsapp, we can open paytm app via stop-start machanism to ensure it to work even though it was open already.

adb shell am force-stop net.one97.paytm
adb shell am start -n net.one97.paytm/.AJRHomePage

3. Ask Recharge number

After reading the recharge number, Tap on recharge number coordinates (270, 650) found by hit and trial.

echo -n "Enter Number:"
read number
adb shell input tap 270 650
adb shell input text $number

4. Ask user for amount he wants to recharge with.

Similar to Number, Tap on coordinates for amount and fed the desired amount in it.

adb shell input tap 270 1050
echo -n "Enter Amount:"
read amount
adb shell input text $amount

5. Get the recharge done

Now to proceed further, you need to tap on back button once to remove keypad screen and then press on Proceed buttons and subsequently tapping on pay with path cash button.
adb shell input tap 270 1850
adb shell input tap 270 1350
adb shell input tap 270 1450
adb shell input tap 990 1650
adb shell input tap 990 1650
adb shell input tap 990 850

6. Close the Paytm app.

Echo a thanks message before closing the app.

echo "Thank you for recharging with Paytm AndroidTerminal \m/"
adb shell am force-stop net.one97.paytm


PS: If your android phone is connected to internet via a slow connection, you might need to add appropriate sleep command to make it work.

This entire experience can be automated by saving below commands in a file

adb shell input keyevent 82
adb shell am force-stop net.one97.paytm
adb shell am start -n net.one97.paytm/.AJRHomePage
echo -n "Enter Number:"
read number
adb shell input tap 270 650
adb shell input text $number
adb shell input tap 270 1050
sleep 2
echo -n "Enter Amount:"
read amount
adb shell input text $amount
adb shell input tap 270 1850
adb shell input tap 270 1350
adb shell input tap 270 1450
sleep 2
adb shell input tap 990 1650
sleep 2
adb shell input tap 990 1650
sleep 2
adb shell input tap 990 850
echo "thank you for recharging with command line paytm \m/"
adb shell am force-stop net.one97.paytm

Save it in a file named paytm and make it executable with global access. Now next time you need to recharge, Paytm CommandLine will be at your service.

Calvin and Hobbes – Keep it Simple Silly

Calvin and Hobbes – Keep it Simple Silly

Calvin & Hobbes is a comic series created by Bill Watterson. Calvin is a 6 year old child, who imagine about a Tiger named Hobbes is real and his best friend. He is remarkably funny at moments.

While Justifying his pleasure cum secret of low grades

c5While making an innocent mockery of education system.


Sometimes too innocent,
Or sometimes at top of his wits!
Being smart is just usual for him.
Defining procrastination in most humble way
Well, He make valid points most times..
Long live Bill Watterson, the creator!

Success – Definition from the successful persons

Success – Definition from the successful persons

Success is often overrated. A collection of quotes from successful persons of our generation, defining success.


You might have more talent than me, you might be smarter than me, you might be sexier than me, you might be all of those things you got it on me in nine categories. But if we get on the treadmill together, there’s two things: You’re getting off first, or I’m going to die. It’s really that simple, right?

– Will Smith



“The moment you realize that everything in the world around you was built by people who were no smarter than you, you become an element of change yourself…you can change anything”

– Steve Jobs



“I start early, and I stay late, day after day, year after year, it took me 17 years and 114 days to become an overnight success.”

-Lionel Messi


“You might never fail on the scale I did, but some failure in life is inevitable. It is impossible to live without failing at something, unless you live so cautiously that you might as well not have lived at all – in which case, you fail by default.”

– J.K Rowling



The only thing standing between you and your goal is the bullshit story you keep telling yourself as to why you can’t achieve it.

Felix Baumgartner(First person to break sound barrier)

How do you define success!

Using Javascript for mass invitation for a Facebook page

Using Javascript for mass invitation for a Facebook page


Recently, For a friend’s Facebook page, We need to send invitations to all of his friends. So instead of clicking Invite button for every single person, I preferred to write a small javascript for this.


var a = Array.prototype.slice.call(document.getElementsByClassName("_5tef"))[0];if(a)a.click();setTimeout(function(){Array.prototype.slice.call(document.querySelectorAll("ul._5kwh li")).forEach(function(c){var d = $(c); var e = d.getElementsByTagName("button")[0]; if(e) e.click();})}, 1000);


How to use it

Open Facebook page for which you need to send invites, Make sure there is a peoples section on that page though which invites can be sent.

open console. via right click –> Inspect element –> Console. and pasting above script followed by enter.

How it works

It works as a daemon which will first click on show more friends button and then click invite against all friends listed in that list, one by one.

Key elements to write such scripts or modify this script

You need to know specific components of this script and their usage to modify it

1. document.getElementsByClassName – To select all elements with given class name, which in this case is 5tef (Use inspect element to get this).

2. document.querySelectorAll – To select all friends with specified selector, child <li> with parent class as _5kwh in our case.

3. getElementsByTagName – To get all child buttons which we target to click on.