Extract Android 8 Oreo app

Extract Android 8 Oreo app

A guide on how to play Android games on PC or Mac and how to extract them.

Install Android Studio

Go to Google and search for “download Android studio” then download and install Android studio

extract android oreo app
Android Studio download page.

Run AVD Manager

Create a dummy Android project so that you access the AVD manager.

extract android oreo app
This is where you can find the AVD Manager.

Create Virtual Device with Play Store

In the AVD manager, search for a device that has Google Play Store else you will not be able to install any app from the Play Store. If the virtual device has Play Store, you will notice that there is a Play Store icon in the Play Store column.

extract android oreo app
I had created a virtual Nexus 5x device that has Play Store in it.

Install App

Install any games or app from the Play Store. In my example, I am using Angry Birds.

extract android oreo app
I installed Angry Birds into the virtual device through Play Store.

Install ADB

The Android Debug Bridge ADB did not come bundled together with the Android Studio I install. Therefore I had to rely on MacOS Homebrew to install it. If you do not have Homebrew install, you can read my blog post on how to install Homebrew in MacOS.

Extract Android 8 Oreo app

Extracting an app in Android 8 Oreo is not as simple as the old days where it adds a suffix “-1” to the end of the app ID. For example, in the old days, the APK for Angry Birds is located at

/data/app/com.rovio.angrybirds-1/base.apk

To extract the same APK in Android 8 Oreo, you will need to run the command below. The command below is shortened, whereas the command I use in the screenshot below requires two steps.

adb shell pm path com.rovio.angrybirds|sed 's/package://'|xargs adb pull
extract android oreo app
Extracting APK from the virtual device into my MacOS.

MacOS install Homebrew

MacOS install Homebrew

Mac App store is great but all the apps there are GUI apps but not command line. If you are looking for command line apps like those found in Linux, Homebrew is the solution. Homebrew provides most of the useful apps found in Linux but not found in the Mac terminal. To install homebrew in MacOS, just open terminal and type the following commands.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
macos install homebrew
Successfully installed Homebrew into my MacOS.

Install Homebrew apps

You can list all the available apps offered by Homebrew by using the list command. To install the app, just type install followed by the name of the app. In the example below, I am installing optipng, a very useful tool for me to compress my screenshots before uploading to my blog.

brew list
brew cask list
brew install optipng
macos install homebrew
Successfully install optipng into my Mac.

Compress PNG

Uploading a big image file for WordPress use is a waste of bandwidth and it slows down the loading time of your site which is bad for search engine optimization ( SEO ).

Screenshots taken in Mac is in PNG format. To compress the PNG file you can either install an application through the app store or you can install through Homebrew. To install homebrew, type in the following command.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Installation

For MacOS.

brew install optipng
brew install pngcrush
brew install imagemagick

For Ubuntu.

sudo apt-get install optipng
sudo apt-get install pngcrush
sudo apt-get install imagemagick

Compress PNG

To compress a PNG file using the various compressor, the commands are listed below.

optipng -o7 input.png -out output.png
pngcrush -l 9 input.png output.png
convert input.png -quality 90 output.png