Archive for 'Tutorial'

There has been a huge upset recently with Apple, the iPhone, and AT&T. A lot of finger pointing has been going on because people don’t know who to blame. At first people were blaming AT&T because apparently Sean Kovacs, developer of Google Voice Mobile, said the app was approved by Apple’s senior Vice President of Worldwide Product marketing. Now apparently AT&T says it is all Apple’s doing and that AT&T has no say in what apps make it or don’t make it into the app store.

Finger-pointing aside, you can still install Google Voice Mobile to jailbroken iPhone’s through Cydia. Search “GV” or “GV Mobile” and the app should pop up. Just install it and you are ready to go.

photo1photo2photo3photo4

If you are like me and want to make your mobile device be all that you can be I highly recommend jailbreaking your iphone.

I recently flashed my Palm Centro which used to be on Sprint and now after flashing/unlocking it is now on Cricket. Most carriers will let you use whatever compatible phone you want with their network, but a lot of carriers like to lock phone to be exclusive to their network *cough* Sprint *cough* AT&T *cough*. Fortunately for you and me, we have Google, where you can find out how to do almost anything. It took me about 3 hours of googling and figuring stuff out to get my Centro completely unlocked and turned out to be a fun project.

Before I explain the technical details on unlocking, there are a few things you will need.

  1. Qualcomm Diagnostic Drivers – Download
    This was probably the hardest part of the whole process, finding the correct and working drivers. The Palm Centro uses a standard qualcomm chipset and you need the diagnostic drivers for that chipset. Keep in mind these are not the standard drivers your PC will use to hot sync with the Centro.
  2. QPST – Qualcomm Service Programming Tool
    This tool lets you get down and dirty with the internal programming of your phone. Due to QPST being copyrighted software, you will have to search google for this one. It is pretty easy to find, especially if you are on mobile phone forums. I believe the latest version is 2.7.
  3. UniCDMA 1.095+ – Download
    This is a basic memory prober which will let you read out a bunch of phone information and specific addresses.
  4. Cricket PRL – Perfered Roaming List – Download
    This is basically a file containing all cell phone carrier fun stuff.

There is also some lingo you should be aware of.

  • SPC – Service programming code. This is a 6 digit number which when entered allows access to the carrier programming screen.
  • PRL – Perferred roaming list. The Preferred Roaming List (PRL) is a database residing in a wireless (primarily CDMA) device, such as a cellphone, that contains information used during the system selection and acquisition process (wikipedia).

The goal when flashing the Centro is you want to set the SPC to “000000″. This will allow the phone to be used on any CDMA network. With sprint, sometimes if you call them they will give you the SPC or if you have the SPC written down somewhere when activating the phone, then you will be able to skip setp #3 below.

  1. Enter diagnostic mode on yoru phone by entering “##3424#” on the phone screen. A menu will pop up and make sure “diag” is checked. If this doesn’t work you might be able to enter diagnostic mode by unplugging the phone from the usb, taking out the battery, plug int he phone, and holding down the hot sync button.
  2. Plug the phone in to your computer via usb. When you plug it in you should see 2 new devices recognized. Go ahead and install the drivers from above to that device (I believe 2 qualcomm devices show up when installing the driver, if one doesn’t work, just try the other).  The driver will assign it to a virtual COM port, you can set what COM it gets set to in the Device Manager settings.
  3. Now you need to find out your SPC code. Open up UniCDMA and in the setup tab, set the COM to the COM port set in your Device Manager. Hit read all and you will should see all the fields get populated with information from the phone.
    unicdma
    Next go to the memory tab and you want to read 6 bytes from the address 0×00947F12.
    unicdma2
    Click read and save to file. Then open up the file in a hex editor or just notepad and the first 6 characters should be your SPC.
  4. Now comes the fun part, open up QPST Service Programmer and you should see your phone in the list.
    qpst1
    Open that phone up and then click “Read from phone”. This will prompt you for your SPC, enter the number you found in step #3. It will take 5 seconds or so for all the information to load from your phone.
    qpst2
    Before you continue its a good idea to backup all your phones settings by hitting “Save to file”. Now just enter “000000″ to the service programming field on the Settings tab (1st tab) and hit write to phone. Your SPC should now be changed to “000000″, you can test this by entering “##000000#” on the phone screen and a screen should show up saying “Activating your phone” where you can set your mobile number and MSID.
  5. This step may not be necessary, but it wouldn’t hurt to do. You want to load Cricket’s PRL into your phone. When having your phone open and loaded in QPST Service Programmer go to the “Roam” tab, hit browse and select the PRL you want to load then write to phone.
    qpst3

