Solved

How to view the content of a PKG file on OSX

Posted on 2016-08-23
6
143 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 50 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 450 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
Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

 
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 450 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Are you looking to clear some space on your phone for the latest iOS 8 update? Did you switch to Spotify so you no longer need to keep music native on your phone? Run out of space for taking photos while in the middle of vacation? Sometimes the quic…
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 …

617 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