Pages

Monday, July 11, 2005

Telnet access Motorola A768i phone from Kernel 2.6

I had almost given up connecting my phone by USB on Linux (I was told and I tested it not working on my FC2/3 machines)until yesterday when I landed up at this post by simon. Where he describs a patch in kernel 2.6.12-rc4 that enables usbnet to work properly in Linux without need of any extra usblan drivers at was required in kernel 2.4

I Got the kernel 2.6.12.2 from kernel.org and installed it. Just checked that everything relating to hotplug and usb was selected in kernel config. If you think compiling is a big problem it's not, you need just these commands and some time:
tar -cvjf kernel-2.6.12.2.tar.bz2
cd kernel-2.6.12.2
make menuconfig #(if you really wanna enable/disable default config of kernel).
make
make install
And your grub file will now contain your new kernel entry,

After booting in to new kernel, I just plugged in my phone, usb connection mesg was shown on the console. lsusb showed me the phone identified. This much was working even with 2.6.9 kernel, what mattered was that the usb0 interface was not getting created. Which happened without any problem in new kernel. I just checked "ifconfig usb0" and it showed the device. I don't know if the command echo "AT+MODE=99'>/dev/ttyAMC0 was needed on my phone as suggested in simon's post.

Then started the fun part. To assign an ip to usb0 I gave command ifconfig usb0 192.168.1.2
and then set usbnet option in setup of my phone to on. It accepted IP address 192.168.1.1.
I did telnet 192.168.1.1 and was able to login as root without any password. Did lot of exploration on the phone seeing all the directories. important files etc. Its real cool stuff to play around and see same Linux powering ur box running on such small hardware.

Some good stuff to play around.
1) As with all(mostly) devices this phone provides you only windows .exe to do things like syncing, updating etc. But if you really hate to boot to that OS you can do without it. The phone probably uses(read point 3 below too) samba for enabling write from windows, so from your linux box just smbmount your phone no password required, just press enter when prompted e.g

000_0490.JPG
smbmount //192.168.1.1/home /mnt/tmp -o username=ezx ;# understood by reading samba config file ;-)
To get to your custom files and folder as shown by the filemanager app.
And
smbmount //192.168.1.1/system /mnt/tmp -o username=ezx
To get to the / you have to give this command. I must warn you to be carefull with writing files etc.
now you can simply play with /mnt/tmp/ as you like to and as the file/dir permissions allow you to do.

2) Run Nmap to see what the device is offering, its os fingerprint, its uptime etc.
nmap -o 192.168.1.1
000_0488.JPG

000_0487.JPG

3) I could see ftp in above command's output, as expected next command was ftp 192.168.1.1
by after getting "connected to 192.168.1.1", I was told device closed the connection. I didn't try much further. This could also be one possible way of file tranfer by syncing software.

4) Linux hackers love this /proc so I investigated it for a while, to see details of my device.
cat /proc/meminfo
cat /proc/cpuinfo
To realize it was running on Intel XScale. and kernel is 2.4. something
000_0486.JPG

cat /proc/filesystems
To realize that it supports nfs and ext3
000_0485.JPG

5) cd /dev/ ; ls
000_0480.JPG

shows lots of devices I wonder what they are used for.
000_0482.JPG

6) The phone seems to start as normal linux device and autologin to user ezx and startup is mostly what is given in this user's .bash_profile

here is
ls /bin
000_0477.JPG

2 comments:

  1. What amazing tool, it's incredible how technology has evolved a lot, the telnet is a very useful coommand to monitor networking connection, and now has improved capacity for wired connections, now I can use the internet to see how good is generic viagra
    to keep that sensation of pleasure.

    ReplyDelete
  2. My name is Sara Johnson, I live in california U.S.A and i am a happy woman today? I told my self that any Loan lender that could change my Life and that of my family after been scammed severally by these online loan lenders, i will refer any person that is looking for loan to Them. he gave happiness to me and my family, although at first i found it hard to trust him because of my experiences with past loan lenders, i was in need of a loan of $300,000.00 to start my life all over as a single parents with 2 kids, I met this honest and GOD fearing loan lender online Dr. Dave Logan that helped me with a loan of $300,000.00 U.S. Dollars, he is indeed a GOD fearing man, working with a reputable loan company. If you are in need of loan and you are 100% sure to pay back the loan please contact him on (daveloganloanfirm@gmail.com and Call/Text: +1(501)800-0690 ) .. and inform them Sara Johnson directed you.. Thanks. Blessed Be.

    ReplyDelete