RSS-feed

Sun, 31 Aug 2008

Using a macpro for bioinformatics research


Our group decided four months ago to get mac pro to help us in our research. The idea was having a unix box with some decent disk and ram to help us run our bioinformatics code. As a matter of fact we ended up using it in our SOLiD ABi pipeline. The machine has run most of our offline analysis for human dna samples.

The machine has been serving pretty well for its main task. Now that our LSF cluster starts behaving a little bit better we can use the spare cycles for other jobs. A colleague contacted me asking me for access to our machine. His group needed to run some perl code that was suppose to use more than 4G or ram. The first thing we checked was if our perl distribution (macports) was 64 bits. It wasn't. I must admit I didn't even care until then. But I always thought the binary would be 64 bits. It was not:

drio@arad /hgsc/solid/corona_lite/bin $ otool -tv ./mapreads 
./mapreads:
(__TEXT,__text) section
start:
00002468        pushl   $0x00
__SNIP___
00002495        movl    %ebx,0x0c(%esp)
00002499        calll   0x00004cf2
0000249e        movl    %eax,0x00(%esp)
000024a2        calll   0x00101081
__SNIP__

My first thought was, oh well, less check the macports framework, I am sure they had some flags to recompile in 64 bits mode. There isn't. I even asked in the IRC channel. The next logical move was to try to compile everything from scratch, but, the effort will be too much. I would had had to recompile not only perl but also all the dependencies.

All these made me reconsider if a macpro is a ideal machine for this kind of tasks. The machine has already paid off his cost with all the solid analysis we have done with it. But, now, if we want to run some ram intensive code, we are a little bit screwed up. A Dell/HP/etc... linux box will be perfect here (Check my other posts, we got one). Another issue here is the noise. Initially we got the macpro because it was very powerful yet very quiet. There is nothing like that in the PC market. But, well, who cares, I can put the machine in the lab, in front of the sequencers. Noise is not a problem there.

posted at: 20:58 | path: /apple | permanent link to this entry

Wed, 05 Mar 2008

Updating to 1.1.4


It is time to upgrade to 1.1.4 after confirming that the latest ziphone version works fine with 1.1.4. Thanks to Dani for showing my the right steps to do this: NOTE: I have a 1.1.3 iphone, unlocked + jailb NOTE 2: DO NOT USE THE DOCK STATION

  1. Sync all your contacts and stuff.
  2. Download the 1.1.4 firmware
  3. Put the IP in recovery mode: You have to hold the home key after rebooting
  4. Plug the IP to you computer and start itunes
  5. Go to upgrade firmware and click upgrade while you press the Apple key at the same time. Perform the upgrade
  6. Download the latest ziphone version
  7. Put the IP in recovery mode again.
  8. Start ziphone
  9. Do a "do it all" ( Activate + Jailbreak + unlock)
  10. At this point you should have an unlock IP with 1.1.4 running.
  11. Go to the installar and perform the update to 3.01
  12. Install the BSD subsystem tool
  13. Install the bosstool (more on this later)
  14. You are good to go


posted at: 09:52 | path: /apple | permanent link to this entry

Fri, 29 Feb 2008

Yes, I have an iphone


So yesterday I decided I had all the information I needed and that it was time to get the IP to unlocked it. Let me first go back two days to explain something.

I decided to join the #ziphone channel to try to get some answers for questions that remained unanswered. I got luck enough to meet CLP. He was kind enough to talk to me for some minutes and nailed all the answers to my questions.

Thanks to that I was able to create an item list with the theoretical steps of the activation/jb/unlock process:

1. Get the firmware version of you OTB IP from itunes
2. If 1.1.3 skip 3
3. If 1.1.2
  + plug the IP
  + fire up iTunes
  + download fir mare 1.1.3
  + press Option/ALT-key to restore firmware 1.1.3
  NOTE: repeat the process if you get a 1015 error
4. Close iTunes
5. Start ziphone and select activate + jailbreak + unlock. Click start.
6. Wait for ziphone to do its job. It should take 2' 30''.
7. You are done

That was what I expected the process was going to be. It wasn't exactly like that. But it was close enough.