Your Palm Centro should now officially be unlocked. I dont make any calls on my centro, so I am unsure about the significance of having the Cricket PRL loaded.  Also if you have a data plan, you might want to read this this forum thread about getting data working.

Resources:

Ever wanted to try out OSX without buying a mac? Or wanted to learn to develop native mac apps without having to shell out a ton of cash? A quick search on google I found this great guide on installing OSX 10.4 on VMWare.

In order to get this working there are two things you really need to do.

  1. Obtain “Mac OS X 10.4.8 [JaS AMD-Intel-SSE2-SSE3 with PPF1 & PPF2]“. I can not directly give you a link on how to obtain this file, but doing a quick google search should find it for you.
  2. Mount the ISO to a virtual drive such as Daemon Tools
  3. Modify your ImageName.vmx. There are a couple key things you need to edit in this file such as disabling SCSI (scsi0:0.present = “FALSE”), enabling PAEVM (paevm=”true”), and to be sure you are installing to an IDE virtual drive.
    Here is the vmx file that worked for me. (This image was based off a Windows NT default) 

    config.version = "8"
    virtualHW.version = "6"
    scsi0.present = "TRUE"
    memsize = "1024"
    scsi0:0.present = "FALSE"
    scsi0:0.fileName = "Windows NT.vmdk"
    ide1:0.present = "TRUE"
    ide1:0.fileName = "F:"
    ide1:0.autodetect = "FALSE"
    ide1:0.deviceType = "cdrom-raw"
    floppy0.autodetect = "TRUE"
    floppy0.startConnected = "FALSE"
    ethernet0.present = "TRUE"
    ethernet0.wakeOnPcktRcv = "FALSE"
    ethernet0.virtualDev="e1000"
    sound.present = "TRUE"
    sound.fileName = "-1"
    sound.autodetect = "TRUE"
    svga.autodetect = "TRUE"
    
    mks.enable3d = "TRUE"
    
    pciBridge0.present = "TRUE"
    mks.keyboardFilter = "allow"
    displayName = "MacOSX"
    guestOS = "darwin"
    nvram = "Windows NT.nvram"
    deploymentPlatform = "windows"
    virtualHW.productCompatibility = "hosted"
    tools.upgrade.policy = "useGlobal"
    
    floppy0.present = "FALSE"
    floppy0.fileName = "A:"
    extendedConfigFile = "Windows NT.vmxf"
    
    paevm="true"
    
    ethernet0.addressType = "generated"
    uuid.location = "56 4d 58 8f 4b 24 25 ae-68 14 6d 9e c7 d7 50 37"
    uuid.bios = "56 4d 58 8f 4b 24 25 ae-68 14 6d 9e c7 d7 50 37"
    pciBridge0.pciSlotNumber = "17"
    ethernet0.pciSlotNumber = "32"
    sound.pciSlotNumber = "33"
    ethernet0.generatedAddress = "00:0c:29:d7:50:37"
    ethernet0.generatedAddressOffset = "0"
    checkpoint.vmState = ""
    
    ide0:0.present = "TRUE"
    ide0:0.fileName = "Windows NT-0.vmdk"
    
    ide0:0.redo = ""
    scsi0.pciSlotNumber = "16"
    tools.remindInstall = "TRUE"

Then you just need to boot up to the image and run through the installer and you’re done.

bootup boot2 install1

install2 install3 done

Resource: OSX86 Project

Previously, I was backing up my websites password-less ssh and rsync, but I have decided to change that for a couple of reasons such as passwordless ssh can have its security problems, and I dont trust hardware. Using S3 I can securely keep as many full backups as I’d like, not have to worry about hardware failing, all for pennies a month. Currently I backup my desktop with JungleDisk and thought I may as well consolidate all my backups to S3. 

To accomplish this goal of backing up your website you will need 2 things, SSH access and s3sync which is a handy little S3 client written in ruby.

  1. Download and setup s3sync from http://s3sync.net/wiki. Once you untar the file open up s3config.yml (may be named s3config.sample.yml, just rename it) and this is where you set the path to your certficates, youAWS access, secret access keys, these can be found in “Access Identifiers” section of your AWS account.
  2. Now lets test this out. S3sync needs to know where its configuration file is so we just export the variable S3CONF with the path to your s3config.yml file.
    [user@machine s3sync] export S3CONF=/home/bront1/s3sync

    To make sure everything is working do a simple command to list your buckets.

    [user@machine s3sync]$ ./s3cmd.rb listbuckets
    bucket1
    bucket2
    bucket3

    Yay we have s3 connectivity!

  3. Next we dump the databases, tar and gzip everything up.
    [user@machine] mysqldump -u user -pPassword --all-databases > /home/user/backup.sql
    [user@machine] tar -cf /home/user/backup.tar /home/user/public_html /home/user/backup.sql | gzip > /home/usr/backup.tar
  4. Copy the backup to your S3 bucket using s3sync’s s3cmd.rb
    [user@machine s3sync] ./s3cmd.rb put bucket-name:folder/target_name.tar.gz /home/user/backup.tar.gz
  5. Success! You have now backed up your website and database to your S3 account.

