Proj 4x: BlueStacks Android Emulator on Windows (15 pts)

What You Need for This Project

Purpose

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

Task 1: Installing Bluestacks

Downloading and Installing BlueStacks

In a Web browser, go here:

http://www.bluestacks.com/

Download and install it, as shown below.

Click the "LET'S GO" button and log in to a Google account. You'll need to provide a Google login.

When it's done, you'll see the BlueStacks home page, as shown below.

Troubleshooting

If Bluestacks won't start, or freezes, it's usually a problem with the graphics settings.

Use Task Manager to kill Bluestacks and start it again. While it's starting, at the top right, click the gear icon.

In Settings, click the Engine tab. Try different settings, such as OpenGL, as shown below. It may also help to use a lower resolution on the Display tab.

To do that, some adjustments are needed in VMware Settings.

Turning on USB Debugging

In BlueStacks, at the top right, click the Gear, Settings, Preferences, and check "Enable Android Debug Bridge (ADB)", as shown below.

Turning Off Windows Firewall

Click Start and type FIREWALL

Launch "Windows Firewall", as shown below.

On the left side, click "Turn Windows Firewall on or off".

Check both "Turn off Windows Firewall (not recommended)" buttons, as shown below.

Click OK.

On your Windows machine, in Control Panel, open the Firewall utility and turn off the Firewall.


Task 2: Port Fowarding

Observing the Listening Port

On your host computer, click Start and type CMD

Right-click "Command Prompt" and click "Run as Administrator".

In the Administrator Command Prompt window, execute this command:

netstat -an | findstr "5555"
You should see a LISTENING port on the loopback address, as shown below.

Port Forwarding

We need to forward that port to the Kali virtual machine with Socat. Execute this command:
netsh interface portproxy add v4tov4 listenport=5556 listenaddress=0.0.0.0 connectport=5555 connectaddress=127.0.0.1
To see that it's working, execute this command:
netstat -an | findstr "5556"
You should see a LISTENING port on the arbitrary address "0.0.0.0", as shown below.


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 ipconfig and find the interface address that's on the same subnet as the Kali machine.

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 172.16.123.1:5556
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.

YOU MUST SUBMIT A FULL-SCREEN IMAGE FOR FULL CREDIT!

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 cnit.128sam@gmail.com with the subject line: Proj 4x from YOUR NAME
Updated 2-5-19