PDA

View Full Version : [iPhone SDK] Apps Work w/o Certificate on 2.0 + Pwnage


elpopo
04-04-2008, 05:46 PM
Well seems like there is everything when you have the free sdk, the 2.0 and the pwnage tool from the dev team.
Nothing else is needed to write applications and get them tested on the hardware.
I'm using an iPod touch indeed.

I tough you may be interested to know that it works wonderfully!!

I needed the hardware to test the accelerometer. Now, thanks to the dev team, I can test using the official sdk and be ready for june!

I am now an happy developer.

Cheers,

Elpopo

thebinaryman
04-04-2008, 06:02 PM
I can confirm that this works fine. Also tried a few apps on it and they run great.

slyv
04-04-2008, 06:09 PM
To be as happy as you, i need to know if installing 2.0b pwned on iPhone is reversible? Will i be able to go back to 1.1.4? Anyone knows?

Izzard
04-04-2008, 09:15 PM
Hmmm, I installed 2.0 and have the new Xcode but I couldn't build any apps for the device because it failed saying I don't have a certificate in my keychain (which is true). My phone was working OK with 2.0, unlocked, activated and jailbroken using iPwnage.

So what did you do differently I wonder?

slyv: I used iPwnage on 1.1.4, then upgraded to 2.0 (also pwned) and was able to go back to 1.1.4 fine.

elpopo
04-04-2008, 10:53 PM
If you download one example from Apple dev site, you can check that you can compile for the device and upload manually to the device. So you just check what is different from your application that requires instead the signing.....
;)

Elpopo

Izzard
04-04-2008, 11:32 PM
Hmm. I have downloaded *all* the sample projects. Can you say which one compiles for 'device' without requiring a certificate?

appleguru
04-04-2008, 11:46 PM
Works fine for me.. in xcode, go to your organizer and make sure to add your phone and enable it for development.

elpopo
04-04-2008, 11:56 PM
All of them. They compile in debug for iPhoneOS2.0 (to compile in release mode you have to manually edit the project first). The debug version is ok, use only the build command as the go will not work (in my case Xcode does not recognize the device). Then transfer by ftp the compiled application to the device and it works. You need to either restart the device or kill and restart the SpringBoard (I use the second).

A couple of them, do not compile as they are because are still in the old Aspen format. But can be fixed easily changing the base sdk to iPhoneOS2.0.

Elpopo

thebinaryman
04-05-2008, 01:20 AM
You may run into problems getting xcode to automatically put compiled apps on the device. I actually just copied them across manually using ForkLift (FTP/SSH).

Also, YES you can go back to any firmware at any time. I don't think anyone has locked/bricked their device yet.

filharvey
04-05-2008, 03:33 AM
k, I can compile say the lunerLander app, it creates the application for device.

What do I do to copy over it and the assets to work on the iTouch? I can connect to the iphone via winSCP and see the file structure.

Just what do I need to do to get the compiled app working?

Also as a side note, when I have my iTouch plugged into the Mac and use XCode, xcode crashes. Any ideas?

Thanks

Phil

elpopo
04-05-2008, 10:52 AM
As I reported and the thebinaryguy ;) is saying, use an ftp program to connect and transfer the compiled app to the Applications folder in the iPhone/iPod. An ftp server is on by default on the pwned device. Use the IP address of the device.
Then the easiest way to restart the SpringBoard is to turn off and then on again the device and you get your app ready for running.

The Xcode is crashing when you close the starting window with tips etc.? Is normal, close that window using the close red button on top-right of the window and not the button to close. You may specify not to open it by default on start.
Otherwise I have no idea. You may check the Apple official forums then or submit a bug (that's the best thing you can do).

Elpopo

filharvey
04-05-2008, 03:49 PM
Thanks was able to upload the lunar lander app and run it without a problem.

The one thing I did have to do was turn on the excutable flags for the application.

Thanks

Phil

peterH
04-05-2008, 08:07 PM
what do you mean by "turn on the excutable flags" ?

sleeepy
04-06-2008, 03:04 AM
OK, Ive got as far as a pwned phone and a custom 2.0 ipsw but now I'm stuck.

How the *** do I use iTunes to install the ipsw file onto the iphone. As far as I can see there seems to be no facility to give iTunes a specific file, it gets it from the net.

Do I need a specific version of iTunes or am I just going blind and/or stupid. :confused:

Former Bender
04-06-2008, 06:23 AM
As I reported and the thebinaryguy ;) is saying, use an ftp program to connect and transfer the compiled app to the Applications folder in the iPhone/iPod. An ftp server is on by default on the pwned device. Use the IP address of the device.
Then the easiest way to restart the SpringBoard is to turn off and then on again the device and you get your app ready for running.

