Category Archives: iPhone

iPhone server’s issue – Apple wasted my time for the whole morning

Problem: For no reason,  I couldn’t install anything from AppStore on my iPhone today, it popped up a new  iTunes Terms & Conditions and when I clicked “OK”, it said “Cannot connect to the store – A secure connection could not be established. Please check Date & Time settings“. In fact, I accepted a new Terms & Conditions a month ago without problem, now WTF is this?  Apple servers are currently down or am I the only one having this issue? I verified the date/time and even rebooted couple times, still no luck.

Analysis: Switching to my laptop, I downloaded and installed the latest iTunes from Apple. When I clicked  “Sign In” or even “Create a new Account”, I got the same error message from my iPhone! That’s unbelievable.  Interestingly, when I clicked “Forgot Password” button, it brought me to a SSL page. I noticed something strange, because Internet Explorer prompted me a security warning on expired certificate. Looking into details, all domain *.itunes.apple.com expired on 8/28/2009.  (see picture below)  What the hell? Someone should got fired by Apple on this, it must be someone installed the wrong certificate some time this week.

Workaround: Noticing the expiry problem, it started to make sense when the error message I got was related to “Date/Time Settings”.   So,  I changed my iPhone Date/Time manually to Aug 1, 2009 (Basically any date between 8/26/2008 to 8/28/2009 should be good) and it worked!!! Bingo!  Fucking stupid mofo Apple pissed me off. I then read someone on the forums reporting this happened on PC, Mac, iPhone, and iPad.  I hope Apple realized this and updated the stupid certificate, and Thanks for wasting my time for the whole morning.

Posted in iPhone | Tagged , , , , , , | 1 Comment

Proof of Concept – Controlling Garage Door Opener remotely using mobile phone

About 2 Years ago, a huge snow storm made Deb’s car got stuck on our street, and it was very messy. Because Deb was in a rush, by the time she got to the highway she called me at work saying “I was in a rush and I forgot to close the garage door.”   This was the project I had in my mind back then.  Finally I have some time during Christmas holiday, I can try out this proof of concept.

First I bought a universal Skylink remote control from Home Depot (around $20, it works for most brands), because I didn’t want to ruin the original remote control comes with the opener. By opening the skylink keychain remote control, I could easily locate the switch. Just soldered the 2 wires and connected to the X10 Universal Module! It’s so simple, anyone can do it.

Low Tech X10 does the job

X10 technology is so old, I was the first generation user about 15 years ago.  Since it is still working okay, I can still using.  But if you don’t have it, don’t buy X10. Consider other products like Insteon, Zigbee and Z-Wave.  If you have been using X10, you know it is NOT that stable and it can turn on by itself all of a sudden. Although it is very rare, it does happen. To make it safer, I added an Appliance Module on top of the Universal Module (see in 2nd last picture). In my PHP script, I do the following:

1. Turn On Applianace Module, Sleep for 3 secs
2. Turn On Universial Module, Skylink button is connected, Sleep for 6 secs
3. Turn Off Applianace Module

Note 1: The application shown in the picture is NOT a native compiled iPhone App.  it is just a simple PHP script running on web server.

Note 2: This is a proof of concept and for demostration only, Firecracker and X10 combination is not secure.


Related Home Automation / Security Projects

A while ago, I wrote a web service so that I can read my basement (server room) temperature on my mobile phone, check it out if you are interested:

- Remote Temperature/Humidity reading on Mobile Phone Project


Configurations:

- Skylink Keychain remote control
- X10 firecracker (Serial to USB needed)
- X10 Universal Module (UM506)
- X10 Appliance Module (AM466)
- mscm17a.exe (download from Internet, free)

(All project photos were taken using point and shoot camera)

Posted in Home Improvement, iPhone, Network/Hardware | Tagged | Leave a comment

My first iPhone App – HelloWorld (Xcode on Windows Vista)

I love my iPhone 3GS. As an IT person, I am so curious on how to develop iPhone apps.  Here is my first iPhone App:

