Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to tag build number onto extracted binaries #278

Open
jonpalmisc opened this issue Jul 10, 2023 · 3 comments
Open

Option to tag build number onto extracted binaries #278

jonpalmisc opened this issue Jul 10, 2023 · 3 comments

Comments

@jonpalmisc
Copy link

When extracting binaries with ipsw extract -f --pattern it would be handy if there was an additional option to append (or prepend) the build number onto the binaries that are extracted.

In other words, if one did ipsw extract -f --tag --pattern Example, a file called Example-21A5277h would be created instead of just Example.

@blacktop
Copy link
Owner

❯ ipsw extract -f --pattern '.im4p$' test-caches/IPSWs/iPhone15,2_17.0_21A5277j_Restore.ipsw
   • Extracting files matching pattern ".im4p$"
      • Mounting DMG 096-00881-069.dmg
      • Mounting DMG 096-01005-048.dmg
      • Mounting DMG 096-01403-044.dmg
         • Extracting to 21A5277j__iPhone15,2/usr/standalone/update/all_flash/applelogo@2556~iphone.im4p
         • Extracting to 21A5277j__iPhone15,2/usr/standalone/update/all_flash/batterycharging0@2556~iphone.im4p
         • Extracting to 21A5277j__iPhone15,2/usr/standalone/update/all_flash/batterycharging1@2556~iphone.im4p
         • Extracting to 21A5277j__iPhone15,2/usr/standalone/update/all_flash/batteryfull@2556~iphone.im4p
         • Extracting to 21A5277j__iPhone15,2/usr/standalone/update/all_flash/batterylow0@2556~iphone.im4p
         • Extracting to 21A5277j__iPhone15,2/usr/standalone/update/all_flash/batterylow1@2556~iphone.im4p
         • Extracting to 21A5277j__iPhone15,2/usr/standalone/update/all_flash/glyphplugin@2556~iphone-lightning.im4p
         • Extracting to 21A5277j__iPhone15,2/usr/standalone/update/all_flash/liquiddetect@2556~iphone-lightning.im4p
         • Extracting to 21A5277j__iPhone15,2/usr/standalone/update/all_flash/lowpowerfindmymode@2556~iphone-lightning.im4p
         • Extracting to 21A5277j__iPhone15,2/usr/standalone/update/all_flash/lowpowermode@2556~iphone-lightning.im4p
         • Extracting to 21A5277j__iPhone15,2/usr/standalone/update/all_flash/recoverymode@2556~iphone-lightning.im4p
      • Created 21A5277j__iPhone15,2/Firmware/AOP/aopfw-iphone15aop.im4p
      • Created 21A5277j__iPhone15,2/Firmware/D73_HapticAssets.im4p
      • Created 21A5277j__iPhone15,2/Firmware/D73_LeapHapticsFirmware.im4p
      • Created 21A5277j__iPhone15,2/Firmware/D73_MtpFirmware.im4p
      • Created 21A5277j__iPhone15,2/Firmware/D73_Multitouch.im4p
      • Created 21A5277j__iPhone15,2/Firmware/SmartIOFirmware_ASCv6.im4p
      • Created 21A5277j__iPhone15,2/Firmware/WirelessPower/WirelessPower.iphone15.im4p
<SNIP>

So I already use the metadata in the IPSW to auto create a logical folder to extract into.

Are you saying to allow the user to customize that name?

@jonpalmisc
Copy link
Author

Customizing the folder name would be a separate (nice to have) feature, but isn't what I had in mind when creating this issue.

For my workflow, I might want to extract Example.framework from 10 different IPSWs into the same folder and have them each tagged with the IPSW they came from, hence why appending/prepending the build number to the file name would be handy.

Thinking about it now... prepending might make more sense (compared to appending) so that file extensions aren't clobbered.

Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants