[MOD]How to Set Logs type to "View by All Call Logs" - Hide SMS from Call Logs

Status
Not open for further replies.
Search This thread

wanam

Recognized Developer / Inactive RC
Jan 26, 2011
6,209
30,012
Toulouse
wanam.net
OnePlus 7T
Sony Xperia 5 III
[MOD]How to Set Logs type to "View by All Call Logs" - Hide SMS from Call Logs

I made this mod to fix Homam's mod,
Homam tried in his mod to prevent sms from being logged, this mod
worked well for GB Roms, but is not compatible with Stock Email app on
ICS Roms.


So i followed karl999999's idea, and i made a more clean and stable changes.

This mod will :
  • Not remove any log
  • Set the Default Call logs type to "View All Call logs" (no SMS)
  • Let you view/edit all other logs types
You have to decompile "SecContacts.apk" (use my repackedApk_Manager if you have any issue with your apktool).


Edit "Contacts.apk\smali\com\android\contacts\activitie s\DialtactsActivity.smali", search for "onBackPressed" method and make these changes :
Code:
    :cond_4
    iget-object v0, p0,  Lcom/android/contacts/activities/DialtactsActivity;->mCallLogFragment:Lcom/sec/android/app/dialertab/calllog/CallLogFragment;

    iget-object v1, p0,  Lcom/android/contacts/activities/DialtactsActivity;->mCallLogFragment:Lcom/sec/android/app/dialertab/calllog/CallLogFragment;

    const/4 v1, 0x1

    [COLOR=SeaGreen]++iput v1, v0, Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->mWhichButton:I[/COLOR]

    [COLOR=Red]--iput v0, v0, Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->mWhichButton:I[/COLOR]

    goto :goto_0

    :cond_5
    invoke-virtual {p0}, Lcom/android/contacts/activities/DialtactsActivity;->isTaskRoot()Z

    move-result v0
Then edit "Contacts.apk\smali\com\sec\android\app\dialertab\ calllog\CallLogFragment.smali":
Code:
.method public constructor <init>()V
    .locals 3

    const/4 v0, 0x1

    const/4 v2, 0x0

    const/4 v1, 0x0

    invoke-direct {p0}, Lcom/sec/android/app/dialertab/widget/DialtactsListFragment;-><init>()V

    iput-boolean v0, p0, Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->mSweepActionEnabled:Z

    iput-object v1, p0,  Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->unlockReceiver:Lcom/sec/android/app/dialertab/calllog/CallLogFragment$UnlockReceiver;

    iput-boolean v2, p0, Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->mResetMissedCheck:Z

    [COLOR=SeaGreen]++iput v0, p0, Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->mWhichButton:I[/COLOR]

    [COLOR=Red]--iput v2, p0, Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->mWhichButton:I[/COLOR]

    iput v0, p0, Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->CONTEXTMENU_CALL:I
That's all, compile and enjoy.

If you get a different Registers number, you just need to check at the beginning of each method what register has the value "0x1" and put it on "mWhichButton".

GT-I9300_WanamLite.ZSALED.Hide.SMS.From.Call.Logs.zip

Uploaded patches to be used on deodexed Roms.
 
Last edited:

abuawab

Senior Member
Nov 15, 2005
77
1
removing

salam WANAM
i flashed your mod from CWM on my stock/rooted firmware
yes i did
and ended up messing my phone app. , it is totally my mistake , is there a way to remove this mod or re-flash the phone app ?
great work by the way
 

dr.kam

Member
Jun 23, 2012
11
0
Is it possible to flash that zip file through CWM recovery, or do i have to do all the changes listed above (e.g. changing code and decompiling)


Thanks again guys

Kam
 

gizmoed

New member
Jul 16, 2012
3
0
Stock ROM Success

On my stock rooted AT&T rom, I deleted the existing SecContacts.apk and SecContacts.odex and then copied the version from the attached zip. I had to re-add the icons to my home screen, but otherwise it seems to work fine.
 

wanam

Recognized Developer / Inactive RC
Jan 26, 2011
6,209
30,012
Toulouse
wanam.net
OnePlus 7T
Sony Xperia 5 III
can ayone help with this?


