Table of Contents
This article demonstrates the steps required to run an API Example that completes the following:
Logs in to Corellium.
Retrieves the available projects on that account.
Retrieves the available instances on the desired project.
Creates a new instance of a virtual device.
Uploads a custom kernel to that virtual device.
Takes a snapshot of that virtual device.
Check out our Corellium API Documentation for a list of supported flavors and more.
There are two ways to get set up for this tutorial. You can either:
Clone the entire Corellium-API GitHub Repository and run the example within your cloned repository.
Or, you can clone the device_example folder and run the example on its own.
** will fix this link once the example is on github**
You will also need a device tree file to upload to your device. If you don't have one handy, install our example file, and put it in the
Now follow the steps below to get the API example running!
Run the following command inside the
npm install @corellium/corellium-api
main.jsreplace the values assigned to the
myProjectvariables with your own account credentials and project name.
Optionally, you can replace the values in
myOS. Currently, the example creates a ranchu (Generic Android) device named API Android with the 11.0.0 OS.
Optionally, if you would like to upload a different image, edit
If you would like to upload a different type of image, such as a kernel choose a different
Run the example by entering the following command into your command line:
Check your console to see the output.
Note: if you haven't named your devices, the example will return "Found instance named null" as seen above.
Find out How to Download Copies of Stock Firmwares, to see the process of getting the
ranchu-8.1.0-r60-userdebug file we used in this tutorial.
Check out our GitHub Actions article for a guide on how to automate this API Example on a GitHub Runner.