Please read the rules before getting started.
Please request an account here since self-signup is disabled.
Also check out our discord!
To use crave, you'll likely be doing this:
On windows, download the zip, extract it, enter it.
Right click somewhere blank on the folder and click on Open In Terminal. Alternatively,
cd /d Drive:\path\to\crave\folder\
(replacing
Drive:\path\to\crave\folder\
Tip: If you use powershell and crave is not recognised but crave.exe exists in your current folder, you can use
./crave.exe
crave
crave
curl -s https://raw.githubusercontent.com/accupara/crave/master/get_crave.sh | bash -s --
mkdir -p ${HOME}/bin/
mv ${PWD}/crave ${HOME}/bin/
sudo ln -sf /home/${USER}/bin/crave /usr/bin/crave; sudo chmod +x /usr/bin/crave
brew install --cask crave
You will need to install homebrew beforehand.
Here is a guide to use proot-distro on Android
After setting it up, come back to this guide and continue
Open sessions tab and click on "Create Session/Connect" button.
Now, skip to the next section without worrying about entering Devspace CLI.
For menu, swipe from the middle of the left side of your phone. If you're on a computer/have access to a keyboard, press
Ctrl+Alt+Shift
Crave RAS is built upon Apache Guacamole
There's also a VSCode Web Client, instructions to set this up can be found here
Create a new one, name it whatever you like to easily identify it and click on Create API Key Button.
Now, download this newly created API key and copy it over to your crave folder, wherever it is. On linux, preferably put it in your home directory, or wherever your terminal leads you when you first open it.
crave devspace
Using tmux is recommended to quickly view builds, multitask, etc. Here is a simple guide on how to use tmux:
https://hamvocke.com/blog/a-quick-and-easy-guide-to-tmux/
crave clone list # note down the project id for the next step
crave clone create --projectID 72 /crave-devspaces/Lineage21
cd /crave-devspaces/Lineage21
After you're done building the ROM at the end of this guide, use crave clone destroy to delete the folder. Do not use rm -rf!
crave clone destroy /crave-devspaces/Lineage21
Simply use crave run! On a normal server, we'd be running commands one by one. But since crave uses a queue system, we run all the commands in one go, and wait for our turn in queue. Then, the build node will execute our commands, one by one.
crave run --no-patch -- "your commands"
Note: using clean build will reset the image to default. This means it removes any of your progress e.g. synced dt/or the out folder from previous build and ensures we're back to the default source code of the base project.
Please avoid doing this needlessly as resyncing and building from takes a lot of time.
Syntax:
crave run --clean --no-patch -- "your commands"
When you run a build using crave run, it adds you to the build queue, where a build node comes, picks it up and compiles your build for you!
Options: officially supported devices, local manifests, sync scripts, and manual git clone.
crave run --no-patch -- "rm -rf .repo/local_manifests; \
git clone https://github.com/TheMuppets/manifests --depth 1 -b lineage-21.0 .repo/local_manifests; \
/opt/crave/resync.sh; \
source build/envsetup.sh; \
brunch Mi439"
crave run --no-patch -- "rm -rf .repo/local_manifests; \
git clone https://github.com/sounddrill31/reponame --depth 1 -b branchname .repo/local_manifests; \
/opt/crave/resync.sh; \
source build/envsetup.sh; \
lunch lineage_oxygen-eng; \
m bacon"
~marado made an easy to follow guide on making your own local manifests over at tilde.pt.
You can also use sounddrill's Generator script which works most of the time
Local manifests rely on repo sync. We have made a simple script to repo sync while avoiding majority of conflicts which arise due to uncommitted changes, or when building a different ROM. You can find the source code to resync.sh here
crave run --no-patch -- "rm -rf device/oem/codename kernel/oem/codename vendor/oem/codename; \
git clone https://github.com/sounddrill31/android_device_oem_codename --depth 1 -b branchname device/oem/codename; \
git clone https://github.com/sounddrill31/android_kernel_oem_codename --depth 1 -b branchname kernel/oem/codename; \
git clone https://github.com/sounddrill31/android_vendor_oem_codename --depth 1 -b branchname vendor/oem/codename; \
source build/envsetup.sh; \
lunch lineage_oxygen-eng; \
m bacon"
This is discouraged as it causes many sync conflicts and is a bit difficult to debug, however, it is not against the rules. Rules for doing this:
Example: Building crDroid 14
crave run --no-patch -- "rm -rf .repo/local_manifests; \
repo init -u https://github.com/crdroidandroid/android.git -b 14.0 --git-lfs; \
git clone https://github.com/youraccount/local_manifests --depth 1 -b rising-14 .repo/local_manifests; \
/opt/crave/resync.sh; \
source build/envsetup.sh; \
breakfast device_codename userdebug; \
mka bacon"
bash /opt/crave/github-actions/upload.sh 'tag' 'device' 'repository' 'release title' 'extra files'
(Replace tag with the tag you want your release to use, device with the device's codename, repository with the link to the github repo and release title with your preferred title. Extra files can be left blank)
You can find the source code for the script here
Tip: By default, size limit is set to 2147483648. To change it, run this before the above command
export GH_UPLOAD_LIMIT="yourvalue"
/opt/crave/telegram/upload.sh 'device' 'extra files'
Uploads will land in your saved messages. You can find the source code for the script here
Tip: By default, size limit is set to 2147483648. To change it, run this before the above command
export TG_UPLOAD_LIMIT="yourvalue"
crave pull out/target/product/*/*.zip
crave pull out/target/product/*/*.img
mkdir -p ~/.bin;
PATH="${HOME}/.bin:${PATH}";
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo;
chmod a+rx ~/.bin/repo
Do Not Do This Inside Crave Devspace CLI!
Instead of setting up through crave clone create, you could directly repo init a supported ROM too! Crave will see git project is set up and assign accordingly. Note that this method is not recommended if you're using Devspace CLI or RAS(web client). This makes sense when you're trying to trigger without devspace
mkdir /crave-devspaces/Lineage21; cd /crave-devspaces/Lineage21
repo init -u https://github.com/LineageOS/android.git -b lineage-21.0 --git-lfs --depth=1
For lineageOS 21, run
repo init -u https://github.com/LineageOS/android.git -b lineage-21.0 --git-lfs --depth=1
For lineageOS 20, run
repo init -u https://github.com/accupara/los20.git -b lineage-20.0 --git-lfs --depth=1
Do not run repo sync or build the ROM here as it slows down devspace CLI and causes trouble for other users. Devspace CLI also does not have the resources to build a ROM or a similar huge project directly.
Workspace persistence here refers to the preservation of what you have synced and compiled in the past. This is not needed if you're building from Crave RAS(the web shell)
This build storage is reset when one of these 4 factors change:
1. Project UUID
2. User ID
3. Workspace Dir
4. Workspace Branch Sig
/crave-devspaces/Arrow13
/crave-devspaces/Lineage20
/crave-devspaces/Lineage21
/crave-devspaces/DerpFest13
/crave-devspaces/Cipher14
/crave-devspaces/Pixel14
/crave-devspaces/Lineage16
/crave-devspaces/Cyanogen14
Tip: If you find this part confusing, just ensure your workspace folder is named as one of the folders listed above or the one you previously built with
Tip: You use --clean flag in crave run to reset the build storage as shown here
This is a file to pass specific instructions to crave. Because repo init
put files in .repo/manifests, that's where our crave.yaml should go.
Move it to
crave.yaml can be used to pass environment variables, push certain files, use a certain docker image, etc.
The name has to match with the project name on dashboard(eg "Arrow OS" "LOS 20"). You can also find this through crave clone list.
Examples:
CipherOS:
ignoreClientHostname: true
Arrow OS:
ignoreClientHostname: true
DerpFest-aosp:
ignoreClientHostname: true
LOS 20:
ignoreClientHostname: true
LOS 21:
ignoreClientHostname: true
PixelOS:
ignoreClientHostname: true
Rising OS:
ignoreClientHostname: true
LOS 16:
ignoreClientHostname: true
LOS CM 14.1:
ignoreClientHostname: true
TWRP:
ignoreClientHostname: true
image: "sounddrill31/crave-archlinux-twrp@sha256:605892162a907ea3760813643c9aa1bdb63a7ae0dce6ca159b0f6e20a7c0815b"
Do not change the image unless you know what you're doing and have a very good reason.
For more info, read the official documentation
Tip: If you find this part confusing, just run this command inside the folder we made before
rm .repo/manifests/crave.yaml* || true; # Removes existing crave.yamls
curl -o .repo/manifests/crave.yaml https://raw.githubusercontent.com/sounddrill31/crave_aosp_builder/main/configs/crave/crave.yaml.aosp # Downloads crave.yaml
Use this command to enter into a machine with your source code mounted:
crave ssh
This is good for changing files for the purpose of testing but this will be wiped if you do a clean build.
Do not run repo sync or build the ROM here, wait in the crave run queue for a more powerful machine.
You could get banned for syncing or building in this environment!
You can use crave tokens to skip the queue and get the build to start faster! To use tokens from your wallet, use the flag
--platform aosp-silver
Like this:
crave run --no-patch --platform aosp-silver -- "build commands here"
If there are no tokens left in your wallet, the paid build will fail(but you can still use the free queue). A running build is able to go into Negative credits but no new paid builds can be requested while having less than 0 credits.