Proj 4x: BlueStacks Android Emulator on Mac or Linux (15 pts)

What You Need for This Project


To get BlueStacks working, a game-oriented Android emulator.

Task 1: Installing Bluestacks

Downloading and Installing BlueStacks

In a Web browser, go here:

Download and install it, as shown below.

You'll need to provide a Google login.

When it's done, you'll see the BlueStacks home page, as shown below. (You won't have the Bank of America app installed yet.)

Task 2: Port Fowarding

Observing the Listening Port

On your host computer, execute this command:
netstat -an | grep 5555
You should see a LISTENING port on the loopback address, as shown below.

Installing Socat

We need to forward that port to the Kali virtual machine with Socat.

On a Mac OS machine, execute these commands to install Homebrew and Socat:

/usr/bin/ruby -e "$(curl -fsSL"
brew install socat
On Ubuntu Linux, execute these commands instead:
sudo apt update
sudo apt install socat

Port Forwarding with Socat

Execute this command:
socat tcp-listen:5556,reuseaddr,fork tcp:localhost:5555
The terminal freezes, waiting for traffic, as shown below.

Leave this terminal window open.

Connecting with ADB

Finding the Host's Address

On your Kali virtual machine, execute this command:
ip addr
Find the IP address of the interface that goes to the host, which is usually "eth0", as highlighted in the image below.

On the host computer, execute ifconfig and find the interface address that's on the same subnet as the Kali machine.

On my host, it was, as shown below.

Connecting to the Bluestacks Emulator

On your Kali virtual machine, execute these commands, replacing the IP address with the correct address of your host system:
apt update
apt install android-tools-adb -y
adb connect
adb devices -l
You see a kltexx device attached, as shown below.

Saving a Screen Image

Make sure you can see the kltexx device, as shown above.

Save a full-desktop image. On a Mac, press Commmand+3. On a PC, press Shift+PrntScrn and paste into Paint.


Save the image with the filename "YOUR NAME Proj 4x", replacing "YOUR NAME" with your real name.

Turning in your Project

Email the images to to with the subject line: Proj 4x from YOUR NAME
Updated 2-5-19