First of all, currently ziphone doesn't unlock 1.1.4. Ordering online wasn't an option since the likelihood of getting a 1.1.4 was pretty high. I decided to go the apple store so the chances to get a 1.1.2 or a 1.1.3 would be higher. I entered the AS with my credit card (:)) and I asked the guy: "What do I have to do here to get an IP?" The girl was: umm.. not sure if still have.. bummer! I thought. She went check and she came back saying: "yes, we have only 8G". Excellent that is what I needed. I decided to try to get some information about the firmware. That was probably stupid since they are aware people gets IP to unlock them. She said I wasn't going to know what Firmware I had on my IP until using it with my computer. Ok, I knew that already :). So I left the store thinking, would my IP be 1.1.4? If that was the case I should had to wait for zibri to release ziphone 2.5.

Once at home, first problem: Once you fire itunes you are stucked in the activation process. I started thinking.. and I remembered I downloaded Independence some days ago and for some reason I knew the interface had some info about your firmware version, baseband version and so on... Nice, 1.1.3! The perfect scenario. First problem solved.

I closed iTunes. The crucial moment was here. I fired up ziphone and selected all the options and clicked start. Luckily, I checked some youtube videos and I read the documentation so I knew what the process was going to be: First the software puts the IP in recovery mode and then it warns you is going to take 2' 30'' to finish the process. During that period, ziphone changes the screen resolution and starts vomiting mem addresses and info about the process status. Everything looked as expected. The IP rebooted with the classical slide to unlock screen. It was done. I changed the sim card, put a tmobile one, reset the configuration and... wait for it... yes T-mobile signal. I stared trying all the phone basics. Everything was working. Yes!

Then I looked the output of ziphone and i saw the textarea with the log had a very disturbing error messages saying: "Error code 1". Damn it I thought. I googled the error and it seems some people got the same despite everything was fully functional. So far everything has worked perfectly.

One thing I wasn't sure about was the jailbreak process. Did I had to install something after the unlock was done? No! The unlock process installs installer.app (plus the nice Zibri blog app). From there you can install everything: in my case I started with the openssh server. I configured some rsa keys, and I sshed from my laptop to the phone. Nice! it is a full macosx. Or at least it seems so.

I think I should had gotten one of this before. I don't like the apple + ATT deal. I don't like to have to pay 90US or 75US or whatever when i can pay 40US or less. And I definitely don't like the 2 year contract deal. But the iphone is an amazing machine.

That's all so far. Thanks again to CLP.

posted at: 09:21 | path: /apple | permanent link to this entry

Sun, 24 Feb 2008

getting an Iphone?


UPDATE3: Nice explanation of what the baseband is, here.

UPDATE2: The Ziphone guys got it all together. Is it possible to unlock an iphone with just one click? We'll have to try it. here. Amazing people out there. A macosx version exists. Awesome. It seems that they integrated geohot's work on their software.

UPDATE: It seems this is another method to unlock 1.1.3.

I am considering getting an iphone. I kind of want to make it work with t-mobile. I don't want a pay 70US to att and get stuck in a two years contract.

Before getting one I have to be sure apple won't release a new version or reduce the price of this cult device. After that, I want to read about the software unlocking methods out there to try to get an idea how they work before I actually get one.

There is a lot of information on the Internet, unfortunately it already assume you have some previous knowledge. That's bad. First thing first, go ahead and read this. It will explain you some terms and concepts you have to know prior to reading other documents.

After reading that we should stop in the iphone status page which nicely shows what is the status of the unlocking process for the different versions of the iphone. If you read that, you'll find there is a very promising update in orange basically saying someone (Geohot) has released a software method to unlock 1.1.2 OTB (Out of the box). In the status overview there is an entry to Geohot's blog.

Once there, you can download his work and read the instructions txt file. That file was kind of my starting point and I am going over it here. This is just a method for me to try to understand what we are doing here:

geohot's 1.1.2 software unlock
yes, this is what you have all been waiting for
now fixed to support 1.1.3
and a little more idiot proof

Ok, pretty awesome, it seems to even works with 1.1.3. Again, 1.1.3 is the latest firmware that runs in the iphone.

1. Download these:
gunlock and the secpack from http://iphonejtag.blogspot.com/ or the blog :)
the 4.02.13 fls from around the internet

Umm.. hang on.. two much information here.

Ok, so we seem to have everything that gunlock requires. And more or less understand what's are each of these files. Next please:

2. Downgrade your phone to 1.0.2. See all the great tutorials online to do this. 
Your baseband won't be downgraded, this is normal.
This will probably work on other versions too, but 1.0.2 doesn't lose wifi on bb access.

Let's review this for a sec. We have to downgrade to an earlier version of the firmware. Makes sense, I guess it was easier to hack the device with that older firmware. The downgrade process is explained here. Notice something here: It seems that downgrading the general firmware won't downgrade the baseband firmware. GeoHot warns us about it.