Challenge 1: Need a Mac? or Run OS X 10.6 on Vmware

In order to develop iPhone app., you basically need a Mac., but I refused to buy one. Well, you can download the pre-loaded VM image from the usual place, or you can follow the link below to do a fresh install (it is legal, you buy a licensed upgrade DVD  from Apple for $29.99) .  For me, my friend Ed. is nice enough to give me  a hand on this, that saves me a lot of time (Thanks Ed.)

- Snow Leopard boot-132 for VMware
- OSX 86 Project – Tips and Tricks

The only requirement is that, you need a machine that supports hardware virtualization (Intel VT) with 32bit XP or Vista as host OS. Bingo, I am running OS X on my HP laptop!


Challenge 2: Developer License for $99

Without the developer license, you can only test your app. on the iPhone simulator. Since I am testing my Hello World App. why would I pay $99 to Apple? There is a lot of articles out there teach you how to bypass code signature but many of them are for older version SDKs, they don’t work for 3.1.4 SDK. After trying out different methods from so many articles (took me 2 days), I finally found one in the forum. Basically you need to modify SDKSettings.plist (Info.plist  doesn’t work for 3.1.4 SDK) and from the script, you can tell it is using codesign to sign the app. under the default name  “iPhone developer” with the self-signed certificate. See screenshots!

- Bypass Code Signature (Does NOT work for 3.1.4 SDK)
- SDK 3.0 / Xcode 3.1.3 Build and Go (WORKS for 3.1.4 SDK)
- Creating a self-signed certificate (Apple official guide)


Challenge 3: Package it as IPA file and deploy to my iPhone

Finally, I need to package the app. as IPA file for my phone, please read the following link. In my screenshot, you can see I have 2 custom scripts under “Targets > IPA”.  One is for signing the app. (runs the .py script), the other one for creating the IPA file.

- How to automatically build an IPA file from XCode

You do need a jail broken phone to install IPA file, please read my 2 other related articles for more information.

- iPhone 3GS tethering and jailbreak 3.1.2
- What’s next after jailbreaking my iPhone 3.1.2?

How do I like OS X Snow Leopard?

I was the FIRST generation of Apple user, even before Mac was born. I had Apple II+ and Apple IIe about 20 years ago and I wrote assembly language on them. However, After using OS X for 2 weeks, I still don’t like it that much (it is very personal and subjective). The ONLY part I like about OS X is Linux based, I can use Terminal so freely and write shell or python scripts. Overall, I still like Windows better and I am glad that I didn’t spend money on buying a real Mac.

Objective C – Return on Investment or waste of time?

Some friends of mine are using C++ for their daily job,  it is absolutely not hard to write iPhone App. using Objective C. For Java and C# people like me, there is a learning curve.  Is it worthy? What is the return on investment? There is an article talking a guy who worked for Sun Microsystem, he was a Java programmer and he spent his spare time to write a game and he earned about $600K in a month (more than HALF a million), of course he quited his job!

- iShoot Developer makes $600,000 in one month

VmWare Notes:
1. Install VMware Tools, you can enjoy full screen and way better graphic and mouse support

2.  If you lose the the mouse or it hangs in OSX, click “CTRL-ALT” back to the system. Go to “VM” > “POWER OFF” and then start the OS again.  DO NOT use “Reset”, otherwise you will see the Apple Logo on grey screen forever and it never boots successfully.

3. Always make backup from time to time of all your Vmware files, around 15GB if you are using VmPlayer like me.

Disclaimer: The article is for education purpose only, use at your own risk. The configuration that I am using:

- HP EliteBook 6930p with Windows Vista SP1
- Vmware Player 3.0 build 203739
- OS X Snow Leopard v10.6
- Xcode 3.1.4 with iPhone SDK 3.1.2

Posted in iPhone, Network/Hardware | Tagged , , , | 1 Comment

“I Dig It 2 (Expeditions)” money cheat for iPhone

