Difference between revisions of "Android Flashing Guide"

From Planet Computers

Jump to: navigation, search
(No summary)
(Flashing the Gemini Android firmware)
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Introduction==
 
==Introduction==
This document will guide you through the necessary steps needed to flash your Gemini with Linux or Android OS.
+
This document will guide you through the necessary steps needed to install or update Android on your Gemini.
  
'''Please note: ''' '''<span style="color: #ff0000;">Flashing Android or Linux will delete any user data on the device. Please make sure you have a backup of any important data before starting!</span>'''
+
'''Please note:&nbsp;''' '''<span style="color: #ff0000;">Installing Android will delete any user data on the device. Please make sure you have a backup of any important data before starting!</span>'''
  
<div style="text-align: justify;">'''Important Note: <span style="color: #ff0000;">please don’t use other tools to flash firmware fo your Gemini as it’s easy to loose key information such as the IMEI number. In particular, never use the “Format all + download“ option in the SP Flash Tool as this erases key information stored in the NVRAM partition and can lead to a non-functional device.</span>'''</div>
+
<div style="text-align: justify;">'''Important Note: <span style="color: #ff0000;">Please don’t use other tools to flash firmware fo your Gemini as it’s easy to loose key information such as the IMEI number. In particular, never use the “Format all + download“ option in the SP Flash Tool as this erases key information stored in the NVRAM partition and can lead to a non-functional device.<br data-attributes="%20/"><br data-attributes="%20/"></span>'''</div>
 +
There are 3 steps needed to install or upgrade Android on your Gemini:
  
==Download and Install FlashTool on Windows==
+
# Install the FlashTool software on your Windows PC or Linux PC
The first step to install FlashTool on Windows PC is to install the flash tool drivers. These drivers are needed for your Windows PC to communicate with your Gemini, the minimum requirement is to have a 64bit Windows operating system.
+
# Download and unzip the Android firmware
 +
# Flash the firmware on your device
 +
 
 +
These steps are detailed in the next sections.
 +
 
 +
==<br data-attributes="%20/">Download and Install FlashTool on Windows==
 +