Simply open the Organizer window in Xcode, click the + sign, browse and select the app you want to send to the iPhone/iTouch.

It works even to send Unofficial apps. :)

omnivector
04-06-2008, 08:59 AM
So I have an app on the phone, and running, but I couldn't get the supposed "automatically provided" ftp to work. FTPing into my phone just gives me a connection refused error. Did you guys add something custom to the ipsw package before flashing it onto the phone?

elpopo
04-06-2008, 11:14 PM
Simply open the Organizer window in Xcode, click the + sign, browse and select the app you want to send to the iPhone/iTouch.

It works even to send Unofficial apps. :)
I tried again but when sending the App I always get an error. Then trying to get a screen copy of the device it reports that it cannot communicate with it.
May is something connected to the fact I am using an iPod Touch?

Another thing I observed. In the /private/var/mobile/Applications (where I suppose the organizer transfer the applications) the iPod see only one app at time (the first). The others are ignored. So I normally put them directly in the main Applications

Elpopo

elpopo
04-06-2008, 11:18 PM
So I have an app on the phone, and running, but I couldn't get the supposed "automatically provided" ftp to work. FTPing into my phone just gives me a connection refused error. Did you guys add something custom to the ipsw package before flashing it onto the phone?
No, simply the pwned ipsw. What kind of error you get? There may be a problem with the secure key if you connected before and the key has changed. In my case I had to delete in the ssh hosts file the line for the previous "version" of my device, as it was complaining the key has changed.

Elpopo

Former Bender
04-06-2008, 11:20 PM
All the tests are done with my iTouch :)

elpopo
04-06-2008, 11:39 PM
Oh, so or I have something messed up or missing or you have done something special or more.
I have just done the basic procedure to get the 2.0 pwned. On the mac I have the Xcode 3.1 complete, and installed also the open toolchain.
Attaching the iTouch, I exit then from iTunesbefore to switch to Xcode. I get the green button on organizer. But I get this strange error that seems to come from the iTouch.
Only is not easy to get more info.....as you see this is what I get.

Sun Apr 6 09:35:37 unknown kernel[0] <Debug>: shared_region: mapping[0]: address:0x00000000300b8000 size:0x00000000000b8000 offset:0x0000000000000000 maxprot:0x5 prot:0x5 failed 0x3

Thanks again. One more curiosity. Your applications are ending in var/mobile/Applications? And you can see more than one right?

Elpopo

sleeepy
04-07-2008, 01:48 AM
I've been round the following loop twice. The results were the same each time.

I've Pwned the phone with 1.1.4 on it

I've created a custom 1.1.4 using the default settings.

I've restored the custom 1.1.4 image via iTunes (once someone pointed out the alt key).

I've created a custom 1.2 from 2.0_Beta_5a225c_ipsw again using default settings

I've restored the custom 1.2 image using iTunes.

I've uploaded all of buildable Apple examples built with the latest Apple iPhone SDK to the custom 2.0 Beta iPhone.

But when I run them they all start and then immediately shut down again.

Any ideas anyone (apart from that I've accidentally uploaded the original rather than custom 1.2 image - no).

omnivector
04-07-2008, 04:16 AM
You have to copy the ones from the iPhone-os debug directory, not the iphone-simulator debug directory. If you copy those, you'll be trying to run x86 binaries on the phone (which won't work.)

sleeepy
04-07-2008, 12:55 PM
You have to copy the ones from the iPhone-os debug directory, not the iphone-simulator debug directory. If you copy those, you'll be trying to run x86 binaries on the phone (which won't work.)

They were built for Device - Release and copied from the iphone-os release directory in the project. Anyway they started up and generally created their initial display before shutting down. Which surely they wouldn't do unless they were the arm version. Also, on the Mac, they have the no entry icon because they are not x86 versions.

mbroncano
04-07-2008, 02:13 PM
I have some demo app from the first version, which worked fine on my 2.0 pwned iPhone. Now I try to create a new sample app from Xcode 3.1 (former one was from 3.0) and it says:

Codesign error: no certificate for identifier "iPhone Developer" was found in your keychain

mbroncano
04-07-2008, 02:21 PM
Autoanswer:

Once created the project, you just have to go to "project settings" and on "code signing identity" switch to "Device - iPhone OS 2.0"

sleeepy
04-07-2008, 03:25 PM
I am not using the xcode 3.1 download facility. I am building the code and then sftping the code across to the /Applications directory. The "No Certificate" message comes from the Build and Go option but a straight build does not do this. Since I have not got a certificate ....

Mbroncano - I assume that your second comment was an answer to your first comment but did you then have success in running the apps built under the new SDK ? Assuming that you do not have a real Apple certificate (since you have a pwned 2.0) did you then succeed in getting Xcode 3.1 to install across the USB cable rather than using SFTP?

