Monday, June 22, 2009

iPhone OS upgrade to 3.0

Taking my chances to upgrade to the latest OS version 3.0 for iPhone.
So, first needed to backup some things: AptBackup, SpringBack and finally, a backup with iTunes.
Then create a custom ipsw with Pwnagetool. To install this ipsw, I put the iPhone into recovery mode (did not need the DFU mode, since it was already hacked) by holding both buttons on the iPhone and release the sleep button when screen goes black. Installation went fine, but...

AptBackup icon was hidden because I used the Categories app. No sweat on that, but after unhiding, AptBackup failed on me since it wasn't tested with 3.0 yet.
Solution: Installed OpenSSH and APT again and ran the following command:
for p in `cut -f 1 /User/Library/Preferences/aptbackup_dpkg-packages.txt`; do apt-get -y --force-yes install $p; done
Any packages not for 3.0 won't be installed (like mobileinstallation patch), so you need to find a newer version for them.

I seemed to have lost most settings of Cydia apps since iTunes only backs up managed settings. This includes categories, spbk files, whatever. The only items in /User where Applications, Documents, Library and Media.
So next time, I'll copy the other items manually. Also /Library/Themes for custom themes.
Tip: Get Macfusion/FUSE to mount the iPhone volume on your Mac. Or use Cyberduck.

Replace yellown0w with ultrasn0w if you updated the baseband firmware (Pwnagetool does that by default btw!). At the time of me writing it wasn't released yet though... oops.

Friday, June 19, 2009

UIProgressView custom draw method

Code snippet of a UIProgressView subclass that implements custom draw method.
This example uses four images for the left side, right side and ten sections that can be either on/off or partially filled.
My images included edge and shadow and named: pb_left.png (9x32), pb_right.png (9x32), pb_on.png (28x32). pb_off.png (28x32)

- (void)awakeFromNib
{
[self setBackgroundColor:[UIColor clearColor]];
}

// allow non-clear background color in Interface Builder, but do not draw it
- (BOOL)getClearsContextBeforeDrawing
{
return NO;
};

// draw left and right edge of progress bar with filled sections between
- (void)drawRect:(CGRect)rect
{
const int numParts = 10;
UIImage *pb_left = [UIImage imageNamed:@"pb_left.png"]; // "["
UIImage *pb_right = [UIImage imageNamed:@"pb_right.png"]; // "]"
UIImage *pb_on = [UIImage imageNamed:@"pb_on.png"]; // "X"
UIImage *pb_off = [UIImage imageNamed:@"pb_off.png"]; // " "
CGPoint p = {0,0};
[pb_left drawAtPoint:p];
p.x = pb_left.size.width;
int q = (int)(self.progress * numParts);
for (int i=0; i<numParts; i++)
{
if (i == q) // partial on/off section. works with semi-transparent images too
{
float w = truncf(pb_on.size.width * fmodf(self.progress * numParts, 1.0f));
[pb_on drawInRect:CGRectMake(p.x, p.y, w, pb_on.size.height)];
[pb_off drawInRect:CGRectMake(p.x + w, p.y, pb_on.size.width - w, pb_on.size.height)];
}
else if (i < q)
{
[pb_on drawAtPoint:p];
}
else // (i > q)
{
[pb_off drawAtPoint:p];
}
p.x += pb_on.size.width;
}
[pb_right drawAtPoint:p];
}

Wednesday, June 17, 2009

Semi-transparent overlay for UIButton subclass

A little snippet for subclassed UIButton that adds an UIImageView overlay.
You can then animate the alpha property.
- (void)awakeFromNib
{
UIImage *img = [self imageForState:UIControlStateSelected];
overlayImage = [[UIImageView alloc] initWithImage:img];
overlayImage.alpha = 0.0f;
[self addSubview:overlayImage];
// [self addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchDown];
// you could call custom highlight handler
}

- (void)setHighlightedByAlpha:(BOOL)highlighted
{
[UIView beginAnimations:nil context:@"hmm"];
[UIView setAnimationCurve: UIViewAnimationCurveLinear];
[UIView setAnimationDuration:0.2f];
overlayImage.alpha = highlighted ? 1.0f : 0.0f;
[UIView commitAnimations];
}

Saturday, July 05, 2008

Gbit card, modem, HDD

Ok, I had it for now with this r8169 kernel driver. I even tried a suggested newer kernel version but even that didn't help. I put in a new Intel card and it seems to work fine.

