I am trying to repack an iOS Application; IPA file with the frida gadget dynamic library according to the following link. However, i am running into a console log error when launching the application:
<Warning>: Unable to obtain a task name port right for pid 610: (os/kern) failure (5)
Thus, googling a bit, I found that a possible fix(second link to related fix) might be to add a task_for_pid-allow key-value pair to the entitlements file.
Editing the entitlements file by adding the key using a text-editor before re-sigining the application with the following code snippet:
codesign --force --sign "iPhone Developer: m*****************" --entitlements entitlements.plist Payload/Plain\ Notes.app/Plain\ Notes
Resulted in a verification error when running ios-deploy as shown below:
Error 0xe800003a: The application could not be verified. AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)
Is there a specific way to add key-value pairs to the entitlements file when repacking applications on iOS which would solve the verification error that I am getting?
I found out how to add values to the entitlements file, use PlistBuddy.
In my case, the below snippet should add the task_for_pid-allow key into my entitlements:
To check that it has been successfully added: