> For the complete documentation index, see [llms.txt](https://dhaneshsivasamy07.gitbook.io/oscp-2022/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dhaneshsivasamy07.gitbook.io/oscp-2022/mobile-pentesting/android-pentesting/lab-troubleshoot.md).

# Lab TroubleShoot

These are the solutions for the problems that I faced along the way in setting up things and testing them

### Setup

* VirtualBox
* Gennymotion (Personal Use)

### Internet Not Working

* When linux in the virtual box is configured with **NAT** adapter, the internet works and the android in genymotion is also pingable
* But the Android device is in **Host Only Adapter** with the subnet of 192.168.0.0/16&#x20;
* When the ***Host Only Adapter*** is included in the kali machine, the internet siezes to work
* In short: ***NAT + Host Only Adapter*** in linux only communicates with the mobile and not with the internet

{% hint style="info" %}
Solution: [**https://www.youtube.com/watch?v=HWFOdmuBEIw**](https://www.youtube.com/watch?v=HWFOdmuBEIw)
{% endhint %}

```bash
sudo vi /etc/NetworkManager/NetworkManager.conf
# Change => managed=false --> managed=true

sudo vi /etc/network/interfaces
# Add at last
# auto eth0
# iface eth0 inet dhcp

# restart the services
service networking restart

# Checking
ip a | grep inet | grep 24
# 2 IP addresses will be shown                          
```