“I Dig It Expeditions” or “I Dig It 2″ is a very addictive game, it is one of my favorite games on iPhone. Personally, I am not very good at games anymore as I am getting old. Well, I passed first few levels without problem, but I found that it was very time consuming when I was on “Amazon” level, so I decided to cheat. However, looking on the Internet I could only find cheats for “I Dig It version 1″, none for version 2. So, I decided to figure it out myself.

Pre-req:
1. First you have to play “Expedition”, not “Free Games” because the instructions below are based on Expedition
2. You need to have a jailbroken phone with OpenSSH installed (root access)

Steps:
1. Connect your iphone to WiFi as usual
2. Use WinSCP and connect to your iphone,  login as root (password: alpine)
3. In /private/var/mobile/Applications/ look for “iDigIt2.app” it should be under GUID. If you remember the date when you installed, it will make your life easier.
4. Look under ../[32 digits GUID]/Documents/Profiles/004 (In my case it was 004, this is my personal profile)
5. Under 004, you can see several more folders “0301″, “0001″, “0200″, etc.. depending on which LEVEL you have finished playing. For me, “0001″ was Map 1, “0301″ was Map 2 (Antarcitca). “0200″ was Map 3 (Amazon).
6. Go into the existing level folder (in my case, it is 0200), you will see “Session.dat“, “Checkpoint.dat“.
- Checkpoint is the last game you saved, if you die you start from checkpoint.
- Session is the last session you played, it remembers where you left off.
7. All we do is to modify “Session.dat”, open it up in NotePad (see screenshots)
8. I am only interested in money, you can buy and upgrade everything. Search for “money”: 270, changed it to 20000000 (Not “totalmoney”, it’s “money”)
9. Upload the file to iPhone, replacing original one
10. This is a VERY important step, Change Owner from “root” to “mobile”, with proper permission 644
11. Done! See last screenshot, now I got $20000000!! Yeah.

Notes: In case you screw up the session.dat, you can always copy “checkpoint.dat” and replace “session.dat” (or vice version).

Amazon level – Missing Professor Walkthrough

Although I got the money cheat working, it doesn’t mean I won’t get  stuck on this game.  The “Missing Professor” on Amazon level drove me crazy for almost a week, finally I located him at the bottom-left of the map at 1890 feet. You have to enter a path located at 1990 feet, however there is a stone blocking your way in, so you’ve to use the 3×3 dynamite to clear it. Then you will see a big ass giant Ant guarding the professor (The story line doesn’t make sense but who cares, it’s a fun game to play). That particular stone which blocks the entrance looks like the regular stone with no obvious crack on it,  and I guess many of you wouldn’t even try to use dynamite on it in the first place. I think the designer/developer of the game intented to do it this way and make the game bit  more difficult.

Posted in iPhone | Tagged , , , , , | 4 Comments

What’s next after jailbreaking my iPhone 3.1.2?

A lot of iphone 3GS newbie (just like me) successfully “jailbreak” their iPhones, but have no idea what to do next.  This is my experience that I want to share with everyone.  Okay, usually jailbreak programs would install some icons such as “Cydia” or  “Rock” on your iphone.  These are the keywords that you need to know:

- Cydia (Similar to Apple AppStore but it is for jailbroken phones, wiki)
- Rock Your Phone (Similar to Cydia but offers backup/restore, website)

In Cydia and RockYourPhone, you can find a lot of open source utils such as  OpenSSL, OpenSSH, MxTube, etc.  These are apps that cannot be found in Apple AppStore even if you want to pay (stupid eh?)   Many apps on Cydia/Rock are apps rejected by Apple, yet some of them are not free, such as “MyWi” and “My3G” these are very good apps and I did pay for them through “RockYourPhone” as an appreciation to the developers.  However, you CANNOT find any pirated or cracked Apps from these repositories (repo).

(1) IPA files – Drag and Sync

