How to activate status & nav bars on source?

How to activate status & nav bars on mmalow & nougat source?

The Mmallow :

  1. git rebase framework/base
$ cd frameworks/base
$ git remote add github git@github.com:khadas/android_frameworks_base.git
$ git fetch github Vim
$ git rebase e88a0ae7c0f54acd80de8e274beca4e1f691404a
  1. git rebase device/khadas
$ cd device/khadas
$ git remote add github git@github.com:khadas/android_device_khadas
$ git fetch github Vim
$ git rebase 949f25a21b4744d185badd8bea3cd7d829fdb8b8
  1. git rebase packages/apps/Settings
$ cd packages/app/Settings
$ git remote add github git@github.com:khadas/android_packages_apps_Settings
$ git fetch github Vim
$ git rebase 027aa4f3dd81b6084dda147030fcd0ddcac5201c

Notice:
After do that , You need to follow below steps to build update image

$ cd <path-your-project>
$ source build/envsetup.sh
$ lunch <target>
$ make installclean -jN
$ make otapackage -jN

If all goes well , You can enter the menu ‘Settings->Display->control status bar’ and control the status bar

1 Like

Is it normal log?

davemf@ubuntu:~/project/khadas/mmallow$ cd frameworks/base
davemf@ubuntu:~/project/khadas/mmallow/frameworks/base$ git remote add github git@github.com:khadas/android_frameworks_base.git
fatal: remote github already exists.
davemf@ubuntu:~/project/khadas/mmallow/frameworks/base$ git fetch github Vim
remote: Counting objects: 97, done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 97 (delta 67), reused 97 (delta 67), pack-reused 0
Unpacking objects: 100% (97/97), done.
From GitHub - khadas/android_frameworks_base

  • branch Vim → FETCH_HEAD
    ca936b3…f34e201 Vim → github/Vim
    davemf@ubuntu:~/project/khadas/mmallow/frameworks/base$
    davemf@ubuntu:~/project/khadas/mmallow/frameworks/base$
    davemf@ubuntu:~/project/khadas/mmallow/frameworks/base$
    davemf@ubuntu:~/project/khadas/mmallow/frameworks/base$ git rebase e88a0ae7c0f54acd80de8e274beca4e1f691404a
    First, rewinding head to replay your work on top of it…
    Fast-forwarded HEAD to e88a0ae7c0f54acd80de8e274beca4e1f691404a.
    davemf@ubuntu:~/project/khadas/mmallow/frameworks/base$
    davemf@ubuntu:~/project/khadas/mmallow/frameworks/base$
    davemf@ubuntu:~/project/khadas/mmallow$
    davemf@ubuntu:~/project/khadas/mmallow$
    davemf@ubuntu:~/project/khadas/mmallow$ cd device/khadas
    davemf@ubuntu:~/project/khadas/mmallow/device/khadas$ git remote add github git@github.com:khadas/android_device_khadas
    fatal: remote github already exists.
    davemf@ubuntu:~/project/khadas/mmallow/device/khadas$
    davemf@ubuntu:~/project/khadas/mmallow/device/khadas$
    davemf@ubuntu:~/project/khadas/mmallow/device/khadas$ git fetch github Vim
    remote: Counting objects: 35, done.
    remote: Total 35 (delta 11), reused 11 (delta 11), pack-reused 24
    Unpacking objects: 100% (35/35), done.
    From https://github.com/khadas/android_device_khadas
  • branch Vim → FETCH_HEAD
    30ccf6a…949f25a Vim → github/Vim
    davemf@ubuntu:~/project/khadas/mmallow/device/khadas$ git rebase 949f25a21b4744d185badd8bea3cd7d829fdb8b8
    Cannot rebase: You have unstaged changes.
    Please commit or stash them.
    davemf@ubuntu:~/project/khadas/mmallow/device/khadas$
    davemf@ubuntu:~/project/khadas/mmallow/device/khadas$ cd …
    davemf@ubuntu:~/project/khadas/mmallow/device$ cd …
    davemf@ubuntu:~/project/khadas/mmallow$ cd packages/app/Settings
    bash: cd: packages/app/Settings: No such file or directory
    davemf@ubuntu:~/project/khadas/mmallow$ cd packages/ apps /Settings
    davemf@ubuntu:~/project/khadas/mmallow/packages/apps/Settings$
    davemf@ubuntu:~/project/khadas/mmallow/packages/apps/Settings$
    davemf@ubuntu:~/project/khadas/mmallow/packages/apps/Settings$ git remote add github git@github.com:khadas/android_packages_app_Settings
    fatal: remote github already exists.
    davemf@ubuntu:~/project/khadas/mmallow/packages/apps/Settings$ git fetch github Vim
    remote: Counting objects: 33, done.
    remote: Compressing objects: 100% (27/27), done.
    remote: Total 33 (delta 10), reused 0 (delta 0), pack-reused 0
    Unpacking objects: 100% (33/33), done.
    From GitHub - khadas/android_packages_apps_Settings
  • branch Vim → FETCH_HEAD
    399422a…027aa4f Vim → github/Vim
    davemf@ubuntu:~/project/khadas/mmallow/packages/apps/Settings$ git rebase 027aa4f3dd81b6084dda147030fcd0ddcac5201c
    First, rewinding head to replay your work on top of it…
    Fast-forwarded HEAD to 027aa4f3dd81b6084dda147030fcd0ddcac5201c.
    davemf@ubuntu:~/project/khadas/mmallow/packages/apps/Settings$

The git ‘device/khadas’ has problem

What to do with this git ‘device/khadas’?
Thanks

PS: May be I copy this file kvim/preinstall/Aptoide.apk on desktop and then copy on source?

You can modify the file 'device/khadas/kvim/overlay/frameworks/base/packages/SystemUI/res/values/config.xml’
by manually.

-    <string name="config_statusBarComponent" translatable="false">com.android.systemui.statusbar.tv.TvStatusBar</string>
+    <string name="config_statusBarComponent" translatable="false">com.android.systemui.statusbar.phone.PhoneStatusBar</string>
2 Likes

Ok, I’ll do it.
Please tell, this is instruction for Mmallow only?

Yes, This is only for mmallow

Sloved.
Mmallow has status and nav bars.


How to add it on Nougat???

It is most the same as Mmallow and you can have a try basing on the commit from Mmallow

Ok, I’ll try it.
Thanks!

Hi,
after building Mmallow (everything looks good), the SystemUI has stopped after set “Show … statusbar”.
The relevant part of log:
05-26 08:39:09.582 5098 5098 D AndroidRuntime: Shutting down VM
05-26 08:39:09.582 5098 5098 E AndroidRuntime: FATAL EXCEPTION: main
05-26 08:39:09.582 5098 5098 E AndroidRuntime: Process: com.android.systemui, PID: 5098
05-26 08:39:09.582 5098 5098 E AndroidRuntime: java.lang.RuntimeException: failed to set system property
05-26 08:39:09.582 5098 5098 E AndroidRuntime: at android.os.SystemProperties.native_set(Native Method)
05-26 08:39:09.582 5098 5098 E AndroidRuntime: at android.os.SystemProperties.set(SystemProperties.java:130)
05-26 08:39:09.582 5098 5098 E AndroidRuntime: at com.android.systemui.statusbar.phone.PhoneStatusBar.addUpperBar(PhoneStatusBar.java:1172)
05-26 08:39:09.582 5098 5098 E AndroidRuntime: at com.android.systemui.statusbar.CommandQueue$H.handleMessage(CommandQueue.java:449)
05-26 08:39:09.582 5098 5098 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
05-26 08:39:09.582 5098 5098 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
05-26 08:39:09.582 5098 5098 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5422)
05-26 08:39:09.582 5098 5098 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
05-26 08:39:09.582 5098 5098 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
05-26 08:39:09.582 5098 5098 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
05-26 08:39:09.584 4035 4212 W ActivityManager: Process com.android.systemui has crashed too many times: killing!
05-26 08:39:09.588 3748 4087 D audio_hw_primary: start_output_stream(adev->out_device=0x2, adev->mode=0 sample rate=48000)
05-26 08:39:09.588 3748 4087 D audio_hw_primary: select_devices(mode=0, out_device=0x2)
05-26 08:39:09.588 3748 4087 D audio_hw_primary: select_devices : hs=0 , hp=0, sp=2, hdmi=0x0,earpiece=0x0
05-26 08:39:09.588 3748 4087 D audio_hw_primary: select_devices : in_device(0x4), mic_in(0x4), headset_mic(0)
05-26 08:39:09.588 3748 4087 D audio_hw_primary: *start_output_stream, open card(0) port(0)
05-26 08:39:09.589 3748 4087 I audio_hw_primary: device pcm 0xf1d14380
05-26 08:39:09.589 3748 4087 D audio_hw_primary: channels=2—format=0—period_count4—period_size1024—rate=48000—
05-26 08:39:09.589 3748 4087 I audio_hw_primary: store out (0xf49a3000) to index 0
05-26 08:39:09.589 3748 4087 I audio_hw_primary: to enable same source,need reset alsa,type 0,same source flag 0
05-26 08:39:09.710 4035 5025 I OpenGLRenderer: Initialized EGL, version 1.4
05-26 08:39:09.572 5098 5098 W ndroid.systemui: type=1400 audit(0.0:7): avc: denied { write } for name=“property_service” dev=“tmpfs” ino=9487 scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0

