[MOD] [GUIDE] SplitWindow for G2 stock KK roms

Search This thread

purpleraintoxicity

Senior Member
Feb 7, 2011
3,749
832
Jerusalem
This mod work very good on my d 802
But after flash the mod
I lost knock code when the screen off
Must turn it on .and the knock code works.
Is that normal or i made some mestakes.
Sorry for my bad english.

Try to do the follow:
Go to Dialer
Press 3845#*802#
Go to setting
Choose update touch firmware
Wait 2 sec and try again


I don't know why did it happened to yoy
Sent from my LG-D802 using Tapatalk
 

penser

Senior Member
Jan 17, 2013
619
112
On LG stock KK OTA should I use the G Pro 2 zip?

Sent from my LG-D800 using XDA Free mobile app
 

bobi1024

Member
Mar 4, 2012
17
2
Sofia
still got no answer on how can i trigger the splitwindow to work through LMT launcher, any idea?
I'm also trying to figure this out. I love LMT and I find LG splitwindow useful, but can't combine them both. For now, only the link click triggers the splitwindow, no luck with the back button longpress. I'll greatly appreciate any help on that matter.
 

Tambuyeye

Senior Member
Mar 28, 2008
119
23
Hurrah, i managed to get the mod working on stock kk 20b indian rom. Works perfectly fine.

THERE ARE 2 STYLES COMPILED BY ME:

1. G PRO2 STYLE (1ST 3 PICTURES)
2. G3 STYLE (4TH PICTURE)

THE ONLY DIFFERENCE BETWEEN THE 2 IS THE OUTER BORDER COLOR.



Thanks to @xdabbeb for the guide and @sotmax for the help

IF YOU LOOSE DATA OR EXPERIENCE CRASHES, BOOTLOOP, I AM NOT RESPONSIBLE. FLASH AT YOUR OWN RISK...PL MAKE BACKUP BEFORE FLASHING.

I HAVE FLASHED IT ON MY PHONE AND IT WORKS FLAWLESSLY



I dont know if this will work for everyone. I have created for my stock kk rom 20b indian. Please try and revert if it works....

DOWNLOAD GPRO2 STYLE

DOWNLOAD G3 STYLE

how do you get the multitasking options in the settings menu????
 
  • Like
Reactions: linjes

linjes

Senior Member
Sep 15, 2013
169
43
I'm also trying to figure this out. I love LMT and I find LG splitwindow useful, but can't combine them both. For now, only the link click triggers the splitwindow, no luck with the back button longpress. I'll greatly appreciate any help on that matter.

Anyone knows how this app was made
http://fs1.d-h.st/download/00090/J60/SplitViewLauncher.apk
I got it from the thread of the first split view port, but it doesn't work on this version (using paedus 7.7)
Opening the app is supposed to trigger split view to start

Sent from my LG-D802
 

markus4000

Senior Member
Oct 10, 2012
204
91
Berlin
Anyone knows how this app was made
http://fs1.d-h.st/download/00090/J60/SplitViewLauncher.apk
I got it from the thread of the first split view port, but it doesn't work on this version (using paedus 7.7)
Opening the app is supposed to trigger split view to start

Sent from my LG-D802
I decompiled it to Java code. Here is the interesting line:
Code:
sendBroadcast(new Intent("com.lge.splitwindow.LAUNCH"));
It's just an Intent broadcast.

Sadly I don't know how to intercept system intents that are probably sent directly to the dualwindow/splitwindow app or if it's even possible. I tried different things like:
com.lge.splitwindow.LAUNCH (the original, just to make sure)
com.lge.dualwindow.LAUNCH (although im pretty convinced this is wrong)
com.lge.intent.action.FLOATING_WINDOW_ENTER_LOWPRO FILE (because this showed up in adb logcat)
and variations of the first two.

I tried to get through the decompiled output of the dualwindowservice.apk but it seems to me that it's not complete or partly wrong. There are numerous intent strings and an extra string, but they are never created, just received and analyzed (or I just don't have enough understanding of the smali code). In my opinion there has to be another location where this Intent is created to start up the dual window app the correct way. It could be in the software buttons code, but I don't know if they are a dedicated app or not. There is also some library mentioned in the manifest file called "com.lge.zdi.splitwindow" maybe thats another spot to look out for.

Maybe there is some kind of extra missing to the original intent to make it complete, but as I said before, I can't find code where those intents are actually created and broadcasted, not just received, so it makes it a pretty impossible guessing game...
Other Strings I found are:
com.lge.settings.ACTION_DUAL_WINDOW
com.lge.intent.extra.SPLIT_WINDOW_STARTKEY
com.lge.intent.extra.SPLIT_WITH_DRAWER
com.lge.android.intent.action.SPLIT_WINDOW

