PDA

View Full Version : How to install anbox in kali?



_defalt
2017-09-06, 11:55
Anbox (https://anbox.io/) is a container-based approach to boot a full Android system on a regular GNU/Linux system like Debian. In other words Anbox will let you run Android on your Linux system without the slowness of virtualization. Anbox puts the Android operating system into a container, abstracts hardware access and integrates core system services into a GNU/Linux system. Every Android application will be integrated with your operating system like any other native application.

Learn more about this open-source project from the author (https://github.com/anbox/anbox#overview).

How to install
The official Anbox installation (https://github.com/anbox/anbox#installation) is not compiled for Debian so it doesn't run in kali-linux. Even though Anbox now supports Debian yet i was still not able to run it after installation. This person (https://github.com/zhsj) who is also a contributor of Anbox, has compiled Anbox from the source for Debian 9 stretch and it is also working in kali.

From his Personal Package Archive (https://ftp.ustclug.org/~zsj/anbox/), read before install

Install

Install lxc - Linux Containers userspace tools.

sudo apt update && sudo apt install lxc

Install deb packages.

sudo wget -O /etc/apt/trusted.gpg.d/zhsj.gpg https://ftp.ustclug.org/~zsj/anbox/zhsj.gpg
echo "deb [arch=amd64] https://ftp.ustclug.org/~zsj/anbox stretch main" |sudo tee /etc/apt/sources.list.d/anbox.list
sudo apt update && sudo apt install anbox

Now you need to download the Android image.

sudo wget -O /var/lib/anbox/android.img https://build.anbox.io/android-images/2017/07/13/android_3_amd64.img

Start

There are two systemd services.

sudo systemctl start anbox-container-manager.service
systemctl --user start anbox-session-manager.service

Now you can start anbox application from your desktop.

If you want these services to start when booting, just

sudo systemctl enable anbox-container-manager.service
systemctl --user enable anbox-session-manager.service


You can also build Anbox from the source (https://github.com/anbox/anbox#build-from-source) if you meet with its requirements (https://github.com/anbox/anbox#requirements).

If anyone manages to run Anbox application by installing it from its author's Personal Package Archive (https://launchpad.net/~morphis/+archive/ubuntu/anbox-support), you are requested to post the solution here.

You can contribute your programing skills to help improving this project and make it compatible for kali-linux so that pentesters can test the security of their Android apps directly on Linux platform without using emulators.

_defalt
2017-09-06, 12:03
Please keep in mind that Anbox currently is ALPHA level software. Not every feature is supposed to work or work well yet. You will find bugs, you will see crashes and unexpected problems. When you do so, please report a bug here (https://github.com/anbox/anbox/issues/new).

Roberta
2017-09-24, 07:16
starting the service I get it:

# systemctl start anbox-container-manager.service

Job for anbox-container-manager.service failed because the control process exited with error code.
See "systemctl status anbox-container-manager.service" and "journalctl -xe" for details.

_defalt
2017-09-24, 12:02
@Roberta (https://forums.kali.org/member.php?58200-Roberta) you have to install lxc - Linux Containers userspace tools.

sudo apt update && sudo apt install lxc

kingayazkhan
2018-04-07, 16:44
Hi,

i was having problem installing anbox with these module and found a solution here (simon1tan (https://github.com/simon1tan)) https://github.com/anbox/anbox/issues/264

i just modified it a little to build ashmem which was not there so here's the lines.

ownload anbox from github so that you have the ashmem and binder directories.
Extract ashmem and biinder into /usr/src
Rename the folders to anbox-ashmem-1 and anbox-binder-1 (the 1 is the version number in dkms.conf)
install dkms if not already installed(sudo aptitude install dkms)
sudo dkms add -m anbox-binder -v 1
sudo dkms build -m anbox-binder -v 1
sudo dkms install -m anbox-binder -v 1
sudo dkms add -m anbox-ashmem -v 1
sudo dkms build -m anbox-ashmem -v 1
sudo dkms install -m anbox-ashmem -v 1


sudo modprobe ashmem-linux binder-linux
--------

Thanks :)