nowsecure / node-applesign

NodeJS module and commandline utility for re-signing iOS applications (IPA files).
https://www.nowsecure.com
MIT License
425 stars 77 forks source link

iOS 13.3.1 #93

Closed HerbertGoergens closed 4 years ago

HerbertGoergens commented 4 years ago

Thank you for the great tool. Unfortunately it does not seem to work with iOS 13.3.1 anymore. The installation of a self-signed IPA fails with the error message: "Error 0xe8008001: An unknown error has occurred. AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)"

trufae commented 4 years ago

Is this happening with any IPA? Which commandline flags are you using?

On 27 Feb 2020, at 12:52, HerbertGoergens notifications@github.com wrote:

 Thank you for the great tool. Unfortunately it does not seem to work with iOS 13.3.1 anymore. The installation of a self-signed IPA fails with the error message: "Error 0xe8008001: An unknown error has occurred. AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)"

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Tigre000 commented 4 years ago

I get the same error.

tigre000@Tigre000ui-MacBookPro Desktop % applesign --mobileprovision ~/embedded.mobileprovision test.ipa File: /Users/tigre000/Desktop/test.ipa Outdir: /Users/tigre000/Desktop/test.ipa.88992a4e-72fe-4faf-9c4a-a0a61a3008e8 Cleaning up /Users/tigre000/Desktop/test.ipa.88992a4e-72fe-4faf-9c4a-a0a61a3008e8 Unzipping /Users/tigre000/Desktop/test.ipa Main IPA executable is not encrypted Embedding new mobileprovision {"application-identifier":"GJ962AK34K.com.tigre000.ProvisionAppCert","keychain-access-groups":["GJ962AK34K.*"],"get-task-allow":true,"com.apple.developer.team-identifier":"GJ962AK34K"} get-task-allow set to true Updated binary entitlements/Users/tigre000/Desktop/test.ipa.88992a4e-72fe-4faf-9c4a-a0a61a3008e8/Payload/test.app/test.entitlements Signing libraries and frameworks Resolving signing order using layered list Nested: ["/Users/tigre000/Desktop/test.ipa.88992a4e-72fe-4faf-9c4a-a0a61a3008e8/Payload/test.app"] SystemLibraries: ["/usr/lib/libc++.1.dylib","/usr/lib/libsqlite3.dylib","/usr/lib/libz.1.dylib","/System/Library/Frameworks/Foundation.framework/Foundation","/System/Library/Frameworks/Security.framework/Security","/System/Library/Frameworks/StoreKit.framework/StoreKit","/System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration","/System/Library/Frameworks/SafariServices.framework/SafariServices","/System/Library/Frameworks/WebKit.framework/WebKit","/System/Library/Frameworks/UserNotifications.framework/UserNotifications","/System/Library/Frameworks/PushKit.framework/PushKit","/usr/lib/libobjc.A.dylib","/usr/lib/libSystem.B.dylib","/System/Library/Frameworks/AVFoundation.framework/AVFoundation","/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation","/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics","/System/Library/Frameworks/UIKit.framework/UIKit"] DiskLibraries: ["/Users/tigre000/Desktop/test.ipa.88992a4e-72fe-4faf-9c4a-a0a61a3008e8/Payload/test.app/test"] UnavailableLibraries: [] AppLibraries: ["/Users/tigre000/Desktop/test.ipa.88992a4e-72fe-4faf-9c4a-a0a61a3008e8/Payload/test.app/test"] Orphan: [] Signed /Users/tigre000/Desktop/test.ipa.88992a4e-72fe-4faf-9c4a-a0a61a3008e8/Payload/test.app/test Zipifying into /Users/tigre000/Desktop/test-resigned.ipa ... Cleaning up /Users/tigre000/Desktop/test.ipa.88992a4e-72fe-4faf-9c4a-a0a61a3008e8 Target is now signed: test-resigned.ipa Cleaning up /Users/tigre000/Desktop/test.ipa.88992a4e-72fe-4faf-9c4a-a0a61a3008e8 tigre000@Tigre000ui-MacBookPro Desktop % ideviceinstaller -i test-resigned.ipa WARNING: could not locate iTunesMetadata.plist in archive! Copying 'test-resigned.ipa' to device... DONE. Installing 'com.tigre000.test' Install: CreatingStagingDirectory (5%) Install: ExtractingPackage (15%) Install: InspectingPackage (20%) Install: TakingInstallLock (20%) Install: PreflightingApplication (30%) Install: InstallingEmbeddedProfile (30%) Install: VerifyingApplication (40%)ERROR: Install failed. Got error "ApplicationVerificationFailed" with code 0xe8008001: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.OziT33/extracted/Payload/test.app : 0xe8008001 (An unknown error has occurred.) tigre000@Tigre000ui-MacBookPro Desktop %

trufae commented 4 years ago

Read the device syslog for proper error message. Also, use the -c flag too

On 7 Mar 2020, at 07:54, Tigre000 notifications@github.com wrote:

 I get the same error.

