Go Back   Android and G1 Forums, Mods, Hacks, News, Downloads, Skins, Themes, and more! | ModMyGphone > Android Modding > Jailbreak (Root Access)
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
Jailbreak (Root Access) Discussions on gaining and using root access
Reply
 
Thread Tools Display Modes
  #1  
Old 06-15-2009, 09:43 AM
chax chax is online now
Actually, I prefer Yahoo.
 
Join Date: May 2009
Location: Varaždin, Croatia, Europe
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Connect G1 to Ad-hoc network SOLVED

This guide will help you to connect your G1 to laptop's Ad-hoc wireless network.

Requirements:
1. Rooted G1 phone.
2. Terminal emulator. (You can download it here or from Android market)
3. Busybox for android. (download)

Steps:
1. Install Terminal emulator
I assume that most of you guys already have this since it is essential for root access.
For those who don't have this installed you will have to make sure that you have root access first.
The easyest way to install this application is to download it from Android market, but if you don't have access to internet from your phone, you could install it over ADB or some other way.

2. Install busybox for android

Open Terminal emulator and type following commands:
Become super user:
Code:
su
Make new directory for busybox and navigate to it:
Code:
mkdir /data/busybox
cd /data/busybox
Now you should copy your downloaded busybox file to this new directory. You could do this simply by connecting your phone to the computer over usb cable and copy file to the sdcard or you could push it using ADB service directly to our directory. If you wish to do this over ADB you should do the following.

a) ADB is part of Android SDK and you can freely download it for Windows, Linux or even Mac, just google it. Your downloaded busybox file must be in the same folder with adb or you can specify the different path in adb command if you have it somewhere else. To push the file to the phone using ADB you could type the following command on your computer (offcourse you must first navigate to the folder in which is your Android SDK and then to the subfolder tools):
Code:
adb push busybox /data/busybox/busybox
b) The other way is to copy the file to your sdcard and then move it to our folder with cat command, since we don't have cp command to copy the file. To do this you must type the following commands on your phone assuming we didn't leave Terminal emulator and we are still in /data/busybox/ directory.
Code:
cat /sdcard/busybox > ./busybox
Now that you have it in your folder you should do the following:
Make busybox binary executable
Code:
chmod 755 ./busybox
Execute following command to install busybox:
Code:
./busybox --install
Make all the installed tools in folder executable like you did with the first one:
Code:
chmod 755 *
Last step is to export it to PATH to make it usable at all time.
Code:
export PATH=/data/busybox:$PATH
3. Now you can modify two important files to make your phone able to connect to Ad-hoc
First gain root access with su command like before:
Code:
su
Remount /system partition as read-write with the following command:
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
Navigate to /system/etc/wifi/
Code:
cd /system/etc/wifi
Now you must edit tiwlan.ini file in current directory. I did this with VI editor which is part of busybox. You must know some basic things about VI editor befor you do this. VI operates in two modes. When you open editor you are in command mode and you can't edit your file yet.
To edit file type:
Code:
vi tiwlan.ini
First you must navigate trough file with your trackball. Find the following line:
Code:
WiFiAdhoc = 0
This is the line we need to edit. To enter edit mode press A on your phone's keyboard. Now move the cursor with trackball to the end off this line. Replace 0 with 1. You must add two more lines in order this to work. To add new line press enter key and then type:
Code:
dot11DesiredSSID = HTCG1
dot11DesiredBSSType = 0
Replace HTCG1 with whatever you like. This is SSID of your wireless Ad-hoc network.
Now you must exit back again to command mode. This is done with escape key, and since our keyboard doesn't have escape key we must click down trackball and simultaniously press 1. This is the same as you pressed escape on regular computer keyboard. In command mode again we can't edit the file but we can type commands. Command for saving file is 'w' and for exiting editor is 'q'. Every command is typed after ':' so our command to save file and exit editor will be:
Code:
:wq
The next file we need to edit is /data/misc/wifi/wpa_supplicant.conf
Edit it the same way as previous file and add these lines:
Code:
network={
ssid="HTCG1" key_mgmt=NONE mode=1
}
Save and exit
'mode = 1' indicate that this is Ad-hoc network

4. Make Ad-hoc network on your laptop or computer.
I assume you know how to do that and I won't explain it because you can google it. Only thing to know when you do this is that you have to set SSID for the network same as the SSID in two files you edited and that you must make open network without wep or other security. Yet if you decide to have protected network you must also edit wpa_supplicant.conf file and modify it. Again google it if you want to know more.

5. Finally connect
If you configured correctly your computer wireless network and selected it to connect, you should then disable and enable wireless in your mobile phone settings. If SSID is broadcasted you should see your network and signal strenght in network list. Connect.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Reply With Quote
  #2  
Old 06-24-2009, 01:43 PM
number9ine number9ine is offline
Actually, I prefer Yahoo.
 
Join Date: Jun 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I can't seem to get this to work.

I have followed all of the steps and I can see the wi-fi network in my g1 list and it shows full signal strength.

When I try to connect to it it attempts to acquire network address and the ad hoc network on the computer does the same thing, then the G1 says unsuccessful and is not connected.

Any help would be awesome as I have been trying to do this for some time now and I thought I had finally found a solution.

Using JF 1.5 adp
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Reply With Quote
  #3  
Old 06-24-2009, 03:31 PM
chax chax is online now
Actually, I prefer Yahoo.
 
Join Date: May 2009
Location: Varaždin, Croatia, Europe
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is because there's no DHCP on ad-hoc and you need to configure your IP adresses manually, both on computer and phone.
This is the configuration that I use:

Computer:
Code:
IP adress: 192.168.0.1
Subnet mask: 255.255.255.0
Default gateway: 192.168.0.1
Prefered DNS: 192.168.0.1
Phone:
Code:
IP adress: 192.168.0.2
Gateway: 192.168.0.1
Netmask: 255.255.255.0
DNS 1: 192.168.0.1
To change IP settings on phone go to Wi-Fi settings and then press menu key and select advanced. There you must select to use static IP and configure it like me.

Hope it helped
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 06:10 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc. .
Copyright © 2007-17, ModMy LLC