Build Android (6.0/7.0) - system ui has stopped


Hi All,

I’m try compile android from source, either Marshmallow or Nougat. When I’m got update.img and apply into VIM Pro (either i’m tried VIM) I’m always receiving on the HDMI screen message “system ui has stopped”. It’s quite anoying, is comming like every two second again and again. I have same issues for Android 6 and Android 7. For both systems and images I’m always try erase emmc before by pressing magic buttons (pwr btn+functions+reset).

I’m try check forum here and I’m found one case here or let say some similar issues, but I’m not really found a solutions for that or?

The original pre-compiled images is working well, but I need add support for I2C and I2S. So maybe will be questions, is any way possible to add to precompiled images ? and if yes, how?

Has anybode similar issues or any hints?

here is log:

note: Compilations stations is xbuntu 16.04, I haven’t big issue with compilation of 6.0 Android (just need manually add JDK 1.7) and for 7.0 Android just need tweak JDK for use only 4GB memory (compilations stations Skylake i5, 8GB,250GB drive) so let say “no big deal”. The git checkout was perfromed with success, but is takes while and severals runs was needed. Let say I try follow a manual for download android source and compling from doc site.


You can try to modify the source code following below
###On Mmallow

  • external/sepolicy/app.te
  • external/sepolicy/platform_app.te
diff --git a/app.te b/app.te
index a939a92..77d6bef 100644
--- a/app.te
+++ b/app.te
@@ -261,7 +261,7 @@ neverallow appdomain socket_device:sock_file write;
 # Unix domain sockets.
 neverallow appdomain adbd_socket:sock_file write;
 neverallow appdomain installd_socket:sock_file write;
-neverallow { appdomain -bluetooth -radio -shell -system_app -nfc }
+neverallow { appdomain -bluetooth -radio -shell -system_app -platform_app  -nfc }
     property_socket:sock_file write;
 neverallow { appdomain -radio } rild_socket:sock_file write;
 neverallow appdomain vold_socket:sock_file write; # Ability to set system properties.
-neverallow { appdomain -system_app -radio -shell -bluetooth -nfc }
+neverallow { appdomain -system_app -platform_app -radio -shell -bluetooth -nfc }
     property_type:property_service set;

diff --git a/platform_app.te b/platform_app.te
index 2afe4d8..3d0c634 100644
--- a/platform_app.te
+++ b/platform_app.te
@@ -41,3 +41,5 @@ allow platform_app radio_service:service_manager find;
 allow platform_app surfaceflinger_service:service_manager find;
 allow platform_app app_api_service:service_manager find;
 allow platform_app system_api_service:service_manager find;
+allow platform_app property_socket:sock_file write;
+allow platform_app system_prop:property_service set

###On Nougat

  • system/sepolicy/platform_app.te
diff --git a/platform_app.te b/platform_app.te
index d4a27ad..08cd720 100644
--- a/platform_app.te
+++ b/platform_app.te
@@ -56,3 +56,5 @@ allow platform_app vr_manager_service:service_manager find;
 # Access to /data/preloads
 allow platform_app preloads_data_file:file r_file_perms;
 allow platform_app preloads_data_file:dir r_dir_perms;
+allow platform_app property_socket:sock_file write;
+allow platform_app system_prop:property_service set;


Hi Terry,

I’m focused on Android6 today. I’m quite sure I’m update that files, because during compilations I’m got some typo errors, what I’m fixed, if I’m makes update right (even I’m try recompiled all so: make clean; make -j4 otapackage) again.

The results is same, only have feeling is takes like 2-3 second, when windows is appear.
Just point, what i’m not mentioned, sorry for that. I’m not able controll the system by console in my both Android builds. Simply data are sent to terminal (LNX_RX/TX) but no response from system. Where khadas build I can normally controll the system. Can be that this issue?

today I’m add a log, from first start and second start.


Can you provider the android log and not kernel log for me?

$ adb connect IP_ADDR
$ adb shell logcat > logcat.txt

Thanks very much.


Need to add ; in the end otherwise it fails build with syntax error. Nonetheless, it didn’t help - after starting Android it’s system UI is stopped :worried:

Build Android failed

Thanks for your feedback. Can you provide the android log for me? Thanks!


Unfortunately I wasn’t able to connect to ADB via network…

Maybe by default device isn’t listening? I know in Lineage OS developer settings you need to explicitly enable ADB over network.

Any other way to grab log?

I couldn’t browse much as “System UI stopped” kept triggering :worried:

Also I noticed MAC address changed after my last image upload. Is it the same as with GeekBox - MAC address isn’t stable? Is there a way to burn it permanently?


Regarding the MAC address, you can refer the Duplicate MAC Addresses and Serial Numbers.

@Terry will follow other issues.


about ADB I’m try yesterday a lot, but I’m gave it up for Android6 and try today in fresh compilation with Android7

I can run ‘debugging mode’ in android6. Even I’m able to brings wifi on, so either I have in adb list device by network or usb I had unauthorized devices. (one with IP and second with 123456789ABCDEF) Non of the examples here not helps:

what I’m see, or guess is missing, when I’m enabled debugging mode is missing info about RSA keys.

then I’m even try (was hard :slight_smile: ) install the console program and run catlog from that. Unfortunately I’m not able to transfer file from VIM to host. Is missing either usb normal connections or I haven’t rights to write to USB stick/micro SD card.

and next point, log should be so short… in normal android i’m see log is around 800Kb, where is a few kB. So probably only chance is make “real” screenshots from cat the log text. I’m not really looks into, but can be there is something like missing partitions 8 on emmc? Because this what I’m saw it in log.

I would like try today Android 7, maybe will be not painful.


Would USB TTL output be sufficient?

I’ll setup the one I have from GeekBox :relaxed:


Looks like error might be here:

Full Kermit log here.

Notice mistype in here: comm=“ndroid.systemui” - maybe required rule is already but it fails due to typo (“ndroid.systemui” instead of “android.systemui”)?


I need the android printing log. Can you provide it for me? Thanks!
$ logcat


Impossible - ADB sees device as unauthorized and it is not possible to authorize it from device because UI doesn’t work :unamused:


Why can you got the kernel log? By serial?
Also you can get the android log by serial.
$ logcat


Yes, by serial (USB TTL). But how do I get Android log? I can’t type in Kermit window…


You can refer to Setup Serial Debugging Tool
Of course, you need to type ‘enter’ button on your keyboard to enter input mode
If you still don’t type in Kermit after doing that, you maybe need to check the connection of serial


Hello terry,

i have fully working USB-TTL connections, and I’m not able to type anything when I’m use image for android 6. Simply VIM not able to receive any character (I’m got data from VIM, isn’t accept any). Normally when I’m run your pre-recompiled, I can control vim that way. For that reason I’m try yesterday to do by internal console program to get the log.

In next hours I will try android 7, what I have same issues, maybe I have more luck to get the log. (console control isn’t working same way like in Android6). And what I’m for sure want to try is store whole image to try. but this will be later, if I have still same issue
with android 7


I’m very sorry for that and I forgot the serial debug issue. You need to refer to the post


Same story with me - kermit stops at:

And it doesn’t go until kvim# where typing in could be possible…


ok, heh, this read only flag is funny here… of course, i will start compilation again without it…