Nov 24
While I was waiting for CPICH to finish the first bits of the NAND FTL reverse engineering work, I've been trying to fill in some of the gaps we had in other places, such as the PMU. As promised, there is also now an easy way to install openiboot onto the iPhone. This is great because it will eventually lead to an even leaner and easier QuickPwn in the future.

One of the annoying parts about iBoot in recovery mode is that the thing refuses to charge the iPhone while sitting in recovery mode. The battery just eventually entirely drains. With the new PMU code, openiboot now recharges the battery, so programmers using it (read: me) can just have it sit on the console screen indefinitely. You can also do neat things like check the current battery voltage and check the power supply type the phone is charging from.

The "installation code" consists of porting over my knowledge of reading and modifying img3 files from working on the jailbreaks. I was too lazy to port over the entire xpwn framework, but I wrote up a "diet" version that is sufficient to read and modify img3 files in a limited fashion. img3 files are sort of the new native format of the main part of the NOR (just a bunch of img3 files concatenated together). The upshot is that you can load openiboot as an img3 through iBoot (just like sending an iBEC image) and then type "install" at the console and openiboot will be a permanent stage in your bootloader chain. =P

You can, of course, keep booting up to the iPhone OS as you always do by selecting the option in the boot menu. Installing openiboot isn't very useful except for hackers wanting to hack openiboot.

I also figured out how to parse and modify the NVRAM banks (storing environment variables like "auto-boot", etc.), which was actually pointless complicated (in my opinion). They have two banks consisting of a bunch of partitions with these headers that Apple uses a pointless one-byte custom checksum on. The entire bank is also checksumed with adler32. When NVRAM is modified, the oldest bank is overwritten with the data and becomes the newest bank (which is tracked by an epoch number on each bank). This is so if one bank becomes corrupted, the other can be used as a backup. However, NVRAM hardly contains anything high value so the value of all this trouble is doubtful. Being able to write to NVRAM, though, makes it possible to set auto-boot on and off within openiboot so that we can easily control whether or not to enter iBoot's recovery mode.

Someone asked me how "safe" it was to do the installation, etc. Well, I've been doing it every time I make an update these days, so it's fairly safe. The worst that can happen in the usual case is that you may be forced into a DFU mode restore. Everything will be undone with a restore. Early on, I did have bugs that really screwed things up so that a DFU mode restore was no longer possible, but even that was recoverable. I'll just go over how briefly:

The important thing is to have a backup of the NOR. As I described in a previous posting, it's possible to really screw things up if you erase the SysCfg section of the NOR. If you do that, the iPhone OS will refuse to boot at all since iBoot cannot properly populate the device tree for the kernel. Since restore ramdisks rely on XNU booting, this is Bad News Bears. In addition, the SysCfg section is device specific, so if you do not have a backup, it will be difficult to ever completely recover from erasing it.

Therefore, before you proceed, MAKE A BACKUP OF YOUR NOR. openiboot can do this for you (and subsequently restore your backup if things go wrong).

Load openiboot via loadibec and select the console. Connect with the oibc client. Type in: nor_read 0x09000000 0x0 0x100000

This will read all of NOR into memory. Then type: ~nordump.bin:0x100000

This will transfer the dump over USB onto your computer and save it as nordump.bin.

Supposing you filled the entire NOR with garbage somehow and are unable to boot. You have to get into openiboot to restore the NOR. The problem is that openiboot is only designed to operate in a post-LLB or post-Recovery Mode context, so it cannot be directly booted from DFU mode. Basically, you've got to load a pwned WTF, then a pwned iBSS, and then a pwned iBEC (all of which is available from a custom IPSW). After that, you can use loadibec to load openiboot. Then, you can restore the NOR thus:

!nordump.bin
nor_write 0x09000000 0x0 0x100000

After that, you can reboot and everything should be normal.

Also, I received a few responses for people volunteering to do the art. I'm not sure what the best thing would be, since I don't want anyone putting in effort for nothing, but we do want the best possible results. So, I'll be getting back to you guys about that.

Tagi: recovery mode, csts, fashi, boot menu, auto boot, battery voltage, promed, pmu, iphe, nand, iboot, phe, upshot, opti, aces, gaps, programmers, hackers, variables, banks

Dec 17
Localizing Icy

As promised, here is the localization file containing strings that need to be translated to make Icy speak your native language.

Translating is fairly easy -- open the file in your favorite text editor that can handle Unicode, and then translate all the pairs of strings -- leave the left side intact, and translate the right side. Make sure it all stays in the quotes, like this:

"Hello" = "Aloha";

Then save the file and mail it to us at ripdev@me.com - and we'll try our best to include your language in the next minor update, which will follow fairly soon.

Update: German, Greek, Italian, Spanish and Swedish translations were submitted already - thanks guys!

Icy Won't Launch

If Icy is refusing to launch, then it will be extremely helpful if you could send us some crash logs -- these usually live in the /var/logs/CrashReporter/Icy...crash files on the iPhone or ~/Library/Logs/CrashReporter/MobileDevice/<your device name>/Icy...crash on a Mac OS X (after the synchronization with the phone). We'll see what is causing this.


Ripdev Are Stealing Repo Owners Money?

There was a point running across certain community threads regarding Icy that by excluding the "depiction" and "more info" pages Ripdev is stealing money away from the repository owners. We'd like to clarify that in fact, we are not making any money off Icy -- there is no ads that run in it, and the whole point of the project is to provide a faster and lighter alternative to Cydia.

We all know that the competition boosts productivity and enhances products. In this case, as Icy and Cydia are inevitably going to compete in one way or another, this will tremendously benefit us, the end users.

As for the repository owners, some of them were upset with Icy 1.0 not even giving a chance for their information pages to show -- so this is why we have worked closely with The Big Boss and Fabiano Confuorto to work out a solution that makes the repository owners satisfied without slowing down the application down to the snail speeds. As a result, you can see a blue arrow button next to the package name that will lead you to the repository information page containing download stats, screenshots, and banners to support the repository. We encourage you to click on these often if you'd like to help repo maintainers.

And please, please remember -- this is not an evil plan to screw everyone, nor a holy crusade against repository owners -- we are, truly honestly just want to make your life a little bit brighter and easier. The positive feedback we receive every day helps us going and makes us sure we are moving in the right direction. So if you like or don't like something -- speak out, you will be heard.

Tagi: library logs, mac os x, iphe, depicti, big boss, promed, phe, native language, mobiledevice, launch, end users, repository, pairs, os x, crash, productivity, lt, threads, quotes

next >