tigre000@Tigre000ui-MacBookPro Desktop % applesign --mobileprovision ~/embedded.mobileprovision test.ipa File: /Users/tigre000/Desktop/test.ipa Outdir: /Users/tigre000/Desktop/test.ipa.88992a4e-72fe-4faf-9c4a-a0a61a3008e8 Cleaning up /Users/tigre000/Desktop/test.ipa.88992a4e-72fe-4faf-9c4a-a0a61a3008e8 Unzipping /Users/tigre000/Desktop/test.ipa Main IPA executable is not encrypted Embedding new mobileprovision {"application-identifier":"GJ962AK34K.com.tigre000.ProvisionAppCert","keychain-access-groups":["GJ962AK34K.*"],"get-task-allow":true,"com.apple.developer.team-identifier":"GJ962AK34K"} get-task-allow set to true Updated binary entitlements/Users/tigre000/Desktop/test.ipa.88992a4e-72fe-4faf-9c4a-a0a61a3008e8/Payload/test.app/test.entitlements Signing libraries and frameworks Resolving signing order using layered list Nested: ["/Users/tigre000/Desktop/test.ipa.88992a4e-72fe-4faf-9c4a-a0a61a3008e8/Payload/test.app"] SystemLibraries: ["/usr/lib/libc++.1.dylib","/usr/lib/libsqlite3.dylib","/usr/lib/libz.1.dylib","/System/Library/Frameworks/Foundation.framework/Foundation","/System/Library/Frameworks/Security.framework/Security","/System/Library/Frameworks/StoreKit.framework/StoreKit","/System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration","/System/Library/Frameworks/SafariServices.framework/SafariServices","/System/Library/Frameworks/WebKit.framework/WebKit","/System/Library/Frameworks/UserNotifications.framework/UserNotifications","/System/Library/Frameworks/PushKit.framework/PushKit","/usr/lib/libobjc.A.dylib","/usr/lib/libSystem.B.dylib","/System/Library/Frameworks/AVFoundation.framework/AVFoundation","/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation","/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics","/System/Library/Frameworks/UIKit.framework/UIKit"] DiskLibraries: ["/Users/tigre000/Desktop/test.ipa.88992a4e-72fe-4faf-9c4a-a0a61a3008e8/Payload/test.app/test"] UnavailableLibraries: [] AppLibraries: ["/Users/tigre000/Desktop/test.ipa.88992a4e-72fe-4faf-9c4a-a0a61a3008e8/Payload/test.app/test"] Orphan: [] Signed /Users/tigre000/Desktop/test.ipa.88992a4e-72fe-4faf-9c4a-a0a61a3008e8/Payload/test.app/test Zipifying into /Users/tigre000/Desktop/test-resigned.ipa ... Cleaning up /Users/tigre000/Desktop/test.ipa.88992a4e-72fe-4faf-9c4a-a0a61a3008e8 Target is now signed: test-resigned.ipa Cleaning up /Users/tigre000/Desktop/test.ipa.88992a4e-72fe-4faf-9c4a-a0a61a3008e8 tigre000@Tigre000ui-MacBookPro Desktop % ideviceinstaller -i test-resigned.ipa WARNING: could not locate iTunesMetadata.plist in archive! Copying 'test-resigned.ipa' to device... DONE. Installing 'com.tigre000.test' Install: CreatingStagingDirectory (5%) Install: ExtractingPackage (15%) Install: InspectingPackage (20%) Install: TakingInstallLock (20%) Install: PreflightingApplication (30%) Install: InstallingEmbeddedProfile (30%) Install: VerifyingApplication (40%)ERROR: Install failed. Got error "ApplicationVerificationFailed" with code 0xe8008001: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.OziT33/extracted/Payload/test.app : 0xe8008001 (An unknown error has occurred.) tigre000@Tigre000ui-MacBookPro Desktop %

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Tigre000 commented 4 years ago

Hmm.. It's the same with the -c flag.

Tigre000 commented 4 years ago

I'm not good at reading syslog. But after reading it hard, the profile installed on my iPhone(SE, 13.3.1) is NYN4KPRZFF, but GJ962AK34K if you attempt to install it with an ideviceinstaller.

trufae commented 4 years ago

Maybe you are using the wrong provisioning file? Did you created it with xcode? Or how did u got that file?

You can use the idevicesyslog tool from libimobiledevice project or the xcode device manager to read the logs

On 7 Mar 2020, at 09:14, Tigre000 notifications@github.com wrote:

 I'm not good at reading syslog. But after reading it hard, the profile installed on my iPhone(SE, 13.3.1) is NYN4KPRZFF, but GJ962AK34K if you attempt to install it with an deviceinstaller.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Tigre000 commented 4 years ago

I'm used the provisioning file created with xcode. I followed this github wiki. https://github.com/nowsecure/node-applesign/wiki/Setting-up-your-resigning-environment

lukewegryn commented 4 years ago

@Tigre000 did you ever figure out the issue? I am having the same problem, and I'm not able to glean much more information from the logs.

lukewegryn commented 4 years ago

I figured out my issue. It had to do with missing entitlements. I fixed it by adding all capabilities by clicking "Targets > + Capability" and selecting every one. This allowed by provisioning file to work.