Code:
--------------------------------------------------------------------------
|20/07/2012 -- 17:00:35.98|
--------------------------------------------------------------------------
java version "1.6.0_33"
Java(TM) SE Runtime Environment (build 1.6.0_33-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)
Could Not Find C:\Apk_Manager_ICS\place-apk-here-for-modding\../place-apk-here-f
or-modding/signedSecContacts.apk
Could Not Find C:\Apk_Manager_ICS\place-apk-here-for-modding\../place-apk-here-f
or-modding/unsignedSecContacts.apk
I: Baksmaling...
I: Loading resource table...
W: Skipping "android" package group
I: Loaded.
I: Loading resource table from file: C:\Users\****\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'phone_call_prohibited' has no default translation in C:\A
pk_Manager_ICS\other\..\projects\SecContacts.apk\res; found: es pt
C:\Apk_Manager_ICS\other\..\projects\SecContacts.apk\res\layout\delete_contacts_
activity.xml:5: error: Error: No resource found that matches the given name (at
'layout' with value '@layout/common_custom_action_bar').
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\****\AppData\Local\Temp\APK
TOOL9055894213858941346.tmp, -I, C:\Users\****\apktool\framework\1.apk, -S, C:\Ap
k_Manager_ICS\other\..\projects\SecContacts.apk\res, -M, C:\Apk_Manager_ICS\othe
r\..\projects\SecContacts.apk\AndroidManifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
        at brut.androlib.Androlib.buildResources(Androlib.java:248)
        at brut.androlib.Androlib.build(Androlib.java:171)
        at brut.androlib.Androlib.build(Androlib.java:154)
        at brut.apktool.Main.cmdBuild(Main.java:182)
        at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\****\AppData\Local\Temp\APKTOOL9055894213858941346.tmp, -I, C:\Users\****\apk
tool\framework\1.apk, -S, C:\Apk_Manager_ICS\other\..\projects\SecContacts.apk\r
es, -M, C:\Apk_Manager_ICS\other\..\projects\SecContacts.apk\AndroidManifest.xml
]
        at brut.util.OS.exec(OS.java:83)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
        ... 6 more
The system cannot find the file specified.
Press any key to continue . . .

C:\Apk_Manager_ICS>

Edit "SecContacts.apk\res\values\layouts.xml" and add missing layout :

Code:
<item type="layout" name="common_custom_action_bar">false</item>
 
  • Like
