Coder Social home page Coder Social logo

ironsand's Introduction

Example for running VirtualBox's virtual PCI device sample on macOS.

VirtualBox's standard macOS installation is sandboxed and prevents loading third-party virtual devices.

This repo provides a launcher that disables VirtualBox's sandbox, and a build script for VirtualBox's DevPlayground device sample.

This is tested against VirtualBox 6.1.8 - you might need to fix the hardcoded offset in vboxlauncher.c.

To run:

cd ironsand
vim build2.sh # Fix the include path to your VirtualBox source
./build2.sh

Create a VirtualBox VM with ICH9 chipset. Then:

sudo cp libDevPlayground.dylib /opt/ironsand/
VBoxManage setextradata vmname VBoxInternal/PDM/Devices/playground/Path /opt/ironsand/libDevPlayground.dylib
VBoxManage setextradata vmname VBoxInternal/Devices/playground/0/Config/Whatever1 0
clang -o vboxlauncher vboxlauncher.c
sudo ./vboxlauncher --startvm vmname

It will print:

39
attach to 57113

run

sudo lldb -p 57113

then

breakpoint set -F _dyld_get_image_name -c "$rdi==0" -C "print $rdi=39" -C "c"

License

The sample code is taken from VirtualBox, which is dual-licensed under GPL and CDDL.

ironsand's People

Contributors

zhuowei avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

doytsujin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.