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

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…

What exactly are you going to modify?

follow post what Terry mentioned, with that modifications

  1. $ cd ~/khadas/mmallow
  2. $ source build/envsetup.sh
  3. $ lunch kvim-userdebug-64
  4. $ make -j4 otapackage

“problem is” that console is working and suprisely, system ui windows is disaapear too… I will try that under Android 6 now… (so lunch kvim-userdebug-32 instead)

so all is about that userdebug mode? :open_mouth:

ok, so I can confirm, that if I run compilations as userdebug, with “system ui has stopped” issues is gone and linux console is accesible and controlable. This is valid for Android 6 and Android 7.

so sorry, that I’m gave up that way, I have something else to do. I’m ok for sure with this debug image, what ever is means.

For 32bit compilations I follows the doc, just

cd ~/project/khadas/mmallow
$ source build/envsetup.sh
$ lunch kvim-userdebug-32
$ make -jN otapackage

for 64bit system I have issues with not enought host memory (limit JDK to use only 4GB), so I need that, first

export JACK_SERVER_VM_ARGUMENTS="-Xmx4g"
./prebuilts/sdk/tools/jack-admin kill-server
./prebuilts/sdk/tools/jack-admin start-server

and than I can do compilations, similary like

source ./build/envsetup.sh
lunch kvim-userdebug-64
make -j4 otapackage

hope is helps Gytis and others… that userdebug helps me.
note: Obviously needs to be add these rule updates, atleast I’m add for compilation

1 Like

Before rebuilding did you include rule updates that @Terry provided?

I did rebuild Nougat without those updates just in userdebug so it still fails on “system ui” error, now rebuilding with those updates.

good point,
Android 6 with the rule-update, (but because I’m not rollout changes back)
Android 7 without (because even I’m add missing semicollon, I have still some syntax error, so rollout all changes back)

With rules:

[quote]allow platform_app property_socket:sock_file write;
allow platform_app system_prop:property_service set;[/quote]
added to system/sepolicy/platform_app.te and using lunch kvim-userdebug-64 instead of lunch kvim-user-64 it finally works - no system ui failed error :smiley:

Thanks @Terry and @TomasFilip :slight_smile:

I have the same issue using nougat, but i can’t find these files, using root browser.

I have enabled hidden files, but can’t find sepolicy file under system folder.

It’s not on device, look it up in sources before you build.

I didn’t build anything, i receive this error on Nougat build.

Quite simply, the main reason for this problem on Android devices is that the application you are developing is not compatible with Android. After deleting this application, the system ui has stopped problem should be solved. After uninstalling, if the issue is still not resolved, it will be helpful to enter safe mode.