Junsun V1 - Rescue the status bar

Search This thread

demolite

Member
Aug 8, 2022
31
11
I deactivated the activity com.ts.MainUI/com.ts.MainActivity.
--> no change in behavior of statusbar

Seen there was a process com.ts.MainUI.Overlay running but I wasn't able to find it in code base of MainUI

I tested this and you are correct. Also disabled all com.ts. processes and no change.

Disassembled MtkSystemUI, CarClient..., found nothing.

Went through build.prop, nothing (here the navigation bar is hidden permanently).

And also the CLOSE_SYSTEM_DIALOGS seems to be just a coincidence.
 

TorstenH

Senior Member
Feb 20, 2021
779
176
I think it's implemented in one of the /system/framework files but I can't decompile the vdex files even I found a vdex extractor tool.
 

demolite

Member
Aug 8, 2022
31
11
Found in /system/framework/framework.jar/android/app/Activity

public void onWindowAttributesChanged(WindowManager.LayoutParams params) {
View decor;
params.flags &= -8193;
int myDirect = SystemProperties.getInt("forfan.force_direct", 1);
if (myDirect == 1 || myDirect == 3) {
String packageName = getPackageName();
if (!packageName.contains("com.ts.") && !packageName.contains("com.autochips.") && !packageName.contains("com.forfan.") && !packageName.contains("com.tengshi.") && !packageName.contains("com.android.") && !packageName.contains("com.google.") && !packageName.equals("com.xrross.xlauncher") && !packageName.equals("com.ex.dabplayer.pad") && !packageName.equals("com.estrongs.android.pop")) {
params.flags |= 1024;
}
}
if (this.mParent == null && (decor = this.mDecor) != null && decor.getParent() != null) {
getWindowManager().updateViewLayout(decor, params);
ContentCaptureManager contentCaptureManager = this.mContentCaptureManager;
if (contentCaptureManager != null) {
contentCaptureManager.updateWindowAttributes(params);
}
}
}
 
  • Like
Reactions: TorstenH

TorstenH

Senior Member
Feb 20, 2021
779
176
Found in /system/framework/framework.jar/android/app/Activity

public void onWindowAttributesChanged(WindowManager.LayoutParams params) {
View decor;
params.flags &= -8193;
int myDirect = SystemProperties.getInt("forfan.force_direct", 1);
if (myDirect == 1 || myDirect == 3) {
String packageName = getPackageName();
if (!packageName.contains("com.ts.") && !packageName.contains("com.autochips.") && !packageName.contains("com.forfan.") && !packageName.contains("com.tengshi.") && !packageName.contains("com.android.") && !packageName.contains("com.google.") && !packageName.equals("com.xrross.xlauncher") && !packageName.equals("com.ex.dabplayer.pad") && !packageName.equals("com.estrongs.android.pop")) {
params.flags |= 1024;
}
}
if (this.mParent == null && (decor = this.mDecor) != null && decor.getParent() != null) {
getWindowManager().updateViewLayout(decor, params);
ContentCaptureManager contentCaptureManager = this.mContentCaptureManager;
if (contentCaptureManager != null) {
contentCaptureManager.updateWindowAttributes(params);
}
}
}
That's it! And it clarifies why on top of my test app the statusbar is shown.
 

TorstenH

Senior Member
Feb 20, 2021
779
176
I changed the property and observed the following behavior:

- no change before reboot
- after reboot:
-- property reset by system
-- but if I then change the property again new windows starts with status bar on top.


I just used a piece of Java code to set the property. Maybe next test should be to add the entry
forfan.force_direct=0
into /vendor/build.prop file
 
Last edited:

demolite

Member
Aug 8, 2022
31
11
It should be sufficient to set the parameter forfan.force_direct to 0.

Flag 1024 is R.attr.windowFullscreen.

I changed the property and observed the following behavior:

- no change before reboot
- after reboot:
-- property reset by system
-- but if I then change the property again new windows starts with status bar on top.


