Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,811,995 Members 46,948 Now Online
XDA Developers Android and Mobile Development Forum

[MOD][GUIDE][4.2.2 FLEX BASED] Show Extended Kernel Info

Tip us?
 
pendroz
Old
(Last edited by pendroz; 22nd February 2014 at 05:53 PM.)
#1  
pendroz's Avatar
Senior Member - OP
Thanks Meter 4,119
Posts: 1,399
Join Date: Jun 2012
Location: Istanbul

 
DONATE TO ME
Default [MOD][GUIDE][4.2.2 FLEX BASED] Show Extended Kernel Info

Show Extended Kernel Info



All information, follow these instructions !

Required tools

* Java
* SDK
* Notepad ++ ( Or another application )
* Deodexed LGSettings.apk
* Winrar or 7Zip or Winzip
* Baksmali/Smali Manager
* Extract the "LGSettings.apk" from your rom /system/app/

PART 1

* Compile clasess.dex file ( Baksmali/Smali Tool )

* Navigate to ....\smali\com\android\settings

* Open DeviceInfoSettings.smali with notepad++ and add the following lines after that close and save the changes.

- Required line

Code:
.method public static formatKernelVersion(Ljava/lang/String;)Ljava/lang/String;
    .locals 5
    .parameter

    .prologue
    const/4 v4, 0x1

    .line 858
    const-string v0, "Linux version (\\S+) \\((\\S+?)\\) (?:\\(gcc.+? \\)) (#\\d+) (?:.*?)?((Sun|Mon|Tue|Wed|Thu|Fri|Sat).+)"

    .line 866
    const-string v0, "Linux version (\\S+) \\((\\S+?)\\) (?:\\(gcc.+? \\)) (#\\d+) (?:.*?)?((Sun|Mon|Tue|Wed|Thu|Fri|Sat).+)"

    invoke-static {v0}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;

    move-result-object v0

    invoke-virtual {v0, p0}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;

    move-result-object v1

    .line 867
    invoke-virtual {v1}, Ljava/util/regex/Matcher;->matches()Z

    move-result v0

    if-nez v0, :cond_1

    .line 868
    const-string v0, "aboutphone # DeviceInfoSettings"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Regex did not match on /proc/version: "


    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;


    move-result-object v1


    invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 869
    const-string v0, "Unavailable"

    .line 899
    :cond_0
    :goto_0
    return-object v0

    .line 870
    :cond_1

    invoke-virtual {v1}, Ljava/util/regex/Matcher;->groupCount()I

    move-result v0

    const/4 v2, 0x4

    if-ge v0, v2, :cond_2

    .line 871
    const-string v0, "aboutphone # DeviceInfoSettings"


    new-instance v2, Ljava/lang/StringBuilder;


    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V


    const-string v3, "Regex match on /proc/version only returned "


    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;


    move-result-object v2


    invoke-virtual {v1}, Ljava/util/regex/Matcher;->groupCount()I

    move-result v1

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " groups"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 873
    const-string v0, "Unavailable"

    goto :goto_0

    .line 882
    :cond_2
    invoke-virtual {v1, v4}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;

    move-result-object v0



    if-nez v0, :cond_3


    .line 883
    const-string v0, "Unavailable"


    goto :goto_0


    .line 885
    :cond_3
    new-instance v0, Ljava/lang/StringBuilder;


    invoke-virtual {v1, v4}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;


    move-result-object v2


    invoke-direct {v0, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V


    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 892
    const-string v2, "-"


    invoke-virtual {v0, v2}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v2

    .line 893
    if-lez v2, :cond_4


    .line 894
    const/4 v3, 0x0


    invoke-virtual {v0, v3, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;


    move-result-object v0


    .line 896
    :cond_4
    const-string v2, "VZW"


    const-string v3, "ro.build.target_operator"


    invoke-static {v3}, Landroid/os/SystemProperties;->get(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_0

    .line 897
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-virtual {v1, v4}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V


    const-string v1, "\n"


    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;


    move-result-object v0


    const-string v1, "lge@android-build "


    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method
- Modified Line

Code:
.method public static formatKernelVersion(Ljava/lang/String;)Ljava/lang/String;
    .locals 5


    .prologue
    const/4 v4, 0x4


    const-string v0, "Linux version (\\S+) \\((\\S+?)\\) (?:\\(gcc.+? \\)) (#\\d+) (?:.*?)?((Sun|Mon|Tue|Wed|Thu|Fri|Sat).+)"


    const-string v2, "Linux version (\\S+) \\((\\S+?)\\) (?:\\(gcc.+? \\)) (#\\d+) (?:.*?)?((Sun|Mon|Tue|Wed|Thu|Fri|Sat).+)"

    invoke-static {v2}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;

    move-result-object v2

    invoke-virtual {v2, p0}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;

    move-result-object v1


    invoke-virtual {v1}, Ljava/util/regex/Matcher;->matches()Z

    move-result v2

    if-nez v2, :cond_0


    const-string v2, "DeviceInfoSettings"






    new-instance v3, Ljava/lang/StringBuilder;


    const-string v4, "Regex did not match on /proc/version: "


    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I


    const-string v2, "Unavailable"



    :goto_0
    return-object v2



    :cond_0
    invoke-virtual {v1}, Ljava/util/regex/Matcher;->groupCount()I









    move-result v2


    if-ge v2, v4, :cond_1


    const-string v2, "DeviceInfoSettings"


    new-instance v3, Ljava/lang/StringBuilder;


    const-string v4, "Regex match on /proc/version only returned "


    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1}, Ljava/util/regex/Matcher;->groupCount()I

    move-result v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, " groups"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I


    const-string v2, "Unavailable"

    goto :goto_0






    :cond_1
    new-instance v2, Ljava/lang/StringBuilder;


    const/4 v3, 0x1



    invoke-virtual {v1, v3}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;


    move-result-object v3




    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;


    move-result-object v3


    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V


    const-string v3, "\n"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2



    const/4 v3, 0x2

    invoke-virtual {v1, v3}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;

    move-result-object v3



    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;



    move-result-object v2


    const-string v3, " "


    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;




    move-result-object v2


    const/4 v3, 0x3

    invoke-virtual {v1, v3}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;

    move-result-object v3










    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2


    const-string v3, "\n"


    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;


    move-result-object v2


    invoke-virtual {v1, v4}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;


    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    goto :goto_0
.end method

PART 2

* Compile clasess.dex file ( Baksmali/Smali Tool )

* Open your "LGSettings.apk" with winrar and drag the new "classes.dex" file into the "LGSettings.apk"and replace the original "classes.dex".

* You can do this with a File explorer ( With root permissions or before you build your rom. )

Thanks @P_Toti and @acer73

Soon Other Mods
Attached Files
File Type: zip Examplefile.zip - [Click for QR Code] (19.5 KB, 6 views)

Device History

Galaxy S2 Galaxy S3

LG G2 ( D802 )

Project

S2 ( Turkbey Rom Team ) S3 ( Pardus HD RoMô )

LG G2 Pardus HD RoMô
The Following 3 Users Say Thank You to pendroz For This Useful Post: [ Click to Expand ]
 
tugrul_27
Old
#2  
Member
Thanks Meter 32
Posts: 95
Join Date: May 2012
You are perfect thanks bro we love you

LG_G2 32GB Karaşimşekô
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes