We are building a system based on the Sabre SD board with iMX6. Up until recently, we were developing using Android 7.1.1; however, limitations in Android 7 moved us to try using Android 8.
The problem is, we can't flash Android 8. Oh, we can go through the motions, and it seems to do everything right, but when you try to boot it, U-Boot says, "Can't load zImage. Bad magic."
the utility gparted doesn't recognize any of the partitions on the targeted flash at all (See attachment). By contrast, flashing on Ubuntu 16.04 generates a good image. (Note that the boot sector is a little wild -- I don't know what NXP is doing there.)
The .img and .imx files in out/product/target/.../ all are good. The build itself is done in a Docker container running 16.04 LTS, but devices don't come through Docker environment.
To muddy the waters further, 18.04 LTS used to flash Android 7.1.1 until recently, but started showing the same problems. We had to "sudo systemctl mask udisk2" to restore 7.1.1 flashing, but didn't help with Android 8.
Our best guess is that something is being "helpful" with the partitions in 18.04, but we don't know why.
Any ideas on how to proceed?
There are some ways to download the Android image into the SDcard, the most straight forward is using MFGtool. To see how to make this, please see the Android Quick Start Guide.
For me, the best way is using the "fsl-sdcard-partition.sh" script.
To use this, just go to the path of the downloaded package Android image and type the below commands:
# sudo chmod a+x fsl-sdcard-partition.sh
# sudo ./fsl-sdcard-partition.sh -f imx6q /dev/sdx
Where sd is the number of your sdcard slot.
Just take note that is all made through a Linux computer.
Hope this information can help you.
That is precisely what we do.
We have a "wrapper" script that allows us to flash for our board or for the SabreSD, which is our reference board. It basically says the following:
(delete scratch directory at root of AOSP)
(make scratch directory at root of AOSP)
(copy output from product to scratch directory)
(cd scratch directory)
(make sure target device is ready)
sudo chmod +x ../device/$DEVDIR/common/tools/fsl-sdcard-partition.sh
sudo ../device/$DEVDIR/common/tools/fsl-sdcard-partition.sh -f imx6q $TARGET
We can't flash reliably a SabreSD board from 18.04, either. 16.04? No problem.
Are you using our script to flash the Android image?
Otherwise, we cannot guarantee anything. I have used the script several times, and all the times worked without any problem. If you are using our script, can you please send me the way you are writing the command?