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

Search This thread

somboons

Senior Member
Apr 25, 2011
3,183
4,477
Bangkok
can anyone guide me for re-odex com.lge.frameworks.jar,telephony-common.jar ? I stuck on step9.

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)


---------- Post added at 05:59 PM ---------- Previous post was at 05:33 PM ----------

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. :)

Cpecial 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:
Can you guide re-odex .jar in windows?
I stuck step 9?
 

Claudiu678

Senior Member
Dec 29, 2011
118
14
Frankfurt a.M.(DE) / Deva(RO)
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. :)

Cpecial 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:

Nice work, apreciate it, but im a newbie, so... :(
-> I am using 380 dpi. Can this afect the mod?
 
Last edited:

davidang

Senior Member
Apr 2, 2012
474
134
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. :)

Cpecial 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:
mate,can we have a windows version?
 

purpleraintoxicity

Senior Member
Feb 7, 2011
3,749
832
Jerusalem
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. :)

Cpecial 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:

Finally someone that making Linux scripts.

Sent from my LG-D802 using Tapatalk
 

xdabbeb

Inactive Recognized Developer
Sep 10, 2010
1,248
7,257
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.
 

rastigo

Senior Member
Apr 28, 2013
953
1,185
Pune
I totally agree with xdabbeb.he made the guide which none could and we are so glad to have him. Things like these should be taken very seriously.even though the intention was good the outcome is discouraging so ppl take his permission before doing any such work @xdabbeb excuse him this time,I m sure his intentions were good.you are a great developer.we love you m8

Sent from my LG-D802 using XDA Premium 4 mobile app
 

basemhanafy

Member
May 4, 2007
35
4
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.
 

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.