Because I switched ISP, I have to return my modem (not my property; Sagem BASE F@ST 3202). I still wanted to know if I could get access to superuser account again. It is still accessible by serial port for which there is no connector unfortunately. An phone data cable with some soldering helps in these cases.
Well.. I just cleaned up the pads I probed and screwing it back together.
Since I can't remember what cables it came with, I just put in the ones in worst condition :)

I also bought a WD MyBook 1TB disk.

Wednesday, June 04, 2008

My network

New SSH keys generated to login without password on my server, macbook, imac and website. Works nicely. I have set MacFusion to mount automatically.

I've put back the r8169 network card in my server and it now appears to be running stable. Perhaps it's also because I upgraded the kernel version again to 2.6.24-gentoo-r3. Oh and I soldered 3 capacitors on it. They always leave out some to make it cheaper.
[edit]Shit.. still problematic[/edit]

After fiddling with MAC address in Time Machine to backup over firewire target disk mode, I found out that Apple added a hidden feature that enables network disks. With this gigabit network, that should go speedy although it still could be buggy or cause system hiccups. I wouldn't try backing up with my disk or imac turned/turning off though.
This method does not use the filesystem feature with hardlinks etc. but creates one big file: "{machine name}_{MAC address}.sparsebundle". It's probably more optimal for network links.

Btw, my macbook is named Diana and my imac Morte. From Noir-et-Blanc, which I have not seen yet but do have the Morte figurine. The internal HDDs are also called like that to prevent confusion when mounting them over the network.

Monday, March 24, 2008

link down

Since updating my kernel of my linux server, the 1Gbit card (r8169) gave troubles. Occasionally, the link went down.
dmesg shows some PCI quirks and IRQ routing conflicts but afaik it's been like that before.
Although I also had enabled the onboard USB ports and added USB to the kernel.
I then tried loading back the old kernel version only to find out that the problem persisted.
Could the card have gone bad? Sure it's a coicidence. Or perhaps the driver is just buggy somehow. I will test the card in another PC.
Back with the old and slow r8139, it seems to work just fine.
I hate this kind of crap. It takes too much time to figure out.

[iMac] samba vs sshfs

I tried moving some files from my linux server to the external firewire drive on my iMac. It just did not work and my iMac would not see the UTF-8 encoded filenames. Then I learned about the utf-8-mac encoding and though wtf. My gentoo linux installation doesn't know about that. (NT_STATUS_OBJECT_NAME_NOT_FOUND)
I tried muCommander and bash in the hope that Finder was just screwing up. But nope...
ls: 耳をすませば サウンドトラック « Whisper of the Heart/: No such file or directory
So, after fiddling around, I used MacFUSE and MacFusion user-interface to mount my homedirectory via ssh. That works.
I guess that's another -1 point for OS X.

Also, I could not overwrite files starting with a dot (normally invisible in Finder). It gives "Error code -43". Oh well, that's just a feature.

Thursday, January 12, 2006

Encryption, Input, Matrix, Devastation

Yesterday, I stumbled upon a few SRL files that are stored in some romdumps. These are WMB programs, but yet contained encryption information which is only intended for card use. It is kind of odd they would left that in. (7 out of 52 SRL files)

I found an unconnected button input on the mainboard named "R03" close to the SL1 contacts. It is mapped to bit 3 of the I/O register which also contains X & Y buttons. The purpose is still unknown.

Since a while, Nintendo started using Matrix Memory ROM chips for their cards. These seem to require a bigger latency setting. This also gave thought to making a CompactFlash (or SD) converter. This way you can connect two media cards and copy stuff from one to another for example.

I also had an idea of connecting mainboard signals to an FPGA and USB port to turn it into a real developer's system. This will include video and both card/tridge slots. I will call it Dev-a-Station :)

PassMe2

As you might have seen already, PassMe2 programming files are available at http://darkfader.net/ds/games/. The CPLD logic is precompiled for XC9572XL-VQ44 devices, so it cannot be used directly on some PassMe brands which use a different chip.
I will continue to update the list until KeyMe is out. Information on where to get up-to-date dumps easily is appreciated. Many thanks go to Loopy for making the ARM/thumb code for PassMe2.

Wednesday, November 02, 2005

NDS-tool v1.24

NDStool now can generate PassMe vhdl sourcecode and SRAM file from an nds rom file.
Here's the full Changelog.
Compiling the vhdl sourcecode requires Xilinx ISE, so I will look for a less tedious way to create a programming file since it's technically possible.
Xilinx project files and a readme can be found here.
I will soon update the nds rom database page with more info, functionality and download links for programming and SRAM files.