If you come across many iphone Apps from the usual places (Bit Torrent or Usenet, etc..)  you will see they comes with *.IPA extension. By default, a jailbroken phone cannot install these apps,  so the next thing is to modify your iphone using a famous app called “AppSync” (alternatively, you can use “Installd”) so that you can install *.ipa files.  This is a very good guide:

- AppSync for iPhone 3.1.2 Jailbreak Firmware

Now, you can download your favorite Games, Apps, etc.   All you do is to DRAG the *.ipa files to your iTune (Applications), and then Sync it with your iphone, that is so easy!

Ipa format  is no mystery, it is stupid Apple tries to make it cool. Indeed, they are “ZIP” files, damn it. Just rename the extension unzip them and you will see the “PayLoad” folder and then, there is the “.app” folder containing the real apps. If you are interested in finding out more, you can use SFTP (see end of the article) to explore your own iphone, look under   /Applications/  folder.

(2) Alternative way – Install0us

Install an app called  “Install0us” on your iphone, that you can search/install apps directly from your iphone.  Remember to get the correct version, for 3GS 3.1.2, you need AppSync para v1.0 for 3.1.2 AND  you need Install0us v2.5.1  (v2.5 will not work for 3.1.2). There is a lot of good articles out there:

- install0us 2.5 for iPhone 3.1.2 Jailbreak Firmware

After starting “Install0us” successfully, set the home page to: http://appulo.us/appdb (They will ask you a stupid question, Google it for the answer). If you find appulos.us is too slow, try other alternatives:

- Appulos.us Alternatives


Which way is better?

Personally I like the first method of downloading the *.ipa files and drag it to iTune and Sync it. There is a very good Russian site, many of those RapidShare or even Bit Torrent files were originated from this site:

- IGUI.ru


How do they do it? and why iPhone Apps are so easy to crack?

iPhone Apps are easy to hack because of  Apple’s “AppStore”,  this provides ONE single point of entry of weakness. In desktop world, each vendor has their own ways to validate their software license keys. However, AppStore concept makes it as ONE.  The hacking community is so smart that they come up with a software called “Crackulous“ which can rip any PAID AppStore apps and make it free to share it with the community.

- iPhone app developers robbed: Crackulous released


Advanced Reference (SFTP + SSH)

To transfer files manually from/to  iPhone,  install OpenSSH from Cydia/Rock. Then use WinScp, thro WiFi/Tether  from Windows and you can SFTP all you want.  Default username/password is  root/alpine,  also there is another account: mobile/alpine .  Indeed, this was the traditional way of jailbreak & unlock my wife’s old 2G phone years ago.

Remember to use Putty and SSH to your iphone and use the “passwd” command to change both “root” and “mobile” password, otherwise virus/trojan horse can take advantage of the default SSH password and potentially steal your information.

Posted in iPhone, Network/Hardware | Leave a comment

iPhone 3GS – “To enable tethering on this account contact ….”

I have been using my HTC TyTnII (Kaiser) with Windows Mobile 6.1 (Hyperdragon rom) for almost 2 years, and I finally couldn’t stand it and decided to upgrade to an iPhone 3GS.   Although I have never had an iPhone before, but I did help my wife to unlock and jailbreak 2G iphone 2 years ago.

I was pretty happy with the iphone 3GS on the first day, but after I found that I couldn’t tether – I was PISSED.   It said “To enable tethering on this account contact [Provider Name]“, that is bullshit since I have a 6GB data plan and it does not allow me to tether!!  I called customer support and the idiot  said that because I was on a “Blackberry 6GB plan” which doesn’t work for iPhone on tethering and they needed to do some investigation.   After 5 days, still no tethering.  But for the same account, same data plan,  I could do it with Windows Mobile, what is the problem with these people? After reading some articles, I understand why – the reason is that Apple works so closely with these phone companies, they intentionally disabled tethering in iPhone version 3.1.x,  so that they can charge their customers on tethering in the future (not now, since my provider actually allows me to tether without additional fee).