Reactions: ypypy
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 21
    [MOD]How to Set Logs type to "View by All Call Logs" - Hide SMS from Call Logs

    I made this mod to fix Homam's mod,
    Homam tried in his mod to prevent sms from being logged, this mod
    worked well for GB Roms, but is not compatible with Stock Email app on
    ICS Roms.


    So i followed karl999999's idea, and i made a more clean and stable changes.

    This mod will :
    • Not remove any log
    • Set the Default Call logs type to "View All Call logs" (no SMS)
    • Let you view/edit all other logs types
    You have to decompile "SecContacts.apk" (use my repackedApk_Manager if you have any issue with your apktool).


    Edit "Contacts.apk\smali\com\android\contacts\activitie s\DialtactsActivity.smali", search for "onBackPressed" method and make these changes :
    Code:
        :cond_4
        iget-object v0, p0,  Lcom/android/contacts/activities/DialtactsActivity;->mCallLogFragment:Lcom/sec/android/app/dialertab/calllog/CallLogFragment;
    
        iget-object v1, p0,  Lcom/android/contacts/activities/DialtactsActivity;->mCallLogFragment:Lcom/sec/android/app/dialertab/calllog/CallLogFragment;
    
        const/4 v1, 0x1
    
        [COLOR=SeaGreen]++iput v1, v0, Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->mWhichButton:I[/COLOR]
    
        [COLOR=Red]--iput v0, v0, Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->mWhichButton:I[/COLOR]
    
        goto :goto_0
    
        :cond_5
        invoke-virtual {p0}, Lcom/android/contacts/activities/DialtactsActivity;->isTaskRoot()Z
    
        move-result v0
    Then edit "Contacts.apk\smali\com\sec\android\app\dialertab\ calllog\CallLogFragment.smali":
    Code:
    .method public constructor <init>()V
        .locals 3
    
        const/4 v0, 0x1
    
        const/4 v2, 0x0
    
        const/4 v1, 0x0
    
        invoke-direct {p0}, Lcom/sec/android/app/dialertab/widget/DialtactsListFragment;-><init>()V
    
        iput-boolean v0, p0, Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->mSweepActionEnabled:Z
    
        iput-object v1, p0,  Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->unlockReceiver:Lcom/sec/android/app/dialertab/calllog/CallLogFragment$UnlockReceiver;
    
        iput-boolean v2, p0, Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->mResetMissedCheck:Z
    
        [COLOR=SeaGreen]++iput v0, p0, Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->mWhichButton:I[/COLOR]
    
        [COLOR=Red]--iput v2, p0, Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->mWhichButton:I[/COLOR]
    
        iput v0, p0, Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->CONTEXTMENU_CALL:I
    That's all, compile and enjoy.

    If you get a different Registers number, you just need to check at the beginning of each method what register has the value "0x1" and put it on "mWhichButton".

    GT-I9300_WanamLite.ZSALED.Hide.SMS.From.Call.Logs.zip

    Uploaded patches to be used on deodexed Roms.
    4
    well, after a lot of research, i figure out what was wrong on my attemps.

    the smali folder are inside the corresponding odex file. took me a lot of time to learn how to de-odex the file. but anyway i found the smali files that must be edited like in the first post. but they don't match...

    the string to modify at DialtactsActivity.smali and CallLogFragment.smali aren't the same as you posted. I think that is because this is for ICS and now i'm trying to edit a Jelly Bean file.

    Anyway i tried to edit the string closest to the posted, recompiled the odex file and replace the original, but the phone and contacts app crash if i load them.

    Any chance you look into this? Or Am i missing something?

    regards

    This is the way for JB :

    Code:
    DialtactsActivity.smali
    [COLOR="red"]--iput v2, v0, Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->mWhichButton:I[/COLOR]
    [COLOR="Green"]++iput v3, v0, Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->mWhichButton:I[/COLOR]
    
    CallLogFragment.smali
    [COLOR="Red"]--iput v1, p0, Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->mWhichButton:I[/COLOR]
    [COLOR="Green"]++iput v3, p0, Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->mWhichButton:I[/COLOR]
    Also I made MA2
    2
    ..or maybe the great devs in our community can incorporate this mod into their ROM(s) ^^^ ;):D

    sent from my Galaxy S III

    It's already included on my WanamLite V1.0.
    2
    hi, i can't decompile the SecContacts always getting this error
    Code:
    java version "1.7.0_05"
    Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
    Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)
    Could Not Find D:\Files\Downloads\Apk_Manager_5.0.2\place-apk-here-for-modding\.
    ./place-apk-here-for-modding/signedSecPhone.apk
    Could Not Find D:\Files\Downloads\Apk_Manager_5.0.2\place-apk-here-for-modding\.
    ./place-apk-here-for-modding/unsignedSecPhone.apk
    I: Loading resource table...
    W: Skipping "android" package group
    I: Loaded.
    I: Loading resource table from file: C:\Users\bius\apktool\framework\1.apk
    Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceede
    d
            at java.nio.ByteBuffer.wrap(Unknown Source)
            at brut.androlib.res.decoder.StringBlock.decodeString(StringBlock.java:2
    81)
            at brut.androlib.res.decoder.StringBlock.getString(StringBlock.java:108)
    
            at brut.androlib.res.decoder.StringBlock.getHTML(StringBlock.java:124)
            at brut.androlib.res.decoder.ARSCDecoder.readValue(ARSCDecoder.java:222)
    
            at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:177)
    
            at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165
    )
            at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)
            at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
    5)
            at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
            at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
            at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibRes
    ources.java:315)
            at brut.androlib.res.AndrolibResources.loadFrameworkPkg(AndrolibResource
    s.java:81)
            at brut.androlib.res.data.ResTable.getPackage(ResTable.java:72)
            at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:55)
            at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:51)
            at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:3
    5)
            at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlRe
    sourceParser.java:315)
            at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValu
    e(XmlPullParserDelegate.java:69)
            at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartT
    ag(StaticXmlSerializerWrapper.java:267)
            at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Stati
    cXmlSerializerWrapper.java:211)
            at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDe
    coder.java:46)
            at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamD
    ecoderContainer.java:34)
            at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:1
    00)
            at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:114
    )
            at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
            at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
            at brut.apktool.Main.cmdDecode(Main.java:128)
            at brut.apktool.Main.main(Main.java:65)
    Could Not Find D:\Files\Downloads\Apk_Manager_5.0.2\place-apk-here-for-modding\.
    ./place-apk-here-for-modding/signedSecPhone.apk
    Could Not Find D:\Files\Downloads\Apk_Manager_5.0.2\place-apk-here-for-modding\.
    ./place-apk-here-for-modding/unsignedSecPhone.apk
    I: Loading resource table...
    W: Skipping "android" package group
    I: Loaded.
    I: Loading resource table from file: C:\Users\bius\apktool\framework\1.apk
    Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceede
    d
            at java.util.regex.Pattern.compile(Unknown Source)
            at java.util.regex.Pattern.<init>(Unknown Source)
            at java.util.regex.Pattern.compile(Unknown Source)
            at java.lang.String.replace(Unknown Source)
            at brut.androlib.res.xml.ResXmlEncoders.escapeXmlChars(ResXmlEncoders.ja
    va:29)
            at brut.androlib.res.decoder.StringBlock.getHTML(StringBlock.java:130)
            at brut.androlib.res.decoder.ARSCDecoder.readValue(ARSCDecoder.java:222)
    
            at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:177)
    
            at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165
    )
            at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)
            at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
    5)
            at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
            at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
            at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibRes
    ources.java:315)
            at brut.androlib.res.AndrolibResources.loadFrameworkPkg(AndrolibResource
    s.java:81)
            at brut.androlib.res.data.ResTable.getPackage(ResTable.java:72)
            at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:55)
            at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:51)
            at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:3
    5)
            at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlRe
    sourceParser.java:315)
            at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValu
    e(XmlPullParserDelegate.java:69)
            at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartT
    ag(StaticXmlSerializerWrapper.java:267)
            at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Stati
    cXmlSerializerWrapper.java:211)
            at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDe
    coder.java:46)
            at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamD
    ecoderContainer.java:34)
            at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:1
    00)
            at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:114
    )
            at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
            at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
            at brut.apktool.Main.cmdDecode(Main.java:128)
            at brut.apktool.Main.main(Main.java:65)
    Could Not Find D:\Files\Downloads\Apk_Manager_5.0.2\place-apk-here-for-modding\.
    ./place-apk-here-for-modding/signedSecPhone.apk
    Could Not Find D:\Files\Downloads\Apk_Manager_5.0.2\place-apk-here-for-modding\.
    ./place-apk-here-for-modding/unsignedSecPhone.apk
    I: Loading resource table...
    W: Skipping "android" package group
    I: Loaded.
    I: Loading resource table from file: C:\Users\bius\apktool\framework\1.apk
    I: Loaded.
    W: Could not decode attr value, using undecoded value instead: ns=android, name=
    theme, value=0x01030319
    W: Could not decode attr value, using undecoded value instead: ns=android, name=
    theme, value=0x01030319
    I: Decoding file-resources...
    W: Could not decode attr value, using undecoded value instead: ns=android, name=
    id, value=0x010203d2
    I: Decoding values*/* XMLs...
    I: Done.
    Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:
    0x01030319
            at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)
            at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:55)
            at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:51)
            at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferen
    ceValue.java:59)
            at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResRefe
    renceValue.java:46)
            at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResSca
    larValue.java:43)
            at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:4
    0)
            at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlRe
    sourceParser.java:315)
            at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValu
    e(XmlPullParserDelegate.java:69)
            at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartT
    ag(StaticXmlSerializerWrapper.java:267)
            at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Stati
    cXmlSerializerWrapper.java:211)
            at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDe
    coder.java:46)
            at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamD
    ecoderContainer.java:34)
            at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:1
    00)
            at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:114
    )
            at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
            at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
            at brut.apktool.Main.cmdDecode(Main.java:128)
            at brut.apktool.Main.main(Main.java:65)

    i can decompile with apktool but i can't see the smali folder...

    i'm on i Galaxy S3 international jelly bean 4.1.1 all stock and rooted

    Set max memory to 512.
    2
    This is the way for JB :

    Code:
    DialtactsActivity.smali
    [COLOR="red"]--iput v2, v0, Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->mWhichButton:I[/COLOR]
    [COLOR="Green"]++iput v3, v0, Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->mWhichButton:I[/COLOR]
    
    CallLogFragment.smali
    [COLOR="Red"]--iput v1, p0, Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->mWhichButton:I[/COLOR]
    [COLOR="Green"]++iput v3, p0, Lcom/sec/android/app/dialertab/calllog/CallLogFragment;->mWhichButton:I[/COLOR]
    Also I made MA2

    You just need to check at the beginning of the method what register has the value "1" and put it on "mWhichButton".