Low-level debugging, older games (so many consoles have used everything from MIPS to PowerPC as CPUs), etc.
In the early 2000s, I used a linux-based emulator to virtualize some ancient manufacturing hardware control software that was still running on EOL and very expensive PA-RISC kit. It saved the company tens of thousands of dollars in new hardware, while also running faster (it involved early 1990s-era proprietary vector graphics as part of it was printing on the goods). The HP sales people were not amused and tried very hard to get my 22 year old self fired, but my manager convinced them to use it and the old hardware as a backup for awhile. Last I heard in 2011 it was still being used, though running in linux on VMware.
An emulator is a computer program that executes the machine code of some system. For example, if your computer is x86, you can't natively run ARM machine code. But an emulator can.
QEMU is an emulator that can run entire operating systems, because it emulates hardware devices like hard drives and displays. Unicorn doesn't emulate any of those things, it only emulates the CPU. It's probably mostly useful for compiler development and security research / reverse engineering.
Well, say all you've got is an x86 device, but you want to develop for ARM. You can write and compile your code, push it to unicorn, and see how it runs.
Or you can use it as a sandbox serving x86 software on an x86 machine.
Or as a "virtual machine" serving say AOSP for ARM on a Windows x86 host.
This. It is far easier to debug something like obfuscated DRM code when you have it running inside an emulator and can wind the code forwards and backwards and see the whole machine, rather than trying to debug it on the actual hardware where your options are more limited.
It's sort of a reverse compiler. Imagine you have a program in some architecture (say ARM) other than that of your computer (maybe x86) that says:
add A, B, C # meaning: add A and B, put it in C
The (python in this case) emulator has code that does:
def add(a, b):
Repeat that for every assembly instruction in the architecture and you get an emulator. You can use that to run ARM programs on your PC.Low-level debugging, older games (so many consoles have used everything from MIPS to PowerPC as CPUs), etc.
In the early 2000s, I used a linux-based emulator to virtualize some ancient manufacturing hardware control software that was still running on EOL and very expensive PA-RISC kit. It saved the company tens of thousands of dollars in new hardware, while also running faster (it involved early 1990s-era proprietary vector graphics as part of it was printing on the goods). The HP sales people were not amused and tried very hard to get my 22 year old self fired, but my manager convinced them to use it and the old hardware as a backup for awhile. Last I heard in 2011 it was still being used, though running in linux on VMware.
This comparison to qemu gives some idea: https://www.unicorn-engine.org/docs/beyond_qemu.html
The ability to execute and inspect some code without any context (no OS, not even a complete binary) is useful for reverse/security engineering.
An emulator is a computer program that executes the machine code of some system. For example, if your computer is x86, you can't natively run ARM machine code. But an emulator can.
QEMU is an emulator that can run entire operating systems, because it emulates hardware devices like hard drives and displays. Unicorn doesn't emulate any of those things, it only emulates the CPU. It's probably mostly useful for compiler development and security research / reverse engineering.
Well, say all you've got is an x86 device, but you want to develop for ARM. You can write and compile your code, push it to unicorn, and see how it runs.
Or you can use it as a sandbox serving x86 software on an x86 machine.
Or as a "virtual machine" serving say AOSP for ARM on a Windows x86 host.
There's a long list of projects using Unicorn at https://www.unicorn-engine.org/showcase/
How's this one differ from QEMU?
https://www.unicorn-engine.org/docs/beyond_qemu.html
It can be used for many things. But the main use is reverse engineering.
This. It is far easier to debug something like obfuscated DRM code when you have it running inside an emulator and can wind the code forwards and backwards and see the whole machine, rather than trying to debug it on the actual hardware where your options are more limited.