The first step to install FlashTool on a Windows PC is to install the flash tool drivers. The drivers are needed for your Windows PC to communicate with your Gemini, the minimum requirement is to have a 64bit Windows operating system.
  
 
You can find the latest drivers here: [http://support.planetcom.co.uk/download/FlashToolDrivers.zip Windows Flash Tool Drivers]
 
You can find the latest drivers here: [http://support.planetcom.co.uk/download/FlashToolDrivers.zip Windows Flash Tool Drivers]
Line 15: Line 22:
 
Now that the drivers have been installed, you can download the latest Windows flash tool: [http://support.planetcom.co.uk/download/FlashToolWindows.zip Windows Flash Tool]
 
Now that the drivers have been installed, you can download the latest Windows flash tool: [http://support.planetcom.co.uk/download/FlashToolWindows.zip Windows Flash Tool]
  
Once downloaded the Windows flash tool, please unzip it to reveal the '''FlashToolWindows''' folder. Next, run the flash tool by double clicking on '''flash_tool''' (flash_tool.exe) file in the '''FlashToolWindows''' folder.
+
Once downloaded the Windows FlashTool, please unzip it to reveal the '''FlashToolWindows''' folder. Next, run the flash tool by double clicking on '''flash_tool''' (flash_tool.exe) file in the '''FlashToolWindows''' folder.
  
You can now skip the next part regarding Linux and move on to the '''Download Gemini Firmware''' section.
 
  
You will also need a firmware to flash, either Linux or Android. You can find the available Gemini firmware here: [[Gemini Firmware]]
 
  
 +
==Download and Install FlashTool on Linux==
 +
If you intend to install FlashTool on a Windows PC you can skip this section, otherwise please keep reading if you want to install FlashTool on a Linux PC.
  
 
==Download and Install FlashTool on Linux==
 
 
'''The following procedure has been tested on Debian 9.0, Ubuntu 18.04 (see notes below) and Fedora 28 (see notes below).'''
 
'''The following procedure has been tested on Debian 9.0, Ubuntu 18.04 (see notes below) and Fedora 28 (see notes below).'''
  
Line 40: Line 45:
 
And inside the file put the following 2 lines:
 
And inside the file put the following 2 lines:
  
<code>ATTRS{idVendor}=="0e8d", ENV{ID_MM_DEVICE_IGNORE}="1"</code><br /><code>ATTRS{idVendor}=="6000", ENV{ID_MM_DEVICE_IGNORE}="1"<br /></code>
+
<code>ATTRS{idVendor}=="0e8d", ENV{ID_MM_DEVICE_IGNORE}="1"</code><br data-attributes="%20/"><code>ATTRS{idVendor}=="6000", ENV{ID_MM_DEVICE_IGNORE}="1"<br data-attributes="%20/"></code>
  
 
After that, restart the udev:
 
After that, restart the udev:
Line 57: Line 62:
 
On Ubuntu you will need to install the following dependency:
 
On Ubuntu you will need to install the following dependency:
  
 <code>sudo apt-get install libjpeg62</code>
+
&nbsp;<code>sudo apt-get install libjpeg62</code>
  
  
 
'''Notes - Fedora 28'''
 
'''Notes - Fedora 28'''
  
On Fedora you will have to write the following command to allow applications running with root privileges to access the X server (this will fix the lines above for both gedit and flash_tool):
+
On Fedora you will have to write the following command to allow applications running with root privileges to access the X server (this will fix the lines above for both the gedit and the flash_tool command):
  
 
<code>xhost +local:</code>
 
<code>xhost +local:</code>
  
Additionally you will have to  restart the udev service by typing (or rebooting your machine):
+
Additionally you will have to&nbsp; restart the udev service by typing (or rebooting your machine):
  
<code>udevadm control --reload-rules && udevadm trigger</code>
+
<code>udevadm control --reload-rules &amp;&amp; udevadm trigger</code>
  
 
Finally, you will need to install the following dependency:
 
Finally, you will need to install the following dependency:
Line 81: Line 86:
  
  
==Download Android-Only Gemini Firmware==
+
==Download Android Gemini Firmware==
Now that the Flash Tool is running, it is time to download the Gemini Firmware.
+
Now that the FlashTool application is running, it is time to download the Gemini Android Firmware from the [[Gemini Firmware|Gemini Firmware page]].
 
 
Planet Computers provides both an Android-only firmware and a Linux or Android-Linux firmware.
 
 
 
If you choose to flash a standard Android firmware, you will have to download one from this page: [[Gemini Firmware|Gemini Firmware.]]
 
 
 
After downloading the firmware, unzip it to reveal the folder containing the firmware code, for example '''Gemini_WIFI_MP_09052018''' or '''Gemini_x27_FOTA3_12062018''' and proceed to the next section.
 
 
 
If you choose to flash a Linux or Android-Linux firmware, then you will have to repartition your device, reserving some space for Linux and some for Android. To repartition your Gemini you will have to use our partition tool, available at [http://support.planetcom.co.uk/partitionTool.html http://support.planetcom.co.uk/partitionTool.html]. A screenshot of the tool is provided below.
 
 
 
[[File:Screen_Shot_2018-06-20_at_11.06.06.png|center|640x422px|border]]
 
 
 
You can choose the partition size for Linux and Android by dragging the planet slider left or right. You can choose to have an Android-only Gemini, a multi boot Linux-Android or a Linux-only Gemini. Once you have selected the partition sizes you have to select your Gemini model using the appropriate drop down menu.
 
 
 
There are 3 Gemini versions, please make sure you select the right version for your device. WiFi-Only Gemini users should select "Gemini WIFI-Only". 4G Gemini users using x25 chip (early release Geminis) should select "Gemini x25" and finally Gemini 4G x27 users should select the "Gemini x27" option. If you are not sure about your Gemini version, just check under Settings -> Wireless & networks. If you see a menu called SIM cards, then you have an x27 Gemini, otherwise you have an x25 Gemini.
 
 
 
After selecting the partition size, you can select the operating systems to use for each boot mode. Gemini supports 4 boot modes. When the Gemini is OFF, press Esc(On) key for around one second to initiate the booting process. Immeditately after that, the unit will vibrate, and after a few seconds the screen will turn ON. When the screen turns ON, the Gemini will check the status of the Esc (On) key and of the side silver button. Based on the status of those buttons there are 4 possible booting modes:
 
 
 
* Boot 1: Both Esc (On) key and side button are not pressed. This is the default booting option when no buttons are pressed.
 
* Recovery Mode: Esc (On) is pressed. This will always boot into overy mode.
 
* Boot 2: Side button is pressed.
 
* Boot 3: Esc(On) key is pressed and Side button is also pressed
 
 
 
As an example, the following screenshot shows a Gemini WIFI-Only model, configured with 28 GB for both Android and Linux, where the boot modes are set as:
 
 
 
* Boot 1: Standard Android
 
* Boot 2: Debian GNU/Linux
 
* Boot 3: Sailfish OS
 
  
 +
After downloading the firmware, unzip it to reveal the folder containing the firmware folder, for example '''Gemini_WIFI_MP_09052018''' or '''Gemini_x27_FOTA3_12062018'''.
  
[[File:Screen_Shot_2018-06-20_at_11.16.03.png|center|640x421px|border]]
+
==Configuring FlashTool==
 
 
 
 
After you made your selection, there are 3 modules to download using the buttons on the right:
 
 
 
* The Base firmware contains the basic Android firmware. This is the main component, it needs to be extracted to reveal the Gemini Base firmware folder. All the other component need to be copied/unzipped here.
 
* The Scatter file contains the definition of your Gemini partition, based on your selection. This needs to be copied into the firmware folder
 
* The optional Linux (Debian, Sailfish or Debian+Sailfish) contains the additional Linux module. This needs to be unzipped into the firmware folder
 
 
 
Once you have extracted the base firmware,  copied the scatter file and unzipped the optional Linux module, you will be ready to proceed to the next step.
 
 
 
==Configuring Flash Tool==
 
 
Use the choose button as in the following screenshot to load the scatter file that you will find inside the downloaded firmware. In particular:
 
Use the choose button as in the following screenshot to load the scatter file that you will find inside the downloaded firmware. In particular:
  
 
* Downlad-Agent should be set to the file MTK_AllInOne_DA.bin, which is located in the FlashToolWindows or FlashToolLinux folder.
 
* Downlad-Agent should be set to the file MTK_AllInOne_DA.bin, which is located in the FlashToolWindows or FlashToolLinux folder.
* Scatter-loading file should be set to the specific scatter file of the firmware that you want to flash, which is located in the firmware folder
+
* Scatter-loading file should be set to the '''Gemini_Android.txt''' file, which is located inside the of the firmware folder that you downloaded.
  
  
[[File:flash1.png]]
+
[[File:Screen_Shot_2018-06-21_at_10.45.58.png|center|800x511px|border]]
  
  
Line 136: Line 104:
 
==Backup the NVRAM partition==
 
==Backup the NVRAM partition==
 
Before flashing the device with a different firmware it is a good idea to backup the current NVRAM partition. This partition stores key information for your Gemini, including the IMEI number. If it gets lost or damaged, your Gemini will not be able to take or receive calls.
 
Before flashing the device with a different firmware it is a good idea to backup the current NVRAM partition. This partition stores key information for your Gemini, including the IMEI number. If it gets lost or damaged, your Gemini will not be able to take or receive calls.
 
  
 
The provided flash tool is already configured for your Gemini. To create a backup of your NVRAM partition, just click on the '''Readback''' tab and then on the '''Add''' button. A row will appear in the table as in the following screenshot.
 
The provided flash tool is already configured for your Gemini. To create a backup of your NVRAM partition, just click on the '''Readback''' tab and then on the '''Add''' button. A row will appear in the table as in the following screenshot.
  
  
[[File:nvram.png]]
+
[[File:Screen_Shot_2018-06-21_at_10.52.02.png|center|799x526px|border]]
 
 
 
 
Next, just click the '''Read Back''' button, connect your Gemini to your PC and restart the Gemini. Once rebooted, the flash tool will detect the phone and will write the NVRAM partition on a file on your hard disk called NVRAM0. It’s a good idea to keep this file as a backup.
 
 
 
 
 
  
==Flashing the Gemini with an alternative firmware==
 
Be sure to follow the previous step to store a copy of the NVRAM partition as backup. Now, run the Flash tool software and click on the '''Download''' tab. Next, locate the '''Scatter-loading File''' option and click on the associated '''choose''' '''button''', as highlighted in the picture below:
 
  
[[File:flash1.png|center|640x419px|border]]
+
Next, just click the '''Read Back''' button, <span style="color: #252525; font-family: 'Source Sans Pro', sans-serif; font-size: 15.008px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">connect your PC to the left end USB-C port on your Gemini</span> and restart the Gemini. Once booting, the flash tool will detect the unit and will write the NVRAM partition on a file on your hard disk called NVRAM0 (see screenshot below). It’s a good idea to keep this file as a backup.
  
Now, open the firmware folder from the firmware zip file you downloaded and select the scatter file. If you selected an Android firmware, then the scatter file will be called''' Gemini_Android.txt'''. If you selected an Android/Linux firmware, then the scatter file name will depend on the space you reserved for them, for example''' Gemini_x27_A26GB_L30GB_Multi_Boot.txt'''.
 
  
Once you select the scatter file, the table should be populated as below:
+
[[File:Screen_Shot_2018-06-21_at_10.51.50.png|center|800x527px|border]]
  
 +
==Flashing the Gemini Android firmware==
 +
Be sure to follow the previous step to store a copy of the NVRAM partition as backup.Now click back on the '''Download''' tab.
  
[[File:flash2.png]]
+
If you want to flash the complete firmware to your unit then select '''Firmware Upgrade''' from the drop down menu.This will automatically select all the partitions in the table and it will restore your unit to its factory state. Please note that you will loose all your personal data/settings. 
  
 +
Your screen should appear similar to the following screenshot:
  
Make sure all the partitions are found and are checked. If some partitions are not found (location tab is empty), double checked that you unzipped the Linux module in the firmware folder.
 
  
Finally, change the '''Download Only''' drop down menu to '''Firmware Upgrade''' and click on the '''Download''' button. When switching between a standard Android to a dual boot Android/Linux firmware, you must use the '''Firmware Upgrade '''mode because you need to format the device and change the partitions.
+
[[File:Screen_Shot_2018-06-21_at_11.01.20.png|center|800x597px|border]]
  
Connect your Gemini and restart it. As soon as the Gemini is rebooted, the flash tool will detect the device and it will update the OS with the selected firmware.
 
  
  
 +
To start the flashing process, just click the big '''Download''' button, <span style="color: #252525; font-family: 'Source Sans Pro', sans-serif; font-size: 15.008px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">connect your PC to the left end USB-C port on your Gemini</span> and restart the Gemini. Once booting, the flash tool will detect the unit and will start flashing the device with the selected firmware.
  
==Manually Update Android firmware==
+
If instead you want to manually update your Gemini without loosing your data, you should select the '''Download Only '''option from the drop down menu. After that, make sure you select all the partition with the exception of the '''userdata''' partition, which contains your data. Your screen should look like this:
Planet Computers provides over-the-air update for standard Android installations. For custom installation, you will need to manually update the Android firmware.
 
  
To update the Android firmware, simply download the latest Android firmware from [http://support.planetcom.co.uk/index.php/Gemini_Firmware http://support.planetcom.co.uk/index.php/Gemini_Firmware] and use the '''Download Only''' option while selecting only the system partition, as in the screenshot below
+
[[File:Screen_Shot_2018-06-21_at_11.12.29.png|center|800x597px|border]]
  
[[File:Screen_Shot_2018-06-20_at_15.57.55.png|center|640x421px|border]]
 
  
  
 +
To start the flashing process, just click the big '''Download''' button, <span style="color: #252525; font-family: 'Source Sans Pro', sans-serif; font-size: 15.008px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">connect your PC to the left end USB-C port on your Gemini</span> and restart the Gemini. Once booting, the flash tool will detect the unit and will start flashing the device with the selected firmware.
  
==Linux dual boot notes==
+
The following screenshot shows a successfully completed flashing process:
The dual boot mechanism works as follow:
 
  
* '''Dual boot Android-Linux firmware'''
+
[[File:Screen_Shot_2018-06-21_at_11.17.44.png|center|800x595px|border]]
** Press Esc (On) for around one second to turn ON the unit and boot into Android. You should release the Esc (On) button before the screen turns ON, otherwise the unit will boot into recovery mode (see below).
 
** Press Esc (On) for around one second to turn ON the unit and at the same time press and hold the side button until the screen turns ON to boot into Linux. You should release the Esc (On) button before the screen turns ON, but you must keep the side button pressed until you see the turning ON. When the screen turns ON you can release the side button, and the unit will boot into Linux.
 
** Press Esc (On) and keep pressing the button until the screen turns ON to boot in recovery mode. At this stage the recovery mode is disabled and you will see a droid image with a red triangle and a "No command" text.
 

Latest revision as of 10:54, 26 February 2019

Introduction

This document will guide you through the necessary steps needed to install or update Android on your Gemini.

Please note:  Installing Android will delete any user data on the device. Please make sure you have a backup of any important data before starting!

Important Note: Please don’t use other tools to flash firmware fo your Gemini as it’s easy to loose key information such as the IMEI number. In particular, never use the “Format all + download“ option in the SP Flash Tool as this erases key information stored in the NVRAM partition and can lead to a non-functional device.

There are 3 steps needed to install or upgrade Android on your Gemini:

  1. Install the FlashTool software on your Windows PC or Linux PC
  2. Download and unzip the Android firmware
  3. Flash the firmware on your device

These steps are detailed in the next sections.


Download and Install FlashTool on Windows

The first step to install FlashTool on a Windows PC is to install the flash tool drivers. The drivers are needed for your Windows PC to communicate with your Gemini, the minimum requirement is to have a 64bit Windows operating system.

You can find the latest drivers here: Windows Flash Tool Drivers

Once downloaded, unzip the archive. You will find a folder called FlashToolDrivers, open the folder and double click on the Install (install.bat) file. Allow the installation to complete by clicking Yes when asked to make changes.

Now that the drivers have been installed, you can download the latest Windows flash tool: Windows Flash Tool

Once downloaded the Windows FlashTool, please unzip it to reveal the FlashToolWindows folder. Next, run the flash tool by double clicking on flash_tool (flash_tool.exe) file in the FlashToolWindows folder.


Download and Install FlashTool on Linux

If you intend to install FlashTool on a Windows PC you can skip this section, otherwise please keep reading if you want to install FlashTool on a Linux PC.

The following procedure has been tested on Debian 9.0, Ubuntu 18.04 (see notes below) and Fedora 28 (see notes below).

You can find the latest Linux flash tool software here: Linux Flash Tool

Once downloaded, extract the flash tool by typing:

tar -zxvf FlashToolLinux.tgz

Before running the flash tool you will need to add some rules to udev.

Create the blacklist file by typing (using either the "sudo command" or syntax or simply typing the command as root) :

sudo gedit /etc/udev/rules.d/20-mm-blacklist-mtk.rules

And inside the file put the following 2 lines:

ATTRS{idVendor}=="0e8d", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="6000", ENV{ID_MM_DEVICE_IGNORE}="1"

After that, restart the udev:

sudo service udev restart

Finally, run the flash tool application by entering into the FlashToolLinux folder and typing:

cd FlashToolLinux

sudo ./flash_tool.sh


Notes - Ubuntu 18.04

On Ubuntu you will need to install the following dependency:

 sudo apt-get install libjpeg62


Notes - Fedora 28

On Fedora you will have to write the following command to allow applications running with root privileges to access the X server (this will fix the lines above for both the gedit and the flash_tool command):

xhost +local:

Additionally you will have to  restart the udev service by typing (or rebooting your machine):

udevadm control --reload-rules && udevadm trigger

Finally, you will need to install the following dependency:

sudo yum install nas-libs-1.9.4-13.fc28.x86_64


Building the flash tool from source

You can also build the flash tool by yourself, the code is hosted on github: Flash Tool Source


Download Android Gemini Firmware

Now that the FlashTool application is running, it is time to download the Gemini Android Firmware from the Gemini Firmware page.

After downloading the firmware, unzip it to reveal the folder containing the firmware folder, for example Gemini_WIFI_MP_09052018 or Gemini_x27_FOTA3_12062018.

Configuring FlashTool

Use the choose button as in the following screenshot to load the scatter file that you will find inside the downloaded firmware. In particular:

  • Downlad-Agent should be set to the file MTK_AllInOne_DA.bin, which is located in the FlashToolWindows or FlashToolLinux folder.
  • Scatter-loading file should be set to the Gemini_Android.txt file, which is located inside the of the firmware folder that you downloaded.


Screen Shot 2018-06-21 at 10.45.58.png


Backup the NVRAM partition

Before flashing the device with a different firmware it is a good idea to backup the current NVRAM partition. This partition stores key information for your Gemini, including the IMEI number. If it gets lost or damaged, your Gemini will not be able to take or receive calls.

The provided flash tool is already configured for your Gemini. To create a backup of your NVRAM partition, just click on the Readback tab and then on the Add button. A row will appear in the table as in the following screenshot.


Screen Shot 2018-06-21 at 10.52.02.png


Next, just click the Read Back button, connect your PC to the left end USB-C port on your Gemini and restart the Gemini. Once booting, the flash tool will detect the unit and will write the NVRAM partition on a file on your hard disk called NVRAM0 (see screenshot below). It’s a good idea to keep this file as a backup.


Screen Shot 2018-06-21 at 10.51.50.png

Flashing the Gemini Android firmware

Be sure to follow the previous step to store a copy of the NVRAM partition as backup.Now click back on the Download tab.

If you want to flash the complete firmware to your unit then select Firmware Upgrade from the drop down menu.This will automatically select all the partitions in the table and it will restore your unit to its factory state. Please note that you will loose all your personal data/settings. 

Your screen should appear similar to the following screenshot:


Screen Shot 2018-06-21 at 11.01.20.png


To start the flashing process, just click the big Download button, connect your PC to the left end USB-C port on your Gemini and restart the Gemini. Once booting, the flash tool will detect the unit and will start flashing the device with the selected firmware.

If instead you want to manually update your Gemini without loosing your data, you should select the Download Only option from the drop down menu. After that, make sure you select all the partition with the exception of the userdata partition, which contains your data. Your screen should look like this:

Screen Shot 2018-06-21 at 11.12.29.png


To start the flashing process, just click the big Download button, connect your PC to the left end USB-C port on your Gemini and restart the Gemini. Once booting, the flash tool will detect the unit and will start flashing the device with the selected firmware.

The following screenshot shows a successfully completed flashing process:

Screen Shot 2018-06-21 at 11.17.44.png