{% include alerts/warning.html content="Make sure you can rollback to stock firmware in case /e/OS doesn't work at all" %}
{% include alerts/warning.html content="Make sure you can rollback to stock firmware in case the /e/OS GSI doesn't work" %}
## Step 1: Install fastboot
> This step is executed on the PC
## Installing fastboot
### On Windows
@@ -17,40 +19,46 @@ To install fastboot on your Windows PC follow [this guide](/pages/install-adb-wi
If you do not have fastboot installed on your linux device follow [this guide](/pages/install-adb)
## Find your phone architecture
## Step 2: Find your phone architecture
> This step is executed on the Phone
An easy way to do this is to install `treble info`
An easy way to do this is to install `treble info` on your phone.
> You will find the `treble info` app in the /e/OS default Apps Store as shown in the screenshot below
{% include alerts/tip.html content="You will find the `treble info` app in the /e/OS App Lounge. Once installed the app will display information as shown in the screenshot below" %}


This is to verify that the
- Phone is Project Treble compatible
- Check the CPU architecture it should show
This information can help to verify that the
1. Phone is Project Treble compatible
1. Check the CPU architecture it should show
- arm or
- arm 64
1. If the device is "System as root" then a A/B build will be necessary
1. Name of the required system image (for example system-arm64-ab.img.xz)
1. Under Dynamic Partition, check if you need fastbootd. Clickinf on the option will display a pop-up which will have this information.
- If the device is "System as root" then a A/B build will be necessary
So, please note the following information:
- name of the required system image (for example system-arm64-ab.img.xz)
- Under Dynamic Partition, check if you need fastbootd
## Step 3: Remove dm verity
> This step is executed on the Phone if using TWRP or on the PC from the console where you are executing fastboot commands
## Remove dm verity
- This can be done on some devices using twrp
- A slightly more complicated method is by extracting the kernel and reflashing it with the below command
1. Connect your phone to your PC with a USB cable.
> Please note there are cables which are only for charging your phone. They will not work here. The USB cable should allow data exchange between the PC and the phone.
1. Type the below command in the PC console. If fastbootd is required for your device as detected in Step 2 , type the below command
`fastboot reboot fastboot`
1. Extract system.img and flash it on the phone with this command line. The command is executed in the PC console
`fastboot flash system system.img`
```shell
fastboot reboot fastboot
```
then, in every cases, extract system.img and flash it with this command line
## Step 5: Erase userdata
> This step is executed on the PC in the console where you are executing fastboot commands
```shell
fastboot flash system system.img
```
- This step will remove all existing userdata on the device