S3sync has its own sort of built in rsync to make incremental backups, but I prefer to make keep my own daily backups. Heres the script I use to create daily backups of my websites and files. It creates a backup with day, month, and year in the filename and keeps backups for the last 10 days or so. (Note: The sed and awk commands are really messy due to my lack of sed/awk knowledge. This script is run everyday at 3am using a cron job with the output written to a log.

Crontab:

0 3 * * * export S3CONF=/home/user/s3sync; /home/user/backup.sh >> /home/user/backup.log

backup.sh

#!/bin/bash
 
export S3CONF=/home/user/s3sync
 
cd /home/user
 
TIMESTAMP=`date +%m%d%Y`
 
echo "$TIMESTAMP :: Backuping up the databases"
mysqldump -u user -pPassword --all-databases > /home/user/backup.sql
 
echo "$TIMESTAMP :: Bundling all the files up"
 
tar -cf /home/user/backup_`date +%m%d%Y`.tar public_html backup.sql
gzip -f /home/user/backup_`date +%m%d%Y`.tar
 
echo "$TIMESTAMP :: Copying backup to S3"
 
#we use full path because this script is running in a cron job
/usr/local/bin/ruby /home/user/s3sync/s3cmd.rb put bucket:folder/backup_`date +%m%d%Y`.tar.gz /home/user/backup_`date +%m%d%Y`.tar.gz
 
echo "$TIMESTAMP :: Cleaning up"
rm -f /home/user/backup_`date +%m%d%Y`.tar.gz
rm -f /home/user/backup.sql
 
echo "$TIMESTAMP :: Checking for old backups"
 
#check how many backups are saved
num=`/usr/local/bin/ruby /home/user/s3sync/s3cmd.rb list bucket:folder | wc -l`
 
#we save at least 10 days of backups
#13 is checked for due to other crap s3cmd prints out
if [ "$num" == "13" ]; then
  echo "$TIMESTAMP :: Deleting old backup"
 
  #i know there is a better way to check this, i just dont know how
  last=`/usr/local/bin/ruby /home/user/s3sync/s3cmd.rb list bucket:folder | sed -e 's/-//g' | awk '{printf("%s", $0 (NR==1 ? "" : " "))}' | awk '{print $2}'`
 
  /usr/local/bin/ruby /home/user/s3sync/s3cmd.rb delete bucket:$last
else
  echo "$TIMESTAMP :: No old backup to delete"
fi
 
echo "$TIMESTAMP :: Done"

I listen to internet radio stations a lot, Digitally Imported to be specific. Its a very convienient way to have a limitless amounts of all kinds of music, but there a few problems with this. I always find myself really like a song, or mix of songs, or a remix of song, but I have no way of saving this, nor do I have a way of taking it in the car or on a plane. Luckily with the greatest media player out there you can overcome this obstacle.

1. Open the network stream and enter the url and port and make sure “Stream Output” is checked.
vlc1
2. Click on “Settings” and the Stream Output settings box will pop up. The main thing to pay attention to is to make sure that the “File” checkbox is checked and you have selected where you want to save the stream to. If you want to listen to the music while you are ripping it you can check “Play Locally” too. Select “Raw” for encapsulation (this is just an audio stream so there is no need for stream encapsulation) and mp3 for the audio codec, or whatever codec you want (I know a lot of people prefer flac). As for the bitrate, its good to try to match the bitrate of the stream, but if you aren’t sure, its better to set a higher bitrate because then the stream will just be filled with null packets and you will retain good sound quality as opposed to setting a too low bitrate and you will get a bad quality rip.
vlc2

3. click ok and let ‘r rip.

There is also a command line way to do this but I’m not sure if it works or not, but this is what I came up with.

vlc http://209.247.146.98:8000 --sout '#transcode{acodec=mp3,ab=96,channels=2}:duplicate{dst=std{access=file,mux=raw,url="test.mp3"}}'