Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to view the content of a PKG file on OSX

Posted on 2016-08-23
6
Medium Priority
?
178 Views
Last Modified: 2016-08-28
hi OSX folks

can some one tell me how to view the content of a PKG file in an installation image?

e.g. i'd like to check the Google Earth Pro app's version from the disk image file i downloaded from Google. but when i open the downloaded DMG file, i can only see an installer package file, as shown below.
Screen-Shot-2016-08-24-at-12.21.53.png
how can i view its content and get the individual APP file?

thanks,
bbao
0
Comment
Question by:bbao
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 53

Assisted Solution

by:strung
strung earned 200 total points
ID: 41768087
Download Pacifist:  https://www.charlessoft.com
0
 
LVL 37

Author Comment

by:bbao
ID: 41768128
thank you for the link strung.

i actually just tried The Unarchiver and opened the PKG file! i guess the Pacifist basically does the same thing?

The Unarchiver has extracted the content of the PKG file into a folder named "Install Google Earth" on my Desktop. as shown below, it contains another PKG file "Google_Earth_Pro.pkg". it is interesting that this time the PKG file can be opened by right-clicking and choosing "show packet contents".
Screen-Shot-2016-08-24-at-12.49.28.png
after checking the contents of the 2nd PKG file, i saw a file named "Payload" which should be APP file (due to size). see below.
Screen-Shot-2016-08-24-at-12.45.10.png
in a few words, i still can't find the APP file, something like the "Google Earth Pro.app" already in my Application folder.

any thought please? thanks in advance.
0
 
LVL 30

Assisted Solution

by:serialband
serialband earned 1800 total points
ID: 41769339
The first package is a single self contained file executable package, otherwise it would be problematic for someone to download from the internet.  Once extracted, the internal packages can be organized in other ways.

You'll find the App structure in the Packageinfo.plist file as a standard XML text file.  The Bom file has some strings that you can view. (strings Bom|more).  Unfortunately, the other 2 are completely binary.  They do seem to start with the same few bytes in the header, but I don't happen to know what filetype that represents, since I haven't created any Xcode Packages before.  This means that the App folder is contained here, but you'll have to know how to extract it from the payload.

Why do you need to extract this?
1
Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 
LVL 37

Author Comment

by:bbao
ID: 41769559
thanks for the explanation Serialband.

> Why do you need to extract this?

1. to compare the difference between the installed version and the one just downloaded.

2. to learn how a PKG file is organised. a curiosity for a long time.
0
 
LVL 30

Accepted Solution

by:
serialband earned 1800 total points
ID: 41769719
1.  Keep the old package and run diff on the Info.plist to see what files are different.  The binaries are generally going to be different.

2.  Install XCode.  It has utilities to manipulate packages.
https://coolaj86.com/articles/how-to-unpackage-and-repackage-pkg-osx.html

I didn't have time during my earlier answer to check deeply, but now that I do, it seems that the payload is a .tar.gz or .tgz file.  You should be able to extract the app with the tar command.  I should have guessed it was done in standard unix/linux.

tar -xzf payload

That should extract your App folder structure to compare.
1
 
LVL 37

Author Closing Comment

by:bbao
ID: 41773904
> That should extract your App folder structure to compare.

YES!

followed the instruction and done, exactly as given above. thanks so much for your help Serialband.

also thanks to Strung for the suggestion.
0

Featured Post

Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A professional opinion on which Apple product to buy, and a tidbit about the WWDC.
This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
Users will learn how to set proper sequence settings, scale images, paste attributes, add transitions, fades, and music. Open up Final Cut Pro 7 and Create a new Project: Set the Sequence Settings. a) Click File > Easy Setup > Format > Apple ProRe…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question