If you are using version 3.0.x, click here (very simple XML to modify your config profile) and it will enable tethering. Look into the XML file, there is key called “type-mask”, when it sets to -4 or -2, it will enable tethering. Also, read the “Apple Enterprise Deployment Guide” to get more information on this XML. But this doesn’t work for v.3.1.x.

Jailbreak 3.1.2

Originally, I didn’t want to jailbreak my phone but this “tethering” issue bugs me so much. My iphone 3GS comes with version 3.1 and I upgraded to latest 3.1.2  (baseband 05.11.07) when I ran  iTune 9.0.2 on my computer.  With the help of this article, I successfully jailbroke the 3GS in less than 5 min.

- Jailbreak iPhone 3.1.2 Firmware with blackra1n RC3

- After several reboot, you will see “blackra1n” on your phone.
- Click on it and install “Cydia” (App Installer for developers, you will need it later)

Tethering with CommCenter.path (At your own risk)

There is a CommCenter.patch that can do fix tethering issue, however a lot of people saying they got into endless loop of rebooting after applying the patch. I don’t want that.

- Enable Tethering using CommCenter.patch by Dev-Team (FYI)


Tethering with MyWi (Pay $10)

The alternative way is to pay $10 for “MyWi”.  Search for “MyWi” on Cydia  (it will also install “OpenSSL”, “Rock Extensions” and “RockApp”). Read this article:

- Enable Tethering on 3.1.2 using MyWi

This product is amazing, it enables Tethering, no more annoying message “To enable tethering on this account contact …” after connected to the laptop.  Furthermore, it makes your iphone become a wireless access point (Adhoc) so that you can tether with WiFi, this is especially good if you don’t want a cable or you don’t want to install iTune (“Apple Ethernet” needed) on your computer.


Enable Tethering without paying

MyWi is a very good product, I am thinking of paying $10 indeed as an appreciation to developer (since I am a developer myself).  However, there is still a way to get around this without paying – this will enable tethering, but you will lose the WiFi access point feature. (Read the comments on last link above, quote from “YourRegrets” and “prolifix”)

- Use Terminal on iphone
> cd /private/var/stash/Applications
> rm -rf Rock.app
> rm -rf MyWi.app
- Do a hard reset and you will have Internet Tethering enabled without paying.

Something You Have to Know – Why in Recovery mode after reset?

This Jailbreak is not perfect – If you run out of battery or do a soft reset of your phone, you will end up in “Recovery Mode” and you can’t use your phone, period. Originally I thought I screwed up the process and I did a factory restore for several times. But after reading some forums (see link below), I have a better understanding what happen – all you have to do is to connect your iphone to your computer and run the jailbreak program again, no data or app loss at all.

- ALWAYZ recovery mode after reboot?

Posted in iPhone, Network/Hardware | Tagged , | Leave a comment

iPhone accidentally upgraded to 1.1.2 – successfully unlocked again!

Buffalo vs Pacific Mall: As of today writing this article, there are 2 ways to use iPhone in Canada: (1) Drive across the border to Walden Galleria and get one from Apple Store for $399 US and then unlock it yourself, or (2) You can pay $680 CAD at Pacific Mall and get big time ripped off.

Unlocking an iPhone to use on Rogers in Canada is very easy if you get to the right article, but finding the right article on Google isn’t that easy.  Because there are SO MANY ways to get from point A to point B and also there are many outdated methods.  After researching for a while,  I strongly recommended: www.unlockthatiphone.com (Note that 1.1.2 + 04.02.13G baseband using AnySim 1.2/1.2.1u described in unlockthatiphone.com does NOT work)

Jailbreaking and Unlocking 1.1.1 iPhone is too easy using TIFF exploit, there is nothing worth writing on my blog since there are tons of good articles out there. However, this blog is to help other people who have accidentally upgraded to 1.1.2 and want to jailbreak and unlock it again.

iPhone accidentally upgraded to 1.1.2: After jailbreaking and unlocking the 1.1.1 iPhone,  one day I accidentally upgraded the iPhone to 1.1.2 in iTune. As of today when writing this article, there is no easy way to unlock the phone from AT&T on 1.1.2 firmware + 04.02.13G baseband. After looking for solutions on the net and trying for several days, finally I got it working by downgrading BOTH firmware and baseband, then revirginized the phone.

Pre-req: Your phone was shipped with 1.1.1 Firmware + 04.01.13G baseband + 3.9 bootloader  purchased in U.S (not Europe, because different bootloader version 4.6 won’t work) and you have accidentally upgraded to 1.1.2 firmware + 04.02.13G baseband in iTune

To recap, here is the summary:

1. Downgrade firmware to 1.1.1 and then to 1.0.2 (using iTune and iBrick)
2. You phone now has firmware 1.0.2 + baseband 04.02.13G
3. Use “iBrick” to install PXL software and “OpenSSH”
4. Connect to wireless network using *#307# trick
5. Using “WinSCP” and “Putty” to connect to the iPhone through your WiFi
6. Downgrade baseband to 03.14.08G using “bbupdater” and “iearaser”
7. Revirginize using “eliteloader.bin” (rebuild iphone lock table in the seczone area)
8. Now, your phone has firmware 1.0.2 + baseband 03.14.08G

dsc01775.JPG dsc01771b.JPG

9. Restore firmware to 1.1.1 + baseband 04.01.13G (Using iTune, no more #1011 or #1013 error)
10. Using Jailbreakme.com or UnlockthatiPhone.com to jailbreak to get access to Springboard (using TIFF exploit)
11. Using “Installer” to install “BSD Subsystem” (prepare for AnySim 1.1)
12. Install “AnySim 1.1″ to unlock A&T to use with your local wireless provider

dsc01779.JPG dsc01780b.JPG dsc01782b.JPG

To follow the detail step-by-step downgrade and unlock, please visit the 3 links below.

Links: (Very Detail, Step-By-Step)

Step (1): Downgrade Firmware + Baseband to 1.0.2 + 03.14.08G

Step (2): JailBreak 1.1.1 to get Springboard

Step (3): Unlock provider using AnySim 1.1

Iphone Terminology:

- Jailbreak vs Unlock: Access to Springboard vs Unlock from AT&T
- Firmware vs Baseband: iTune upgrades Firmware as well as Baseband duing update. However, when ITune downgrades firmware, it does not downgrade baseband. That’s why you need to revirginize the phone using “bbupdater” and “ieraser”
- iPhoneSIMFree vs AnySim: One charges for a fee, the other one is free. It’s an easy decision, use AnySim!
- AnySim 1.1. vs AnySim 1.2/1.2.1u: AnySim 1.1 was developed by DEV Team for firmware 1.1.1, and AnySim 1.2/1.2.1u was developed by ELITE Team claiming to unlock firmware 1.1.2.

iPhone Voice Mail Indicator doesn’t work on Rogers: If you are running 1.1.1 on Rogers successfully, and you find that the voice mail indicator doesn’t work? You do need to upgrade to 1.1.2 using Oktoprep (A new  jailbreak for 1.1.1 to 1.1.2 upgrade), then use 1.2.1u to unlock the phone.

Overall Comments: You do need to have some basic Linux skills in order to do this, I followed the above 3 links to unlock my iphone, and it was successfully. There were some typo or very minor steps were missing (such as chmod 0755 to a file) in those articles, but with some basic computer knowledge, you can easily figure out.

Do not email me for questions, I will not answer. If you have questions, please post them on Hackint0sh.org Forum or Elite Team Forum. If you are scared about damaging your phone (it’s possible during flashing baseband), pay someone to do it. Good luck.

iTouch vs iPhone: I saw Futureshop/Best Buy in Canada are selling iTouch for $299 CAD, and at the same time, you can drive to Buffalo and get a 8GB iPhone for $399 US.   In Buffalo, you pay less tax, and with strong CAD dollar, I don’t see why you want an iTouch. It’s so stupid.

Posted in iPhone, Network/Hardware | 1 Comment