Difference between revisions of "How to edit prebuilt Android images"

(The algorithm to edit the Android image for microSD card)
(The algorithm to edit the Android image for microSD card)
Line 38: Line 38:
 
===The algorithm to edit the Android image for microSD card===
 
===The algorithm to edit the Android image for microSD card===
  
 +
To edit the configuration of official Android image suitable for the micrSD card memory follow the algorithm below:
  
 +
*1. Identify what type of Android image for microSD card you have downloaded
 +
**There are two types of Android images for microSD card that we usually provide and each of them can be edited in a different way. The image provided for microSD card is either the native Android image that can be edited with a tool like the DragonFace mentioned above or an image taken from an already prepared microSD card which can't be loaded in DragonFace.
 +
**'''Why did you make two types of images microSD card images with Android?''' The original image was a bit hard to load to a microSD card and you had to use PhoenixSuit - a not-so-consistent program. Something more - it had no Linux alternative. The images that were a copy of a prepared microSD card are easier to deploy and use - just write the image to the microSD card.
 +
**'''But how to tell which image is which?''' It's simple - if the Android image for microSD card (that you downloaded from the wiki) opens successfully in DragonFace then it is the first type. If it doesn't load successfully - it is the second type. If the image is the first type go to step 2. If the image is the second type skip to step 3.
  
There are two types of Android images for microSD card that we usually provide and each of them can be edited in a different way. The image provided for microSD card is either the native Android image that can be edited with a tool like the DragonFace mentioned above or an image taken from an already prepared microSD card which can't be loaded in DragonFace.
+
*2. If the image is the first type (an image suitable for DragonFace) then simply follow the algorithm in the previous section: "The algorithm to edit the Android image for the NAND memory". That would allow you to modify the configuration and then you can upload it to your board using PhoenixSuit.
  
But how to tell which image is which? It's simple - if the Android image for microSD card (that you downloaded from the wiki) opens successfully in DragonFace then it is the first type. If it doesn't load successfully - it is the second type.
+
*3. It is most likely that the image is the second type - not the original Android image card, but a copy of the memory of an already-prepared card. In that case to edit the configuration you would need to download the image to the card and edit the script.bin (script.fex) file located inside the card. You would need a card reader to do so.
 +
**Note that the card is prepared in EXT4 file system which is not native a native for Windows. This means that if you are using Windows you would need a software tool that would allow you to explore the microSD card. There are such tools available for free - tools like Ext2Fsd, ext2expolerer and DiskInternals Linux Reader. Of course, if you are using Linux to browse the microSD card you are good to go - no need to use additional software.
  
If the image is the first type (an image suitable for DragonFace) then simply follow the algorithm in the previous section: "The algorithm to edit the Android image for the NAND memory".
+
To edit the script.bin (script.fex) file inside the Android microSD card you would need to explore the contents of the card an
 
 
However, it is most likely that the image
 
  
 
'''It is possible that only one of the types mentioned above is available for a specific board.'''
 
'''It is possible that only one of the types mentioned above is available for a specific board.'''

Revision as of 02:05, 11 February 2015

How to edit the parameters in Android distributions

For almost any Olimex Allwinner board there are Android images provided. These are ready-to-use images with all the settings already configured. The images are generally two types: suitable for NAND memory boot of the boards; or suitable for a microSD card boot.

We often get asked to provide Android images with different set of settings or support for custom resolutions. Unfortunately, we are unable to compile Android images for every possible resolution and every possible Alwinner board. This article would provide algorithms that would allow you to edit the Android parameters by yourself.

The easiest approach is to edit an already existing image as explained below. The other method would be to create an Android image from scratch.

Note that the method for editing Android image suitable for NAND memory is completely different compared to the method for editing Android image suitable for microSD card.

The algorithm to edit the Android image for the NAND memory

To edit the configuration of official Android image suitable for the NAND memory follow the algorithm below:

  • 1. Download the latest official Android image for NAND from the wiki article of your board.
  • 3. Start the program from DragonFace.exe and let it update on first launch.
  • 4. After the update is complete and the interface of the program is available click on the "Firmware" button and then load the *.img file that we got in point 1.
    • During the opening of the firmware additional processes might attempt to start. Windows user account control might prompt for your approval. Make sure that you allow those.
    • If you receive an error loading the image: ensure that the torrent program or any local or remote program or process that might interfere with the image had been closed and the link to the image had been terminated. If the image you are going to edit is open by another program you will not be able to edit it via DragonFace - the error that usually gets displayed in such a case is: "DragonFace: Firmware does not support the tools to modify, make sure that the firmware version: OK".
  • 5. After the load is complete navigate to the "Advanced Settings" tab. In the tab select "System Configuration". This would open the configuration in simple text form in your default text editor. Refer to the picture below:
    Df1.png
  • 6. Now we can edit parameters. More information on what the parameters mean and what values they might have is found here: http://linux-sunxi.org/Fex_Guide
    • For example, to enable FullHD video output at 60Hz we need to change screen0_output_type and screen0_output_mode as follows: screen0_output_type = 3; screen0_output_mode = 10
  • 7. After we are done we save the text file and close it. Then we click the button "Save" at the bottom of the DragonFace interface. A prompt windows would appear and would allow us to specify a save location and name for the edited image.
    • During the save operation of the firmware additional processes might attempt to start. Windows user account control might prompt for your approval. Make sure that you allow those.
  • 8. Voila - we have an image with custom settings. We are ready to burn it to the NAND memory of the board.


The algorithm to edit the Android image for microSD card

To edit the configuration of official Android image suitable for the micrSD card memory follow the algorithm below:

  • 1. Identify what type of Android image for microSD card you have downloaded
    • There are two types of Android images for microSD card that we usually provide and each of them can be edited in a different way. The image provided for microSD card is either the native Android image that can be edited with a tool like the DragonFace mentioned above or an image taken from an already prepared microSD card which can't be loaded in DragonFace.
    • Why did you make two types of images microSD card images with Android? The original image was a bit hard to load to a microSD card and you had to use PhoenixSuit - a not-so-consistent program. Something more - it had no Linux alternative. The images that were a copy of a prepared microSD card are easier to deploy and use - just write the image to the microSD card.
    • But how to tell which image is which? It's simple - if the Android image for microSD card (that you downloaded from the wiki) opens successfully in DragonFace then it is the first type. If it doesn't load successfully - it is the second type. If the image is the first type go to step 2. If the image is the second type skip to step 3.
  • 2. If the image is the first type (an image suitable for DragonFace) then simply follow the algorithm in the previous section: "The algorithm to edit the Android image for the NAND memory". That would allow you to modify the configuration and then you can upload it to your board using PhoenixSuit.
  • 3. It is most likely that the image is the second type - not the original Android image card, but a copy of the memory of an already-prepared card. In that case to edit the configuration you would need to download the image to the card and edit the script.bin (script.fex) file located inside the card. You would need a card reader to do so.
    • Note that the card is prepared in EXT4 file system which is not native a native for Windows. This means that if you are using Windows you would need a software tool that would allow you to explore the microSD card. There are such tools available for free - tools like Ext2Fsd, ext2expolerer and DiskInternals Linux Reader. Of course, if you are using Linux to browse the microSD card you are good to go - no need to use additional software.

To edit the script.bin (script.fex) file inside the Android microSD card you would need to explore the contents of the card an

It is possible that only one of the types mentioned above is available for a specific board.