At these point that's what I have in my working directory:

drwxr-xr-x  11 drio  staff       374 Feb 24 11:15 .
drwxr-xr-x   8 drio  staff       272 Feb 24 09:58 ..
-rwxr-xr-x   1 drio  staff   3157412 Feb 24 10:46 ICE04.02.13_G.fls
drwxr-xr-x   6 drio  staff       204 Feb 24 11:16 bricktool
-rw-r--r--@  1 drio  staff      4176 Feb 24 11:15 bricktool.zip
-rw-r--r--   1 drio  staff     19704 Feb 24 09:58 gunlock
-rw-r--r--   1 drio  staff     10733 Feb 24 09:58 gunlock.c
-rw-r--r--@  1 drio  staff  95627324 Feb 24 10:56 iPhone1,1_1.0.2_1C28_Restore.ipsw
-rw-r--r--   1 drio  staff      1124 Feb 24 09:58 instructions.txt
-rw-r--r--   1 drio  staff       279 Feb 24 09:58 runme.sh
-rw-r--r--   1 drio  staff      2048 Feb 24 09:58 secpack

Next,

3. Make sure you have secpack and ICE04.02.13_G.fls in the folder you are in.

4. chmod +x runme.sh

5. ./runme.sh

This is pretty "straightforward". He wrote a shell script that actually runs the final gunlock. He does something before and after, don't know exactly why. --TODO: why is he doing that? Next,

6. For some reason my phone was in brick mode. Use the elite team bricktool to get out.

7. Also run iWorld on 1.1.2

These are some tools that fix some of the problems you get after running the gunlock software. You can find them here and here. TODO -- Find out more about these tools.

And that's suppose to be everything. Here the guy said you'll get a 1.1.2 or 1.1.3 unlocked. I am not sure how that is possible if we started with a 1.0.2 version.

So to sum up:

Still a lot of stuff to read.

posted at: 13:13 | path: /apple | permanent link to this entry

Sun, 03 Feb 2008

remote desktop applescript


Apple has his own implementation of remote desktop. Despite you can remote desktop using VNC using the software from apple has his unique benefits. Performance is hands down better plus it understands the display layout and acts accordingly. In addition you have full control from applescript.

Thanks to that last feature, launching remote desktop to control another machine from quicksilver is pretty easy:

tell application "Remote Desktop"
  activate
  control computer "snowball"
end tell

Don't forget to add your catalog in quicksilver so it indexes that directory so your applescripts are visible to qs.

Superbowl!

posted at: 09:55 | path: /apple | permanent link to this entry

Sat, 19 Jan 2008

Connecting/disconnecting an usb hard-drive from the console


I have an usb external hdd connected to my mac mini. Sometimes the disk is physically connected to the machine but the usb subsystem hasn't made it available to the rest of the OS. This is what you can do:

drio@snowball:~ $ disktool -m disk1s1
disk1s1 device will attempt to be mounted ...
***Disk Appeared ('disk1',Mountpoint = '', fsType = '', volName = '')
***Disk Appeared ('disk1s1',Mountpoint = '', fsType = 'hfs', volName = 'wdbackup')
Disk Mounting Completed
drio@snowball:~ $ disktool -e disk1s1
disk1s1 device will attempt to be ejected ...
***Notifications Complete for type 1
***Disk Unmounted('disk1')
***Notifications Complete for type 4
***Responding yes to eject - disk1
***Responding yes to eject - disk1s1
***Disk Ejected('disk1s1')


posted at: 10:44 | path: /apple | permanent link to this entry

Sun, 09 Dec 2007

I want my terminals with their correct size


Let's say you are in your macosx and you want to start doing your work in the terminal. In my case, I use two terminals + screen. In one terminal I have always an ssh against a remote machine where I have my instance of irssi running. There, I can also check my email and IM to all the typical protocols (jabber, AOL, etc...). In the other Terminal window I have a session to another machine (It changes depending what machine I am working on).

The problem is that I want to create my two terminals and I want them to be in an exact position and with a particular size. Before writting this applescript, I had to that manually. Now I can run this from quicksilver and have my terminals ready:

tell application "Terminal"
  activate
  delay 1
  close window 1
  do script "ls"
  do script "ssh -t whatever.com screen -RD"
  set bounds of window 1 to {0, 0, 1240, 900}
  set bounds of window 2 to {110, -80, 1440, 700}
end tell

This is priceless.

posted at: 01:33 | path: /apple | permanent link to this entry