Skip to content

Latest commit

 

History

History
42 lines (39 loc) · 1.79 KB

DOCKER.md

File metadata and controls

42 lines (39 loc) · 1.79 KB

Running difuze from docker


The docker image machiry/difuzecommon contains the difuze sources (at /difuze/repo) along with all the dependencies installed.

Install Docker

sudo apt-get install -y docker.io

Running the docker image

docker run -i -t --privileged -v /dev/bus/usb:/dev/bus/usb machiry/difuzecommon /bin/bash

You need to give access to the usb devices to allow adb (from the docker container) to access the phone connected to the host machine.

Using the docker image

Building a kernel

  1. Mount the kernel folder while running docker using -v command; do git pull and build all the sources.
docker run -i -t --privileged -v /dev/bus/usb:/dev/bus/usb machiry/difuzecommon -v <path_on_host_machine>:<path_in_docker> /bin/bash

// inside the docker container
# cd /difuze/repo
# git pull
# cd InterfaceHandlers
# ./build.sh

Example:

docker run -i -t --privileged -v /dev/bus/usb:/dev/bus/usb machiry/difuzecommon -v /home/difuze/kernels/msm:/androidkernels/msmkernel /bin/bash
  1. Create makeout.txt Configure the kernel with the desired config and while running make use following command:
$ cd /androidkernels/msmkernel
$ export CROSS_COMPILE=aarch64-linux-android-
$ make V=1 O=out ARCH=arm64 > makeout.txt 2>&1

This will create makeout.txt. 3. Running interface recovery: Follow steps 1.3.2 (An example can be found at 1.4.2) Note: Make sure that you browse to /difuze/repo inside the docker image before running the above commands. 4. Run the post processing and the fuzzer.