I would try to see through the code for the software buttons, but I don't know how to do that as there is no app to decompile (or is there?). Can anybody help?

EDIT: I just realized that there is smali code in his app too, totally didn't notice that before :angel:
So I guess his app is somehow emulating parts of the dualwindowservice or something similar to get it to open the dualwindow app?
 
  • Like
Reactions: linjes

ajrd2000

New member
Apr 11, 2007
2
0
Barranquilla
Att D800 Android 4.4.2

I am going to try this APK in my ATT D800, It is upgrade to android 4.4.2 original att rom, now it is sim unlocked.

Somebody here have the same configuration working with this mod?

my finger want to press the star buttom on this apk.. answer me ..hurry please!!

best regards,
Andrew
 

Bwangster12

Senior Member
Jan 3, 2011
969
107
New York
I'd love to add the splitview to my VS980, but I'm hesitant to install a custom recovery. I had the black/gray lines on my old LG G2 and was able to get a replacement... but now I'm scared of the risk. I am rooted, but not sure if I'm willing to install a custom recovery and flash roms.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 40
    Sorry it took so long for me to write this up.

    Following these steps will allow you to add the full split window implementation from the GPro2 and G3 KK roms that for whatever reason LG decided to leave (mostly) out of the stock G2 4.4.x roms. This guide is geared more towards rom devs or people that are familiar with using smali/baksmali and doing minor dalvik/smali edits.


    Prerequisites:
    1. Get smali/baksmali v2.0.3
    2. Get a copy of the framework directory for the rom you're implementing this on
    3. Download the source files/zip linked below


    Quick notes on smali/baksmali usage:
    • If you're running baksmali on an odex your basic command to use for this guide is baksmali -a 19 -b -d <path/to/framework/dir> -o <path/to/baksmali/outdir> - x filename.odex
    • If you're working with an extracted classes.dex (i.e. from from roms that support art) it's just baksmali -a 19 -b -o <path/to/baksmali/outdir> classes.dex
    • The basic smali command to use for these purposes is smali -a 19 -o classes.dex <path/to/baksmali/outdir>


    Step 1:
    Baksmali telephony-common (from your framework dir) and find the following line in generated/ConfigBuildBase.smali:
    Code:
    sput-boolean v0, Lgenerated/ConfigBuildBase;->CAPP_SPLITWINDOW:Z

    and change the boolean to true like so:
    Code:
    sput-boolean v1, Lgenerated/ConfigBuildBase;->CAPP_SPLITWINDOW:Z

    Step 2:
    Smali that file back to a new classes.dex and zip it back into telephony-common.jar

    Step 3:
    Baksmali com.lge.frameworks and find the same line in generated/ConfigBuildBase.smali:
    Code:
    sput-boolean v0, Lgenerated/ConfigBuildBase;->CAPP_SPLITWINDOW:Z

    and change the boolean to true like so:
    Code:
    sput-boolean v1, Lgenerated/ConfigBuildBase;->CAPP_SPLITWINDOW:Z

    Step 4:
    Open up com/lge/loader/splitwindow/SplitWindowCreatorHelper.smali and add the following to your static fields declarations:
    Code:
    .field private static TAG:Ljava/lang/String;

    so that it will now appear as:
    Code:
    # static fields
    .field private static SPLITWINDOW_INSTANCE:Lcom/lge/loader/splitwindow/ISplitWindow;
    
    .field private static TAG:Ljava/lang/String;

    Step 5:
    In the same smali file a few lines down, you'll need to add the following to your direct methods:
    Code:
        const-string v0, "SplitWindowCreatorHelper"
    
        sput-object v0, Lcom/lge/loader/splitwindow/SplitWindowCreatorHelper;->TAG:Ljava/lang/String;

    so that it will now apprear as:
    Code:
        sput-object v0, Lcom/lge/loader/splitwindow/SplitWindowCreatorHelper;->SPLITWINDOW_INSTANCE:Lcom/lge/loader/splitwindow/ISplitWindow;
    
        const-string v0, "SplitWindowCreatorHelper"
    
        sput-object v0, Lcom/lge/loader/splitwindow/SplitWindowCreatorHelper;->TAG:Ljava/lang/String;
    
        return-void
    .end method

    Step 6:
    Again, in the same smali scroll all the way down as you'll need to add the following public method at the end of the file:
    * keep in mind you'll need to keep a blank line between the .end method above and this new method below

    Code:
    .method public static recoverService()Lcom/lge/loader/splitwindow/ISplitWindow$ISplitWindowPolicy;
        .registers 4
    
        const/4 v3, 0x0
    
        sget-object v1, Lcom/lge/loader/splitwindow/SplitWindowCreatorHelper;->TAG:Ljava/lang/String;
    
        const-string v2, "recoverService"
    
        invoke-static {v1, v2}, Landroid/util/Slog;->w(Ljava/lang/String;Ljava/lang/String;)I
    
        sget-object v1, Lcom/lge/loader/splitwindow/SplitWindowCreatorHelper;->SPLITWINDOW_INSTANCE:Lcom/lge/loader/splitwindow/ISplitWindow;
    
        if-eqz v1, :cond_20
    
        sget-object v1, Lcom/lge/loader/RuntimeLibraryLoader;->SPLIT_WINDOW:Ljava/lang/String;
    
        invoke-static {v1}, Lcom/lge/loader/RuntimeLibraryLoader;->getCreator(Ljava/lang/String;)Lcom/lge/loader/InstanceCreator;
    
        move-result-object v0
    
        if-eqz v0, :cond_1e
    
        invoke-virtual {v0, v3}, Lcom/lge/loader/InstanceCreator;->setDefaultInstance(Ljava/lang/Object;)V
    
        sget-object v1, Lcom/lge/loader/splitwindow/SplitWindowCreatorHelper;->TAG:Ljava/lang/String;
    
        const-string v2, "Set default InstanceCreator as null to make NEW instance"
    
        invoke-static {v1, v2}, Landroid/util/Slog;->v(Ljava/lang/String;Ljava/lang/String;)I
    
        :cond_1e
        sput-object v3, Lcom/lge/loader/splitwindow/SplitWindowCreatorHelper;->SPLITWINDOW_INSTANCE:Lcom/lge/loader/splitwindow/ISplitWindow;
    
        :cond_20
        invoke-static {}, Lcom/lge/loader/splitwindow/SplitWindowCreatorHelper;->getPolicyService()Lcom/lge/loader/splitwindow/ISplitWindow$ISplitWindowPolicy;
    
        move-result-object v1
    
        return-object v1
    .end method

    Step 7:
    Open up com/lge/loader/splitwindow/ISplitWindow$ISplitWindowPolicy.smali and add the following public method after the getMinimumScreenSize public method (again, minding your blank lines)
    Code:
    .method public abstract getRecentStackBoxes()Ljava/util/List;
        .annotation system Ldalvik/annotation/Signature;
            value = {
                "()",
                "Ljava/util/List",
                "<",
                "Landroid/app/ActivityManager$StackBoxInfo;",
                ">;"
            }
        .end annotation
    .end method

    Step 8:
    Smali all of that to a new classes.dex and zip it back into com.lge.frameworks.jar

    Step 9:
    Put your newly modified com.lge.frameworks.jar and telephony-common.jar into place (I also re-odex them and copy the original signatures over)

    Step 10:
    Put all of the files contained in the download provided below into their respective directories with the proper permissions (644 all around)

    Step 11:
    Add the following two lines to your build.prop
    Code:
    ro.lge.capp_splitwindow=true
    persist.splitwindow.support_all=true
    * if you don't want all apps showing up in the selection window, change support_all to false

    That's it...you should be good to go. There's always the possibility that your framework will be slightly different, but that's the general idea and you should be able to make small changes to adjust to your particular variant



    Feel free to include this in your roms (that's why I posted it). Just give credit in your OP.

    Downloads:
    SplitWindow Files - G Pro 2
    SplitWindow Files - G3

    The only real difference between them is the color of the outline box
    9
    UPDATE Working splitview G3 STLYE AND GPRO2 STYLE

    Hurrah, i managed to get the mod working on stock kk 20b indian rom. Works perfectly fine.

    THERE ARE 2 STYLES COMPILED BY ME:

    1. G PRO2 STYLE (1ST 3 PICTURES)
    2. G3 STYLE (4TH PICTURE)

    THE ONLY DIFFERENCE BETWEEN THE 2 IS THE OUTER BORDER COLOR.



    Thanks to @xdabbeb for the guide and @sotmax for the help

    IF YOU LOOSE DATA OR EXPERIENCE CRASHES, BOOTLOOP, I AM NOT RESPONSIBLE. FLASH AT YOUR OWN RISK...PL MAKE BACKUP BEFORE FLASHING.

    I HAVE FLASHED IT ON MY PHONE AND IT WORKS FLAWLESSLY



    I dont know if this will work for everyone. I have created for my stock kk rom 20b indian. Please try and revert if it works....

    DOWNLOAD GPRO2 STYLE

    DOWNLOAD G3 STYLE
    8
    Toolkit for automated creation of SplitWindow mod

    Toolkit for automated creation of SplitWindow mod
    (provided 'AS IS' without any guarantee)

    Requirements:
    • OS Linux
    • LG G2, connected to PC, with USB debugging enabled, authorized (the 'adb devices' command must print out `device` instead of `unauthorized`).
    • Backup of '/system' for emergency. In fact, the first script does not write anything to the phone at all, the second one restores all modified files, but 'just in case'.

    Description:
    This toolset can make SplitWindow mod for any LG G2 devices. You just need to connect the phone to PC, make sure if USB debugging is enabled and device is authorized, and run 2 included scripts one by another.

    The first script 'step_1' does the following:
    1. Determines BOOTCLASSPATH and store it to output/bcp.env file for furfer use.
    2. Downloads all necessary files from the phone if it was not done before.
    3. Baksmali telephony-common.jar and com.lge.frameworks.jar.
    4. Patches them.
    5. Compiles them back.
    6. Packs them as output/splitwindow_mod_##_deodexed.zip files for GPro2 and G3 themes. These files can be installed via recovery mode to DEODEXED ROM's ONLY!!!
    When the script finished you will have deodexed patched files. They can work only on deodexed ROMs only. If your ROM is odexed (the most of stock ROMs are odexed) you have to run 'step_2' script.
    It will do:
    1. Check if BOOTCLASSPATH was previously stored to output/bcp.env file on step_1 task.
    2. Reboot the phone into recovery mode if it's not in recovery already.
    3. Mount /system in rw mode.
    4. Upload ODEX tool.
    5. Upload deodexed telephony-common.jar and com.lge.frameworks.jar files.
    6. ODEX them and copy old signatures from previous odex files.
    7. Download new odex files back to PC.
    8. Restore modified files on the phone, so they will not be affected by the process.
    9. Pack them as to output/splitwindow_mod_##_odexed.zip files for GPro2 and G3 themes. These files are suitable to install via recovery to ODEXED ROMs ONLY!!!
    After that you should look for *_odexed.zip files in the output directory, upload one of them to the phone and install it via standard procedure using recovery mode. DO NOT FORGET MAKE BACKUPs of '/system' partition before installing!!!

    Reboot your phone and check the section "Multitasking" in phone settings to enable new functionality. After that long press "Back" button and enjoy. :)

    Special credits to:
    xdabbeb for his guide how to make this mod - http://xdaforums.com/showthread.php?t=2792938
    roma21515 for sample port to LS980 - http://4pda.ru/forum/index.php?showtopic=530354&view=findpost&p=32578750
    alkhafaf for the guide how to odex - http://xdaforums.com/showthread.php?t=1879128

    Download:
    5
    In addition to 'Toolkit for automated creation of SplitWindow MOD' (I posted earlier in this thread) I've developed the APK which does the same thing. so PC is not needed anymore for creation of this MOD. All necessary actions can be executed right on the device.

    Please visit the thread "[MOD] [APK] SplitWindow MOD Maker for G2 stock [KK] roms".

    I think it's great that you're trying to help, but for future reference you should ask for permission for something like this first (which you didn't) and though I'm not sure why a new thread was needed in the first place it certainly isn't good etiquette to post in someone else's just to redirect people to yours.
    4
    There would not be a feasible way to make this mod work via an apk installer without serious risk as it requires direct replacement of core framework files. This is a pretty low-level mod so if you want it, you'll have to be rooted with a custom recovery. I do not want people to put their phones into an unusable state by attempting to do this without a recovery. It's just too risky.

    As for making flashable zips: this requires modification of framework that is variant/firmware specific and would need to be odexed in most situations (as there are few if any deodexed stock LG roms). This means one would need to create a large number of zips to cover every possible variant/firmware combination. A few devs had asked me to write up a guide detailing how I accomplished this so that they could incorporate it into their own roms. I had already responded to one of rastigo's PMs regarding making flashable zips. I may consider making a couple for the more popular bases (F320K21p & D80220D), but this really should be handled by your individual variant/rom devs. If they run into problems they can get in touch with me and I will help them as soon as I am able to.

    I realize that this is a fairly involved guide/mod with multiple chances to make small mistakes, but when followed exactly it does work. There has even been an individual with a LG GPad who followed the guide and got it working.