mbroncano
04-07-2008, 04:45 PM
I am not using the xcode 3.1 download facility. I am building the code and then sftping the code across to the /Applications directory. The "No Certificate" message comes from the Build and Go option but a straight build does not do this. Since I have not got a certificate ....

Mbroncano - I assume that your second comment was an answer to your first comment but did you then have success in running the apps built under the new SDK ? Assuming that you do not have a real Apple certificate (since you have a pwned 2.0) did you then succeed in getting Xcode 3.1 to install across the USB cable rather than using SFTP?

Yes, I'm using Xcode 3.1 to transfer and debug the applications and I don't have Apple cert. When I found the signing error messsage, I change the code signing identity in project settings. I realized that example applications from Apple didn't have that option set.

I'm still trying to understand what's needed for signing, but erasing that option works!

sleeepy
04-07-2008, 06:07 PM
I moved my problem to a new thread as this thread, titled "[iPhone SDK] Apps Work w/o Certificate on 2.0 + Pwnage" isn't exactly the place to discuss that it doesn't work.

It's now at
[URL="http://www.hackint0sh.org/forum/showthread.php?t=37152"]

I suspect that my problem giving no signature causes the my apps not yo be signed at all, rather than being signed with some junk.

Unfortunately xcode insists that you need 10.5.2 to sign (I'm 10.5.1) as it says that armv6 is required but I think that this is a red herring and am looking for alternative ways to sign the apps that would be compatible albeit with invalid signatures.

When you say that erasing the option works [the "code signing identity"option?], do you mean that you can then build code, or that the code will go on and correctly execute on the device?

mbroncano
04-07-2008, 06:23 PM
I moved my problem to a new thread as this thread, titled "[iPhone SDK] Apps Work w/o Certificate on 2.0 + Pwnage" isn't exactly the place to discuss that it doesn't work.

It's now at
[URL="http://www.hackint0sh.org/forum/showthread.php?t=37152"]

I suspect that my problem giving no signature causes the my apps not yo be signed at all, rather than being signed with some junk.

Unfortunately xcode insists that you need 10.5.2 to sign (I'm 10.5.1) as it says that armv6 is required but I think that this is a red herring and am looking for alternative ways to sign the apps that would be compatible albeit with invalid signatures.

When you say that erasing the option works [the "code signing identity"option?], do you mean that you can then build code, or that the code will go on and correctly execute on the device?
Does any example work for you? Examples have always worked for me.

I'm running 10.5.2, btw.

Erasing the options allows me both to build and run/debug the application on the device.

elpopo
04-07-2008, 06:45 PM
Oh, so or I have something messed up or missing or you have done something special or more.
I have just done the basic procedure to get the 2.0 pwned. On the mac I have the Xcode 3.1 complete, and installed also the open toolchain.
Attaching the iTouch, I exit then from iTunesbefore to switch to Xcode. I get the green button on organizer. But I get this strange error that seems to come from the iTouch.
Only is not easy to get more info.....as you see this is what I get.

Sun Apr 6 09:35:37 unknown kernel[0] <Debug>: shared_region: mapping[0]: address:0x00000000300b8000 size:0x00000000000b8000 offset:0x0000000000000000 maxprot:0x5 prot:0x5 failed 0x3

Thanks again. One more curiosity. Your applications are ending in var/mobile/Applications? And you can see more than one right?

Elpopo
Solved!
I reinstalled Xcode, I don't know if it was because I had it upgrading from well before the iPhone sdk or the open toolchain installed. After that I was able to communicate correctly with the iPod. Then I had still another error because I created manually the folder in mobile/Applications and the organizer didn't like it.
Now everything works also with the organizer....
Thanks to all,

Elpopo

elpopo
04-07-2008, 06:49 PM
I moved my problem to a new thread as this thread, titled "[iPhone SDK] Apps Work w/o Certificate on 2.0 + Pwnage" isn't exactly the place to discuss that it doesn't work.

It's now at
[URL="http://www.hackint0sh.org/forum/showthread.php?t=37152"]

I suspect that my problem giving no signature causes the my apps not yo be signed at all, rather than being signed with some junk.

Unfortunately xcode insists that you need 10.5.2 to sign (I'm 10.5.1) as it says that armv6 is required but I think that this is a red herring and am looking for alternative ways to sign the apps that would be compatible albeit with invalid signatures.

When you say that erasing the option works [the "code signing identity"option?], do you mean that you can then build code, or that the code will go on and correctly execute on the device?
In the sign options fields erase everything leaving only blank like you see in the examples. That's the meaning of erasing the signature or certificates.
Than you can build and also transfer using the organizer.

Elpopo

sleeepy
04-08-2008, 02:23 PM
In the sign options fields erase everything leaving only blank like you see in the examples. That's the meaning of erasing the signature or certificates.
Than you can build and also transfer using the organizer.

Elpopo

There is a missunderstanding here. The ambiguity is not in the meaning of "erasing the signature or certificates" but in the meaning of "does it then work".

You may recall that my problem was never one of being able to build and transfer the application. The issue was that the application, when run on the device, would then shut down shortly after initialization.

i.e. My question

When you say that erasing the option works [the "code signing identity"option?], do you mean that you can then build code, or that the code will go on and correctly execute on the device?

was trying to get confirmation that the code would then run correctly on the device without shutting down after a second and not just whether it would build and transfer. I think that you still haven't answered that.

I confirm that I can now run applications by setting the "code signing identity" non blank but if I leave it blank then my belief is that in this situation the application is not "sandboxized" and that after transfer it will shut down shortly after initialisation.

elpopo
04-08-2008, 11:59 PM
sleepy, sorry I misunderstood your question completely.
Well, in my case the application with a blank code signing identity it is correctly sandboxized and it works.
What do you put in the identity when not blank?
If you transfer the application by ftp on the /Applications folder with a blank code signing identity, does it works?
I remember when I had the problem with XCode and I could only transfer the application by ftp, it only worked if in the /Applications, otherwise n the mobile/Applications it was just doing what it does for you.
Then may be your problem could be that the organizer fails to sandboxized the Application when the code signing identity is blank. But it succeed on transferring it and let it recognize by the SpringBoard.

It could just be something wrong in your Xcode installation. In my case it was, but it didn't even transferring the Application.

If you have a second Mac, try to get a clean installation of Xcode iphone sdk 2.0 beta and try there. So you may distinguish if the problem is on the Xcode/Organizer on on your touch device.

I am interested to know, as it seems to me the situation where everything works is delicate and easily screwable.......

Elpopo

thecube
07-21-2008, 01:15 AM
Hi, I get this error when trying to compile an app in xcode directly to the iphone using the device as active sdk? "Your mobile device has encountered an unexpected error (0xE8000001)"

My phone is pwned to 2.0 from a previously pwned 1.1.4

The log in xcode says:

Mon Jul 21 00:24:16 unknown afcd[206] <Error>: user mobile has uid 501

Mon Jul 21 00:24:16 unknown afcd[206] <Error>: mode is 0x41e8
Mon Jul 21 00:24:17 unknown SpringBoard[26] <Warning>: lockdown says the device is: [FactoryActivated], state is 0
Mon Jul 21 00:24:17 unknown mobile_installation_proxy[208] <Error>: verify_executable: Could not validate signature: e800800e
Mon Jul 21 00:24:17 unknown mobile_installation_proxy[208] <Error>: preflight_application_install: Could not verify /var/tmp/install_staging.8UQQ/Test.app/Test
Mon Jul 21 00:24:17 unknown mobile_installation_proxy[208] <Error>: install_application: Could not preflight application install
Mon Jul 21 00:24:17 unknown mobile_installation_proxy[208] <Error>: handle_install: Installation failed


And the crash log in xcode is complaining on cydia:

Process: Cydia_ [437]
Path: /Applications/Cydia.app/Cydia_
Identifier: Cydia_
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]

Date/Time: 2008-07-20 18:39:40.081 +0200
OS Version: iPhone OS 2.0 (5A347)
Report Version: 103

Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000004
Crashed Thread: 0

I will try to install 2.0 without cydia tomorro and see if it works but any other ideas are appreciated.

Thanks

asdfca
07-21-2008, 05:57 AM
I'm having the same problem... iPhone first gen was pwned with 1.1.4 then pwned 2.0 yesterday.

Your mobile device has encountered an unexpected error (0xE8000001) during the install phase:

Sun Jul 20 22:42:35 unknown afcd[135] <Error>: user mobile has uid 501

Sun Jul 20 22:42:35 unknown afcd[135] <Error>: mode is 0x41e8

I cannot use the organizer...

thecube
07-21-2008, 11:12 AM
I realized I need to get more uptodate on this topic. Does anybody know of FAQ when i comes to the official iphone sdk and building it directly to a pwned 2.0 iPhone? Is there a need to apply to the iPhone Developer Program to get an official certificate if I only want to have the app on my phone for the moment?

Thanks a lot

xqterry
07-21-2008, 12:51 PM
I got same issue, blank code signing identity in project setting no longer works for new official SDK + pwnage 2.0.

sebsto
07-22-2008, 12:12 AM
We just got an update from saurik (ldid and codesign) and Jay (Cydia)
I got my SDK developped application running on a pwned V2 phone, without official certificate.

I just poste dthe instructions there

http://hackint0sh.org/forum/showthread.php?t=46466

Seb

typewriter
07-30-2008, 11:19 PM
Awesome, thanks!