Sunday, December 2, 2012

Taking wireless logs using wifi

Hey Guys,

Recently I have been trying to use connect USB devices to my Nexus S (running Android Jellybean 4.1.2) using an OTG cable. But unfortunately, on connecting the OTG cable we cant take logs to debug. I tried to find a way out of this to take real-time logs using wifi.

On googling I found a way which worked for me.

The task involved two steps:
1. rooting the device
2. using app to start wifi adb

Rooting the device:
a) Download  RootnexussJB.zip from
http://dl.xda-developers.com/attachdl/2b5b28d0b7d10c2d5529e0b8d6d92746/50bb3158/1/2/2/0/8/4/7/RootnexussJB.zip and unzip it in local machine.
b) use "fastboot flash recovery recovery-twrp-2.2.0-crespo.img" to flash recovery binary adn recovery boot using "fastboot reboot recovery".
c) Choose “Mount” > “Mount USB Storage” > Copy the Superuser 3.2_RC.zip to the internal storage of your Nexus S > Choose “Unmount” on your Nexus S.
d) Choose “Install” > Choose “Superuser 3.2_RC.zip”.
e) Choose "Swipe to flash" > Choose “Reboot System”.
f) Nexus S shows now superuser app in launcher. the phone is now rooted. Congratulations... !!!

jai@jai-laptop:~$ adb root
adbd is already running as root
Courtesy: http://forum.xda-developers.com/showthread.php?t=1795167

using app to start wifi adb:
download any of the wifi adb/wireless adb app from the GOOGLE PLAY STORE. I have downloaded "wifi adb" which requires superuser permissions for wifi adb to work.
a) Open the app and click on "Turn On"
b) Grant superuser permissions to the app when prompted.

c) On your PC connect adb using wifi:
$ adb connect 192.168.1.3.:5555
connected to 192.168.1.3:5555 --> on successful connection
$ adb shell
$ cat /proc/kmsg --> to take kernel logs




Hope this helps,
Jai