I just used a piece of Java code to set the property. Maybe next test should be to add the entry
forfan.force_direct=0
into /vendor/build.prop file
I was about to write the same. But it can work without reboot, I had to restart only launcher.

There seems to be no systemproperty by that name, atleast according to adb getprop. Have to add it to a prop file like you said.
 

TorstenH

Senior Member
Feb 20, 2021
779
176
I was about to write the same. But it can work without reboot, I had to restart only launcher.

There seems to be no systemproperty by that name, atleast according to adb getprop. Have to add it to a prop file like you said.
What happens after system restart? Do you have to set the property again?
 

demolite

Member
Aug 8, 2022
31
11
It works! Great! Looks like this one is solved. :)
IMG_20220812_135003__01.jpg


Now to get rid of that pesky MainTask system notification...
 
  • Like
Reactions: TorstenH

demolite

Member
Aug 8, 2022
31
11
No, theres a blank notification in the notification shade from "MainTask", which cannot be silenced because it's a system level notification. This also frequently pops up an icon on the status bar.
 

TorstenH

Senior Member
Feb 20, 2021
779
176
No, theres a blank notification in the notification shade from "MainTask", which cannot be silenced because it's a system level notification. This also frequently pops up an icon on the status bar.
Maybe...
 

TorstenH

Senior Member
Feb 20, 2021
779
176
No, theres a blank notification in the notification shade from "MainTask", which cannot be silenced because it's a system level notification. This also frequently pops up an icon on the status bar.
I checked that and I don't see such a notification.
Are you using latest firmware from April 2022?
I disabled this Junsun security app. Maybe the notification comes from this app?
 

demolite

Member
Aug 8, 2022
31
11
Happy to be of help!
I checked that and I don't see such a notification.
Are you using latest firmware from April 2022?
I disabled this Junsun security app. Maybe the notification comes from this app?

It's still on what it shipped with, not the latest firmware. All non-essential Junsun apps removed. I'll try what happens with the newest firmware. There are still some tweaks (bigger font for clock, extra can data on statusbar) that I need to make, so might as well be on the newest versions.
 

TorstenH

Senior Member
Feb 20, 2021
779
176
Happy to be of help!


It's still on what it shipped with, not the latest firmware. All non-essential Junsun apps removed. I'll try what happens with the newest firmware. There are still some tweaks (bigger font for clock, extra can data on statusbar) that I need to make, so might as well be on the newest versions.
I think this has to be found in MtkSystemUI.apk. I'm not a fan of replacing system APKs by adb because it's just pain after a system update. Maybe we will find another way to archive this.
This sounds interesting in this context:

 
  • Like
Reactions: demolite

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    There is a workaround.

    I use old app "Status Bar Keeper". It's not on Play Store anymore, so be careful when downloading from 3rd party sources. Best way is to always disassemble and check for malicious code.

    There are some problems though:

    - In some apps status bar covers some functions (BlackPlayer for example)

    - Google Play Store, you cannot install apps without first setting status bar "OFF" (Google security feature to not draw over the store display)

    I'm also looking into the original software to find a real solution, but haven't found anything yet. I also tried setting immersive mode settings through ADB, but they don't seem to do anything.
    1
    First thank you for your feedback because in meantime I thought I'm the only one who wants to have the statusbar visible.

    I think you're talking about this app:
    IMG_20220809_142532.jpg

    I'll give it a try. Looks like the app is showing a window with negative size and specific layout parameters to make the status bar visible.

    I tried to set immersive mode and decompiled several apps without success.
    1
    We are very few, 99,9% of search results and android documentation concentrate on hiding the status bar.

    That is the app I am talking about. I want to have the clock shown always, and also I get oudoor temperature through can to show on the status bar.

    I will keep working on this and keep you posted.
    1
    I created a hello wold application with package name com.ts.whatever

    The statusbar is visible so the head unit decides, based on the package name (starting with com.ts) of the foreground app, to show/hide the statusbar.

    IMG_20220810_080233.jpg
    1
    Yes, adb in superuser mode. And like you said Google apps seem to be also on the list. I have yet to dump all system files.