Help! Getting Titlebar on top of game with LGL Mod Menu (Android 14)

GamerBoi2020

Platinian
Hello,
Wondering if someone could please help me. My LGL Mod menu works fine on Android 14 but for some reason I am getting a big annoying title bar at the top of the screen (please see screenshot) and it only happens on Android 14. On my Android 10 device it doesn't happen. And the same apk of the game works fine on Android 14 (no title bar) if I don't inject the mod menu.

I tried just about everything mentioned here to get rid of it:



But when I make any of those modifications in styles.xml files I get a ton of errors when I compile my project in APKTool M.

I also tried adding this to androidmanifest.xml but it didn't help:

Code:
<activity android:name=".MainActivity"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen">
        </activity>

Any solutions/ideas?

Thanks in advance for any help
 

Attachments

  • title bar.jpg
    title bar.jpg
    186.5 KB · Views: 120
Last edited:
Solution
After a journey to hell and back I was finally able to solve this :lol:
I'm going to share my findings in the hopes that they help someone else who may possibly encounter this weird issue. I guess there's a weird bug between this game and the mod menu. Just a quick recap, as I previously mentioned the issue is that if I use:

Code:
invoke-static {p0}, Lcom/android/support/Main;->Start(Landroid/content/Context;)V

in the OnCreate of the game's main activity to request the "appear on top" permission, the mod menu does not appear neither on Android 10 nor on Android 14 (even though I am granting the "appear on top" permission when prompted). The only way to get the mod menu to appear is if I use:

Code:
invoke-static {p0}...
This is because you use invoke-static {p0}, Lcom/android/support/Main;->StartWithoutPermission(Landroid/content/Context;)V

To fix that you can add
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

<service android:name="com.android.support.Launcher" android:enabled="true"
android:exported="false" android:stopWithTask="true" />

In AndroidManifest.xml

and add this in UnityPlayerActivity
invoke-static {p0}, Lcom/android/support/Main;->Start(Landroid/content/Context;)V
 
Thanks for the response, but when I try that my game crashes when I try to launch it.
This is because you use invoke-static {p0}, Lcom/android/support/Main;->StartWithoutPermission(Landroid/content/Context;)V

To fix that you can add
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

<service android:name="com.android.support.Launcher" android:enabled="true"
android:exported="false" android:stopWithTask="true" />

In AndroidManifest.xml

and add this in UnityPlayerActivity
invoke-static {p0}, Lcom/android/support/Main;->Start(Landroid/content/Context;)V

Thanks for the response, but when I try that my game crashes when I try to launch it.
 
After a journey to hell and back I was finally able to solve this :lol:
I'm going to share my findings in the hopes that they help someone else who may possibly encounter this weird issue. I guess there's a weird bug between this game and the mod menu. Just a quick recap, as I previously mentioned the issue is that if I use:

Code:
invoke-static {p0}, Lcom/android/support/Main;->Start(Landroid/content/Context;)V

in the OnCreate of the game's main activity to request the "appear on top" permission, the mod menu does not appear neither on Android 10 nor on Android 14 (even though I am granting the "appear on top" permission when prompted). The only way to get the mod menu to appear is if I use:

Code:
invoke-static {p0}, Lcom/android/support/Main;->StartWithoutPermission(Landroid/content/Context;)V

in the game's main activity in order to force start it without requesting the "appear on top" permission. On Android 10 it works fine, but on Android 14 I get the annoying titlebar across the top of the game as shown in the screenshot above.

The solution/workaround:


1) I had to add this:

Code:
android:theme="@android:style/Theme.NoTitleBar">

in the <application tag of the compiled game's androidmanifest.xml file.

2) In MainActivity.java (Located here on my android device --> Android-Mod-Menu-3.2\app\src\main\java\com\android\support)

using AIDE CMODs, I uncommented the:

Code:
Main.StartWithoutPermission(this);

3) And finally, in the OnCreate of the game's main activity (most likely --> "com.unity3d.player.UnityPlayerActivity" if it's a Unity game), I added this:

