Skip to main content
Associate III
June 16, 2026
Solved

OpenSTDroid v6.2.0 Build Error

  • June 16, 2026
  • 7 replies
  • 260 views

Hi everyone,

I am new to Android development, and I have two questions about OpenSTDroid v6.2.0.

  1. I followed the official documentation to build OpenSTDroid, but I encountered a build error. The details are shown in the attached error.txt.

    How to build OpenSTDroid distribution - stm32mpu
     
  2. For OpenSTDroid, is the Device Tree workflow similar to Yocto?
    In other words, should the Device Tree be generated by STM32CubeMX and then integrated into the OpenSTDroid source tree?

Any guidance or suggestions would be greatly appreciated.

Thank you.

Best answer by Jean-Christophe_TROTIN

Hi ​@Steven-LIN ,

 

It’s good news that the build is completed.

About flashing, I would recommend to use the way of working described in the https://wiki.st.com/stm32mpu/wiki/How_to_populate_boards_for_Android wiki article (using scripts that rely on STM32CubeProgrammer and fastboot). Take care of the prerequisites (especially setting the target device information… /etc/udev/rules.d/51-android.rules file).

If, for any reason, you don’t want to use this procedure, let le know.

 

Hope this information helps.

Regards,

JC.

7 replies

Jean-Christophe_TROTIN
ST Employee
June 16, 2026

Hi ​@Steven-LIN ,

About the first point, the following lines after the execution of the “stm32mp2setup” command look suspicious: it looks as if the command was executed twice (“already applied”), which might lead to an instable configuration.

  • The required patches have been already applied successfully with more recent configuration
  • The required patches have been already applied successfully

So, I propose that you “clear” the patches and apply them again with the following commands (executed in a terminal on which the ”source ./build/envsetup.sh” and “lunch aosp_dk-trunk_staging-userdebug” commands have already been executed):

            $ stm32mp2clear

            $ stm32mp2setup

Then, you can try to build again.

 

About the second point, as explained in the https://wiki.st.com/stm32mpu/wiki/How_to_customize_Linux_kernel_for_Android#Changing_the_Device_Tree wiki article,  OpenSTDroid uses a product device tree overlay. Thus, the device tree generated by STM32CubeMX cannot be used as it, but integrated into the OpenSTDroid device tree overlay.

 

Hope this information helps.

Regards,

JC.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Associate III
June 16, 2026

Hi Jean-Christophe,

I have tried your suggestion, but I still encounter the following error when running stm32mp2setup after stm32mp2clear.

$ stm32mp2clear
aries and sources

$ stm32mp2setup
[1/2]: Apply patches
Apply patches based on required configuration
Apply patches based on required configuration
[2/2]: Load graphics libraries
=> Loading GPU driver and libraries
=> Extracting data to device/stm/stm32mp2/graphics
cp: cannot stat 'device/stm/stm32mp2/tmp/gcnano-userland-android-16.0.0-20260522/*': No such file or directory
=> Extracting data to device/stm/stm32mp2-kernel/gcnano-driver

It seems that the expected gcnano-userland-android-16.0.0-20260522 directory or files are missing under device/stm/stm32mp2/tmp/.

Could you please advise whether I missed any required package or step before running stm32mp2setup?

Thank you.

Jean-Christophe_TROTIN
ST Employee
June 16, 2026

Hi ​@Steven-LIN 

 

I executed again the different steps specified in the wiki to build OpenSTDroid, in order to cross-check that I don’t encounter the same problem as the one you described. So, on my side, I didn’t get any trouble (the build process is still in progress, but the first steps are fine).

 

It seems that your execution of “stm32mp2setup” is cleaner at least for “[1/2]: Apply patches”. For “[2/2]: Load graphics libraries”, I suggest that you run the following command to force EULA dependent libraries load:

            $ load_eula -f

 

Then, you can try again to build with “make -j” (please do not re-execute “stm23mp2setup” command).

 

Hope this information helps.

Regards,

JC.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Associate III
June 17, 2026

Hi Jean-Christophe,

I have decided to perform a fresh repo sync and try again.

Thank you for your help!

Visitor II
June 17, 2026

Following this thread, we have a similar issue..
 

Associate III
June 17, 2026

Hi allsafers,

Are you building in a Docker environment?

I have re-run repo sync from scratch, and the build is currently in progress.

Associate III
June 17, 2026

Hi Jean-Christophe,

I have now completed the build.

According to the contents of FlashLayout_emmc_cm33tdcid.tsv, I copied the required image files, but the total size is only about 1.1 GB. Is this expected for the OpenSTDroid build output?

Also, I would like to confirm whether it is possible to flash this image using STM32CubeProgrammer with the FlashLayout_emmc_cm33tdcid.tsv file.

I tried flashing it with STM32CubeProgrammer, and the flashing process completed very quickly. However, after switching the board back to eMMC boot mode, there was no response.

I also tried the boot procedure described in the wiki: switching back to eMMC mode, pressing RESET, and then pressing USER2, but there was still no reaction.

Could you please advise whether I may have missed any required files, flashing steps, or boot configuration?

Thanks.

Associate III
June 18, 2026

I am currently trying another flashing method.

I changed PE to P in the TSV file, and converted super.img, metadata.img, and userdata.img to raw images using simg2img.

After that, I am trying to flash the images with STM32CubeProgrammer directly, without using the flash-device script.

I will update the result after the flashing test is complete.

Thanks.

Jean-Christophe_TROTIN
ST Employee
June 19, 2026

Hi ​@Steven-LIN ,

 

It’s good news that the build is completed.

About flashing, I would recommend to use the way of working described in the https://wiki.st.com/stm32mpu/wiki/How_to_populate_boards_for_Android wiki article (using scripts that rely on STM32CubeProgrammer and fastboot). Take care of the prerequisites (especially setting the target device information… /etc/udev/rules.d/51-android.rules file).

If, for any reason, you don’t want to use this procedure, let le know.

 

Hope this information helps.

Regards,

JC.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Associate III
June 22, 2026

Hi Jean-Christophe_TROTIN,

I am currently building OpenSTDroid on a remote build machine. After the build is completed, I copy the images required by the TSV file to the corresponding local source code path, out/target/product/dk, on my local machine.

I am using the STM32MP2-DK board. I can successfully start the flashing process with flash-device, and the subsequent fastboot flashing step also works by following the wiki instructions.

However, after flashing is completed, the system cannot boot properly into Android. The boot log shows errors, as shown in the attached android16-error.txt.

I would also like to ask whether the OpenSTDroid Starter Package will be updated in the future. The current version appears to be v5.1.1. With that package, it seems possible to perform the complete flashing process directly with STM32CubeProgrammer on Windows, without using the flash-device flow.

STM32MP2DroidSta | Product - STMicroelectronics

 

Thank you.

Jean-Christophe_TROTIN
ST Employee
June 26, 2026

Hi ​@Steven-LIN,

I unfortunately missed your latest post, and I apologize for that.

Do you finally succeed in booting the board with Android?

I’m currently confused with the logs that you provided: I never got such issue. Let me know if you still have any problem with the boot sequence.

Regards,

JC.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Associate III
July 1, 2026

Hi Jean-Christophe,

I have successfully resolved the issue I encountered earlier.

Thank you very much for your support and assistance.

Best regards,

Steven