Unable to edit the official Android SD image configuration

Started by simo, April 16, 2017, 01:01:50 PM

Previous topic - Next topic

simo

Hi all,
sorry for this probably stupid question but I cannot figure out what I'm missing.

Until now I've working on an A20-SOM (rev.B) with the official Android image for SD card.
Now I need to change the Android image configuration, editing the script.bin file as suggested by the wiki and user manual.
So I've find it on the SD card on the bootable FAT16 partition (actually, there I found both script.bin and script0.bin files, identical), converted to .fex with Sunxi tools, make some changes, converted back the .fex file to script.bin and overwritten the original one on the SD card.

The problem is that the behavior of the board seems to remain the same whatever change I made on the script.bin. I've also try to broke it, filling it with zeros, or even to delete it...but the board still works as before.

So, maybe I'm try to change the wrong configuration file?
How can I really change the configuration of the Android SD image?

Thank you very much in advance.
Simone

LubOlimex

Technical support and documentation manager at Olimex

simo

Hi Lub and thank you for your feedback.

I still have a couple of doubts regarding the 2 possibility you mention.


Edit the prebuilt android image

I've read again the link you provided on how to edit the prebuilt images and I think I've done exactly what is there. In particular, it states

"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 file located inside the card."

I've done it just mounting the SD card on my linux laptop and searching for the script.bin file (located on the first bootable partition of the SD card). Then

"4 At this point you have located the script.bin file. However, you can't edit the script binary file directly so you would need to convert it to text format (it is called .fex in this case), then edit the parameters via a text editor and finally switch it back to the binary format. "

I've just used the utility bin2fex to generate the text format file from the original script.bin, edited it and converded back again in binary format with fex2bin. Then simply overwritten the original script.bin file on the SD card with the one I've generated.

However, as mentioned in my post, nothing seems to change when I insert the SD again in my board and power on it. I've also try to set intentionally wrong parameters just to see if something goes wrong or even I've try to boot the board after removing the script.bin file but nothing change, the boot completes always normally.
So, from these tests my doubt that the board actually does not read this file at all...



Create a new Android Image from scratch

I'm still reading the link you provided (thank you a lot!) and I'll try as soon as possible.
Just a preliminary question:
I see the blog articles you cited rely on "custom" sources to be downloaded, i.e from
http://dl.linux-sunxi.org/users/tsvetan/ANDROID-4.2.2-SDK2.0-KERNEL-3.4/
or
https://drive.google.com/drive/folders/0BwKBcHR31e97ZWtTV2p3SWhhMmM

Are these sources from Olimex? Or are there "official" sources I can start with to try to build my Android image for A20-SOM?


Thank you very much
Simone