Code:
invoke-static {p0}, Lcom/android/support/Main;->StartWithoutPermission(Landroid/content/Context;)V

And just like that the dreadful titlebar is forever gone! Only minor issue is the mod menu's toggle switches will all disappear as shown in the attached screenshot, but the menu's categories are perfectly clickable and functional, and this is a perfectly acceptable workaround, at least for me. So unless someone else feels like chiming in, this can be set to solved. Thank you.
 

Attachments

  • deadtrigger2.jpg
    deadtrigger2.jpg
    33 KB · Views: 35
Solution
And one last thing I forgot to mention is that I did not need to include those two entries in androidmanifest.xml:

1)

Code:
<service android:name="com.android.
        support.Launcher" android:enabled="true"
        android:exported="false"
        android:stopWithTask="true" />


2)

Code:
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
 
One more thing I discovered is if you get an error while compiling your project with APK TOOL M after making the androidmainfest.xml file's change mentioned above, you may need to delete this from underneath the <application tag in that file:
Code:
android:theme="@android:style/Theme.DeviceDefault.Light"
 
After a journey to hell and back I was finally able to solve this :lol:
I'm going to share my findings in the hopes that they help someone else who may possibly encounter this weird issue. I guess there's a weird bug between this game and the mod menu. Just a quick recap, as I previously mentioned the issue is that if I use:

Code:
invoke-static {p0}, Lcom/android/support/Main;->Start(Landroid/content/Context;)V

in the OnCreate of the game's main activity to request the "appear on top" permission, the mod menu does not appear neither on Android 10 nor on Android 14 (even though I am granting the "appear on top" permission when prompted). The only way to get the mod menu to appear is if I use:

Code:
invoke-static {p0}, Lcom/android/support/Main;->StartWithoutPermission(Landroid/content/Context;)V

in the game's main activity in order to force start it without requesting the "appear on top" permission. On Android 10 it works fine, but on Android 14 I get the annoying titlebar across the top of the game as shown in the screenshot above.

The solution/workaround:


1) I had to add this:

Code:
android:theme="@android:style/Theme.NoTitleBar">

in the <application tag of the compiled game's androidmanifest.xml file.

2) In MainActivity.java (Located here on my android device --> Android-Mod-Menu-3.2\app\src\main\java\com\android\support)

using AIDE CMODs, I uncommented the:

Code:
Main.StartWithoutPermission(this);

3) And finally, in the OnCreate of the game's main activity (most likely --> "com.unity3d.player.UnityPlayerActivity" if it's a Unity game), I added this:

Code:
invoke-static {p0}, Lcom/android/support/Main;->StartWithoutPermission(Landroid/content/Context;)V

And just like that the dreadful titlebar is forever gone! Only minor issue is the mod menu's toggle switches will all disappear as shown in the attached screenshot, but the menu's categories are perfectly clickable and functional, and this is a perfectly acceptable workaround, at least for me. So unless someone else feels like chiming in, this can be set to solved. Thank you.
Sounds like quite the journey, but glad you got it working. The titlebar issue was definitely a pain, and your solution should help others facing the same problem. Hopefully, the toggle switch issue doesn’t bother you too much. Thanks for sharing the fix
 
Sounds like quite the journey, but glad you got it working. The titlebar issue was definitely a pain, and your solution should help others facing the same problem. Hopefully, the toggle switch issue doesn’t bother you too much. Thanks for sharing the fix
Yeah it was pretty mind boggling to say the least. And it was one of those things that you just KNOW (while making the post to ask for help) that it's not the sort of thing you're going to get a lot of help with. It was a bit depressing it to be honest lol. It was working perfectly fine with every game update, and then suddenly an update came and that happened. The toggle switch thing is actually no biggy at all because of the toast message. The user can easily tell if the cheat has been activated or not. In fact I am looking at it as a fancy thing that may have been purposely implemented as a change from the toggle switch.:lol:.
 
Back
Top Bottom