What i’m doing wrong?
Thanks

You need to update the source code ‘framework/base’ again.

$ cd frameworks/base
$ git remote add github git@github.com:khadas/android_frameworks_base.git
$ git fetch github Vim
$ git rebase e88a0ae7c0f54acd80de8e274beca4e1f691404a

Thanks terry,
but right after boot: "Unfortunately, System UI has stopped."
adb logcat don’t work either. :frowning:

After do that , You need to follow below steps to build update image

$ cd <path-your-project>
$ source build/envsetup.sh
$ lunch <target>
$ make installclean -jN
$ make otapackage -jN

Another,Did you lunch the kvim-userdebug-32? You can have a try.

It works with lunch kvim-userdebug-32.
Many thanks

Hi, terry!

How to activate “Show the upper statusbar” = on and “Show the bottom status” = on by default on source?

Thank you!

You need to modify the file device/khadas/common/core_amlogic.mk
Have a try.
Thanks

diff --git a/common/core_amlogic.mk b/common/core_amlogic.mk
index 3295411..6424e11 100755
--- a/common/core_amlogic.mk
+++ b/common/core_amlogic.mk
@@ -324,6 +324,10 @@ PRODUCT_PACKAGES += \
 PRODUCT_PACKAGES += \
        FactoryTest
 
+PRODUCT_PROPERTY_OVERRIDES += \
+       persist.sys.status.bar.bottom=true \
+       persist.sys.status.bar.upper=true
+
2 Likes

In Android Pie, how to do this.
I looked for this but there is not those properties available there.

For VIM1 board on Android Pie, you can refer to following this.

diff --git a/kvim/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/kvim/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
index a64ad1d..c010e50 100644
--- a/kvim/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
+++ b/kvim/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
@@ -28,4 +28,6 @@
     <bool name="def_user_setup_complete">true</bool>
     <bool name="def_device_provisioned">true</bool>
     <bool name="def_install_non_market_apps">true</bool>
+    <integer name="def_show_upper_statusbar">0</integer>
+    <integer name="def_show_bottom_statusbar">0</integer>
 </resources>