[HELP] [PIE] Disable signature verification to resign platform apps - Android Software/Hacking General [Developers Only]

Hi guys,
I need devs to help me to find a way to disable signature verification on Pie.
The old patching of compare signature method doesn't work anymore.
Could a java pro analyse PackageManagerService to find how to allow signature of core apps with a different signature.
Thanks
Edit: Here's a working method that I've created:
1) First decompile framework-res.apk and add this in arrays.xml
Code:
<string-array name="config_vendorPlatformSignatures">
<item>308203BB308202A3A003020102020900F00F8E7F45E72D86300D06092A864886F70D01010B05003074310B30090603550406130255533113301106035504080C0A43616C69666F726E69613116301406035504070C0D4D6F756E7461696E205669657731143012060355040A0C0B476F6F676C6520496E632E3110300E060355040B0C07416E64726F69643110300E06035504030C07416E64726F6964301E170D3136303531303138313332385A170D3433303932363138313332385A3074310B30090603550406130255533113301106035504080C0A43616C69666F726E69613116301406035504070C0D4D6F756E7461696E205669657731143012060355040A0C0B476F6F676C6520496E632E3110300E060355040B0C07416E64726F69643110300E06035504030C07416E64726F696430820122300D06092A864886F70D01010105000382010F003082010A02820101009DA10ED05B5EBFE8E5794CFA3A633E605748FDB8F3545C288D9EFFBA4F2CA1BFC16DA0D4C5724575A21D4DF9D44C1B068785C084BFD4C7071EEF258F2169494239B55FCF187E529760D77DD495F65872D6BF7E61C764A368D0AA6272A51C10E91F89991EA147377B3B37B2ED714E622D17288C8A7003DC6A11022F1B0C6EB005A18CFAB5EF3F9B6912EE1B1CBECCD96A1F76DEBB6E6A9BFCCB76E9C2D279EF119D9E9BF6A089C21507FD00A0237A0C11C32946FE123C0A2CE0C52CB4D3B5D815281F244E4F998CDC4D765459BF1FFA960FC48324869DB0555A6844A94204891A01CCA268448374C7CD17661C74C692FB32AF0DF4C20AFF02F9966B5C94BB80710203010001A350304E301D0603551D0E041604149078B7EBD42D359E4E98E6FEF868CABFFA634F9F301F0603551D230418301680149078B7EBD42D359E4E98E6FEF868CABFFA634F9F300C0603551D13040530030101FF300D06092A864886F70D01010B050003820101008646166908812FD5373CE79FBAAC62F691ECDDCB82619D35BD990D068689E15E0C556D246ED8AE96816743D80CEE443F94F55CB6E169CC8F10B3770C434F351E50170F445369A26A4C37B2CA893C14A3AF7C7513A5420784CE4B6D9B92ED61252F5335A11C75EC978B979B1CD776DC3081094C3E7BE161C21E868303E0B40CB6441A95BB85F6CF83BD707735DAB8908C954CF5BB8553D0384480E1D789130D19151CA2AB01F928657E0DF2AD1FB31DCE18436BF873E4E924A59B7A89AE18C8B93CE0FF2C0ECAB4E7A67CEA1F7022CEA3C27699FA67D3B4965ABF9CE89016F33A08BFBE25AD2A9A6626C1A98802F0592DE720BDEFDDE83963D767C7AD96915224</item>
</string-array>
2) Recompile framework-res.apk and decompile new compiled one to find new id inside public.xml
Code:
<public type="array" name="config_vendorPlatformSignatures" id="0x01070057" />
3) Decompile Services.jar and look for this method in com/android/server/pm/PackageManagerService.smali
Code:
.method private collectCertificatesLI(Lcom/android/server/pm/PackageSetting;Landroid/content/pm/PackageParser$Package;ZZ)V
Replace the complete method by:
Code:
.method private collectCertificatesLI(Lcom/android/server/pm/PackageSetting;Landroid/content/pm/PackageParser$Package;ZZ)V
.registers 16
.param p1, "ps" # Lcom/android/server/pm/PackageSetting;
.param p2, "pkg" # Landroid/content/pm/PackageParser$Package;
.param p3, "forceCollect" # Z
.param p4, "skipVerify" # Z
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/android/server/pm/PackageManagerException;
}
.end annotation
.line 8546
iget-boolean v0, p0, Lcom/android/server/pm/PackageManagerService;->mIsPreNMR1Upgrade:Z
if-eqz v0, :cond_10
.line 8547
new-instance v0, Ljava/io/File;
iget-object v1, p2, Landroid/content/pm/PackageParser$Package;->codePath:Ljava/lang/String;
invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/io/File;->lastModified()J
move-result-wide v0
goto :goto_14
:cond_10
invoke-static {p2}, Lcom/android/server/pm/PackageManagerServiceUtils;->getLastModifiedTime(Landroid/content/pm/PackageParser$Package;)J
move-result-wide v0
.line 8548
.local v0, "lastModifiedTime":J
:goto_14
if-eqz p1, :cond_77
if-nez p3, :cond_77
iget-object v2, p1, Lcom/android/server/pm/PackageSetting;->codePathString:Ljava/lang/String;
iget-object v3, p2, Landroid/content/pm/PackageParser$Package;->codePath:Ljava/lang/String;
.line 8549
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_77
iget-wide v2, p1, Lcom/android/server/pm/PackageSetting;->timeStamp:J
cmp-long v2, v2, v0
if-nez v2, :cond_77
.line 8551
invoke-direct {p0, p2}, Lcom/android/server/pm/PackageManagerService;->isCompatSignatureUpdateNeeded(Landroid/content/pm/PackageParser$Package;)Z
move-result v2
if-nez v2, :cond_77
.line 8552
invoke-direct {p0, p2}, Lcom/android/server/pm/PackageManagerService;->isRecoverSignatureUpdateNeeded(Landroid/content/pm/PackageParser$Package;)Z
move-result v2
if-nez v2, :cond_77
.line 8553
iget-object v2, p1, Lcom/android/server/pm/PackageSetting;->signatures:Lcom/android/server/pm/PackageSignatures;
iget-object v2, v2, Lcom/android/server/pm/PackageSignatures;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget-object v2, v2, Landroid/content/pm/PackageParser$SigningDetails;->signatures:[Landroid/content/pm/Signature;
if-eqz v2, :cond_59
iget-object v2, p1, Lcom/android/server/pm/PackageSetting;->signatures:Lcom/android/server/pm/PackageSignatures;
iget-object v2, v2, Lcom/android/server/pm/PackageSignatures;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget-object v2, v2, Landroid/content/pm/PackageParser$SigningDetails;->signatures:[Landroid/content/pm/Signature;
array-length v2, v2
if-eqz v2, :cond_59
iget-object v2, p1, Lcom/android/server/pm/PackageSetting;->signatures:Lcom/android/server/pm/PackageSignatures;
iget-object v2, v2, Lcom/android/server/pm/PackageSignatures;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget v2, v2, Landroid/content/pm/PackageParser$SigningDetails;->signatureSchemeVersion:I
if-eqz v2, :cond_59
.line 8559
new-instance v2, Landroid/content/pm/PackageParser$SigningDetails;
iget-object v3, p1, Lcom/android/server/pm/PackageSetting;->signatures:Lcom/android/server/pm/PackageSignatures;
iget-object v3, v3, Lcom/android/server/pm/PackageSignatures;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
invoke-direct {v2, v3}, Landroid/content/pm/PackageParser$SigningDetails;-><init>(Landroid/content/pm/PackageParser$SigningDetails;)V
iput-object v2, p2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
.line 8561
return-void
.line 8564
:cond_59
const-string v2, "PackageManager"
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "PackageSetting for "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v4, p1, Lcom/android/server/pm/PackageSetting;->name:Ljava/lang/String;
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v4, " is missing signatures. Collecting certs again to recover them."
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Landroid/util/Slog;->w(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_99
.line 8567
:cond_77
const-string v2, "PackageManager"
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
iget-object v4, p2, Landroid/content/pm/PackageParser$Package;->codePath:Ljava/lang/String;
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v4, " changed; collecting certs"
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 8568
if-eqz p3, :cond_8d
const-string v4, " (forced)"
goto :goto_8f
:cond_8d
const-string v4, ""
:goto_8f
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
.line 8567
invoke-static {v2, v3}, Landroid/util/Slog;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 8573
:goto_99
const-wide/32 v2, 0x40000
:try_start_9c
const-string v4, "collectCertificates"
invoke-static {v2, v3, v4}, Landroid/os/Trace;->traceBegin(JLjava/lang/String;)V
.line 8574
invoke-static {p2, p4}, Landroid/content/pm/PackageParser;->collectCertificates(Landroid/content/pm/PackageParser$Package;Z)V
.line 8575
iget-object v4, p2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget-object v4, v4, Landroid/content/pm/PackageParser$SigningDetails;->signatures:[Landroid/content/pm/Signature;
iget-object v5, p0, Lcom/android/server/pm/PackageManagerService;->mVendorPlatformSignatures:[Landroid/content/pm/Signature;
invoke-static {v4, v5}, Lcom/android/server/pm/PackageManagerServiceUtils;->compareSignatures2([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
move-result v4
if-nez v4, :cond_e6
.line 8579
iget-object v4, p0, Lcom/android/server/pm/PackageManagerService;->mPlatformPackage:Landroid/content/pm/PackageParser$Package;
if-eqz v4, :cond_e6
.line 8580
new-instance v4, Landroid/content/pm/PackageParser$SigningDetails;
iget-object v5, p0, Lcom/android/server/pm/PackageManagerService;->mPlatformPackage:Landroid/content/pm/PackageParser$Package;
iget-object v5, v5, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget-object v6, v5, Landroid/content/pm/PackageParser$SigningDetails;->signatures:[Landroid/content/pm/Signature;
iget-object v5, p2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget v7, v5, Landroid/content/pm/PackageParser$SigningDetails;->signatureSchemeVersion:I
iget-object v5, p2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget-object v8, v5, Landroid/content/pm/PackageParser$SigningDetails;->publicKeys:Landroid/util/ArraySet;
iget-object v5, p2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget-object v9, v5, Landroid/content/pm/PackageParser$SigningDetails;->pastSigningCertificates:[Landroid/content/pm/Signature;
iget-object v5, p2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget-object v10, v5, Landroid/content/pm/PackageParser$SigningDetails;->pastSigningCertificatesFlags:[I
move-object v5, v4
invoke-direct/range {v5 .. v10}, Landroid/content/pm/PackageParser$SigningDetails;-><init>([Landroid/content/pm/Signature;ILandroid/util/ArraySet;[Landroid/content/pm/Signature;[I)V
iput-object v4, p2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
.line 8586
iget-object v4, p2, Landroid/content/pm/PackageParser$Package;->applicationInfo:Landroid/content/pm/ApplicationInfo;
iget v4, v4, Landroid/content/pm/ApplicationInfo;->targetSdkVersion:I
.line 8587
.local v4, "targetSdkVersion":I
iget-object v5, p2, Landroid/content/pm/PackageParser$Package;->applicationInfo:Landroid/content/pm/ApplicationInfo;
iget v5, v5, Landroid/content/pm/ApplicationInfo;->targetSandboxVersion:I
.line 8588
.local v5, "targetSandboxVersion":I
invoke-virtual {p2}, Landroid/content/pm/PackageParser$Package;->isPrivileged()Z
move-result v6
.line 8590
.local v6, "isPrivileged":Z
iget-object v7, p2, Landroid/content/pm/PackageParser$Package;->applicationInfo:Landroid/content/pm/ApplicationInfo;
invoke-static {p2, v6, v5, v4}, Lcom/android/server/pm/SELinuxMMAC;->getSeInfo(Landroid/content/pm/PackageParser$Package;ZII)Ljava/lang/String;
move-result-object v8
iput-object v8, v7, Landroid/content/pm/ApplicationInfo;->seInfo:Ljava/lang/String;
:try_end_e6
.catch Landroid/content/pm/PackageParser$PackageParserException; {:try_start_9c .. :try_end_e6} :catch_ed
.catchall {:try_start_9c .. :try_end_e6} :catchall_eb
.line 8597
.end local v4 # "targetSdkVersion":I
.end local v5 # "targetSandboxVersion":I
.end local v6 # "isPrivileged":Z
:cond_e6
invoke-static {v2, v3}, Landroid/os/Trace;->traceEnd(J)V
.line 8598
nop
.line 8599
return-void
.line 8597
:catchall_eb
move-exception v4
goto :goto_f3
.line 8594
:catch_ed
move-exception v4
.line 8595
.local v4, "e":Landroid/content/pm/PackageParser$PackageParserException;
:try_start_ee
invoke-static {v4}, Lcom/android/server/pm/PackageManagerException;->from(Landroid/content/pm/PackageParser$PackageParserException;)Lcom/android/server/pm/PackageManagerException;
move-result-object v5
throw v5
:try_end_f3
.catchall {:try_start_ee .. :try_end_f3} :catchall_eb
.line 8597
.end local v4 # "e":Landroid/content/pm/PackageParser$PackageParserException;
:goto_f3
invoke-static {v2, v3}, Landroid/os/Trace;->traceEnd(J)V
throw v4
.end method
4) Look for this method in com/android/server/pm/PackageManagerService.smali
Code:
.method public constructor <init>(Landroid/content/Context;Lcom/android/server/pm/Installer;ZZ)V
Inside this method add this part (take care of 0x1070057 it must be replaced by the one you've added in framework-res.apk):
Code:
.line 2420
invoke-virtual/range {p1 .. p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const v1, 0x1070057
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getStringArray(I)[Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Lcom/android/server/pm/PackageManagerServiceUtils;->createSignatures([Ljava/lang/String;)[Landroid/content/pm/Signature;
move-result-object v0
iput-object v0, v13, Lcom/android/server/pm/PackageManagerService;->mVendorPlatformSignatures:[Landroid/content/pm/Signature;
Add the above code just before this:
Code:
.line 2428
move/from16 v5, p3
iput-boolean v5, v13, Lcom/android/server/pm/PackageManagerService;->mFactoryTest:Z
.line 2429
iput-boolean v11, v13, Lcom/android/server/pm/PackageManagerService;->mOnlyCore:Z
.line 2430
new-instance v0, Landroid/util/DisplayMetrics;
invoke-direct {v0}, Landroid/util/DisplayMetrics;-><init>()V
iput-object v0, v13, Lcom/android/server/pm/PackageManagerService;->mMetrics:Landroid/util/DisplayMetrics;
.line 2431
iput-object v15, v13, Lcom/android/server/pm/PackageManagerService;->mInstaller:Lcom/android/server/pm/Installer;
.line 2434
iget-object v1, v13, Lcom/android/server/pm/PackageManagerService;->mInstallLock:Ljava/lang/Object;
monitor-enter v1
5) Add this field at the top of in com/android/server/pm/PackageManagerService.smali
Code:
.field private final mVendorPlatformSignatures:[Landroid/content/pm/Signature;
6) Add this method in com/android/server/pm/PackageManagerServiceUtils.smali
Code:
.method public static compareSignatures2([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.registers 9
.param p0, "s1" # [Landroid/content/pm/Signature;
.param p1, "s2" # [Landroid/content/pm/Signature;
.line 411
const/4 v0, 0x0
return v0
.end method
7) Add this method in com/android/server/pm/PackageManagerServiceUtils.smali
Code:
.method public static createSignatures([Ljava/lang/String;)[Landroid/content/pm/Signature;
.registers 5
.param p0, "hexBytes" # [Ljava/lang/String;
.line 708
array-length v0, p0
new-array v0, v0, [Landroid/content/pm/Signature;
.line 709
.local v0, "sigs":[Landroid/content/pm/Signature;
const/4 v1, 0x0
.local v1, "i":I
:goto_4
array-length v2, v0
if-ge v1, v2, :cond_13
.line 710
new-instance v2, Landroid/content/pm/Signature;
aget-object v3, p0, v1
invoke-direct {v2, v3}, Landroid/content/pm/Signature;-><init>(Ljava/lang/String;)V
aput-object v2, v0, v1
.line 709
add-int/lit8 v1, v1, 0x1
goto :goto_4
.line 712
.end local v1 # "i":I
:cond_13
return-object v0
.end method
8) Find this method in com/android/server/pm/permission/PermissionManagerService.smali
Code:
.method constructor <init>(Landroid/content/Context;Lcom/android/server/pm/permission/DefaultPermissionGrantPolicy$DefaultPermissionGrantedCallback;Ljava/lang/Object;)V
Replace whole method by (take care of 0x1070057 it must be replaced by the one you've added in framework-res.apk):
Code:
.method constructor <init>(Landroid/content/Context;Lcom/android/server/pm/permission/DefaultPermissionGrantPolicy$DefaultPermissionGrantedCallback;Ljava/lang/Object;)V
.registers 14
.param p1, "context" # Landroid/content/Context;
.param p2, "defaultGrantCallback" # Lcom/android/server/pm/permission/DefaultPermissionGrantPolicy$DefaultPermissionGrantedCallback;
.param p3, "externalLock" # Ljava/lang/Object;
.line 144
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 130
new-instance v0, Lcom/android/internal/logging/MetricsLogger;
invoke-direct {v0}, Lcom/android/internal/logging/MetricsLogger;-><init>()V
iput-object v0, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mMetricsLogger:Lcom/android/internal/logging/MetricsLogger;
.line 145
iput-object p1, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mContext:Landroid/content/Context;
.line 146
iput-object p3, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mLock:Ljava/lang/Object;
.line 147
const-class v0, Landroid/content/pm/PackageManagerInternal;
invoke-static {v0}, Lcom/android/server/LocalServices;->getService(Ljava/lang/Class;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/content/pm/PackageManagerInternal;
iput-object v0, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mPackageManagerInt:Landroid/content/pm/PackageManagerInternal;
.line 148
const-class v0, Landroid/os/UserManagerInternal;
invoke-static {v0}, Lcom/android/server/LocalServices;->getService(Ljava/lang/Class;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/UserManagerInternal;
iput-object v0, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mUserManagerInt:Landroid/os/UserManagerInternal;
.line 149
new-instance v0, Lcom/android/server/pm/permission/PermissionSettings;
iget-object v1, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mLock:Ljava/lang/Object;
invoke-direct {v0, p1, v1}, Lcom/android/server/pm/permission/PermissionSettings;-><init>(Landroid/content/Context;Ljava/lang/Object;)V
iput-object v0, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mSettings:Lcom/android/server/pm/permission/PermissionSettings;
.line 151
new-instance v0, Lcom/android/server/ServiceThread;
const-string v1, "PackageManager"
const/4 v2, 0x1
const/16 v3, 0xa
invoke-direct {v0, v1, v3, v2}, Lcom/android/server/ServiceThread;-><init>(Ljava/lang/String;IZ)V
iput-object v0, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mHandlerThread:Landroid/os/HandlerThread;
.line 153
iget-object v0, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mHandlerThread:Landroid/os/HandlerThread;
invoke-virtual {v0}, Landroid/os/HandlerThread;->start()V
.line 154
new-instance v0, Landroid/os/Handler;
iget-object v1, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mHandlerThread:Landroid/os/HandlerThread;
invoke-virtual {v1}, Landroid/os/HandlerThread;->getLooper()Landroid/os/Looper;
move-result-object v1
invoke-direct {v0, v1}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V
iput-object v0, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mHandler:Landroid/os/Handler;
.line 155
invoke-static {}, Lcom/android/server/Watchdog;->getInstance()Lcom/android/server/Watchdog;
move-result-object v0
iget-object v1, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mHandler:Landroid/os/Handler;
invoke-virtual {v0, v1}, Lcom/android/server/Watchdog;->addThread(Landroid/os/Handler;)V
.line 157
new-instance v0, Lcom/android/server/pm/permission/DefaultPermissionGrantPolicy;
iget-object v1, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mHandlerThread:Landroid/os/HandlerThread;
.line 158
invoke-virtual {v1}, Landroid/os/HandlerThread;->getLooper()Landroid/os/Looper;
move-result-object v1
invoke-direct {v0, p1, v1, p2, p0}, Lcom/android/server/pm/permission/DefaultPermissionGrantPolicy;-><init>(Landroid/content/Context;Landroid/os/Looper;Lcom/android/server/pm/permission/DefaultPermissionGrantPolicy$DefaultPermissionGrantedCallback;Lcom/android/server/pm/permission/PermissionManagerService;)V
iput-object v0, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mDefaultPermissionGrantPolicy:Lcom/android/server/pm/permission/DefaultPermissionGrantPolicy;
.line 159
invoke-static {}, Lcom/android/server/SystemConfig;->getInstance()Lcom/android/server/SystemConfig;
move-result-object v0
.line 160
.local v0, "systemConfig":Lcom/android/server/SystemConfig;
invoke-virtual {v0}, Lcom/android/server/SystemConfig;->getSystemPermissions()Landroid/util/SparseArray;
move-result-object v1
iput-object v1, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mSystemPermissions:Landroid/util/SparseArray;
.line 161
invoke-virtual {v0}, Lcom/android/server/SystemConfig;->getGlobalGids()[I
move-result-object v1
iput-object v1, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mGlobalGids:[I
.line 168
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v3, 0x1070057
invoke-virtual {v1, v3}, Landroid/content/res/Resources;->getStringArray(I)[Ljava/lang/String;
move-result-object v1
.line 167
invoke-static {v1}, Lcom/android/server/pm/PackageManagerServiceUtils;->createSignatures([Ljava/lang/String;)[Landroid/content/pm/Signature;
move-result-object v1
iput-object v1, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mVendorPlatformSignatures:[Landroid/content/pm/Signature;
.line 165
invoke-static {}, Lcom/android/server/SystemConfig;->getInstance()Lcom/android/server/SystemConfig;
move-result-object v1
invoke-virtual {v1}, Lcom/android/server/SystemConfig;->getPermissions()Landroid/util/ArrayMap;
move-result-object v1
.line 166
.local v1, "permConfig":Landroid/util/ArrayMap;, "Landroid/util/ArrayMap<Ljava/lang/String;Lcom/android/server/SystemConfig$PermissionEntry;>;"
iget-object v3, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mLock:Ljava/lang/Object;
monitor-enter v3
.line 167
const/4 v4, 0x0
.local v4, "i":I
:goto_7b
:try_start_7b
invoke-virtual {v1}, Landroid/util/ArrayMap;->size()I
move-result v5
if-ge v4, v5, :cond_b0
.line 168
invoke-virtual {v1, v4}, Landroid/util/ArrayMap;->valueAt(I)Ljava/lang/Object;
move-result-object v5
check-cast v5, Lcom/android/server/SystemConfig$PermissionEntry;
.line 169
.local v5, "perm":Lcom/android/server/SystemConfig$PermissionEntry;
iget-object v6, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mSettings:Lcom/android/server/pm/permission/PermissionSettings;
iget-object v7, v5, Lcom/android/server/SystemConfig$PermissionEntry;->name:Ljava/lang/String;
invoke-virtual {v6, v7}, Lcom/android/server/pm/permission/PermissionSettings;->getPermissionLocked(Ljava/lang/String;)Lcom/android/server/pm/permission/BasePermission;
move-result-object v6
.line 170
.local v6, "bp":Lcom/android/server/pm/permission/BasePermission;
if-nez v6, :cond_a2
.line 171
new-instance v7, Lcom/android/server/pm/permission/BasePermission;
iget-object v8, v5, Lcom/android/server/SystemConfig$PermissionEntry;->name:Ljava/lang/String;
const-string v9, "android"
invoke-direct {v7, v8, v9, v2}, Lcom/android/server/pm/permission/BasePermission;-><init>(Ljava/lang/String;Ljava/lang/String;I)V
move-object v6, v7
.line 172
iget-object v7, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mSettings:Lcom/android/server/pm/permission/PermissionSettings;
iget-object v8, v5, Lcom/android/server/SystemConfig$PermissionEntry;->name:Ljava/lang/String;
invoke-virtual {v7, v8, v6}, Lcom/android/server/pm/permission/PermissionSettings;->putPermissionLocked(Ljava/lang/String;Lcom/android/server/pm/permission/BasePermission;)V
.line 174
:cond_a2
iget-object v7, v5, Lcom/android/server/SystemConfig$PermissionEntry;->gids:[I
if-eqz v7, :cond_ad
.line 175
iget-object v7, v5, Lcom/android/server/SystemConfig$PermissionEntry;->gids:[I
iget-boolean v8, v5, Lcom/android/server/SystemConfig$PermissionEntry;->perUser:Z
invoke-virtual {v6, v7, v8}, Lcom/android/server/pm/permission/BasePermission;->setGids([IZ)V
.line 167
.end local v5 # "perm":Lcom/android/server/SystemConfig$PermissionEntry;
.end local v6 # "bp":Lcom/android/server/pm/permission/BasePermission;
:cond_ad
add-int/lit8 v4, v4, 0x1
goto :goto_7b
.line 178
.end local v4 # "i":I
:cond_b0
monitor-exit v3
:try_end_b1
.catchall {:try_start_7b .. :try_end_b1} :catchall_bd
.line 180
const-class v2, Lcom/android/server/pm/permission/PermissionManagerInternal;
new-instance v3, Lcom/android/server/pm/permission/PermissionManagerService$PermissionManagerInternalImpl;
const/4 v4, 0x0
invoke-direct {v3, p0, v4}, Lcom/android/server/pm/permission/PermissionManagerService$PermissionManagerInternalImpl;-><init>(Lcom/android/server/pm/permission/PermissionManagerService;Lcom/android/server/pm/permission/PermissionManagerService$1;)V
invoke-static {v2, v3}, Lcom/android/server/LocalServices;->addService(Ljava/lang/Class;Ljava/lang/Object;)V
.line 182
return-void
.line 178
:catchall_bd
move-exception v2
:try_start_be
monitor-exit v3
:try_end_bf
.catchall {:try_start_be .. :try_end_bf} :catchall_bd
throw v2
.end method

9) Look for this method in com/android/server/pm/permission/PermissionManagerService.smali
Code:
.method private grantSignaturePermission(Ljava/lang/String;Landroid/content/pm/PackageParser$Package;Lcom/android/server/pm/permission/BasePermission;Lcom/android/server/pm/permission/PermissionsState;)Z
Replace whole method by:
Code:
.method private grantSignaturePermission(Ljava/lang/String;Landroid/content/pm/PackageParser$Package;Lcom/android/server/pm/permission/BasePermission;Lcom/android/server/pm/permission/PermissionsState;)Z
.registers 26
.param p1, "perm" # Ljava/lang/String;
.param p2, "pkg" # Landroid/content/pm/PackageParser$Package;
.param p3, "bp" # Lcom/android/server/pm/permission/BasePermission;
.param p4, "origPermissions" # Lcom/android/server/pm/permission/PermissionsState;
move-object/from16 v0, p0
move-object/from16 v1, p1
move-object/from16 v2, p2
.line 1046
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->isOEM()Z
move-result v3
.line 1047
.local v3, "oemPermission":Z
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->isVendorPrivileged()Z
move-result v4
.line 1048
.local v4, "vendorPrivilegedPermission":Z
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->isPrivileged()Z
move-result v5
const/4 v7, 0x0
if-nez v5, :cond_1e
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->isVendorPrivileged()Z
move-result v5
if-eqz v5, :cond_1c
goto :goto_1e
:cond_1c
move v5, v7
goto :goto_1f
:cond_1e
:goto_1e
const/4 v5, 0x1
.line 1049
.local v5, "privilegedPermission":Z
:goto_1f
sget-boolean v8, Lcom/android/internal/os/RoSystemProperties;->CONTROL_PRIVAPP_PERMISSIONS_DISABLE:Z
.line 1051
.local v8, "privappPermissionsDisable":Z
const-string v9, "android"
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->getSourcePackageName()Ljava/lang/String;
move-result-object v10
invoke-virtual {v9, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v9
.line 1052
.local v9, "platformPermission":Z
const-string v10, "android"
iget-object v11, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
invoke-virtual {v10, v11}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v10
.line 1053
.local v10, "platformPackage":Z
if-nez v8, :cond_e2
if-eqz v5, :cond_e2
invoke-virtual/range {p2 .. p2}, Landroid/content/pm/PackageParser$Package;->isPrivileged()Z
move-result v11
if-eqz v11, :cond_e2
if-nez v10, :cond_e2
if-eqz v9, :cond_e2
.line 1055
invoke-direct/range {p0 .. p2}, Lcom/android/server/pm/permission/PermissionManagerService;->hasPrivappWhitelistEntry(Ljava/lang/String;Landroid/content/pm/PackageParser$Package;)Z
move-result v11
if-nez v11, :cond_e2
.line 1057
iget-boolean v11, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mSystemReady:Z
if-nez v11, :cond_dd
invoke-virtual/range {p2 .. p2}, Landroid/content/pm/PackageParser$Package;->isUpdatedSystemApp()Z
move-result v11
if-nez v11, :cond_dd
.line 1059
const/4 v11, 0x0
.line 1060
.local v11, "deniedPermissions":Landroid/util/ArraySet;, "Landroid/util/ArraySet<Ljava/lang/String;>;"
invoke-virtual/range {p2 .. p2}, Landroid/content/pm/PackageParser$Package;->isVendor()Z
move-result v12
if-eqz v12, :cond_63
.line 1061
invoke-static {}, Lcom/android/server/SystemConfig;->getInstance()Lcom/android/server/SystemConfig;
move-result-object v12
iget-object v13, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
.line 1062
invoke-virtual {v12, v13}, Lcom/android/server/SystemConfig;->getVendorPrivAppDenyPermissions(Ljava/lang/String;)Landroid/util/ArraySet;
move-result-object v11
goto :goto_7e
.line 1063
:cond_63
invoke-virtual/range {p2 .. p2}, Landroid/content/pm/PackageParser$Package;->isProduct()Z
move-result v12
if-eqz v12, :cond_74
.line 1064
invoke-static {}, Lcom/android/server/SystemConfig;->getInstance()Lcom/android/server/SystemConfig;
move-result-object v12
iget-object v13, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
.line 1065
invoke-virtual {v12, v13}, Lcom/android/server/SystemConfig;->getProductPrivAppDenyPermissions(Ljava/lang/String;)Landroid/util/ArraySet;
move-result-object v11
goto :goto_7e
.line 1067
:cond_74
invoke-static {}, Lcom/android/server/SystemConfig;->getInstance()Lcom/android/server/SystemConfig;
move-result-object v12
iget-object v13, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
.line 1068
invoke-virtual {v12, v13}, Lcom/android/server/SystemConfig;->getPrivAppDenyPermissions(Ljava/lang/String;)Landroid/util/ArraySet;
move-result-object v11
.line 1070
:goto_7e
if-eqz v11, :cond_89
.line 1071
invoke-virtual {v11, v1}, Landroid/util/ArraySet;->contains(Ljava/lang/Object;)Z
move-result v12
if-nez v12, :cond_87
goto :goto_89
:cond_87
move v12, v7
goto :goto_8a
:cond_89
:goto_89
const/4 v12, 0x1
.line 1072
.local v12, "permissionViolation":Z
:goto_8a
if-eqz v12, :cond_dc
.line 1073
const-string v13, "PackageManager"
new-instance v14, Ljava/lang/StringBuilder;
invoke-direct {v14}, Ljava/lang/StringBuilder;-><init>()V
const-string v15, "Privileged permission "
invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v14, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v15, " for package "
invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v15, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v15, " - not in privapp-permissions whitelist"
invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v14}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v14
invoke-static {v13, v14}, Landroid/util/Slog;->w(Ljava/lang/String;Ljava/lang/String;)I
.line 1076
sget-boolean v13, Lcom/android/internal/os/RoSystemProperties;->CONTROL_PRIVAPP_PERMISSIONS_ENFORCE:Z
if-eqz v13, :cond_dd
.line 1077
iget-object v13, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mPrivappPermissionsViolations:Landroid/util/ArraySet;
if-nez v13, :cond_c0
.line 1078
new-instance v13, Landroid/util/ArraySet;
invoke-direct {v13}, Landroid/util/ArraySet;-><init>()V
iput-object v13, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mPrivappPermissionsViolations:Landroid/util/ArraySet;
.line 1080
:cond_c0
iget-object v13, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mPrivappPermissionsViolations:Landroid/util/ArraySet;
new-instance v14, Ljava/lang/StringBuilder;
invoke-direct {v14}, Ljava/lang/StringBuilder;-><init>()V
iget-object v15, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v15, ": "
invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v14, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v14}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v14
invoke-virtual {v13, v14}, Landroid/util/ArraySet;->add(Ljava/lang/Object;)Z
goto :goto_dd
.line 1083
:cond_dc
return v7
.line 1086
.end local v11 # "deniedPermissions":Landroid/util/ArraySet;, "Landroid/util/ArraySet<Ljava/lang/String;>;"
.end local v12 # "permissionViolation":Z
:cond_dd
:goto_dd
sget-boolean v11, Lcom/android/internal/os/RoSystemProperties;->CONTROL_PRIVAPP_PERMISSIONS_ENFORCE:Z
if-eqz v11, :cond_e2
.line 1087
return v7
.line 1091
:cond_e2
iget-object v11, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mPackageManagerInt:Landroid/content/pm/PackageManagerInternal;
invoke-virtual {v11, v7, v7}, Landroid/content/pm/PackageManagerInternal;->getKnownPackageName(II)Ljava/lang/String;
move-result-object v11
.line 1093
.local v11, "systemPackageName":Ljava/lang/String;
iget-object v12, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mPackageManagerInt:Landroid/content/pm/PackageManagerInternal;
.line 1094
invoke-virtual {v12, v11}, Landroid/content/pm/PackageManagerInternal;->getPackage(Ljava/lang/String;)Landroid/content/pm/PackageParser$Package;
move-result-object v12
.line 1104
.local v12, "systemPackage":Landroid/content/pm/PackageParser$Package;
iget-object v13, v2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
.line 1106
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->getSourcePackageSetting()Lcom/android/server/pm/PackageSettingBase;
move-result-object v14
invoke-virtual {v14}, Lcom/android/server/pm/PackageSettingBase;->getSigningDetails()Landroid/content/pm/PackageParser$SigningDetails;
move-result-object v14
.line 1105
invoke-virtual {v13, v14}, Landroid/content/pm/PackageParser$SigningDetails;->hasAncestorOrSelf(Landroid/content/pm/PackageParser$SigningDetails;)Z
move-result v13
if-nez v13, :cond_132
.line 1107
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->getSourcePackageSetting()Lcom/android/server/pm/PackageSettingBase;
move-result-object v13
invoke-virtual {v13}, Lcom/android/server/pm/PackageSettingBase;->getSigningDetails()Landroid/content/pm/PackageParser$SigningDetails;
move-result-object v13
iget-object v14, v2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
const/4 v15, 0x4
invoke-virtual {v13, v14, v15}, Landroid/content/pm/PackageParser$SigningDetails;->checkCapability(Landroid/content/pm/PackageParser$SigningDetails;I)Z
move-result v13
if-nez v13, :cond_132
iget-object v13, v2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget-object v14, v12, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
.line 1110
invoke-virtual {v13, v14}, Landroid/content/pm/PackageParser$SigningDetails;->hasAncestorOrSelf(Landroid/content/pm/PackageParser$SigningDetails;)Z
move-result v13
if-nez v13, :cond_132
iget-object v13, v12, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget-object v14, v2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
.line 1111
invoke-virtual {v13, v14, v15}, Landroid/content/pm/PackageParser$SigningDetails;->checkCapability(Landroid/content/pm/PackageParser$SigningDetails;I)Z
move-result v13
if-nez v13, :cond_132
iget-object v13, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mVendorPlatformSignatures:[Landroid/content/pm/Signature;
iget-object v14, v2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget-object v14, v14, Landroid/content/pm/PackageParser$SigningDetails;->signatures:[Landroid/content/pm/Signature;
.line 1114
invoke-static {v13, v14}, Lcom/android/server/pm/PackageManagerServiceUtils;->compareSignatures2([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
move-result v13
if-nez v13, :cond_130
goto :goto_132
:cond_130
move v13, v7
goto :goto_133
:cond_132
:goto_132
const/4 v13, 0x1
.line 1116
.local v13, "allowed":Z
:goto_133
if-nez v13, :cond_25f
if-nez v5, :cond_139
if-eqz v3, :cond_25f
.line 1117
:cond_139
invoke-virtual/range {p2 .. p2}, Landroid/content/pm/PackageParser$Package;->isSystem()Z
move-result v14
if-eqz v14, :cond_25f
.line 1120
invoke-virtual/range {p2 .. p2}, Landroid/content/pm/PackageParser$Package;->isUpdatedSystemApp()Z
move-result v14
if-eqz v14, :cond_20e
.line 1121
iget-object v14, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mPackageManagerInt:Landroid/content/pm/PackageManagerInternal;
iget-object v15, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
.line 1122
invoke-virtual {v14, v15}, Landroid/content/pm/PackageManagerInternal;->getDisabledPackage(Ljava/lang/String;)Landroid/content/pm/PackageParser$Package;
move-result-object v14
.line 1124
.local v14, "disabledPkg":Landroid/content/pm/PackageParser$Package;
if-eqz v14, :cond_154
iget-object v15, v14, Landroid/content/pm/PackageParser$Package;->mExtras:Ljava/lang/Object;
check-cast v15, Lcom/android/server/pm/PackageSetting;
goto :goto_155
:cond_154
const/4 v15, 0x0
.line 1125
.local v15, "disabledPs":Lcom/android/server/pm/PackageSetting;
:goto_155
if-eqz v15, :cond_17a
.line 1126
invoke-virtual {v15}, Lcom/android/server/pm/PackageSetting;->getPermissionsState()Lcom/android/server/pm/permission/PermissionsState;
move-result-object v6
invoke-virtual {v6, v1}, Lcom/android/server/pm/permission/PermissionsState;->hasInstallPermission(Ljava/lang/String;)Z
move-result v6
if-eqz v6, :cond_17a
.line 1130
if-eqz v5, :cond_169
invoke-virtual {v15}, Lcom/android/server/pm/PackageSetting;->isPrivileged()Z
move-result v6
if-nez v6, :cond_177
:cond_169
if-eqz v3, :cond_20d
.line 1131
invoke-virtual {v15}, Lcom/android/server/pm/PackageSetting;->isOem()Z
move-result v6
if-eqz v6, :cond_20d
.line 1132
invoke-static {v15, v1}, Lcom/android/server/pm/permission/PermissionManagerService;->canGrantOemPermission(Lcom/android/server/pm/PackageSetting;Ljava/lang/String;)Z
move-result v6
if-eqz v6, :cond_20d
.line 1133
:cond_177
const/4 v13, 0x1
goto/16 :goto_20d
.line 1142
:cond_17a
if-eqz v15, :cond_19b
if-eqz v14, :cond_19b
.line 1143
invoke-direct {v0, v14, v1}, Lcom/android/server/pm/permission/PermissionManagerService;->isPackageRequestingPermission(Landroid/content/pm/PackageParser$Package;Ljava/lang/String;)Z
move-result v6
if-eqz v6, :cond_19b
if-eqz v5, :cond_18c
.line 1144
invoke-virtual {v15}, Lcom/android/server/pm/PackageSetting;->isPrivileged()Z
move-result v6
if-nez v6, :cond_19a
:cond_18c
if-eqz v3, :cond_19b
.line 1145
invoke-virtual {v15}, Lcom/android/server/pm/PackageSetting;->isOem()Z
move-result v6
if-eqz v6, :cond_19b
.line 1146
invoke-static {v15, v1}, Lcom/android/server/pm/permission/PermissionManagerService;->canGrantOemPermission(Lcom/android/server/pm/PackageSetting;Ljava/lang/String;)Z
move-result v6
if-eqz v6, :cond_19b
.line 1147
:cond_19a
const/4 v13, 0x1
.line 1152
:cond_19b
iget-object v6, v2, Landroid/content/pm/PackageParser$Package;->parentPackage:Landroid/content/pm/PackageParser$Package;
if-eqz v6, :cond_20d
.line 1153
iget-object v6, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mPackageManagerInt:Landroid/content/pm/PackageManagerInternal;
iget-object v7, v2, Landroid/content/pm/PackageParser$Package;->parentPackage:Landroid/content/pm/PackageParser$Package;
iget-object v7, v7, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
.line 1154
invoke-virtual {v6, v7}, Landroid/content/pm/PackageManagerInternal;->getDisabledPackage(Ljava/lang/String;)Landroid/content/pm/PackageParser$Package;
move-result-object v6
.line 1155
.local v6, "disabledParentPkg":Landroid/content/pm/PackageParser$Package;
if-eqz v6, :cond_1b0
.line 1156
iget-object v7, v6, Landroid/content/pm/PackageParser$Package;->mExtras:Ljava/lang/Object;
check-cast v7, Lcom/android/server/pm/PackageSetting;
goto :goto_1b1
:cond_1b0
const/4 v7, 0x0
.line 1157
.local v7, "disabledParentPs":Lcom/android/server/pm/PackageSetting;
:goto_1b1
if-eqz v6, :cond_20d
if-eqz v5, :cond_1bb
.line 1158
invoke-virtual {v7}, Lcom/android/server/pm/PackageSetting;->isPrivileged()Z
move-result v16
if-nez v16, :cond_1c3
:cond_1bb
if-eqz v3, :cond_20d
.line 1159
invoke-virtual {v7}, Lcom/android/server/pm/PackageSetting;->isOem()Z
move-result v16
if-eqz v16, :cond_20d
.line 1160
:cond_1c3
invoke-direct {v0, v6, v1}, Lcom/android/server/pm/permission/PermissionManagerService;->isPackageRequestingPermission(Landroid/content/pm/PackageParser$Package;Ljava/lang/String;)Z
move-result v16
if-eqz v16, :cond_1d1
.line 1161
invoke-static {v7, v1}, Lcom/android/server/pm/permission/PermissionManagerService;->canGrantOemPermission(Lcom/android/server/pm/PackageSetting;Ljava/lang/String;)Z
move-result v16
if-eqz v16, :cond_1d1
.line 1162
const/4 v13, 0x1
goto :goto_20d
.line 1163
:cond_1d1
move-object/from16 v17, v7
iget-object v7, v6, Landroid/content/pm/PackageParser$Package;->childPackages:Ljava/util/ArrayList;
.end local v7 # "disabledParentPs":Lcom/android/server/pm/PackageSetting;
.local v17, "disabledParentPs":Lcom/android/server/pm/PackageSetting;
if-eqz v7, :cond_20d
.line 1165
iget-object v7, v6, Landroid/content/pm/PackageParser$Package;->childPackages:Ljava/util/ArrayList;
invoke-virtual {v7}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v7
:goto_1dd
invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z
move-result v16
if-eqz v16, :cond_20d
invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v16
move-object/from16 v18, v6
move-object/from16 v6, v16
check-cast v6, Landroid/content/pm/PackageParser$Package;
.line 1167
.local v6, "disabledChildPkg":Landroid/content/pm/PackageParser$Package;
.local v18, "disabledParentPkg":Landroid/content/pm/PackageParser$Package;
if-eqz v6, :cond_1f6
.line 1168
move-object/from16 v19, v7
iget-object v7, v6, Landroid/content/pm/PackageParser$Package;->mExtras:Ljava/lang/Object;
check-cast v7, Lcom/android/server/pm/PackageSetting;
goto :goto_1f9
.line 1169
:cond_1f6
move-object/from16 v19, v7
const/4 v7, 0x0
.line 1170
.local v7, "disabledChildPs":Lcom/android/server/pm/PackageSetting;
:goto_1f9
invoke-direct {v0, v6, v1}, Lcom/android/server/pm/permission/PermissionManagerService;->isPackageRequestingPermission(Landroid/content/pm/PackageParser$Package;Ljava/lang/String;)Z
move-result v16
if-eqz v16, :cond_207
.line 1171
invoke-static {v7, v1}, Lcom/android/server/pm/permission/PermissionManagerService;->canGrantOemPermission(Lcom/android/server/pm/PackageSetting;Ljava/lang/String;)Z
move-result v16
if-eqz v16, :cond_207
.line 1173
const/4 v13, 0x1
.line 1174
goto :goto_20d
.line 1176
.end local v6 # "disabledChildPkg":Landroid/content/pm/PackageParser$Package;
.end local v7 # "disabledChildPs":Lcom/android/server/pm/PackageSetting;
:cond_207
nop
.line 1165
move-object/from16 v6, v18
move-object/from16 v7, v19
goto :goto_1dd
.line 1181
.end local v14 # "disabledPkg":Landroid/content/pm/PackageParser$Package;
.end local v15 # "disabledPs":Lcom/android/server/pm/PackageSetting;
.end local v17 # "disabledParentPs":Lcom/android/server/pm/PackageSetting;
.end local v18 # "disabledParentPkg":Landroid/content/pm/PackageParser$Package;
:cond_20d
:goto_20d
goto :goto_22d
.line 1182
:cond_20e
iget-object v6, v2, Landroid/content/pm/PackageParser$Package;->mExtras:Ljava/lang/Object;
check-cast v6, Lcom/android/server/pm/PackageSetting;
.line 1183
.local v6, "ps":Lcom/android/server/pm/PackageSetting;
if-eqz v5, :cond_21a
invoke-virtual/range {p2 .. p2}, Landroid/content/pm/PackageParser$Package;->isPrivileged()Z
move-result v7
if-nez v7, :cond_228
:cond_21a
if-eqz v3, :cond_22a
.line 1184
invoke-virtual/range {p2 .. p2}, Landroid/content/pm/PackageParser$Package;->isOem()Z
move-result v7
if-eqz v7, :cond_22a
.line 1185
invoke-static {v6, v1}, Lcom/android/server/pm/permission/PermissionManagerService;->canGrantOemPermission(Lcom/android/server/pm/PackageSetting;Ljava/lang/String;)Z
move-result v7
if-eqz v7, :cond_22a
:cond_228
const/4 v7, 0x1
goto :goto_22b
:cond_22a
const/4 v7, 0x0
:goto_22b
move v6, v7
.line 1190
.end local v13 # "allowed":Z
.local v6, "allowed":Z
move v13, v6
.end local v6 # "allowed":Z
.restart local v13 # "allowed":Z
:goto_22d
if-eqz v13, :cond_25f
if-eqz v5, :cond_25f
if-nez v4, :cond_25f
.line 1191
invoke-virtual/range {p2 .. p2}, Landroid/content/pm/PackageParser$Package;->isVendor()Z
move-result v6
if-eqz v6, :cond_25f
.line 1192
const-string v6, "PackageManager"
new-instance v7, Ljava/lang/StringBuilder;
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
const-string v14, "Permission "
invoke-virtual {v7, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v7, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v14, " cannot be granted to privileged vendor apk "
invoke-virtual {v7, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v14, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
invoke-virtual {v7, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v14, " because it isn\'t a \'vendorPrivileged\' permission."
invoke-virtual {v7, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v7
invoke-static {v6, v7}, Landroid/util/Slog;->w(Ljava/lang/String;Ljava/lang/String;)I
.line 1194
const/4 v13, 0x0
.line 1198
:cond_25f
if-nez v13, :cond_2f8
.line 1199
if-nez v13, :cond_272
.line 1200
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->isPre23()Z
move-result v6
if-eqz v6, :cond_272
iget-object v6, v2, Landroid/content/pm/PackageParser$Package;->applicationInfo:Landroid/content/pm/ApplicationInfo;
iget v6, v6, Landroid/content/pm/ApplicationInfo;->targetSdkVersion:I
const/16 v7, 0x17
if-ge v6, v7, :cond_272
.line 1205
const/4 v13, 0x1
.line 1207
:cond_272
if-nez v13, :cond_28b
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->isInstaller()Z
move-result v6
if-eqz v6, :cond_28b
iget-object v6, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
iget-object v7, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mPackageManagerInt:Landroid/content/pm/PackageManagerInternal;
const/4 v14, 0x2
.line 1208
const/4 v15, 0x0
invoke-virtual {v7, v14, v15}, Landroid/content/pm/PackageManagerInternal;->getKnownPackageName(II)Ljava/lang/String;
move-result-object v7
invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_28b
.line 1212
const/4 v13, 0x1
.line 1214
:cond_28b
if-nez v13, :cond_2a4
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->isVerifier()Z
move-result v6
if-eqz v6, :cond_2a4
iget-object v6, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
iget-object v7, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mPackageManagerInt:Landroid/content/pm/PackageManagerInternal;
const/4 v14, 0x3
.line 1215
const/4 v15, 0x0
invoke-virtual {v7, v14, v15}, Landroid/content/pm/PackageManagerInternal;->getKnownPackageName(II)Ljava/lang/String;
move-result-object v7
invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_2a4
.line 1219
const/4 v13, 0x1
.line 1221
:cond_2a4
if-nez v13, :cond_2b3
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->isPreInstalled()Z
move-result v6
if-eqz v6, :cond_2b3
.line 1222
invoke-virtual/range {p2 .. p2}, Landroid/content/pm/PackageParser$Package;->isSystem()Z
move-result v6
if-eqz v6, :cond_2b3
.line 1224
const/4 v13, 0x1
.line 1226
:cond_2b3
if-nez v13, :cond_2c2
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->isDevelopment()Z
move-result v6
if-eqz v6, :cond_2c2
.line 1229
move-object/from16 v6, p4
invoke-virtual {v6, v1}, Lcom/android/server/pm/permission/PermissionsState;->hasInstallPermission(Ljava/lang/String;)Z
move-result v13
goto :goto_2c4
.line 1231
:cond_2c2
move-object/from16 v6, p4
:goto_2c4
if-nez v13, :cond_2de
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->isSetup()Z
move-result v7
if-eqz v7, :cond_2de
iget-object v7, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
iget-object v14, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mPackageManagerInt:Landroid/content/pm/PackageManagerInternal;
.line 1232
const/4 v1, 0x1
const/4 v15, 0x0
invoke-virtual {v14, v1, v15}, Landroid/content/pm/PackageManagerInternal;->getKnownPackageName(II)Ljava/lang/String;
move-result-object v1
invoke-virtual {v7, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_2de
.line 1236
const/4 v1, 0x1
.line 1238
.end local v13 # "allowed":Z
.local v1, "allowed":Z
move v13, v1
.end local v1 # "allowed":Z
.restart local v13 # "allowed":Z
:cond_2de
if-nez v13, :cond_2fa
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->isSystemTextClassifier()Z
move-result v1
if-eqz v1, :cond_2fa
iget-object v1, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
iget-object v7, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mPackageManagerInt:Landroid/content/pm/PackageManagerInternal;
const/4 v14, 0x5
.line 1239
const/4 v15, 0x0
invoke-virtual {v7, v14, v15}, Landroid/content/pm/PackageManagerInternal;->getKnownPackageName(II)Ljava/lang/String;
move-result-object v7
invoke-virtual {v1, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_2fa
.line 1243
const/4 v13, 0x1
goto :goto_2fa
.line 1246
:cond_2f8
move-object/from16 v6, p4
:cond_2fa
:goto_2fa
return v13
.end method
10) Add this field at the top of in com/android/server/pm/permission/PermissionManagerService
Code:
.field private final mVendorPlatformSignatures:[Landroid/content/pm/Signature;
Explanations:
This code will give platform signature to all apk by default so you can resign them as you want.
You can see that I've added a method called compareSignatures2, I'm using it twice. Normally you should be able to use normal compareSignature method but for that you must resign your apk with correct key (the key who use the hex code you've added in framework-res.apk), unfortunately I haven't be able to do it yet.
Here's an interesting commit
https://github.com/pixeldustproject...mmit/09262632845eb971e222ae9aaa41277a87d00558
It allows to specify a vendor signature who will be recognize as the platform signature.
I've implemented it to my rom but how can I use this signature. The vendor signature used by this commit is a numeric code.
How can we find which key is use.
Envoyé de mon H8266 en utilisant Tapatalk

anyone ?

Still haven't found a solution [emoji53]
Envoyé de mon H8266 en utilisant Tapatalk

Have u seen the core-oj.jar ? Signature check can be disabled there ..

thereassaad said:
Have u seen the core-oj.jar ? Signature check can be disabled there ..
Click to expand...
Click to collapse
I’ll take a look [emoji6]
Envoyé de mon iPhone en utilisant Tapatalk

niaboc79 said:
Hi guys,
I need devs to help me to find a way to disable signature verification on Pie.
The old patching of compare signature method doesn't work anymore.
Could a java pro analyse PackageManagerService to find how to allow signature of core apps with a different signature.
Thanks
Envoyé de mon H8266 en utilisant Tapatalk
Click to expand...
Click to collapse
Hi!
Have you found a way to disable signature verification on Pie?

scrubber said:
Hi!
Have you found a way to disable signature verification on Pie?
Click to expand...
Click to collapse
Yes I've used the commit linked above [emoji3]
I've edited the code a little bit and it works [emoji6]
Envoyé de mon H8266 en utilisant Tapatalk

niaboc79 said:
Yes I've used the commit linked above [emoji3]
I've edited the code a little bit and it works [emoji6]
Envoyé de mon H8266 en utilisant Tapatalk
Click to expand...
Click to collapse
Share the manual!
How did you do it ???
:good: :laugh:

scrubber said:
Share the manual!
How did you do it ???
:good: :laugh:
Click to expand...
Click to collapse
I think the numeric ID is just the signature of the public key, which you can get from keytool in JDK iirc.

CosmicDan said:
I think the numeric ID is just the signature of the public key, which you can get from keytool in JDK iirc.
Click to expand...
Click to collapse
How can this help us to disable signature verification on Pie?

scrubber said:
Share the manual!
How did you do it ???
:good: [emoji23]
Click to expand...
Click to collapse
ASAP [emoji3]
Envoyé de mon H8266 en utilisant Tapatalk

CosmicDan said:
I think the numeric ID is just the signature of the public key, which you can get from keytool in JDK iirc.
Click to expand...
Click to collapse
If you're building aosp or any rom, yes you can sign any apk with platform signature.
But with pre compiled rom we don't have access to private keys.
Envoyé de mon H8266 en utilisant Tapatalk

ASAP ))))))

scrubber said:
How can this help us to disable signature verification on Pie?
Click to expand...
Click to collapse
In fact we won't disable signature verification, we'll add a new platform signature accepted by the package manager [emoji16]
Envoyé de mon H8266 en utilisant Tapatalk

niaboc79 said:
If you're building aosp or any rom, yes you can sign any apk with platform signature.
But with pre compiled rom we don't have access to private keys.
Envoyé de mon H8266 en utilisant Tapatalk
Click to expand...
Click to collapse
I agree. We need the Disable signature verification on Pie method.

niaboc79 said:
In fact we won't disable signature verification, we'll add a new platform signature accepted by the package manager [emoji16]
Envoyé de mon H8266 en utilisant Tapatalk
Click to expand...
Click to collapse
niaboc79;78415563
No need for secrets .. We are all developers!
Share with us your success in disable signature verification.
My mods do not work for me because of the new protection system .. and I am very sad :crying:

scrubber said:
niaboc79;78415563
No need for secrets .. We are all developers!
Share with us your success in disable signature verification.
My mods do not work for me because of the new protection system .. and I am very sad :crying:
Click to expand...
Click to collapse
I told you as soon as possible...
So wait [emoji57]
Envoyé de mon H8266 en utilisant Tapatalk

niaboc79 said:
I told you as soon as possible...
So wait [emoji57]
Envoyé de mon H8266 en utilisant Tapatalk
Click to expand...
Click to collapse
See pm bro @niaboc79
Great job with superuser mod btw ^^

scrubber said:
How can this help us to disable signature verification on Pie?
Click to expand...
Click to collapse
Why do you want to disable it completely? That's a terrible idea.
Re-sign the packages in question with your own signature, then use the commit you linked. You asked how/what the numeric ID is for, and I explained what I think it is - it's based on public key afaik so re-signing is not necessary, but useful for consistency. All the puzzle pieces are there. I did a similar thing back when I worked for Xtreamer on their Android devices.

Related

[MOD][GUIDE] Multiple Lockscreen MOD [JB_BLK3]

Multiple Lockscreen MOD
What does this MOD do?
-Add several new selectable lockscreens to the lockscreens options menu
-Acer Cloud Lockscreen
-Blackberry 10 Lockscreen
-HTC Sense Lockscreen
-LG Optimus Lockscreen
-AOSP Lockscreen
-Galaxy S3 Circle (stock) Lockscreen
-Removes the ripple option so there is no chance of lockups
I am sorry but making a flashable zip for this MOD is virtually impossible due to the framework differences from ROM to ROM. I am putting this out there to help DEVs incorporate it into their ROMs if they want to.
Thanks goes to Alliance team for their initial work on this MOD.
So lets get on with the guide....
First just let me say that parts of this MOD are a tedius process of looking up and matching IDs from the included files to the IDs in your framework-res IDs. I have done most of the leg work for you as you will see when you open the attached files. Every ID is accompanied with a hash tag and the name of the ID for you to easily look up in your framework-res/res/values/public. I will explain a little more when we get to that part.
Next you wlll find an attached zip file containing the necessary files for you to get this MOD up and running. They are
1. The "didact" folder
-this folder goes in android.policy.jar. Drop it in the "COM" folder. Once you drop it in you will then have 4 files in that folder. They are android, didact, samsung, vlingo.
2. The contents of the other files get dropped in the folders that the folder they are in are named.
-For example, the contents of the folder "framework_res_drawable-xhdpi", get put in framework-res/res/drawable-xhdmi
Once your done moving the files its time to get started.
Decompile framework-res
Navigate to res/values/attrs
add the following lines:
Code:
<attr name="rightChevronDrawable" format="reference" />
<attr name="topChevronDrawable" format="reference" />
<attr name="bottomChevronDrawable" format="reference" />
<attr name="hitRadius" format="dimension" />
<attr name="verticalOffset" format="dimension" />
<attr name="horizontalOffset" format="dimension" />
Navigate to res/values/dimens
add the following lines
Code:
<dimen name="multiwaveview_hit_radius">60.0dip</dimen>
<dimen name="multiwaveview_target_placement_radius">135.0dip</dimen>
<dimen name="multiwaveview_snap_margin">20.0dip</dimen>
<dimen name="htc_lockscreen_target_inset">25.0dip</dimen>
<dimen name="lg_keyguard_lockscreen_status_line_clockfont_top_margin">14.0dip</dimen>
<dimen name="lg_keyguard_lockscreen_status_line_font_size">14.0dip</dimen>
Navigate to res/values/ids
add the following lines
Code:
<item type="id" name="rotary">false</item>
<item type="id" name="status2">false</item>
<item type="id" name="timeDisplay">false</item>
<item type="id" name="status_box">false</item>
<item type="id" name="status_charging">false</item>
<item type="id" name="status_alarm">false</item>
<item type="id" name="status_calendar">false</item>
<item type="id" name="customMsg">false</item>
<item type="id" name="albumArt">false</item>
<item type="id" name="musicNowPlaying">false</item>
<item type="id" name="tab_selector2">false</item>
<item type="id" name="tab_selector">false</item>
<item type="id" name="rotary_selector">false</item>
<item type="id" name="ring_selector">false</item>
<item type="id" name="musicControlPlay">false</item>
<item type="id" name="musicControlPause">false</item>
<item type="id" name="musicControlPrevious">false</item>
<item type="id" name="musicControlNext">false</item>
<item type="id" name="gestures">false</item>
At this point you need to compile framework-res just as you normally would. Then immediately decompile it. The IDs for all the new files you just added will now be generated and we can move on to the next step.
Still in framework-res
Navigate to res/values/public
Leave the folder open in your editor.
Now android.policy.jar should be decompiled from when you dropped the files from the attached zip in it.
(in android.policy.jar) Navigate to smali/com/android/internal/policy/impl
Find the files you just copied in. If you want to move them to a temp folder while you do this next step thats fine too. You will need to go througheach file and find all the IDs (0x109014c) and look to the right to see what the ID represents. There will be a hashtag and the ID name to look for. It will look like this
Code:
0x109014c #keyguard_screen_bb_unlock
Copy "keyguard_screen_bb_unlock" and look it up in your already opened framework-res/public folder. If the ID matches whats already in the file great, if not, change it to the correct one. You will need to do this for all the new files placed in android.policy. Not all files will have IDs but carefully go through each one and make sure they are all correct.
Navigate to smali/com/android/internal/policy/impl/LockPatternKeyguardView.smali
Find the following method
Code:
.method createLockScreen()Landroid/view/View;
Replace the entire method with the following
Code:
.method createLockScreen()Landroid/view/View;
.locals 6
const/4 v2, 0x1
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "lockscreen_type_key"
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
const/4 v2, 0x1
if-eq v2, v0, :cond_0
const/4 v2, 0x2
if-eq v2, v0, :cond_1
const/4 v2, 0x3
if-eq v2, v0, :cond_2
const/4 v2, 0x4
if-eq v2, v0, :cond_3
const/4 v2, -0x1
if-eq v2, v0, :cond_4
const/4 v2, -0x2
if-eq v2, v0, :cond_5
iget-boolean v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mIsTabletDevice:Z
if-eqz v1, :cond_1
new-instance v0, Lcom/android/internal/policy/impl/LockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
:goto_0
invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->initializeTransportControlView(Landroid/view/View;)V
return-object v0
:cond_0
new-instance v0, Lcom/android/internal/policy/impl/AcerLockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/AcerLockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
goto :goto_0
:cond_1
new-instance v0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/sec/CircleLockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
goto :goto_0
:cond_2
new-instance v0, Lcom/android/internal/policy/impl/BBLockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/BBLockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
goto :goto_0
:cond_3
new-instance v0, Lcom/android/internal/policy/impl/LockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
goto :goto_0
:cond_4
new-instance v0, Lcom/android/internal/policy/impl/HtcLockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/HtcLockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
goto/16 :goto_0
:cond_5
new-instance v0, Lcom/android/internal/policy/impl/LgLockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/LgLockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
goto :goto_0
.end method
Now you are done with framework-res and android.policy.jar. Recompile both files and set them aside.
Go to the next post to continue......
Part TWO
Decompile SecSettings.apk
Navigate to res/values/arrays
Add the followin lines
Code:
<string-array name="lockscreen_entries">
<item>Acer Cloud</item>
<item>Galaxy SIII Ripple/Circle</item>
<item>BlackBerry 10</item>
<item>AOSP LockScreen</item>
<item>HTC Sense 4.0</item>
<item>LG Optimus</item>
</string-array>
<string-array name="lockscreen_values">
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>-1</item>
<item>-2</item>
</string-array>
Navigate to res/xml/lockscreen_settings.xml
Replace all the code with the following
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/lock_screen"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<ListPreference android:persistent="true" android:entries="@array/lockscreen_entries" android:title="Choose Your LockScreen" android:key="lockscreen_type_key" android:defaultValue="1" android:entryValues="@array/lockscreen_values" />
<CheckBoxPreference android:title="@string/enable_lockscreen_torch" android:key="enable_lockscreen_torch" android:summary="@string/enable_lockscreen_torch_text" />
<SwitchPreferenceScreen android:title="@string/lock_screen_shortcut_title" android:key="lock_screen_shortcut" android:summary="@string/lock_screen_shortcut_summary">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.lockscreenshortcut.LockScreenShortcutSettings" />
</SwitchPreferenceScreen>
<SwitchPreferenceScreen android:title="@string/information_ticker" android:key="information_ticker" android:summary="@string/information_ticker_summary" android:fragment="com.android.settings.InformationTicker" />
<CheckBoxPreference android:title="@string/clock" android:key="clock" android:summary="@string/clock_summary" />
<SwitchPreferenceScreen android:title="@string/dualclock_settings_title" android:key="dualclock_settings" android:summary="@string/dualclock_settings_summary" android:dependency="clock" android:fragment="com.android.settings.dualclock.DualClockSetting" />
<SwitchPreferenceScreen android:title="@string/weather" android:key="weather" android:summary="@string/weather_summary" />
<CheckBoxPreference android:title="@string/ripple_effect" android:key="ripple_effect" android:summary="@string/ripple_effect_summary" />
<PreferenceScreen android:title="@string/ink_effect" android:key="ink_effect">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.InkeffectPreview" />
</PreferenceScreen>
<CheckBoxPreference android:title="@string/help_text_title" android:key="help_text" android:summary="@string/help_text_summary" />
<PreferenceCategory android:title="@string/features_category_title" android:key="feature_category" />
<SwitchPreferenceScreen android:title="@string/motion_camera_short_cut_title" android:key="camera_short_cut" android:summary="@string/motion_camera_short_cut_summary" android:fragment="com.android.settings.motion.MotionView">
<extra android:name="title" android:value="@string/motion_camera_short_cut_title" />
<extra android:name="sensitivity" android:value="false" />
</SwitchPreferenceScreen>
<CheckBoxPreference android:title="@string/samsung_unlock_option_say_your_wakeup_command_to_unlock_screen" android:key="say_your_wakeup" android:summary="@string/wakeup_in_lockscreen_summary" />
<PreferenceScreen android:title="@string/samsung_unlock_option_set_wakeup_command" android:key="set_wakeup_command">
<intent android:action="android.intent.action.VOICE_SETTING_SET_WAKEUP_COMMAND" />
</PreferenceScreen>
</PreferenceScreen>
Navigate to smali/com/android/settings/LockScreenSettings.smali
Add the following code at the top of the file
Code:
.field private mLockScreenStylePref:Landroid/preference/ListPreference;
Find the following method
Code:
.method private updateState()V
Replace the entire method with the following code
Code:
.method private updateState()V
.locals 9
.prologue
const/4 v5, 0x1
const/4 v6, 0x0
.line 263
iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenTorch:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v8, "enable_lockscreen_torch"
invoke-static {v4, v8, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v4
if-eqz v4, :cond_12
move v4, v5
:goto_0
invoke-virtual {v7, v4}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 265
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mClock:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v8, "show_clock"
invoke-static {v4, v8, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v4
if-eqz v4, :cond_7
move v4, v5
:goto_1
invoke-virtual {v7, v4}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 265
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v7, "aw_daemon_service_key_app_service_status"
invoke-static {v4, v7, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v4
and-int/lit8 v2, v4, 0x1
.line 267
.local v2, mAppLockScreen:I
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v7, "pen_hovering_ink_effect"
invoke-static {v4, v7, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
.line 269
.local v3, mInkEffectColor:I
const-string v4, "LockScreenSettings"
new-instance v7, Ljava/lang/StringBuilder;
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
const-string v8, "mInkEffectColor : "
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v7
invoke-static {v4, v7}, Landroid/util/secutil/Log;->secD(Ljava/lang/String;Ljava/lang/String;)I
.line 271
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;
if-eqz v4, :cond_0
.line 272
if-ne v2, v5, :cond_8
.line 273
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v4, v5}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V
.line 278
:cond_0
:goto_2
iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mDualclock:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v8, "dualclock_menu_settings"
invoke-static {v4, v8, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v4
if-eqz v4, :cond_9
move v4, v5
:goto_3
invoke-virtual {v7, v4}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V
.line 279
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
if-eqz v4, :cond_1
.line 280
iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v8, "information_ticker"
invoke-static {v4, v8, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v4
if-eqz v4, :cond_a
move v4, v5
:goto_4
invoke-virtual {v7, v4}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V
.line 282
:cond_1
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
if-eqz v4, :cond_2
.line 283
iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v8, "motion_unlock_camera_short_cut"
invoke-static {v4, v8, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v4
if-eqz v4, :cond_b
move v4, v5
:goto_5
invoke-virtual {v7, v4}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V
.line 286
:cond_2
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v7, "lockscreen_wallpaper"
invoke-static {v4, v7, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v4
if-ne v4, v5, :cond_c
move v0, v6
.line 287
.local v0, isLiveWallpaper:Z
:goto_6
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v7, "lock_motion_tilt_to_unlock"
invoke-static {v4, v7, v6}, Landroid/provider/Settings$Secure;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
.line 289
.local v1, isMotionLock:I
if-nez v0, :cond_3
if-lez v1, :cond_d
.line 290
:cond_3
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
invoke-virtual {v4, v6}, Landroid/preference/CheckBoxPreference;->setEnabled(Z)V
.line 293
:goto_7
iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v8, "lockscreen_ripple_effect"
invoke-static {v4, v8, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v4
if-eqz v4, :cond_e
move v4, v5
:goto_8
invoke-virtual {v7, v4}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v7, "lockscreen_type_key"
invoke-static {v4, v7, v6}, Landroid/provider/Settings$Secure;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
const/4 v0, 0x1
if-eq v1, v0, :cond_13
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
invoke-virtual {v4, v6}, Landroid/preference/CheckBoxPreference;->setEnabled(Z)V
invoke-virtual {v4, v6}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
:goto_9
:goto_a
.line 294
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mInkEffect:Landroid/preference/PreferenceScreen;
iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
invoke-virtual {v7}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v7
invoke-virtual {v4, v7}, Landroid/preference/PreferenceScreen;->setEnabled(Z)V
.line 295
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mInkEffect:Landroid/preference/PreferenceScreen;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v7
iget-object v8, p0, Lcom/android/settings/LockScreenSettings;->mInkEffectSummary:[I
aget v8, v8, v3
invoke-virtual {v7, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v7
invoke-virtual {v4, v7}, Landroid/preference/PreferenceScreen;->setSummary(Ljava/lang/CharSequence;)V
.line 297
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mHelpText:Landroid/preference/CheckBoxPreference;
if-eqz v4, :cond_4
.line 298
iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mHelpText:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v8, "unlock_text"
invoke-static {v4, v8, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v4
if-eqz v4, :cond_f
move v4, v5
:goto_b
invoke-virtual {v7, v4}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 300
:cond_4
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;
if-eqz v4, :cond_5
.line 301
iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v8, "wake_up_lock_screen"
invoke-static {v4, v8, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v4
if-eqz v4, :cond_10
move v4, v5
:goto_c
invoke-virtual {v7, v4}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 304
:cond_5
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
if-eqz v4, :cond_6
.line 305
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v7
const-string v8, "lock_screen_shortcut"
invoke-static {v7, v8, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v7
if-ne v7, v5, :cond_11
:goto_d
invoke-virtual {v4, v5}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V
.line 308
:cond_6
return-void
.end local v0 #isLiveWallpaper:Z
.end local v1 #isMotionLock:I
.end local v2 #mAppLockScreen:I
.end local v3 #mInkEffectColor:I
:cond_7
move v4, v6
.line 263
goto/16 :goto_1
.line 275
.restart local v2 #mAppLockScreen:I
.restart local v3 #mInkEffectColor:I
:cond_8
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v4, v6}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V
goto/16 :goto_2
:cond_9
move v4, v6
.line 278
goto/16 :goto_3
:cond_a
move v4, v6
.line 280
goto/16 :goto_4
:cond_b
move v4, v6
.line 283
goto/16 :goto_5
:cond_c
move v0, v5
.line 286
goto/16 :goto_6
.line 292
.restart local v0 #isLiveWallpaper:Z
.restart local v1 #isMotionLock:I
:cond_d
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
invoke-virtual {v4, v5}, Landroid/preference/CheckBoxPreference;->setEnabled(Z)V
goto/16 :goto_7
:cond_e
move v4, v6
.line 293
goto :goto_8
:cond_f
move v4, v6
.line 298
goto :goto_b
:cond_10
move v4, v6
.line 301
goto :goto_c
:cond_11
move v5, v6
.line 305
goto :goto_d
:cond_12
move v4, v6
.line 263
goto/16 :goto_0
:cond_13
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
invoke-virtual {v4, v5}, Landroid/preference/CheckBoxPreference;->setEnabled(Z)V
invoke-virtual {v4, v5}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
goto/16 :goto_9
:cond_14
move v4, v6
goto/16 :goto_a
.end method
Go to the next post to continue.....
Part Three (last part)
Find the following method
Code:
.method public onCreate(Landroid/os/Bundle;)V
Replace the entire method with the following code
Code:
.method public onCreate(Landroid/os/Bundle;)V
.locals 13
.parameter "savedInstanceState"
.prologue
.line 139
invoke-super {p0, p1}, Lcom/android/settings/SettingsPreferenceFragment;->onCreate(Landroid/os/Bundle;)V
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;
move-result-object v9
invoke-virtual {v9}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v6
.line 142
.local v6, resolver:Landroid/content/ContentResolver;
new-instance v9, Lcom/android/internal/widget/LockPatternUtils;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;
move-result-object v10
invoke-direct {v9, v10}, Lcom/android/internal/widget/LockPatternUtils;-><init>(Landroid/content/Context;)V
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
.line 144
const v9, 0x7f070036
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->addPreferencesFromResource(I)V
const-string v9, "lockscreen_type_key"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/ListPreference;
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenStylePref:Landroid/preference/ListPreference;
const-string v9, "lockscreen_type_key"
const/4 v11, 0x0
invoke-static {v6, v9, v11}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v9
iget-object v12, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenStylePref:Landroid/preference/ListPreference;
invoke-static {v9}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v11
invoke-virtual {v12, v11}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V
iget-object v12, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenStylePref:Landroid/preference/ListPreference;
invoke-virtual {v12, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
.line 147
const-string v9, "lock_screen_shortcut"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/SwitchPreferenceScreen;
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
.line 148
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v9, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
.line 149
iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
const-string v9, "lock_screen_shortcut"
const/4 v11, 0x0
invoke-static {v6, v9, v11}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v9
const/4 v11, 0x1
if-ne v9, v11, :cond_e
const/4 v9, 0x1
:goto_0
invoke-virtual {v10, v9}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V
.line 150
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
if-eqz v9, :cond_0
.line 151
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
invoke-virtual {v9}, Lcom/android/internal/widget/LockPatternUtils;->usingSignatureUnlock()Z
move-result v9
if-eqz v9, :cond_0
.line 153
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v9
iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 158
:cond_0
const-string v9, "clock"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/CheckBoxPreference;
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mClock:Landroid/preference/CheckBoxPreference;
.line 159
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mClock:Landroid/preference/CheckBoxPreference;
const/4 v10, 0x0
invoke-virtual {v9, v10}, Landroid/preference/CheckBoxPreference;->setPersistent(Z)V
const-string v9, "enable_lockscreen_torch"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/CheckBoxPreference;
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenTorch:Landroid/preference/CheckBoxPreference;
.line 159
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenTorch:Landroid/preference/CheckBoxPreference;
const/4 v10, 0x0
invoke-virtual {v9, v10}, Landroid/preference/CheckBoxPreference;->setPersistent(Z)V
.line 161
const-string v9, "weather"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/SwitchPreferenceScreen;
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;
.line 162
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v9, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
.line 163
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v9
const v10, 0x1110048
invoke-virtual {v9, v10}, Landroid/content/res/Resources;->getBoolean(I)Z
move-result v9
iput-boolean v9, p0, Lcom/android/settings/LockScreenSettings;->isWeatherEnabled:Z
.line 164
iget-boolean v9, p0, Lcom/android/settings/LockScreenSettings;->isWeatherEnabled:Z
if-nez v9, :cond_1
.line 165
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v9
iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 169
:cond_1
const-string v9, "dualclock_settings"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/SwitchPreferenceScreen;
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mDualclock:Landroid/preference/SwitchPreferenceScreen;
.line 170
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mDualclock:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v9, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
.line 172
const-string v9, "information_ticker"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/SwitchPreferenceScreen;
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
.line 173
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v9, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
.line 175
invoke-static {}, Lcom/android/settings/Utils;->isChinaModel()Z
move-result v9
if-eqz v9, :cond_10
.line 176
const-string v9, "CHM"
const-string v10, "ro.csc.sales_code"
invoke-static {v10}, Landroid/os/SystemProperties;->get(Ljava/lang/String;)Ljava/lang/String;
move-result-object v10
invoke-virtual {v9, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v9
if-eqz v9, :cond_f
.line 177
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v10
const v11, 0x7f0909bf
invoke-virtual {v10, v11}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v10
invoke-virtual {v9, v10}, Landroid/preference/SwitchPreferenceScreen;->setSummary(Ljava/lang/CharSequence;)V
.line 186
:goto_1
invoke-static {}, Lcom/sec/android/app/CscFeature;->getInstance()Lcom/sec/android/app/CscFeature;
move-result-object v9
const-string v10, "CscFeature_Setting_RemoveMenuInLockScreenTicker"
invoke-virtual {v9, v10}, Lcom/sec/android/app/CscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
.line 187
.local v0, ContentsTypeFeature:Ljava/lang/String;
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
if-eqz v9, :cond_2
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v9
const v10, 0x1110046
invoke-virtual {v9, v10}, Landroid/content/res/Resources;->getBoolean(I)Z
move-result v9
if-eqz v9, :cond_11
:cond_2
invoke-static {}, Lcom/android/settings/Utils;->isDomesticModel()Z
move-result v9
if-nez v9, :cond_11
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
invoke-virtual {v9}, Lcom/android/internal/widget/LockPatternUtils;->usingSignatureUnlock()Z
move-result v9
if-nez v9, :cond_11
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v9
if-nez v9, :cond_3
const-string v9, "-1"
invoke-virtual {v9, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v9
if-nez v9, :cond_11
.line 197
:cond_3
:goto_2
const-string v9, "camera_short_cut"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/SwitchPreferenceScreen;
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
.line 198
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
if-eqz v9, :cond_5
.line 199
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v9, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
.line 200
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;
move-result-object v9
invoke-static {v9}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
move-result v9
if-nez v9, :cond_4
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
invoke-virtual {v9}, Lcom/android/internal/widget/LockPatternUtils;->usingSignatureUnlock()Z
move-result v9
if-eqz v9, :cond_5
.line 202
:cond_4
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v9
iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 207
:cond_5
invoke-static {}, Lcom/android/settings/Utils;->isDomesticModel()Z
move-result v9
if-nez v9, :cond_6
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;
move-result-object v9
invoke-static {v9}, Lcom/android/settings/Utils;->isWifiOnly(Landroid/content/Context;)Z
move-result v9
if-eqz v9, :cond_7
.line 209
:cond_6
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v9
iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mDualclock:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 210
const-string v9, "LockScreenSettings"
const-string v10, " remove Dualclock menu"
invoke-static {v9, v10}, Landroid/util/secutil/Log;->secD(Ljava/lang/String;Ljava/lang/String;)I
.line 213
:cond_7
const-string v9, "ripple_effect"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/CheckBoxPreference;
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
.line 214
const-string v9, "ja"
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v10
invoke-virtual {v10}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
move-result-object v10
iget-object v10, v10, Landroid/content/res/Configuration;->locale:Ljava/util/Locale;
invoke-virtual {v10}, Ljava/util/Locale;->getLanguage()Ljava/lang/String;
move-result-object v10
invoke-virtual {v9, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v9
if-eqz v9, :cond_12
const-string v1, ""
.line 215
.local v1, dot:Ljava/lang/String;
:goto_3
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
new-instance v10, Ljava/lang/StringBuilder;
invoke-direct {v10}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v11
const v12, 0x7f090cdc
invoke-virtual {v11, v12}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v11
invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v10
invoke-virtual {v10, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v10
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v11
const v12, 0x7f090d26
invoke-virtual {v11, v12}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v11
invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v10
invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v10
invoke-virtual {v9, v10}, Landroid/preference/CheckBoxPreference;->setSummary(Ljava/lang/CharSequence;)V
.line 217
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v9
const-string v10, "pen_hovering_ink_effect"
const/4 v11, 0x0
invoke-static {v9, v10, v11}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
.line 218
.local v3, mInkEffectColor:I
const-string v9, "ink_effect"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/PreferenceScreen;
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInkEffect:Landroid/preference/PreferenceScreen;
.line 219
const-string v9, "help_text"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/CheckBoxPreference;
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mHelpText:Landroid/preference/CheckBoxPreference;
.line 220
const-string v9, "say_your_wakeup"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/CheckBoxPreference;
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;
.line 223
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
if-eqz v9, :cond_8
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;
move-result-object v9
invoke-static {v9}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
move-result v9
if-eqz v9, :cond_8
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v9
const v10, 0x1110049
invoke-virtual {v9, v10}, Landroid/content/res/Resources;->getBoolean(I)Z
move-result v9
if-eqz v9, :cond_9
:cond_8
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
invoke-virtual {v9}, Lcom/android/internal/widget/LockPatternUtils;->usingSignatureUnlock()Z
move-result v9
if-eqz v9, :cond_a
.line 225
:cond_9
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v9
iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 229
:cond_a
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v5
.line 230
.local v5, ps:Landroid/preference/PreferenceScreen;
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInkEffect:Landroid/preference/PreferenceScreen;
invoke-virtual {v5, v9}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 234
const-string v9, "set_wakeup_command"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v7
check-cast v7, Landroid/preference/PreferenceScreen;
.line 235
.local v7, setWakeupCommand:Landroid/preference/PreferenceScreen;
if-eqz v7, :cond_d
.line 236
invoke-virtual {v7}, Landroid/preference/PreferenceScreen;->getIntent()Landroid/content/Intent;
move-result-object v8
.line 237
.local v8, set_wakeup_commant_intent:Landroid/content/Intent;
if-eqz v8, :cond_d
.line 238
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;
move-result-object v9
invoke-virtual {v9}, Landroid/app/Activity;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v4
.line 239
.local v4, pm:Landroid/content/pm/PackageManager;
const/4 v9, 0x0
invoke-virtual {v4, v8, v9}, Landroid/content/pm/PackageManager;->queryIntentActivities(Landroid/content/Intent;I)Ljava/util/List;
move-result-object v2
.line 240
.local v2, list:Ljava/util/List;,"Ljava/util/List<Landroid/content/pm/ResolveInfo;>;"
invoke-interface {v2}, Ljava/util/List;->size()I
move-result v9
const/4 v10, 0x1
if-ge v9, v10, :cond_d
.line 241
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;
if-eqz v9, :cond_b
.line 242
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v9
iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;
invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 243
:cond_b
if-eqz v7, :cond_c
.line 244
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v9
invoke-virtual {v9, v7}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 246
:cond_c
const/4 v9, 0x0
invoke-static {v9}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
move-result v9
if-eqz v9, :cond_d
.line 247
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v10
const-string v9, "feature_category"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/PreferenceCategory;
invoke-virtual {v10, v9}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 253
.end local v2 #list:Ljava/util/List;,"Ljava/util/List<Landroid/content/pm/ResolveInfo;>;"
.end local v4 #pm:Landroid/content/pm/PackageManager;
.end local v8 #set_wakeup_commant_intent:Landroid/content/Intent;
:cond_d
return-void
.line 149
.end local v0 #ContentsTypeFeature:Ljava/lang/String;
.end local v1 #dot:Ljava/lang/String;
.end local v3 #mInkEffectColor:I
.end local v5 #ps:Landroid/preference/PreferenceScreen;
.end local v7 #setWakeupCommand:Landroid/preference/PreferenceScreen;
:cond_e
const/4 v9, 0x0
goto/16 :goto_0
.line 179
:cond_f
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v10
const v11, 0x7f0909be
invoke-virtual {v10, v11}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v10
invoke-virtual {v9, v10}, Landroid/preference/SwitchPreferenceScreen;->setSummary(Ljava/lang/CharSequence;)V
goto/16 :goto_1
.line 182
:cond_10
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v10
const v11, 0x7f0909bd
invoke-virtual {v10, v11}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v10
invoke-virtual {v9, v10}, Landroid/preference/SwitchPreferenceScreen;->setSummary(Ljava/lang/CharSequence;)V
goto/16 :goto_1
.line 193
.restart local v0 #ContentsTypeFeature:Ljava/lang/String;
:cond_11
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v9
iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
goto/16 :goto_2
.line 214
:cond_12
const-string v1, ". "
goto/16 :goto_3
.end method
Recompile SecSettings and push all files.
Enjoy!
Thanks for your contribution didact74. You sir are truly helping the community!
Sent from my SCH-I605 using Tapatalk 2
You sir.. are a machine!! Thank you for sharing so many great mods with the community!!
Thanks again Didact, your quite the boss!!!
I hated you in Halo 4.
Your Mod, however, is awesome. I thank you
Haha funny to scroll through and see all the winky faces because of the code.
Thank you for this.
How ever I guess I missed the purpose of this as it must be the base and not compatible with all ROMs yet. Haha glad I didn't read the op.....
Figured it out real quick when it aborted every time.
Love to see this on clean ROM
sent from that young galaxy on clean ROM!
You are the best!! I ve been locking for this very time, and now I will port to S2. Thanks
c'mon guy only 12 "thanks"!? this man is a beast providing his free time, the least we can do is hit that thanks button to show some appreciation.
andybones said:
c'mon guy only 12 "thanks"!? this man is a beast providing his free time, the least we can do is hit that thanks button to show some appreciation.
Click to expand...
Click to collapse
Damn straight, such a boss didact is
I'm not to the level to be able to successfully port these types of tutorials yet but I still wanted to say how much I appreciate what you do! I look over your code daily. One day I'll be able to do more but right now I'm still learning.
Thanks a lot man!
Sent from my ASUS Transformer Pad TF700T using xda app-developers app
Thanks for the thanks!
Keep an eye out in the next few hours....got a new MOD coming I know you all will enjoy!
Didact74 said:
Thanks for the thanks!
Keep an eye out in the next few hours....got a new MOD coming I know you all will enjoy!
Click to expand...
Click to collapse
Hell yes such a boss
Sent from my SCH-I605 using xda premium
I'm having issues porting this to SGS2. Are there any differences in how to for s3 and how to for s2? Thanks!
rompnit said:
You sir.. are a machine!! Thank you for sharing so many great mods with the community!!
Click to expand...
Click to collapse
i agree 100% with this statement. and your wife's statement. lol great work, i get a headache just reading all that code.
phenomarc said:
I'm having issues porting this to SGS2. Are there any differences in how to for s3 and how to for s2? Thanks!
Click to expand...
Click to collapse
What are the issues you are having? Won't build? No arrays? Fcs? Etc?
Sent from my SPH-L710 using xda app-developers app
rompnit said:
What are the issues you are having? Won't build? No arrays? Fcs? Etc?
Sent from my SPH-L710 using xda app-developers app
Click to expand...
Click to collapse
When I flash the mod, I can't unlock the phone and the lockscreen settings FC. The clock in lockscreen has changed but I can't unlock. I' ve seen the files to mod in the alliance Rom for S2 and there are differences between this guide and the files. Thanks!
I am in a similar situation. The default lockscreen for the mod (see 2nd screenshot on OP) works fine, but lockscreen settings FC's.
I did notice a few things while working on this mod.
There were two strings missing when I tried to compile SecSettings.apk (enable_lockscreen_torch and enable_lockscreen_torch_text).
These missing strings are for lockscreen_settings.xml from this code:
Code:
<CheckBoxPreference android:title="@string/enable_lockscreen_torch" android:key="enable_lockscreen_torch" android:summary="@string/enable_lockscreen_torch_text" />
I am guessing that this line assumes you have the lockscreen torch mod already on your device since it is not included in this mod.
But whether I added the missing strings or removed the code from the code box above lockscreen settings still FC's.
Need to play with this some more....
(Don't get me wrong, I am not complaining. I want to get his bad boy working!)
Edit:
The line of code in green should be added to lockscreen_settings.xml and the line of code in red should be deleted (or made invisible) unless you already have the lockscreen torch mod:
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/lock_screen"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
[COLOR="Green"]<PreferenceCategory android:title="@string/display_settings" />[/COLOR]
<ListPreference android:persistent="true" android:entries="@array/lockscreen_entries" android:title="Choose Your LockScreen" android:key="lockscreen_type_key" android:defaultValue="1" android:entryValues="@array/lockscreen_values" />
[COLOR="Red"]<CheckBoxPreference android:title="@string/enable_lockscreen_torch" android:key="enable_lockscreen_torch" android:summary="@string/enable_lockscreen_torch_text" />[/COLOR]
<SwitchPreferenceScreen android:title="@string/lock_screen_shortcut_title" android:key="lock_screen_shortcut" android:summary="@string/lock_screen_shortcut_summary">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.lockscreenshortcut.LockScreenShortcutSettings" />
</SwitchPreferenceScreen>
ETC...
These are the missing strings I mentioned earlier:
Code:
<string name="enable_lockscreen_torch">Lockscreen Torch</string>
<string name="enable_lockscreen_torch_text">Enable torch through lockscreen</string>
For settings to be FC'ing your issue is in LockScreenSettings.smali.
Start simple.......
Begin with SecSettings. Make no alterations to android.policy yet.
Add everything EXCEPT the smali changes to SecSettings first. Push SecSettings to your phone and verify you have the menus and everything is there. You should be able to click the lockscreen options but they wont be functional until you add the smali code.
Next, add the changes needed to android.policy. Push android policy to the phone and check everything again. The MOD still wont be functional but you should not get any FC's.
Lastly, add the smali code to SecSettings. If your working wiht a different carrier you must make sure to change the registers accordingly.
If your still having issues post up your OnCreate and OnPreferenceChange methods here using the hide tags and we can tke a look to see where the issues may be.

Discussion on SysScope

[Update] Solution is here SysScopeFix
​
[email protected] said:
A project have been started on github https://github.com/sinancetinkaya/DeviceStatus
Current Collaborators :
dwitherell (Big thanks to him)
[email protected]
If you know backsmali/smali stuff, feel free to join.
Click to expand...
Click to collapse
First of all, I want to thank to Samsung for bringing this headache to us.
I'm not a java programmer and nor an expert at those smali stuff. I know some C++ and little programming.
I just wondered how SysScope works and what can we do about it.
Apparently SysScope is using a SQL database SysScope\assets\databases\SysScope.db
And there is an interesting table
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
It looks like to me SysScope is reading su binary from the offset for the size bytes, and comparing the data's md5 hash?
Under \SysScope.apk\smali\com\sec\android\app\sysscope\job there two interesting subroutine
KernelStatusChecker: It's using libcordon.o library. I don't think this subroutine is responsible for setting the settings at the bootloader screen. More likely it's just generating some reports to make system modified and send it Samsung?
Code:
# virtual methods
.method public final a(Landroid/os/Bundle;)Lcom/sec/android/app/sysscope/service/f;
.locals 4
sget-object v0, Lcom/sec/android/app/sysscope/service/f;->f:Lcom/sec/android/app/sysscope/service/f;
invoke-virtual {p0}, Lcom/sec/android/app/sysscope/job/KernelStatusChecker;->getCmdLine()Ljava/lang/String;
move-result-object v1
invoke-direct {p0, v1}, Lcom/sec/android/app/sysscope/job/KernelStatusChecker;->b(Ljava/lang/String;)Z
move-result v1
if-eqz v1, :cond_0
sget-object v0, Lcom/sec/android/app/sysscope/service/f;->a:Lcom/sec/android/app/sysscope/service/f;
:cond_0
new-instance v1, Ljava/lang/StringBuilder;
const-string v2, "code="
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p0}, Lcom/sec/android/app/sysscope/job/KernelStatusChecker;->getCmdLine()Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
const-string v2, " custom binary download count="
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
iget-wide v2, p0, Lcom/sec/android/app/sysscope/job/KernelStatusChecker;->b:J
invoke-virtual {v1, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-virtual {p0, v1}, Lcom/sec/android/app/sysscope/job/KernelStatusChecker;->a(Ljava/lang/String;)V
return-object v0
.end method
.method public final c()V
.locals 0
return-void
.end method
.method public final d()Ljava/lang/String;
.locals 1
const-string v0, "Kernel Checker"
return-object v0
.end method
.method public final e()I
.locals 1
const/4 v0, 0x0
return v0
.end method
RootProcessScanner: It's looks like this subroutine is checking the processes unde /proc and checking them whether they are in the approved list.
Code:
# virtual methods
.method public final a(Landroid/os/Bundle;)Lcom/sec/android/app/sysscope/service/f;
.locals 11
const/4 v4, 0x1
const/4 v2, 0x0
sget-object v0, Lcom/sec/android/app/sysscope/service/f;->a:Lcom/sec/android/app/sysscope/service/f;
:try_start_0
new-instance v1, Ljava/io/File;
const-string v3, "/proc"
invoke-direct {v1, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-virtual {v1}, Ljava/io/File;->exists()Z
move-result v3
if-nez v3, :cond_1
new-instance v2, Ljava/io/FileNotFoundException;
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v1
const-string v3, " is missing (man 5 proc)"
invoke-virtual {v1, v3}, 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-direct {v2, v1}, Ljava/io/FileNotFoundException;-><init>(Ljava/lang/String;)V
throw v2
:catch_0
move-exception v1
:cond_0
:goto_0
return-object v0
:cond_1
new-instance v5, Ljava/util/ArrayList;
invoke-direct {v5}, Ljava/util/ArrayList;-><init>()V
invoke-virtual {v1}, Ljava/io/File;->listFiles()[Ljava/io/File;
move-result-object v6
if-eqz v6, :cond_2
array-length v1, v6
if-lez v1, :cond_2
array-length v7, v6
move v1, v2
:goto_1
if-lt v1, v7, :cond_3
:cond_2
invoke-interface {v5}, Ljava/util/List;->size()I
move-result v1
if-lez v1, :cond_0
sget-object v1, Lcom/sec/android/app/sysscope/service/f;->d:Lcom/sec/android/app/sysscope/service/f;
:try_end_0
.catch Lcom/sec/android/app/sysscope/job/f; {:try_start_0 .. :try_end_0} :catch_0
.catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_1
:try_start_1
const-string v0, ""
:goto_2
invoke-interface {v5}, Ljava/util/List;->size()I
move-result v3
if-lt v2, v3, :cond_7
invoke-virtual {p0, v0}, Lcom/sec/android/app/sysscope/job/RootProcessScanner;->a(Ljava/lang/String;)V
:try_end_1
.catch Lcom/sec/android/app/sysscope/job/f; {:try_start_1 .. :try_end_1} :catch_3
.catch Ljava/io/FileNotFoundException; {:try_start_1 .. :try_end_1} :catch_2
move-object v0, v1
goto :goto_0
:cond_3
:try_start_2
aget-object v8, v6, v1
invoke-virtual {v8}, Ljava/io/File;->isDirectory()Z
move-result v3
if-eqz v3, :cond_5
const-string v3, "\\d+"
invoke-virtual {v8}, Ljava/io/File;->getName()Ljava/lang/String;
move-result-object v9
invoke-static {v3, v9}, Ljava/util/regex/Pattern;->matches(Ljava/lang/String;Ljava/lang/CharSequence;)Z
move-result v3
if-eqz v3, :cond_5
move v3, v4
:goto_3
if-eqz v3, :cond_6
new-instance v3, Ljava/lang/StringBuilder;
const-string v9, "/proc/"
invoke-direct {v3, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v8}, Ljava/io/File;->getName()Ljava/lang/String;
move-result-object v9
invoke-virtual {v3, v9}, 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-virtual {p0, v3}, Lcom/sec/android/app/sysscope/job/RootProcessScanner;->checkIsApprivedProcess(Ljava/lang/String;)I
move-result v3
if-gez v3, :cond_6
move v3, v4
:goto_4
if-eqz v3, :cond_4
const-string v3, "SysScopeRootScanner"
new-instance v9, Ljava/lang/StringBuilder;
const-string v10, "isUnapprovedRootProcess returns true: "
invoke-direct {v9, v10}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v8}, Ljava/io/File;->getName()Ljava/lang/String;
move-result-object v10
invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v9
invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v9
invoke-static {v3, v9}, Lcom/sec/android/app/sysscope/engine/Log;->b(Ljava/lang/String;Ljava/lang/String;)I
invoke-interface {v5, v8}, Ljava/util/List;->add(Ljava/lang/Object;)Z
:try_end_2
.catch Lcom/sec/android/app/sysscope/job/f; {:try_start_2 .. :try_end_2} :catch_0
.catch Ljava/io/FileNotFoundException; {:try_start_2 .. :try_end_2} :catch_1
:cond_4
add-int/lit8 v1, v1, 0x1
goto :goto_1
:cond_5
move v3, v2
goto :goto_3
:cond_6
move v3, v2
goto :goto_4
:cond_7
:try_start_3
new-instance v3, Ljava/lang/StringBuilder;
invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
invoke-direct {v3, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-interface {v5, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/io/File;
invoke-static {v0}, Lcom/sec/android/app/sysscope/job/RootProcessScanner;->a(Ljava/io/File;)Ljava/lang/String;
move-result-object v0
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v3, " "
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
:try_end_3
.catch Lcom/sec/android/app/sysscope/job/f; {:try_start_3 .. :try_end_3} :catch_3
.catch Ljava/io/FileNotFoundException; {:try_start_3 .. :try_end_3} :catch_2
move-result-object v3
add-int/lit8 v0, v2, 0x1
move v2, v0
move-object v0, v3
goto/16 :goto_2
:catch_1
move-exception v1
goto/16 :goto_0
:catch_2
move-exception v0
move-object v0, v1
goto/16 :goto_0
:catch_3
move-exception v0
move-object v0, v1
goto/16 :goto_0
.end method
SysScope.apk\smali\com\sec\android\app\sysscope\service\f :
Code:
# direct methods
.method static constructor <clinit>()V
.locals 9
const/4 v8, 0x4
const/4 v7, 0x3
const/4 v6, 0x2
const/4 v5, 0x1
const/4 v4, 0x0
new-instance v0, Lcom/sec/android/app/sysscope/service/f;
const-string v1, "OK"
invoke-direct {v0, v1, v4, v4}, Lcom/sec/android/app/sysscope/service/f;-><init>(Ljava/lang/String;II)V
sput-object v0, Lcom/sec/android/app/sysscope/service/f;->a:Lcom/sec/android/app/sysscope/service/f;
new-instance v0, Lcom/sec/android/app/sysscope/service/f;
const-string v1, "ADB_RUNNING_AS_ROOT"
const v2, 0x10001
invoke-direct {v0, v1, v5, v2}, Lcom/sec/android/app/sysscope/service/f;-><init>(Ljava/lang/String;II)V
sput-object v0, Lcom/sec/android/app/sysscope/service/f;->b:Lcom/sec/android/app/sysscope/service/f;
new-instance v0, Lcom/sec/android/app/sysscope/service/f;
const-string v1, "PARTITION_TAMPERED"
const v2, 0x20001
invoke-direct {v0, v1, v6, v2}, Lcom/sec/android/app/sysscope/service/f;-><init>(Ljava/lang/String;II)V
sput-object v0, Lcom/sec/android/app/sysscope/service/f;->c:Lcom/sec/android/app/sysscope/service/f;
new-instance v0, Lcom/sec/android/app/sysscope/service/f;
const-string v1, "ROOT_PROCESS_FOUND"
const/16 v2, 0x3001
invoke-direct {v0, v1, v7, v2}, Lcom/sec/android/app/sysscope/service/f;-><init>(Ljava/lang/String;II)V
sput-object v0, Lcom/sec/android/app/sysscope/service/f;->d:Lcom/sec/android/app/sysscope/service/f;
new-instance v0, Lcom/sec/android/app/sysscope/service/f;
const-string v1, "DANGEROUS_FILE_DETECTED"
const v2, 0x40001
invoke-direct {v0, v1, v8, v2}, Lcom/sec/android/app/sysscope/service/f;-><init>(Ljava/lang/String;II)V
sput-object v0, Lcom/sec/android/app/sysscope/service/f;->e:Lcom/sec/android/app/sysscope/service/f;
new-instance v0, Lcom/sec/android/app/sysscope/service/f;
const-string v1, "NOT_OFFICIAL_BINARY"
const/4 v2, 0x5
const v3, 0x50001
invoke-direct {v0, v1, v2, v3}, Lcom/sec/android/app/sysscope/service/f;-><init>(Ljava/lang/String;II)V
sput-object v0, Lcom/sec/android/app/sysscope/service/f;->f:Lcom/sec/android/app/sysscope/service/f;
const/4 v0, 0x6
new-array v0, v0, [Lcom/sec/android/app/sysscope/service/f;
sget-object v1, Lcom/sec/android/app/sysscope/service/f;->a:Lcom/sec/android/app/sysscope/service/f;
aput-object v1, v0, v4
sget-object v1, Lcom/sec/android/app/sysscope/service/f;->b:Lcom/sec/android/app/sysscope/service/f;
aput-object v1, v0, v5
sget-object v1, Lcom/sec/android/app/sysscope/service/f;->c:Lcom/sec/android/app/sysscope/service/f;
aput-object v1, v0, v6
sget-object v1, Lcom/sec/android/app/sysscope/service/f;->d:Lcom/sec/android/app/sysscope/service/f;
aput-object v1, v0, v7
sget-object v1, Lcom/sec/android/app/sysscope/service/f;->e:Lcom/sec/android/app/sysscope/service/f;
aput-object v1, v0, v8
const/4 v1, 0x5
sget-object v2, Lcom/sec/android/app/sysscope/service/f;->f:Lcom/sec/android/app/sysscope/service/f;
aput-object v2, v0, v1
sput-object v0, Lcom/sec/android/app/sysscope/service/f;->i:[Lcom/sec/android/app/sysscope/service/f;
return-void
.end method
Probably this subroutine is returning all the result codes that other subroutines need ?
Such as
is ADB_RUNNING_AS_ROOT
is PARTITION_TAMPERED
is ROOT_PROCESS_FOUND
is DANGEROUS_FILE_DETECTED
is NOT_OFFICIAL_BINARY
SysScope.apk\smali\com\sec\android\app\sysscope\engine\SystemDiagnosisManager
To me it looks like the main routine
Code:
# virtual methods
.method public final a()V
.locals 10
const/4 v3, 0x0
const/4 v1, 0x0
iget-object v4, p0, Lcom/sec/android/app/sysscope/engine/SystemDiagnosisManager;->c:[Ljava/lang/String;
iget-object v5, p0, Lcom/sec/android/app/sysscope/engine/SystemDiagnosisManager;->d:Landroid/content/Context;
new-instance v6, Ljava/util/ArrayList;
invoke-direct {v6}, Ljava/util/ArrayList;-><init>()V
array-length v7, v4
move v2, v3
:goto_0
if-lt v2, v7, :cond_0
invoke-interface {v6, v1}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
new-instance v0, Lcom/sec/android/app/sysscope/engine/f;
invoke-direct {v0, v3}, Lcom/sec/android/app/sysscope/engine/f;-><init>(B)V
invoke-static {v6, v0}, Ljava/util/Collections;->sort(Ljava/util/List;Ljava/util/Comparator;)V
iput-object v6, p0, Lcom/sec/android/app/sysscope/engine/SystemDiagnosisManager;->b:Ljava/util/List;
sget-object v0, Lcom/sec/android/app/sysscope/engine/SystemDiagnosisManager;->e:Lcom/sec/android/app/sysscope/job/c;
invoke-virtual {v0}, Lcom/sec/android/app/sysscope/job/c;->a()V
return-void
:cond_0
aget-object v0, v4, v2
const-string v8, "rpscanner"
invoke-virtual {v0, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v8
if-eqz v8, :cond_1
new-instance v0, Lcom/sec/android/app/sysscope/job/RootProcessScanner;
invoke-direct {v0}, Lcom/sec/android/app/sysscope/job/RootProcessScanner;-><init>()V
:goto_1
if-eqz v0, :cond_7
invoke-interface {v0}, Lcom/sec/android/app/sysscope/engine/d;->c()V
invoke-interface {v0}, Lcom/sec/android/app/sysscope/engine/d;->b()Ljava/lang/String;
move-result-object v8
const-string v9, "general"
invoke-virtual {v8, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v8
if-eqz v8, :cond_6
new-instance v8, Lcom/sec/android/app/sysscope/engine/l;
invoke-direct {v8}, Lcom/sec/android/app/sysscope/engine/l;-><init>()V
invoke-virtual {v8, v0}, Lcom/sec/android/app/sysscope/engine/l;->a(Lcom/sec/android/app/sysscope/engine/d;)Lcom/sec/android/app/sysscope/engine/g;
move-result-object v0
:goto_2
invoke-interface {v6, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
add-int/lit8 v0, v2, 0x1
move v2, v0
goto :goto_0
:cond_1
const-string v8, "adbscanner"
invoke-virtual {v0, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v8
if-eqz v8, :cond_2
new-instance v0, Lcom/sec/android/app/sysscope/job/a;
invoke-direct {v0}, Lcom/sec/android/app/sysscope/job/a;-><init>()V
goto :goto_1
:cond_2
const-string v8, "su_scanner"
invoke-virtual {v0, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v8
if-eqz v8, :cond_3
new-instance v0, Lcom/sec/android/app/sysscope/job/g;
invoke-direct {v0, v5}, Lcom/sec/android/app/sysscope/job/g;-><init>(Landroid/content/Context;)V
goto :goto_1
:cond_3
const-string v8, "partition_checker"
invoke-virtual {v0, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v8
if-eqz v8, :cond_4
new-instance v0, Lcom/sec/android/app/sysscope/job/b;
invoke-direct {v0}, Lcom/sec/android/app/sysscope/job/b;-><init>()V
goto :goto_1
:cond_4
const-string v8, "kernel_checker"
invoke-virtual {v0, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_5
new-instance v0, Lcom/sec/android/app/sysscope/job/KernelStatusChecker;
invoke-direct {v0}, Lcom/sec/android/app/sysscope/job/KernelStatusChecker;-><init>()V
goto :goto_1
:cond_5
move-object v0, v1
goto :goto_1
:cond_6
invoke-interface {v0}, Lcom/sec/android/app/sysscope/engine/d;->b()Ljava/lang/String;
move-result-object v8
const-string v9, "filescanning"
invoke-virtual {v8, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v8
if-eqz v8, :cond_7
new-instance v8, Lcom/sec/android/app/sysscope/engine/c;
invoke-direct {v8}, Lcom/sec/android/app/sysscope/engine/c;-><init>()V
invoke-virtual {v8, v0}, Lcom/sec/android/app/sysscope/engine/c;->a(Lcom/sec/android/app/sysscope/engine/d;)Lcom/sec/android/app/sysscope/engine/g;
move-result-object v0
goto :goto_2
:cond_7
move-object v0, v1
goto :goto_2
.end method
.method public final a(Lcom/sec/android/app/sysscope/engine/m;)V
.locals 0
iput-object p1, p0, Lcom/sec/android/app/sysscope/engine/SystemDiagnosisManager;->a:Lcom/sec/android/app/sysscope/engine/m;
return-void
.end method
.method public final b()V
.locals 10
const/4 v3, 0x1
const/4 v2, 0x0
invoke-static {}, Ljava/util/concurrent/Executors;->newSingleThreadExecutor()Ljava/util/concurrent/ExecutorService;
move-result-object v4
iget-object v0, p0, Lcom/sec/android/app/sysscope/engine/SystemDiagnosisManager;->b:Ljava/util/List;
if-nez v0, :cond_1
iget-object v0, p0, Lcom/sec/android/app/sysscope/engine/SystemDiagnosisManager;->a:Lcom/sec/android/app/sysscope/engine/m;
invoke-interface {v0}, Lcom/sec/android/app/sysscope/engine/m;->a()V
iget-object v0, p0, Lcom/sec/android/app/sysscope/engine/SystemDiagnosisManager;->a:Lcom/sec/android/app/sysscope/engine/m;
const-string v1, "no jobs loaded"
invoke-interface {v0, v2, v1}, Lcom/sec/android/app/sysscope/engine/m;->a(ZLjava/lang/String;)V
:cond_0
:goto_0
return-void
:cond_1
iget-object v0, p0, Lcom/sec/android/app/sysscope/engine/SystemDiagnosisManager;->a:Lcom/sec/android/app/sysscope/engine/m;
if-eqz v0, :cond_2
iget-object v0, p0, Lcom/sec/android/app/sysscope/engine/SystemDiagnosisManager;->a:Lcom/sec/android/app/sysscope/engine/m;
iget-object v1, p0, Lcom/sec/android/app/sysscope/engine/SystemDiagnosisManager;->b:Ljava/util/List;
invoke-interface {v1}, Ljava/util/List;->size()I
move-result v1
invoke-interface {v0, v1}, Lcom/sec/android/app/sysscope/engine/m;->a(I)V
:cond_2
new-instance v5, Lcom/sec/android/app/sysscope/service/SysScopeResultInfo;
invoke-direct {v5}, Lcom/sec/android/app/sysscope/service/SysScopeResultInfo;-><init>()V
iget-object v0, p0, Lcom/sec/android/app/sysscope/engine/SystemDiagnosisManager;->b:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v6
move v1, v2
:cond_3
:goto_1
invoke-interface {v6}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-nez v0, :cond_5
invoke-interface {v4}, Ljava/util/concurrent/ExecutorService;->shutdown()V
iget-object v0, p0, Lcom/sec/android/app/sysscope/engine/SystemDiagnosisManager;->b:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->clear()V
invoke-static {}, Lcom/sec/android/app/sysscope/engine/j;->a()Lcom/sec/android/app/sysscope/engine/j;
move-result-object v0
invoke-virtual {v0, v5}, Lcom/sec/android/app/sysscope/engine/j;->a(Lcom/sec/android/app/sysscope/service/SysScopeResultInfo;)V
invoke-virtual {v5}, Lcom/sec/android/app/sysscope/service/SysScopeResultInfo;->a()I
move-result v0
const-string v1, "SysScopeDiagnosisManager"
new-instance v4, Ljava/lang/StringBuilder;
const-string v6, "SysDiagnosisManager > call storeResult"
invoke-direct {v4, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
invoke-static {v1, v4}, Lcom/sec/android/app/sysscope/engine/Log;->b(Ljava/lang/String;Ljava/lang/String;)I
invoke-virtual {p0, v0}, Lcom/sec/android/app/sysscope/engine/SystemDiagnosisManager;->storeResult(I)I
move-result v1
const-string v4, "SysScopeDiagnosisManager"
new-instance v6, Ljava/lang/StringBuilder;
const-string v7, "SysDiagnosisManager > storeResult:"
invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v6, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v4, v1}, Lcom/sec/android/app/sysscope/engine/Log;->b(Ljava/lang/String;Ljava/lang/String;)I
iget-object v1, p0, Lcom/sec/android/app/sysscope/engine/SystemDiagnosisManager;->a:Lcom/sec/android/app/sysscope/engine/m;
if-eqz v1, :cond_0
iget-object v1, p0, Lcom/sec/android/app/sysscope/engine/SystemDiagnosisManager;->a:Lcom/sec/android/app/sysscope/engine/m;
if-eq v0, v3, :cond_4
move v2, v3
:cond_4
invoke-virtual {v5}, Lcom/sec/android/app/sysscope/service/SysScopeResultInfo;->toString()Ljava/lang/String;
move-result-object v0
invoke-interface {v1, v2, v0}, Lcom/sec/android/app/sysscope/engine/m;->a(ZLjava/lang/String;)V
goto :goto_0
:cond_5
invoke-interface {v6}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/sec/android/app/sysscope/engine/g;
if-eqz v0, :cond_3
invoke-virtual {v0}, Lcom/sec/android/app/sysscope/engine/g;->a()I
move-result v7
const/4 v8, 0x2
if-gt v7, v8, :cond_3
invoke-interface {v4, v0}, Ljava/util/concurrent/ExecutorService;->submit(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;
move-result-object v7
iget-object v8, p0, Lcom/sec/android/app/sysscope/engine/SystemDiagnosisManager;->a:Lcom/sec/android/app/sysscope/engine/m;
if-eqz v8, :cond_6
iget-object v8, p0, Lcom/sec/android/app/sysscope/engine/SystemDiagnosisManager;->a:Lcom/sec/android/app/sysscope/engine/m;
invoke-virtual {v0}, Lcom/sec/android/app/sysscope/engine/g;->b()Ljava/lang/String;
move-result-object v0
invoke-interface {v8, v1, v0}, Lcom/sec/android/app/sysscope/engine/m;->a(ILjava/lang/String;)V
:cond_6
sget-object v0, Lcom/sec/android/app/sysscope/service/f;->a:Lcom/sec/android/app/sysscope/service/f;
:try_start_0
invoke-interface {v7}, Ljava/util/concurrent/Future;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/Bundle;
add-int/lit8 v1, v1, 0x1
if-eqz v0, :cond_3
const-string v7, "result"
invoke-virtual {v0, v7}, Landroid/os/Bundle;->getInt(Ljava/lang/String;)I
move-result v7
invoke-static {v7}, Lcom/sec/android/app/sysscope/service/f;->a(I)Lcom/sec/android/app/sysscope/service/f;
move-result-object v7
sget-object v8, Lcom/sec/android/app/sysscope/service/f;->a:Lcom/sec/android/app/sysscope/service/f;
if-eq v7, v8, :cond_3
const-string v8, "info"
invoke-virtual {v0, v8}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
invoke-virtual {v7, v0}, Lcom/sec/android/app/sysscope/service/f;->a(Ljava/lang/String;)V
invoke-virtual {v5, v7}, Lcom/sec/android/app/sysscope/service/SysScopeResultInfo;->a(Lcom/sec/android/app/sysscope/service/f;)V
:try_end_0
.catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0
.catch Ljava/util/concurrent/ExecutionException; {:try_start_0 .. :try_end_0} :catch_1
goto/16 :goto_1
:catch_0
move-exception v0
move-object v9, v0
move v0, v1
move-object v1, v9
invoke-virtual {v1}, Ljava/lang/InterruptedException;->printStackTrace()V
move v1, v0
goto/16 :goto_1
:catch_1
move-exception v0
move-object v9, v0
move v0, v1
move-object v1, v9
invoke-virtual {v1}, Ljava/util/concurrent/ExecutionException;->printStackTrace()V
move v1, v0
goto/16 :goto_1
.end method
My 2 cents:
Funny thing is if you build an odin rom and add the root files etc and flash it this Spyware is unable to detect it and therefore the device remains official and able to check for OTA updates. I have tested this in 2 Samsung devices.
BUT...as soon you add,remove, modify anything in the system folder it detects the change.
Since the devices are scanned (up to 2 minutes in some devices)every boot for changes i find this kind of weird,this tell me that either the database is somewhat locked till you mess with the system folder or assumes that since its a "official rom" nothing has changed.
@faria
Yes, you're right.
The permanent solution is to modify SysScope.
I know this will never end, samsung always will come up with new measures
That's why I'm disappointed in Samsung. They spend their efforts for such things rather than making their devices unbrickable
"SysScope.apk\smali\com\sec\android\app\sysscope\service\f" has been widely used in the code. Looks like returning result codes.
These lines are interesting
Code:
const/4 v8, 0x4
const/4 v7, 0x3
const/4 v6, 0x2
const/4 v5, 0x1
const/4 v4, 0x0
Code:
new-instance v0, Lcom/sec/android/app/sysscope/service/f;
const-string v1, "OK"
invoke-direct {v0, v1, v4, v4}, Lcom/sec/android/app/sysscope/service/f;-><init>(Ljava/lang/String;II)V
sput-object v0, Lcom/sec/android/app/sysscope/service/f;->a:Lcom/sec/android/app/sysscope/service/f;
above you see v1 is status message which is "OK" and v4 status code which is described above "0x0"
Code:
invoke-direct {v0, v1, v4, v4}, Lcom/sec/android/app/sysscope/service/f;-><init>(Ljava/lang/String;II)V
this goes on
Code:
new-instance v0, Lcom/sec/android/app/sysscope/service/f;
const-string v1, "ADB_RUNNING_AS_ROOT"
const v2, 0x10001
invoke-direct {v0, v1, v5, v2}, Lcom/sec/android/app/sysscope/service/f;-><init>(Ljava/lang/String;II)V
sput-object v0, Lcom/sec/android/app/sysscope/service/f;->b:Lcom/sec/android/app/sysscope/service/f;
Code:
new-instance v0, Lcom/sec/android/app/sysscope/service/f;
const-string v1, "PARTITION_TAMPERED"
const v2, 0x20001
invoke-direct {v0, v1, v6, v2}, Lcom/sec/android/app/sysscope/service/f;-><init>(Ljava/lang/String;II)V
sput-object v0, Lcom/sec/android/app/sysscope/service/f;->c:Lcom/sec/android/app/sysscope/service/f;
Code:
new-instance v0, Lcom/sec/android/app/sysscope/service/f;
const-string v1, "ROOT_PROCESS_FOUND"
const/16 v2, 0x3001
invoke-direct {v0, v1, v7, v2}, Lcom/sec/android/app/sysscope/service/f;-><init>(Ljava/lang/String;II)V
sput-object v0, Lcom/sec/android/app/sysscope/service/f;->d:Lcom/sec/android/app/sysscope/service/f;
Code:
new-instance v0, Lcom/sec/android/app/sysscope/service/f;
const-string v1, "DANGEROUS_FILE_DETECTED"
const v2, 0x40001
invoke-direct {v0, v1, v8, v2}, Lcom/sec/android/app/sysscope/service/f;-><init>(Ljava/lang/String;II)V
sput-object v0, Lcom/sec/android/app/sysscope/service/f;->e:Lcom/sec/android/app/sysscope/service/f;
Code:
new-instance v0, Lcom/sec/android/app/sysscope/service/f;
const-string v1, "NOT_OFFICIAL_BINARY"
const/4 v2, 0x5
const v3, 0x50001
invoke-direct {v0, v1, v2, v3}, Lcom/sec/android/app/sysscope/service/f;-><init>(Ljava/lang/String;II)V
sput-object v0, Lcom/sec/android/app/sysscope/service/f;->f:Lcom/sec/android/app/sysscope/service/f;
Rather than trying to understand whole process code, just modifying the result codes to make always send "OK" and "0x0" would help.
I tried to do that with apktool but apk file was never compiled correctly.
I have no time to figure out how apktool works
Can somebody who knows apktool better help us?
I can help you with the apk tools. this apks versions are from 4.1.1 or 4.1.2?
faria said:
I can help you with the apk tools. this apks versions are from 4.1.1 or 4.1.2?
Click to expand...
Click to collapse
4.1.2
change each result code like from this
Code:
new-instance v0, Lcom/sec/android/app/sysscope/service/f;
const-string v1, "ROOT_PROCESS_FOUND"
const/16 v2, 0x3001
invoke-direct {v0, v1, v7, v2}, Lcom/sec/android/app/sysscope/service/f;-><init>(Ljava/lang/String;II)V
sput-object v0, Lcom/sec/android/app/sysscope/service/f;->d:Lcom/sec/android/app/sysscope/service/f;
to this
Code:
new-instance v0, Lcom/sec/android/app/sysscope/service/f;
const-string v1, "[COLOR=Red]OK[/COLOR]"
const/16 v2, 0x3001
invoke-direct {v0, v1, [COLOR=Red]v4, v4[/COLOR]}, Lcom/sec/android/app/sysscope/service/f;-><init>(Ljava/lang/String;II)V
sput-object v0, Lcom/sec/android/app/sysscope/service/f;->d:Lcom/sec/android/app/sysscope/service/f;
And additionally
change these lines from this
Code:
const/4 v8, 0x4
const/4 v7, 0x3
const/4 v6, 0x2
const/4 v5, 0x1
const/4 v4, 0x0
to this
Code:
const/4 v8, [COLOR=Red]0x0[/COLOR]
const/4 v7, [COLOR=Red]0x0[/COLOR]
const/4 v6, [COLOR=Red]0x0[/COLOR]
const/4 v5, [COLOR=Red]0x0[/COLOR]
const/4 v4, 0x0
Im not at home at the moment, meanwhile im uploading the apk tools with all the resources for the note2.
you can also reach me via skype or any other messaging service if you want.
I must stress that my knowledge of smali is limited.
Also you can send me the modified files and i can try to compile them later.
Here are the tools:
https://dl.dropboxusercontent.com/u/7696581/APK-Multi-Tool-note2-4.1.2.zip
Thanks but I already have this too.
The problem is signing the apk file. I can build apk file but it can't get installed.
faria said:
Im not at home at the moment, meanwhile im uploading the apk tools with all the resources for the note2.
you can also reach me via skype or any other messaging service if you want.
I must stress that my knowledge of smali is limited.
Also you can send me the modified files and i can try to compile them later.
Click to expand...
Click to collapse
Here is the modified one.
[email protected] said:
Thanks but I already have this too.
The problem is signing the apk file. I can build apk file but it can't get installed.
Click to expand...
Click to collapse
Since its a system app all you have todo is copy to the app folder and set the right permissions, Personally i never sign system apps that i modify.
the apk you posted does not run, the service aint running .
faria said:
the apk you posted does not run, the service aint running .
Click to expand...
Click to collapse
Can you decompile and compile SysScope.apk without modification, and test it.
A bit of remote desktop
I decompile your apk and recompiled , nothing, "its dead Jim".
Same thing happened with my own apk, i guess this one needs signing
Also all the modified apks fail to appear on Titanium Backup list.
There is a check routine in SecSettings.apk for checking SysScope is not modified.
Well done Samsung, I'm impressed
some conclusions
SysScope is run and checked by
1. BCService.apk (BroadCast Service, periodically starts SysScope)
2. SecSettings.apk
Both apk have similar functions such as SysScopeVerifier that is checking SysScope against modifications
Code:
.method private startSysScopeStatue()V
.locals 2
.prologue
.line 474
new-instance v0, Lcom/sec/android/app/sysscope/service/SysScope;
invoke-direct {v0, p0}, Lcom/sec/android/app/sysscope/service/SysScope;-><init>(Landroid/content/Context;)V
iput-object v0, p0, Lcom/sec/bcservice/BroadcastService;->mSysScope:Lcom/sec/android/app/sysscope/service/SysScope;
.line 475
iget-object v0, p0, Lcom/sec/bcservice/BroadcastService;->mSysScope:Lcom/sec/android/app/sysscope/service/SysScope;
if-nez v0, :cond_0
.line 476
const-string v0, "BCService"
const-string v1, "mSysScope == null"
invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 477
:cond_0
return-void
.end method
Still can't understand why we can't compile these apks with apktool
[email protected] said:
some conclusions
SysScope is run and checked by
1. BCService.apk (BroadCast Service, periodically starts SysScope)
2. SecSettings.apk
Both apk have similar functions such as SysScopeVerifier that is checking SysScope against modifications
...
Still can't understand why we can't compile these apks with apktool
Click to expand...
Click to collapse
Greetings @[email protected] - I'm coming from the AT&T Galaxy S4 where we have a locked bootloader and can't otherwise get rid of an annoying "Custom" boot screen by modifying the bootloader. After poking around a bit, @scott14719 and I have determined that SysScope is certainly to blame for this "Custom" status. It appears we'll need to do the same as you: modify SysScope.apk, compile it, and get away with it (not let BCService or SecSettings find out about it).
Have you or your peers here found a solution to this yet, or have we determined this would be simply impossible?
Many thanks.
Aou said:
Greetings @[email protected] - I'm coming from the AT&T Galaxy S4 where we have a locked bootloader and can't otherwise get rid of an annoying "Custom" boot screen by modifying the bootloader. After poking around a bit, @scott14719 and I have determined that SysScope is certainly to blame for this "Custom" status. It appears we'll need to do the same as you: modify SysScope.apk, compile it, and get away with it (not let BCService or SecSettings find out about it).
Have you or your peers here found a solution to this yet, or have we determined this would be simply impossible?
Many thanks.
Click to expand...
Click to collapse
Rather than modifying SysScope, we need to edit SecSettings and BCService first. Both app are checking SysScope against modifications.
Apparently Samsung developers are better than I thought they were
The problem is that I can't compile apks with apktool and I don't know why.
We need to find a guy that knows how to work with apktool (especially system apks, signing etc)
[email protected] said:
Rather than modifying SysScope, we need to edit SecSettings and BCService first. Both app are checking SysScope against modifications.
Apparently Samsung developers are better than I thought they were
The problem is that I can't compile apks with apktool and I don't know why.
We need to find a guy that knows how to work with apktool (especially system apks, signing etc)
Click to expand...
Click to collapse
I never had much luck compiling any APKs using apktool, but I'm pretty novice in that area to begin with. ^_^
Also, I'm wondering if this thread may help you out?
Aou said:
I never had much luck compiling any APKs using apktool, but I'm pretty novice in that area to begin with. ^_^
Also, I'm wondering if this thread may help you out?
Click to expand...
Click to collapse
Thank you bud but I seriously tried everything on google that I found. None worked. I'm a bit tired of this
On the thread you've given to me, there is a guy has had the same problem and no answer given to him.
To everyone: if you ever find a solution, please try it first before you post here.
Just decompile and compile SysScope.apk and/or SecSettings.apk without modifications. Then install it on your device. If it runs, please post here along with details (links, steps)

[GUIDE][MOD][4.0.4] Add Hide time and am/pm toggle Samsung ICS Devices

***Here is a guide for Adding Hide time and am/pm toggle in Samsung ICS Devices***
This guide is specially for GT-S7562. But should work for other Samsung ICS devices also. Values may differ.​
Things you need:
Tool for decompiling/compiling work (I will not cover this, there are many guides for this)
Notepad++
Patience
Some common sense
Click to expand...
Click to collapse
Here, we will edit two files:
SecSettings.apk
SystemUI.apk
Here we start-
Decompile SecSettings.apk
Open smali/com/android/settings/DateTimeSettings.smali
Add blue one
Code:
# instance fields
.field private mAutoTimePref:Landroid/preference/CheckBoxPreference;
.field private mAutoTimeZonePref:Landroid/preference/CheckBoxPreference;
.field private mDateFormat:Landroid/preference/ListPreference;
.field private mDatePref:Landroid/preference/Preference;
.field private mDummyDate:Ljava/util/Calendar;
[COLOR="Blue"].field private mHideAmPm:Landroid/preference/Preference;[/COLOR]
[COLOR="blue"].field private mHideTime:Landroid/preference/Preference;[/COLOR]
.field private mIntentReceiver:Landroid/content/BroadcastReceiver;
.field private mSettingsObserver:Lcom/android/settings/DateTimeSettings$SettingsObserver;
.field private mTime24Pref:Landroid/preference/Preference;
.field private mTimePref:Landroid/preference/Preference;
.field private mTimeZone:Landroid/preference/Preference;
Search
.method private initUI()V
Click to expand...
Click to collapse
Replace the whole method with this
Code:
.method private initUI()V
.locals 8
.prologue
const/4 v5, 0x1
const/4 v6, 0x0
.line 152
const-string v4, "auto_time"
invoke-direct {p0, v4}, Lcom/android/settings/DateTimeSettings;->getAutoState(Ljava/lang/String;)Z
move-result v0
.line 153
.local v0, autoTimeEnabled:Z
const-string v4, "auto_time_zone"
invoke-direct {p0, v4}, Lcom/android/settings/DateTimeSettings;->getAutoState(Ljava/lang/String;)Z
move-result v1
.line 155
.local v1, autoTimeZoneEnabled:Z
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getActivity()Landroid/app/Activity;
move-result-object v4
invoke-virtual {v4}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;
move-result-object v2
.line 156
.local v2, intent:Landroid/content/Intent;
const-string v4, "firstRun"
invoke-virtual {v2, v4, v6}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v3
.line 158
.local v3, isFirstRun:Z
invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;
move-result-object v4
iput-object v4, p0, Lcom/android/settings/DateTimeSettings;->mDummyDate:Ljava/util/Calendar;
.line 160
const-string v4, "auto_time"
invoke-virtual {p0, v4}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v4
check-cast v4, Landroid/preference/CheckBoxPreference;
iput-object v4, p0, Lcom/android/settings/DateTimeSettings;->mAutoTimePref:Landroid/preference/CheckBoxPreference;
.line 161
iget-object v4, p0, Lcom/android/settings/DateTimeSettings;->mAutoTimePref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v4, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 162
const-string v4, "auto_zone"
invoke-virtual {p0, v4}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v4
check-cast v4, Landroid/preference/CheckBoxPreference;
iput-object v4, p0, Lcom/android/settings/DateTimeSettings;->mAutoTimeZonePref:Landroid/preference/CheckBoxPreference;
.line 165
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getActivity()Landroid/app/Activity;
move-result-object v4
invoke-static {v4}, Lcom/android/settings/Utils;->isWifiOnly(Landroid/content/Context;)Z
move-result v4
if-nez v4, :cond_0
if-eqz v3, :cond_2
.line 166
.line 167
:cond_0
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getActivity()Landroid/app/Activity;
move-result-object v4
invoke-static {v4}, Lcom/android/settings/Utils;->isWifiOnly(Landroid/content/Context;)Z
move-result v4
if-eqz v4, :cond_1
.line 168
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v4
iget-object v7, p0, Lcom/android/settings/DateTimeSettings;->mAutoTimePref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v4, v7}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 169
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v7, "auto_time_zone"
invoke-static {v4, v7, v6}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
.line 171
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v7, "auto_time"
invoke-static {v4, v7, v6}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
.line 173
const/4 v0, 0x0
.line 175
:cond_1
const/4 v1, 0x0
.line 177
:cond_2
iget-object v4, p0, Lcom/android/settings/DateTimeSettings;->mAutoTimeZonePref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v4, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 179
const-string v4, "time"
invoke-virtual {p0, v4}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v4
iput-object v4, p0, Lcom/android/settings/DateTimeSettings;->mTimePref:Landroid/preference/Preference;
.line 180
const-string v4, "24 hour"
invoke-virtual {p0, v4}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v4
iput-object v4, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
.line 181
const-string v4, "timezone"
invoke-virtual {p0, v4}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v4
iput-object v4, p0, Lcom/android/settings/DateTimeSettings;->mTimeZone:Landroid/preference/Preference;
.line 182
const-string v4, "date"
invoke-virtual {p0, v4}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v4
iput-object v4, p0, Lcom/android/settings/DateTimeSettings;->mDatePref:Landroid/preference/Preference;
.line 183
const-string v4, "date_format"
invoke-virtual {p0, v4}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v4
check-cast v4, Landroid/preference/ListPreference;
iput-object v4, p0, Lcom/android/settings/DateTimeSettings;->mDateFormat:Landroid/preference/ListPreference;
.line 184
if-eqz v3, :cond_3
.line 185
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v4
iget-object v7, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
invoke-virtual {v4, v7}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 186
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v4
iget-object v7, p0, Lcom/android/settings/DateTimeSettings;->mDateFormat:Landroid/preference/ListPreference;
invoke-virtual {v4, v7}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 189
:cond_3
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->updateDateFormatEntries()V
.line 192
iget-object v7, p0, Lcom/android/settings/DateTimeSettings;->mTimePref:Landroid/preference/Preference;
if-nez v0, :cond_6
move v4, v5
:goto_0
invoke-virtual {v7, v4}, Landroid/preference/Preference;->setEnabled(Z)V
.line 193
iget-object v7, p0, Lcom/android/settings/DateTimeSettings;->mDatePref:Landroid/preference/Preference;
if-nez v0, :cond_7
move v4, v5
:goto_1
invoke-virtual {v7, v4}, Landroid/preference/Preference;->setEnabled(Z)V
.line 194
iget-object v4, p0, Lcom/android/settings/DateTimeSettings;->mTimeZone:Landroid/preference/Preference;
if-nez v1, :cond_8
:goto_2
invoke-virtual {v4, v5}, Landroid/preference/Preference;->setEnabled(Z)V
.line 197
invoke-direct {p0}, Lcom/android/settings/DateTimeSettings;->applyEDMDateTimeChangePolicy()V
.line 199
const-string v6, "hide_time"
invoke-virtual {p0, v6}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v6
check-cast v6, Landroid/preference/Preference;
iput-object v6, p0, Lcom/android/settings/DateTimeSettings;->mHideTime:Landroid/preference/Preference;
const-string v6, "hide_ampm"
invoke-virtual {p0, v6}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v6
check-cast v6, Landroid/preference/Preference;
iput-object v6, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideTime:Landroid/preference/Preference;
check-cast v0, Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
if-eqz v0, :cond_4
const/4 v0, 0x0
iget-object v6, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
invoke-virtual {v6, v0}, Landroid/preference/Preference;->setEnabled(Z)V
iget-object v6, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
invoke-virtual {v6, v0}, Landroid/preference/Preference;->setEnabled(Z)V
:cond_4
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
check-cast v0, Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
if-eqz v0, :cond_5
const/4 v0, 0x0
iget-object v6, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
invoke-virtual {v6, v0}, Landroid/preference/Preference;->setEnabled(Z)V
:cond_5
return-void
:cond_6
move v4, v6
.line 192
goto :goto_0
:cond_7
move v4, v6
.line 193
goto :goto_1
:cond_8
move v5, v6
.line 194
goto :goto_2
.end method
Search this method
Code:
.method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
Replace full method with this
Code:
.method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
.locals 6
.parameter "preferenceScreen"
.parameter "preference"
.prologue
const/4 v1, 0x1
.line 490
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mDatePref:Landroid/preference/Preference;
if-ne p2, v0, :cond_1
.line 491
const/4 v0, 0x0
invoke-virtual {p0, v0}, Lcom/android/settings/DateTimeSettings;->showDialog(I)V
.line 501
:cond_0
:goto_0
invoke-super {p0, p1, p2}, Lcom/android/settings/SettingsPreferenceFragment;->onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
move-result v0
return v0
.line 492
:cond_1
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mTimePref:Landroid/preference/Preference;
if-ne p2, v0, :cond_2
.line 494
invoke-virtual {p0, v1}, Lcom/android/settings/DateTimeSettings;->removeDialog(I)V
.line 495
invoke-virtual {p0, v1}, Lcom/android/settings/DateTimeSettings;->showDialog(I)V
goto :goto_0
.line 496
:cond_2
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
if-ne p2, v0, :cond_4
.line 497
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
check-cast v0, Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
invoke-direct {p0, v0}, Lcom/android/settings/DateTimeSettings;->set24Hour(Z)V
iget-object v1, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
if-nez v0, :cond_3
const/4 v0, 0x1
goto :goto_1
:cond_3
const/4 v0, 0x0
:goto_1
invoke-virtual {v1, v0}, Landroid/preference/Preference;->setEnabled(Z)V
.line 498
:goto_2
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getActivity()Landroid/app/Activity;
move-result-object v0
invoke-virtual {p0, v0}, Lcom/android/settings/DateTimeSettings;->updateTimeAndDateDisplay(Landroid/content/Context;)V
.line 499
invoke-direct {p0}, Lcom/android/settings/DateTimeSettings;->timeUpdated()V
goto :goto_0
:cond_4
const-string v3, "hide_ampm"
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
if-ne p2, v0, :cond_5
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
check-cast v0, Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v2
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "hide_ampm"
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto :goto_2
:cond_5
const-string v3, "hide_time"
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideTime:Landroid/preference/Preference;
if-ne p2, v0, :cond_0
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideTime:Landroid/preference/Preference;
check-cast v0, Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v2
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "hide_time"
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
if-nez v2, :cond_6
const/4 v2, 0x1
goto :goto_3
:cond_6
const/4 v2, 0x0
:goto_3
iget-object v1, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
invoke-virtual {v1, v2}, Landroid/preference/Preference;->setEnabled(Z)V
iget-object v1, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
invoke-virtual {v1, v2}, Landroid/preference/Preference;->setEnabled(Z)V
goto :goto_2
.end method
Save it.
Now open res/xm/Date_Time_Prefs.xml
Add blue lines
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/date_and_time"
xmlns:android="http://schemas.android.com/apk/res/android">
<CheckBoxPreference android:title="@string/date_time_auto" android:key="auto_time" android:summaryOn="@string/date_time_auto_summaryOn" android:summaryOff="@string/date_time_auto_summaryOff" />
<Preference android:title="@string/date_time_set_date" android:key="date" android:summary="03/10/2008" android:widgetLayout="@layout/round_more_icon" />
<Preference android:title="@string/date_time_set_time" android:key="time" android:summary="12:00am" android:widgetLayout="@layout/round_more_icon" />
<CheckBoxPreference android:title="@string/zone_auto" android:key="auto_zone" android:summaryOn="@string/zone_auto_summaryOn" android:summaryOff="@string/zone_auto_summaryOff" />
[COLOR="blue"]<CheckBoxPreference android:title="@string/disable_time" android:key="hide_time" android:summary="@string/disable_time_text" />
<CheckBoxPreference android:title="@string/disable_ampm" android:key="hide_ampm" android:summary="@string/disable_ampm_text" />[/COLOR]
<PreferenceScreen android:title="@string/date_time_set_timezone" android:key="timezone" android:summary="GMT-8:00" android:fragment="com.android.settings.ZonePicker" />
<CheckBoxPreference android:title="@string/date_time_24hour" android:key="24 hour" />
<ListPreference android:title="@string/date_time_date_format" android:key="date_format" android:summary="mm/dd/yyyy" android:widgetLayout="@layout/round_more_icon" />
</PreferenceScreen>
Save it.
Open res/values/strings.xml
Add these lines at the end
Code:
<string name="disable_time">Hide time</string>
<string name="disable_time_text">Remove time from status bar</string>
<string name="disable_ampm">Hide AM/PM</string>
<string name="disable_ampm_text">Remove AM/PM from time in status bar</string>
Save it and recompile SecSettings.apk
Conitnue to next Post
Decompile SystemUI.apk
Open smali/com/android/systemui/statusbar/policy/Clock.smali
Search-
Code:
.method private final getSmallTime()Ljava/lang/CharSequence;
Replace whole method with this
Code:
.method private final getSmallTime()Ljava/lang/CharSequence;
.locals 22
.prologue
.line 237
invoke-virtual/range {p0 .. p0}, Lcom/android/systemui/statusbar/policy/Clock;->getContext()Landroid/content/Context;
move-result-object v8
.line 238
.local v8, context:Landroid/content/Context;
invoke-virtual {v8}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v7, "hide_time"
const/4 v0, 0x0
invoke-static {v2, v7, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v7
const/4 v0, 0x0
if-eqz v7, :cond_0
const/16 v0, 0x8
:cond_0
[COLOR="Red"]const v1, 0x7f0f003d[/COLOR]
move-object/from16 v2, p0
invoke-virtual {v2, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v1
invoke-virtual {v1, v0}, Landroid/view/View;->setVisibility(I)V
invoke-static {v8}, Landroid/text/format/DateFormat;->is24HourFormat(Landroid/content/Context;)Z
move-result v6
.line 244
.local v6, b24:Z
if-eqz v6, :cond_5
.line 245
const v16, 0x104007f
.line 259
.local v16, res:I
:goto_0
const v2, 0xef00
.line 260
.local v2, MAGIC1:C
const v3, 0xef01
.line 263
.local v3, MAGIC2:C
move/from16 v0, v16
invoke-virtual {v8, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v9
if-nez v6, :cond_1
invoke-virtual {v8}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "hide_ampm"
const/4 v0, 0x0
invoke-static {v2, v3, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v7
const-string v0, "ampm"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "getint returned="
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, v7}, Ljava/lang/StringBuilder;->append(I)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/Slog;->i(Ljava/lang/String;Ljava/lang/String;)I
move v2, v7
if-eqz v2, :cond_1
const-string v9, "h:mm"
.line 266
.local v9, format:Ljava/lang/String;
:cond_1
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/policy/Clock;->mClockFormatString:Ljava/lang/String;
move-object/from16 v20, v0
move-object/from16 v0, v20
invoke-virtual {v9, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v20
if-eqz v20, :cond_2
if-nez v6, :cond_a
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/systemui/statusbar/policy/Clock;->mLocaleChanged:Z
move/from16 v20, v0
if-eqz v20, :cond_a
.line 267
:cond_2
const/16 v20, 0x0
move/from16 v0, v20
move-object/from16 v1, p0
iput-boolean v0, v1, Lcom/android/systemui/statusbar/policy/Clock;->mLocaleChanged:Z
.line 274
sget v20, Lcom/android/systemui/statusbar/policy/Clock;->AM_PM_STYLE:I
if-eqz v20, :cond_9
.line 275
const/4 v4, -0x1
.line 276
.local v4, a:I
const/4 v15, 0x0
.line 277
.local v15, quoted:Z
const/4 v11, 0x0
.local v11, i:I
:goto_1
invoke-virtual {v9}, Ljava/lang/String;->length()I
move-result v20
move/from16 v0, v20
if-ge v11, v0, :cond_4
.line 278
invoke-virtual {v9, v11}, Ljava/lang/String;->charAt(I)C
move-result v7
.line 280
.local v7, c:C
const/16 v20, 0x27
move/from16 v0, v20
if-ne v7, v0, :cond_3
.line 281
if-nez v15, :cond_6
const/4 v15, 0x1
.line 283
:cond_3
:goto_2
if-nez v15, :cond_7
const/16 v20, 0x61
move/from16 v0, v20
if-ne v7, v0, :cond_7
.line 284
move v4, v11
.line 289
.end local v7 #c:C
:cond_4
if-ltz v4, :cond_9
.line 291
move v5, v4
.line 292
.local v5, b:I
:goto_3
if-lez v4, :cond_8
add-int/lit8 v20, v4, -0x1
move/from16 v0, v20
invoke-virtual {v9, v0}, Ljava/lang/String;->charAt(I)C
move-result v20
invoke-static/range {v20 .. v20}, Ljava/lang/Character;->isWhitespace(C)Z
move-result v20
if-eqz v20, :cond_8
.line 293
add-int/lit8 v4, v4, -0x1
goto :goto_3
.line 247
.end local v2 #MAGIC1:C
.end local v3 #MAGIC2:C
.end local v4 #a:I
.end local v5 #b:I
.end local v9 #format:Ljava/lang/String;
.end local v11 #i:I
.end local v15 #quoted:Z
.end local v16 #res:I
:cond_5
const v16, 0x104007e
.restart local v16 #res:I
goto/16 :goto_0
.line 281
.restart local v2 #MAGIC1:C
.restart local v3 #MAGIC2:C
.restart local v4 #a:I
.restart local v7 #c:C
.restart local v9 #format:Ljava/lang/String;
.restart local v11 #i:I
.restart local v15 #quoted:Z
:cond_6
const/4 v15, 0x0
goto :goto_2
.line 277
:cond_7
add-int/lit8 v11, v11, 0x1
goto :goto_1
.line 295
.end local v7 #c:C
.restart local v5 #b:I
:cond_8
new-instance v20, Ljava/lang/StringBuilder;
invoke-direct/range {v20 .. v20}, Ljava/lang/StringBuilder;-><init>()V
const/16 v21, 0x0
move/from16 v0, v21
invoke-virtual {v9, v0, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object v21
invoke-virtual/range {v20 .. v21}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v20
const v21, 0xef00
invoke-virtual/range {v20 .. v21}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
move-result-object v20
invoke-virtual {v9, v4, v5}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object v21
invoke-virtual/range {v20 .. v21}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v20
const-string v21, "a"
invoke-virtual/range {v20 .. v21}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v20
const v21, 0xef01
invoke-virtual/range {v20 .. v21}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
move-result-object v20
add-int/lit8 v21, v5, 0x1
move/from16 v0, v21
invoke-virtual {v9, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;
move-result-object v21
invoke-virtual/range {v20 .. v21}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v20
invoke-virtual/range {v20 .. v20}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v9
.line 300
.end local v4 #a:I
.end local v5 #b:I
.end local v11 #i:I
.end local v15 #quoted:Z
:cond_9
new-instance v18, Ljava/text/SimpleDateFormat;
move-object/from16 v0, v18
invoke-direct {v0, v9}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V
.local v18, sdf:Ljava/text/SimpleDateFormat;
move-object/from16 v0, v18
move-object/from16 v1, p0
iput-object v0, v1, Lcom/android/systemui/statusbar/policy/Clock;->mClockFormat:Ljava/text/SimpleDateFormat;
.line 301
move-object/from16 v0, p0
iput-object v9, v0, Lcom/android/systemui/statusbar/policy/Clock;->mClockFormatString:Ljava/lang/String;
.line 305
:goto_4
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/policy/Clock;->mCalendar:Ljava/util/Calendar;
move-object/from16 v20, v0
invoke-virtual/range {v20 .. v20}, Ljava/util/Calendar;->getTime()Ljava/util/Date;
move-result-object v20
move-object/from16 v0, v18
move-object/from16 v1, v20
invoke-virtual {v0, v1}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
move-result-object v17
.line 307
.local v17, result:Ljava/lang/String;
sget v20, Lcom/android/systemui/statusbar/policy/Clock;->AM_PM_STYLE:I
if-eqz v20, :cond_e
.line 308
const v20, 0xef00
move-object/from16 v0, v17
move/from16 v1, v20
invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(I)I
move-result v12
.line 309
.local v12, magic1:I
const v20, 0xef01
move-object/from16 v0, v17
move/from16 v1, v20
invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(I)I
move-result v13
.line 310
.local v13, magic2:I
if-ltz v12, :cond_e
if-le v13, v12, :cond_e
.line 311
new-instance v10, Landroid/text/SpannableStringBuilder;
move-object/from16 v0, v17
invoke-direct {v10, v0}, Landroid/text/SpannableStringBuilder;-><init>(Ljava/lang/CharSequence;)V
.line 312
.local v10, formatted:Landroid/text/SpannableStringBuilder;
sget v20, Lcom/android/systemui/statusbar/policy/Clock;->AM_PM_STYLE:I
const/16 v21, 0x2
move/from16 v0, v20
move/from16 v1, v21
if-ne v0, v1, :cond_b
.line 313
add-int/lit8 v20, v13, 0x1
move/from16 v0, v20
invoke-virtual {v10, v12, v0}, Landroid/text/SpannableStringBuilder;->delete(II)Landroid/text/SpannableStringBuilder;
.line 334
.end local v10 #formatted:Landroid/text/SpannableStringBuilder;
.end local v12 #magic1:I
.end local v13 #magic2:I
:goto_5
return-object v10
.line 303
.end local v17 #result:Ljava/lang/String;
.end local v18 #sdf:Ljava/text/SimpleDateFormat;
:cond_a
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/policy/Clock;->mClockFormat:Ljava/text/SimpleDateFormat;
move-object/from16 v18, v0
.restart local v18 #sdf:Ljava/text/SimpleDateFormat;
goto :goto_4
.line 315
.restart local v10 #formatted:Landroid/text/SpannableStringBuilder;
.restart local v12 #magic1:I
.restart local v13 #magic2:I
.restart local v17 #result:Ljava/lang/String;
:cond_b
sget v20, Lcom/android/systemui/statusbar/policy/Clock;->AM_PM_STYLE:I
const/16 v21, 0x1
move/from16 v0, v20
move/from16 v1, v21
if-ne v0, v1, :cond_d
.line 317
const v14, 0x3f333333
.line 318
.local v14, proportion:F
sget-boolean v20, Lcom/android/systemui/statusbar/StatusBar;->useTouchWizGUI:Z
if-eqz v20, :cond_c
sget-boolean v20, Lcom/android/systemui/statusbar/StatusBar;->canStatusBarHide:Z
if-nez v20, :cond_c
.line 319
const/high16 v14, 0x3f00
.line 322
:cond_c
new-instance v19, Landroid/text/style/RelativeSizeSpan;
move-object/from16 v0, v19
invoke-direct {v0, v14}, Landroid/text/style/RelativeSizeSpan;-><init>(F)V
.line 324
.local v19, style:Landroid/text/style/CharacterStyle;
const/16 v20, 0x22
move-object/from16 v0, v19
move/from16 v1, v20
invoke-virtual {v10, v0, v12, v13, v1}, Landroid/text/SpannableStringBuilder;->setSpan(Ljava/lang/Object;III)V
.line 327
.end local v14 #proportion:F
.end local v19 #style:Landroid/text/style/CharacterStyle;
:cond_d
add-int/lit8 v20, v13, 0x1
move/from16 v0, v20
invoke-virtual {v10, v13, v0}, Landroid/text/SpannableStringBuilder;->delete(II)Landroid/text/SpannableStringBuilder;
.line 328
add-int/lit8 v20, v12, 0x1
move/from16 v0, v20
invoke-virtual {v10, v12, v0}, Landroid/text/SpannableStringBuilder;->delete(II)Landroid/text/SpannableStringBuilder;
goto :goto_5
.end local v10 #formatted:Landroid/text/SpannableStringBuilder;
.end local v12 #magic1:I
.end local v13 #magic2:I
:cond_e
move-object/from16 v10, v17
.line 334
goto :goto_5
.end method
One ID is highlighted in red color in the above method, match this ID with "Clock" ID in res/values/public.xml. Make them same if they are different.
Save it and recompile SystemUI.apk
Thats it
Enjoy
Credits:
Me
Codename13
Didact74
Click to expand...
Click to collapse

[Guide] Breathing Notification

Today again a new mod ( i got this mod from 4pda forum )
this guide will help you to make your notification animated
Credit:-
KachalkinGeorg (The GK)
Requirement (deodexed):-
1.Settings.apk
2.Telecom.apk
3.TeleService.apk
4.Mms.apk
5.NotePad++
6.Patience.. if you dont have try to get it
First part ( Settings.apk )
1.Decompile Settings.apk
2.Download breathingsettings.zip from attachment. Extract and copy files to decompiled Settings
3.Open Settings\res\xml\display.xml and add the below code
Code:
<PreferenceScreen android:title="@string/gk_breathing_notifications" android:key="breathing_notifications" android:fragment="com.android.settings.gk.BreathingNotifications.BreathingNotifications" />
4.Open Settings\res\values\strings.xml and add below code
Code:
<string name="gk_breathing_notifications">Breathing notifications</string>
<string name="gk_sms_breath_title">Breathing SMS</string>
<string name="gk_sms_breath_summary">Will give your sms notifications a breathing effect in the statusbar</string>
<string name="gk_missed_call_breath_title">Breathing Missed Call</string>
<string name="gk_missed_call_breath_summary">Will give your missed call notifications a breathing effect in the statusbar</string>
<string name="gk_voicemail_breath_title">Breathing Voicemail</string>
<string name="gk_voicemail_breath_summary">Will give your voicemail notifications a breathing effect in the statusbar</string>
5.Recompile and Decompile Settings (For id's)
6.Open Settings\smali\com\android\settings\gk\BreathingNotifications\BreathingNotifications.smali
find
Code:
0x7f060018
replace with below id
Code:
<public type="xml" name="gk_breathing_notifications"
7.Compile Settings and move to your device
Continued next post
Continued.
Second part ( Telecom.apk )
1.Decompile Telecom.apk
2.Download breathingtelecom.zip from attachment. Extract and copy files to your decompiled Telecom
3.Now Recompile and Decompile Telecom (For id's)
4.Open Telecom\smali\com\android\server\telecom\MissedCallNotifier.smali
find and remove below annotations
Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/android/server/telecom/MissedCallNotifier$MissedCallInfo;
}
.end annotation
find and remove below field
Code:
.field private static final TIME_SPAN:Landroid/text/style/RelativeSizeSpan;
find below field
Code:
.field private mMissedCalls:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList",
"<",
"Lcom/android/server/telecom/MissedCallNotifier$MissedCallInfo;",
">;"
}
replace with this field
Code:
.field private mMissedCallCount:I
find below method
Code:
.method static constructor <clinit>()V
in the same method find and remove below lines
Code:
.line 233
new-instance v0, Landroid/text/style/RelativeSizeSpan;
const v1, 0x3f333333 # 0.7f
invoke-direct {v0, v1}, Landroid/text/style/RelativeSizeSpan;-><init>(F)V
sput-object v0, Lcom/android/server/telecom/MissedCallNotifier;->TIME_SPAN:Landroid/text/style/RelativeSizeSpan;
find
Code:
.method constructor <init>(Landroid/content/Context;)V
replace whole method with this
Code:
.method constructor <init>(Landroid/content/Context;)V
.locals 2
.prologue
.line 82
invoke-direct {p0}, Lcom/android/server/telecom/CallsManagerListenerBase;-><init>()V
.line 80
const/4 v0, 0x0
iput v0, p0, Lcom/android/server/telecom/MissedCallNotifier;->mMissedCallCount:I
.line 83
iput-object p1, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;
.line 84
iget-object v0, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;
const-string v1, "notification"
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/NotificationManager;
iput-object v0, p0, Lcom/android/server/telecom/MissedCallNotifier;->mNotificationManager:Landroid/app/NotificationManager;
.line 87
invoke-direct {p0}, Lcom/android/server/telecom/MissedCallNotifier;->updateOnStartup()V
.line 88
return-void
.end method
find
Code:
.method private cancelMissedCallNotification()V
replace whole method with this
Code:
.method private cancelMissedCallNotification()V
.locals 2
.prologue
.line 209
const/4 v0, 0x0
iput v0, p0, Lcom/android/server/telecom/MissedCallNotifier;->mMissedCallCount:I
.line 210
iget-object v0, p0, Lcom/android/server/telecom/MissedCallNotifier;->mNotificationManager:Landroid/app/NotificationManager;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Landroid/app/NotificationManager;->cancel(I)V
.line 211
return-void
.end method
find and remove whole method
.method private formatSingleCallLine(Ljava/lang/String;J)Ljava/lang/CharSequence;
Click to expand...
Click to collapse
find
Code:
.method showMissedCallNotification(Lcom/android/server/telecom/Call;)V
replace whole method with this
Code:
.method showMissedCallNotification(Lcom/android/server/telecom/Call;)V
.locals 10
.prologue
const/4 v2, 0x0
const/high16 v6, 0x7f060000
const/4 v9, 0x0
const/4 v8, 0x1
.line 126
iget v0, p0, Lcom/android/server/telecom/MissedCallNotifier;->mMissedCallCount:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/android/server/telecom/MissedCallNotifier;->mMissedCallCount:I
.line 134
iget v0, p0, Lcom/android/server/telecom/MissedCallNotifier;->mMissedCallCount:I
if-ne v0, v8, :cond_2
.line 135
const v1, 0x7f050015
.line 136
invoke-direct {p0, p1}, Lcom/android/server/telecom/MissedCallNotifier;->getNameForCall(Lcom/android/server/telecom/Call;)Ljava/lang/String;
move-result-object v0
.line 144
:goto_0
new-instance v3, Landroid/app/Notification$Builder;
iget-object v4, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;
invoke-direct {v3, v4}, Landroid/app/Notification$Builder;-><init>(Landroid/content/Context;)V
.line 145
iget-object v4, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;
invoke-virtual {v4}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v5, "gk_missed_call_breath"
invoke-static {v4, v5, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v4
if-ne v4, v8, :cond_3
.line 147
const v4, 0x7f02001f
invoke-virtual {v3, v4}, Landroid/app/Notification$Builder;->setSmallIcon(I)Landroid/app/Notification$Builder;
move-result-object v4
iget-object v5, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;
invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v5
invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getColor(I)I
move-result v5
invoke-virtual {v4, v5}, Landroid/app/Notification$Builder;->setColor(I)Landroid/app/Notification$Builder;
move-result-object v4
invoke-virtual {p1}, Lcom/android/server/telecom/Call;->getCreationTimeMillis()J
move-result-wide v6
invoke-virtual {v4, v6, v7}, Landroid/app/Notification$Builder;->setWhen(J)Landroid/app/Notification$Builder;
move-result-object v4
iget-object v5, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;
invoke-virtual {v5, v1}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;
move-result-object v1
invoke-virtual {v4, v1}, Landroid/app/Notification$Builder;->setContentTitle(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;
move-result-object v1
invoke-virtual {v1, v0}, Landroid/app/Notification$Builder;->setContentText(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;
move-result-object v0
invoke-direct {p0}, Lcom/android/server/telecom/MissedCallNotifier;->createCallLogPendingIntent()Landroid/app/PendingIntent;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/app/Notification$Builder;->setContentIntent(Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;
move-result-object v0
invoke-virtual {v0, v8}, Landroid/app/Notification$Builder;->setAutoCancel(Z)Landroid/app/Notification$Builder;
move-result-object v0
invoke-direct {p0}, Lcom/android/server/telecom/MissedCallNotifier;->createClearMissedCallsPendingIntent()Landroid/app/PendingIntent;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/app/Notification$Builder;->setDeleteIntent(Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;
.line 166
:goto_1
invoke-virtual {p1}, Lcom/android/server/telecom/Call;->getHandle()Landroid/net/Uri;
move-result-object v1
.line 167
if-nez v1, :cond_4
move-object v0, v2
.line 170
:goto_2
iget v4, p0, Lcom/android/server/telecom/MissedCallNotifier;->mMissedCallCount:I
if-ne v4, v8, :cond_6
.line 171
const-string v4, "Add actions with number %s."
new-array v5, v8, [Ljava/lang/Object;
invoke-static {v0}, Lcom/android/server/telecom/Log;->piiHandle(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v6
aput-object v6, v5, v9
invoke-static {p0, v4, v5}, Lcom/android/server/telecom/Log;->d(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 173
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v4
if-nez v4, :cond_0
iget-object v4, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;
const v5, 0x7f050034
invoke-virtual {v4, v5}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v4
invoke-static {v0, v4}, Landroid/text/TextUtils;->equals(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 175
const v0, 0x7f020020
iget-object v4, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;
const v5, 0x7f050019
invoke-virtual {v4, v5}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v4
invoke-direct {p0, v1}, Lcom/android/server/telecom/MissedCallNotifier;->createCallBackPendingIntent(Landroid/net/Uri;)Landroid/app/PendingIntent;
move-result-object v5
invoke-virtual {v3, v0, v4, v5}, Landroid/app/Notification$Builder;->addAction(ILjava/lang/CharSequence;Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;
.line 179
const v0, 0x7f020006
iget-object v4, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;
const v5, 0x7f05001a
invoke-virtual {v4, v5}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v4
invoke-direct {p0, v1}, Lcom/android/server/telecom/MissedCallNotifier;->createSendSmsFromNotificationPendingIntent(Landroid/net/Uri;)Landroid/app/PendingIntent;
move-result-object v1
invoke-virtual {v3, v0, v4, v1}, Landroid/app/Notification$Builder;->addAction(ILjava/lang/CharSequence;Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;
.line 184
:cond_0
invoke-virtual {p1}, Lcom/android/server/telecom/Call;->getPhotoIcon()Landroid/graphics/Bitmap;
move-result-object v0
.line 185
if-eqz v0, :cond_5
.line 186
invoke-virtual {v3, v0}, Landroid/app/Notification$Builder;->setLargeIcon(Landroid/graphics/Bitmap;)Landroid/app/Notification$Builder;
.line 198
:cond_1
:goto_3
invoke-virtual {v3}, Landroid/app/Notification$Builder;->build()Landroid/app/Notification;
move-result-object v0
.line 199
iget-object v1, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;
invoke-static {v1, v0}, Lcom/android/server/telecom/MissedCallNotifier;->configureLedOnNotification(Landroid/content/Context;Landroid/app/Notification;)V
.line 201
const-string v1, "Adding missed call notification for %s."
new-array v3, v8, [Ljava/lang/Object;
aput-object p1, v3, v9
invoke-static {p0, v1, v3}, Lcom/android/server/telecom/Log;->i(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 202
iget-object v1, p0, Lcom/android/server/telecom/MissedCallNotifier;->mNotificationManager:Landroid/app/NotificationManager;
sget-object v3, Landroid/os/UserHandle;->CURRENT:Landroid/os/UserHandle;
invoke-virtual {v1, v2, v8, v0, v3}, Landroid/app/NotificationManager;->notifyAsUser(Ljava/lang/String;ILandroid/app/Notification;Landroid/os/UserHandle;)V
.line 204
return-void
.line 138
:cond_2
const v1, 0x7f050016
.line 139
iget-object v0, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;
const v3, 0x7f050017
new-array v4, v8, [Ljava/lang/Object;
iget v5, p0, Lcom/android/server/telecom/MissedCallNotifier;->mMissedCallCount:I
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v5
aput-object v5, v4, v9
invoke-virtual {v0, v3, v4}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
goto/16 :goto_0
.line 156
:cond_3
const v4, 0x108007f
invoke-virtual {v3, v4}, Landroid/app/Notification$Builder;->setSmallIcon(I)Landroid/app/Notification$Builder;
move-result-object v4
iget-object v5, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;
invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v5
invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getColor(I)I
move-result v5
invoke-virtual {v4, v5}, Landroid/app/Notification$Builder;->setColor(I)Landroid/app/Notification$Builder;
move-result-object v4
invoke-virtual {p1}, Lcom/android/server/telecom/Call;->getCreationTimeMillis()J
move-result-wide v6
invoke-virtual {v4, v6, v7}, Landroid/app/Notification$Builder;->setWhen(J)Landroid/app/Notification$Builder;
move-result-object v4
iget-object v5, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;
invoke-virtual {v5, v1}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;
move-result-object v1
invoke-virtual {v4, v1}, Landroid/app/Notification$Builder;->setContentTitle(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;
move-result-object v1
invoke-virtual {v1, v0}, Landroid/app/Notification$Builder;->setContentText(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;
move-result-object v0
invoke-direct {p0}, Lcom/android/server/telecom/MissedCallNotifier;->createCallLogPendingIntent()Landroid/app/PendingIntent;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/app/Notification$Builder;->setContentIntent(Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;
move-result-object v0
invoke-virtual {v0, v8}, Landroid/app/Notification$Builder;->setAutoCancel(Z)Landroid/app/Notification$Builder;
move-result-object v0
invoke-direct {p0}, Lcom/android/server/telecom/MissedCallNotifier;->createClearMissedCallsPendingIntent()Landroid/app/PendingIntent;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/app/Notification$Builder;->setDeleteIntent(Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;
goto/16 :goto_1
.line 167
:cond_4
invoke-virtual {v1}, Landroid/net/Uri;->getSchemeSpecificPart()Ljava/lang/String;
move-result-object v0
goto/16 :goto_2
.line 188
:cond_5
invoke-virtual {p1}, Lcom/android/server/telecom/Call;->getPhoto()Landroid/graphics/drawable/Drawable;
move-result-object v0
.line 189
if-eqz v0, :cond_1
instance-of v1, v0, Landroid/graphics/drawable/BitmapDrawable;
if-eqz v1, :cond_1
.line 190
check-cast v0, Landroid/graphics/drawable/BitmapDrawable;
invoke-virtual {v0}, Landroid/graphics/drawable/BitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;
move-result-object v0
invoke-virtual {v3, v0}, Landroid/app/Notification$Builder;->setLargeIcon(Landroid/graphics/Bitmap;)Landroid/app/Notification$Builder;
goto/16 :goto_3
.line 194
:cond_6
const-string v1, "Suppress actions. handle: %s, missedCalls: %d."
const/4 v4, 0x2
new-array v4, v4, [Ljava/lang/Object;
invoke-static {v0}, Lcom/android/server/telecom/Log;->piiHandle(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
aput-object v0, v4, v9
iget v0, p0, Lcom/android/server/telecom/MissedCallNotifier;->mMissedCallCount:I
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
aput-object v0, v4, v8
invoke-static {p0, v1, v4}, Lcom/android/server/telecom/Log;->d(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
goto/16 :goto_3
.end method
find and replace id's
0x7f060000 - <public type="color" name="theme_color"
0x7f050015 - <public type="string" name="notification_missedCallTitle"
0x7f02001f - <public type="drawable" name="stat_notify_missed_call_breath"
0x7f050034 - <public type="string" name="handle_restricted"
0x7f020020 - <public type="drawable" name="stat_sys_phone_call"
0x7f050019 - <public type="string" name="notification_missedCall_call_back"
0x7f020006 - <public type="drawable" name="ic_text_holo_dark"
0x7f05001a - <public type="string" name="notification_missedCall_message"
0x7f050016 - <public type="string" name="notification_missedCallsTitle"
0x7f050017 - <public type="string" name="notification_missedCallsMsg"
0x108007f - <public type="drawable" name="stat_notify_missed_call" -from framework-res.apk
Click to expand...
Click to collapse
5.Compile Telecom and move to your device
Continued on next post
Continued.
Third part ( TeleService.apk )
1.Decompile TeleService.apk
2.Downlaod breathingteleservice.zip from attachment. Extract and copy files to your decompiled TeleService
3.Recompile and Decompile TeleService (For ids)
4.Open TeleService\smali\com\android\phone\NotificationMgr.smali
find below method
Code:
.method updateMwi(ZLcom/android/internal/telephony/Phone;)V
replace whole method with this
Code:
.method updateMwi(ZLcom/android/internal/telephony/Phone;)V
.locals 29
.param p1, "visible" # Z
.param p2, "phone" # Lcom/android/internal/telephony/Phone;
.prologue
.line 290
invoke-interface/range {p2 .. p2}, Lcom/android/internal/telephony/Phone;->getPhoneId()I
move-result v13
.line 291
.local v13, "phoneId":I
sget-boolean v25, Lcom/android/phone/NotificationMgr;->DBG:Z
if-eqz v25, :cond_0
new-instance v25, Ljava/lang/StringBuilder;
invoke-direct/range {v25 .. v25}, Ljava/lang/StringBuilder;-><init>()V
const-string v26, "updateMwi(): "
invoke-virtual/range {v25 .. v26}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v25
move-object/from16 v0, v25
move/from16 v1, p1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
move-result-object v25
const-string v26, " phoneId = "
invoke-virtual/range {v25 .. v26}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v25
move-object/from16 v0, v25
invoke-virtual {v0, v13}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v25
invoke-virtual/range {v25 .. v25}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v25
move-object/from16 v0, p0
move-object/from16 v1, v25
invoke-direct {v0, v1}, Lcom/android/phone/NotificationMgr;->log(Ljava/lang/String;)V
.line 292
:cond_0
const/16 v25, 0x3
move/from16 v0, v25
new-array v7, v0, [I
fill-array-data v7, :array_0
.line 296
.local v7, "mwiIcon":[I
const/16 v25, 0x3
move-object/from16 v0, p0
move/from16 v1, v25
invoke-direct {v0, v1, v13}, Lcom/android/phone/NotificationMgr;->getNotificationId(II)I
move-result v9
.line 298
.local v9, "notificationId":I
if-eqz p1, :cond_e
.line 299
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/phone/NotificationMgr;->mContext:Landroid/content/Context;
move-object/from16 v25, v0
invoke-virtual/range {v25 .. v25}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v25
const-string v26, "gk_voicemail_breath"
const/16 v27, 0x0
invoke-static/range {v25 .. v27}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v25
const/16 v26, 0x1
move/from16 v0, v25
move/from16 v1, v26
if-ne v0, v1, :cond_6
.line 301
const v15, 0x7f02003f
.line 305
.local v15, "resId":I
:goto_0
invoke-static {}, Lcom/android/phone/PhoneUtils;->isMultiSimEnabled()Z
move-result v25
if-eqz v25, :cond_1
.line 306
aget v15, v7, v13
.line 319
:cond_1
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/phone/NotificationMgr;->mContext:Landroid/content/Context;
move-object/from16 v25, v0
const v26, 0x7f0802e4
invoke-virtual/range {v25 .. v26}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v11
.line 320
.local v11, "notificationTitle":Ljava/lang/String;
invoke-interface/range {p2 .. p2}, Lcom/android/internal/telephony/Phone;->getVoiceMailNumber()Ljava/lang/String;
move-result-object v24
.line 321
.local v24, "vmNumber":Ljava/lang/String;
sget-boolean v25, Lcom/android/phone/NotificationMgr;->DBG:Z
if-eqz v25, :cond_2
new-instance v25, Ljava/lang/StringBuilder;
invoke-direct/range {v25 .. v25}, Ljava/lang/StringBuilder;-><init>()V
const-string v26, "- got vm number: \'"
invoke-virtual/range {v25 .. v26}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v25
move-object/from16 v0, v25
move-object/from16 v1, v24
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v25
const-string v26, "\'"
invoke-virtual/range {v25 .. v26}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v25
invoke-virtual/range {v25 .. v25}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v25
move-object/from16 v0, p0
move-object/from16 v1, v25
invoke-direct {v0, v1}, Lcom/android/phone/NotificationMgr;->log(Ljava/lang/String;)V
.line 338
:cond_2
if-nez v24, :cond_8
invoke-interface/range {p2 .. p2}, Lcom/android/internal/telephony/Phone;->getIccRecordsLoaded()Z
move-result v25
if-nez v25, :cond_8
.line 339
sget-boolean v25, Lcom/android/phone/NotificationMgr;->DBG:Z
if-eqz v25, :cond_3
const-string v25, "- Null vm number: SIM records not loaded (yet)..."
move-object/from16 v0, p0
move-object/from16 v1, v25
invoke-direct {v0, v1}, Lcom/android/phone/NotificationMgr;->log(Ljava/lang/String;)V
.line 352
:cond_3
move-object/from16 v0, p0
iget v0, v0, Lcom/android/phone/NotificationMgr;->mVmNumberRetriesRemaining:I
move/from16 v25, v0
add-int/lit8 v26, v25, -0x1
move/from16 v0, v26
move-object/from16 v1, p0
iput v0, v1, Lcom/android/phone/NotificationMgr;->mVmNumberRetriesRemaining:I
if-lez v25, :cond_7
.line 353
sget-boolean v25, Lcom/android/phone/NotificationMgr;->DBG:Z
if-eqz v25, :cond_4
const-string v25, " - Retrying in 10000 msec..."
move-object/from16 v0, p0
move-object/from16 v1, v25
invoke-direct {v0, v1}, Lcom/android/phone/NotificationMgr;->log(Ljava/lang/String;)V
.line 354
:cond_4
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/phone/NotificationMgr;->mApp:Lcom/android/phone/PhoneGlobals;
move-object/from16 v25, v0
move-object/from16 v0, v25
iget-object v0, v0, Lcom/android/phone/PhoneGlobals;->notifier:Lcom/android/phone/CallNotifier;
move-object/from16 v25, v0
const-wide/16 v26, 0x2710
move-object/from16 v0, v25
move-wide/from16 v1, v26
move-object/from16 v3, p2
invoke-virtual {v0, v1, v2, v3}, Lcom/android/phone/CallNotifier;->sendMwiChangedDelayed(JLcom/android/internal/telephony/Phone;)V
.line 428
.end local v11 # "notificationTitle":Ljava/lang/String;
.end local v15 # "resId":I
.end local v24 # "vmNumber":Ljava/lang/String;
:cond_5
:goto_1
return-void
.line 303
:cond_6
const v15, 0x108007e
.restart local v15 # "resId":I
goto/16 :goto_0
.line 357
.restart local v11 # "notificationTitle":Ljava/lang/String;
.restart local v24 # "vmNumber":Ljava/lang/String;
:cond_7
const-string v25, "NotificationMgr"
const-string v26, "NotificationMgr.updateMwi: getVoiceMailNumber() failed after 5 retries; giving up."
invoke-static/range {v25 .. v26}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
.line 364
:cond_8
invoke-static/range {p2 .. p2}, Lcom/android/internal/telephony/TelephonyCapabilities;->supportsVoiceMessageCount(Lcom/android/internal/telephony/Phone;)Z
move-result v25
if-eqz v25, :cond_9
.line 365
invoke-interface/range {p2 .. p2}, Lcom/android/internal/telephony/Phone;->getVoiceMessageCount()I
move-result v23
.line 366
.local v23, "vmCount":I
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/phone/NotificationMgr;->mContext:Landroid/content/Context;
move-object/from16 v25, v0
const v26, 0x7f0802e5
invoke-virtual/range {v25 .. v26}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v17
.line 367
.local v17, "titleFormat":Ljava/lang/String;
const/16 v25, 0x1
move/from16 v0, v25
new-array v0, v0, [Ljava/lang/Object;
move-object/from16 v25, v0
const/16 v26, 0x0
invoke-static/range {v23 .. v23}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v27
aput-object v27, v25, v26
move-object/from16 v0, v17
move-object/from16 v1, v25
invoke-static {v0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v11
.line 371
.end local v17 # "titleFormat":Ljava/lang/String;
.end local v23 # "vmCount":I
:cond_9
invoke-static/range {v24 .. v24}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v25
if-eqz v25, :cond_c
.line 372
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/phone/NotificationMgr;->mContext:Landroid/content/Context;
move-object/from16 v25, v0
const v26, 0x7f0802e7
invoke-virtual/range {v25 .. v26}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v10
.line 380
.local v10, "notificationText":Ljava/lang/String;
:goto_2
new-instance v6, Landroid/content/Intent;
const-string v25, "android.intent.action.CALL"
const-string v26, "voicemail"
const-string v27, ""
const/16 v28, 0x0
invoke-static/range {v26 .. v28}, Landroid/net/Uri;->fromParts(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/net/Uri;
move-result-object v26
move-object/from16 v0, v25
move-object/from16 v1, v26
invoke-direct {v6, v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
.line 382
.local v6, "intent":Landroid/content/Intent;
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/phone/NotificationMgr;->mContext:Landroid/content/Context;
move-object/from16 v25, v0
const/16 v26, 0x0
const/16 v27, 0x0
move-object/from16 v0, v25
move/from16 v1, v26
move/from16 v2, v27
invoke-static {v0, v1, v6, v2}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;
move-result-object v12
.line 384
.local v12, "pendingIntent":Landroid/app/PendingIntent;
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/phone/NotificationMgr;->mContext:Landroid/content/Context;
move-object/from16 v25, v0
invoke-static/range {v25 .. v25}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;
move-result-object v14
.line 386
.local v14, "prefs":Landroid/content/SharedPreferences;
const-string v25, "button_voicemail_notification_ringtone_key"
const/16 v26, 0x0
move-object/from16 v0, v25
move-object/from16 v1, v26
invoke-interface {v14, v0, v1}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v18
.line 388
.local v18, "uriString":Ljava/lang/String;
invoke-static/range {v18 .. v18}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v25
if-nez v25, :cond_d
.line 389
invoke-static/range {v18 .. v18}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v16
.line 394
.local v16, "ringtoneUri":Landroid/net/Uri;
:goto_3
new-instance v4, Landroid/app/Notification$Builder;
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/phone/NotificationMgr;->mContext:Landroid/content/Context;
move-object/from16 v25, v0
move-object/from16 v0, v25
invoke-direct {v4, v0}, Landroid/app/Notification$Builder;-><init>(Landroid/content/Context;)V
.line 395
.local v4, "builder":Landroid/app/Notification$Builder;
invoke-virtual {v4, v15}, Landroid/app/Notification$Builder;->setSmallIcon(I)Landroid/app/Notification$Builder;
move-result-object v25
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v26
invoke-virtual/range {v25 .. v27}, Landroid/app/Notification$Builder;->setWhen(J)Landroid/app/Notification$Builder;
move-result-object v25
move-object/from16 v0, v25
invoke-virtual {v0, v11}, Landroid/app/Notification$Builder;->setContentTitle(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;
move-result-object v25
move-object/from16 v0, v25
invoke-virtual {v0, v10}, Landroid/app/Notification$Builder;->setContentText(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;
move-result-object v25
move-object/from16 v0, v25
invoke-virtual {v0, v12}, Landroid/app/Notification$Builder;->setContentIntent(Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;
move-result-object v25
move-object/from16 v0, v25
move-object/from16 v1, v16
invoke-virtual {v0, v1}, Landroid/app/Notification$Builder;->setSound(Landroid/net/Uri;)Landroid/app/Notification$Builder;
move-result-object v25
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/phone/NotificationMgr;->mContext:Landroid/content/Context;
move-object/from16 v26, v0
invoke-virtual/range {v26 .. v26}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v26
const/high16 v27, 0x7f0b0000
invoke-virtual/range {v26 .. v27}, Landroid/content/res/Resources;->getColor(I)I
move-result v26
invoke-virtual/range {v25 .. v26}, Landroid/app/Notification$Builder;->setColor(I)Landroid/app/Notification$Builder;
move-result-object v25
const/16 v26, 0x0
invoke-virtual/range {v25 .. v26}, Landroid/app/Notification$Builder;->setOngoing(Z)Landroid/app/Notification$Builder;
.line 404
invoke-static {v14, v13}, Lcom/android/phone/CallFeaturesSetting;->migrateVoicemailVibrationSettingsIfNeeded(Landroid/content/SharedPreferences;I)Z
.line 405
const-string v25, "button_voicemail_notification_vibrate_key"
const/16 v26, 0x0
move-object/from16 v0, v25
move/from16 v1, v26
invoke-interface {v14, v0, v1}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
move-result v22
.line 407
.local v22, "vibrate":Z
if-eqz v22, :cond_a
.line 408
const/16 v25, 0x2
move/from16 v0, v25
invoke-virtual {v4, v0}, Landroid/app/Notification$Builder;->setDefaults(I)Landroid/app/Notification$Builder;
.line 411
:cond_a
invoke-virtual {v4}, Landroid/app/Notification$Builder;->build()Landroid/app/Notification;
move-result-object v8
.line 412
.local v8, "notification":Landroid/app/Notification;
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/phone/NotificationMgr;->mUserManager:Landroid/os/UserManager;
move-object/from16 v25, v0
const/16 v26, 0x1
invoke-virtual/range {v25 .. v26}, Landroid/os/UserManager;->getUsers(Z)Ljava/util/List;
move-result-object v21
.line 413
.local v21, "users":Ljava/util/List;, "Ljava/util/List<Landroid/content/pm/UserInfo;>;"
const/4 v5, 0x0
.local v5, "i":I
:goto_4
invoke-interface/range {v21 .. v21}, Ljava/util/List;->size()I
move-result v25
move/from16 v0, v25
if-ge v5, v0, :cond_5
.line 414
move-object/from16 v0, v21
invoke-interface {v0, v5}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v19
check-cast v19, Landroid/content/pm/UserInfo;
.line 415
.local v19, "user":Landroid/content/pm/UserInfo;
invoke-virtual/range {v19 .. v19}, Landroid/content/pm/UserInfo;->getUserHandle()Landroid/os/UserHandle;
move-result-object v20
.line 416
.local v20, "userHandle":Landroid/os/UserHandle;
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/phone/NotificationMgr;->mUserManager:Landroid/os/UserManager;
move-object/from16 v25, v0
const-string v26, "no_outgoing_calls"
move-object/from16 v0, v25
move-object/from16 v1, v26
move-object/from16 v2, v20
invoke-virtual {v0, v1, v2}, Landroid/os/UserManager;->hasUserRestriction(Ljava/lang/String;Landroid/os/UserHandle;)Z
move-result v25
if-nez v25, :cond_b
invoke-virtual/range {v19 .. v19}, Landroid/content/pm/UserInfo;->isManagedProfile()Z
move-result v25
if-nez v25, :cond_b
.line 419
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/phone/NotificationMgr;->mContext:Landroid/content/Context;
move-object/from16 v25, v0
move-object/from16 v0, v25
invoke-static {v0, v8}, Lcom/android/phone/NotificationMgr;->configureLedNotification(Landroid/content/Context;Landroid/app/Notification;)V
.line 420
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/phone/NotificationMgr;->mNotificationManager:Landroid/app/NotificationManager;
move-object/from16 v25, v0
const/16 v26, 0x0
move-object/from16 v0, v25
move-object/from16 v1, v26
move-object/from16 v2, v20
invoke-virtual {v0, v1, v9, v8, v2}, Landroid/app/NotificationManager;->notifyAsUser(Ljava/lang/String;ILandroid/app/Notification;Landroid/os/UserHandle;)V
.line 413
:cond_b
add-int/lit8 v5, v5, 0x1
goto :goto_4
.line 375
.end local v4 # "builder":Landroid/app/Notification$Builder;
.end local v5 # "i":I
.end local v6 # "intent":Landroid/content/Intent;
.end local v8 # "notification":Landroid/app/Notification;
.end local v10 # "notificationText":Ljava/lang/String;
.end local v12 # "pendingIntent":Landroid/app/PendingIntent;
.end local v14 # "prefs":Landroid/content/SharedPreferences;
.end local v16 # "ringtoneUri":Landroid/net/Uri;
.end local v18 # "uriString":Ljava/lang/String;
.end local v19 # "user":Landroid/content/pm/UserInfo;
.end local v20 # "userHandle":Landroid/os/UserHandle;
.end local v21 # "users":Ljava/util/List;, "Ljava/util/List<Landroid/content/pm/UserInfo;>;"
.end local v22 # "vibrate":Z
:cond_c
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/phone/NotificationMgr;->mContext:Landroid/content/Context;
move-object/from16 v25, v0
const v26, 0x7f0802e6
invoke-virtual/range {v25 .. v26}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v25
const/16 v26, 0x1
move/from16 v0, v26
new-array v0, v0, [Ljava/lang/Object;
move-object/from16 v26, v0
const/16 v27, 0x0
invoke-static/range {v24 .. v24}, Landroid/telephony/PhoneNumberUtils;->formatNumber(Ljava/lang/String;)Ljava/lang/String;
move-result-object v28
aput-object v28, v26, v27
invoke-static/range {v25 .. v26}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v10
.restart local v10 # "notificationText":Ljava/lang/String;
goto/16 :goto_2
.line 391
.restart local v6 # "intent":Landroid/content/Intent;
.restart local v12 # "pendingIntent":Landroid/app/PendingIntent;
.restart local v14 # "prefs":Landroid/content/SharedPreferences;
.restart local v18 # "uriString":Ljava/lang/String;
:cond_d
sget-object v16, Landroid/provider/Settings$System;->DEFAULT_NOTIFICATION_URI:Landroid/net/Uri;
.restart local v16 # "ringtoneUri":Landroid/net/Uri;
goto/16 :goto_3
.line 425
.end local v6 # "intent":Landroid/content/Intent;
.end local v10 # "notificationText":Ljava/lang/String;
.end local v11 # "notificationTitle":Ljava/lang/String;
.end local v12 # "pendingIntent":Landroid/app/PendingIntent;
.end local v14 # "prefs":Landroid/content/SharedPreferences;
.end local v15 # "resId":I
.end local v16 # "ringtoneUri":Landroid/net/Uri;
.end local v18 # "uriString":Ljava/lang/String;
.end local v24 # "vmNumber":Ljava/lang/String;
:cond_e
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/phone/NotificationMgr;->mNotificationManager:Landroid/app/NotificationManager;
move-object/from16 v25, v0
const/16 v26, 0x0
sget-object v27, Landroid/os/UserHandle;->ALL:Landroid/os/UserHandle;
move-object/from16 v0, v25
move-object/from16 v1, v26
move-object/from16 v2, v27
invoke-virtual {v0, v1, v9, v2}, Landroid/app/NotificationManager;->cancelAsUser(Ljava/lang/String;ILandroid/os/UserHandle;)V
goto/16 :goto_1
.line 292
:array_0
.array-data 4
0x7f020040
0x7f020041
0x7f020042
.end array-data
.end method
find and replace id's
0x7f02003f - <public type="drawable" name="stat_notify_voicemail_breath"
0x7f0802e4 - <public type="string" name="notification_voicemail_title"
0x108007e - <public type="drawable" name="stat_notify_voicemail" - framework-res
0x7f0802e5 - <public type="string" name="notification_voicemail_title_count"
0x7f0802e7 - <public type="string" name="notification_voicemail_no_vm_number"
0x7f0b0000 - <public type="color" name="dialer_theme_color"
0x7f0802e6 - <public type="string" name="notification_voicemail_text_format"
0x7f020040 - <public type="drawable" name="stat_notify_voicemail_sub1"
0x7f020041 - <public type="drawable" name="stat_notify_voicemail_sub2"
0x7f020042 - <public type="drawable" name="stat_notify_voicemail_sub3"
Click to expand...
Click to collapse
5.Compile TeleService and move to your device
Continued on next post
Continued.
Final part ( Mms.apk )
1.Decompile Mms.apk
2.Download breathingmms.zip from attachment. Extract and copy files to your decompiled Mms
3.Recompile and Decompile Mms (For id's)
4.Open Mms\smali\com\android\mms\transaction\MessagingNotification.smali
find below method
Code:
.method private static final addSmsNotificationInfos(Landroid/content/Context;Ljava/util/Set;Ljava/util/SortedSet;)V
replace whole method with this
Code:
.method private static final addSmsNotificationInfos(Landroid/content/Context;Ljava/util/Set;Ljava/util/SortedSet;)V
.locals 21
.param p0, "context" # Landroid/content/Context;
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroid/content/Context;",
"Ljava/util/Set",
"<",
"Ljava/lang/Long;",
">;",
"Ljava/util/SortedSet",
"<",
"Lcom/android/mms/transaction/MessagingNotification$NotificationInfo;",
">;)V"
}
.end annotation
.prologue
.line 929
.local p1, "threads":Ljava/util/Set;, "Ljava/util/Set<Ljava/lang/Long;>;"
.local p2, "notificationSet":Ljava/util/SortedSet;, "Ljava/util/SortedSet<Lcom/android/mms/transaction/MessagingNotification$NotificationInfo;>;"
invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
.line 930
.local v3, "resolver":Landroid/content/ContentResolver;
sget-object v4, Landroid/provider/Telephony$Sms;->CONTENT_URI:Landroid/net/Uri;
sget-object v5, Lcom/android/mms/transaction/MessagingNotification;->SMS_STATUS_PROJECTION:[Ljava/lang/String;
const-string v6, "(type = 1 AND seen = 0)"
const/4 v7, 0x0
const-string v8, "date desc"
move-object/from16 v2, p0
invoke-static/range {v2 .. v8}, Landroid/database/sqlite/SqliteWrapper;->query(Landroid/content/Context;Landroid/content/ContentResolver;Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
move-result-object v17
.line 934
.local v17, "cursor":Landroid/database/Cursor;
if-nez v17, :cond_0
.line 982
:goto_0
return-void
.line 939
:cond_0
:goto_1
:try_start_0
invoke-interface/range {v17 .. v17}, Landroid/database/Cursor;->moveToNext()Z
move-result v2
if-eqz v2, :cond_4
.line 940
const/4 v2, 0x2
move-object/from16 v0, v17
invoke-interface {v0, v2}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
move-result-object v6
.line 941
.local v6, "address":Ljava/lang/String;
invoke-static {v6}, Lcom/android/mms/ui/MessageUtils;->isWapPushNumber(Ljava/lang/String;)Z
move-result v2
if-eqz v2, :cond_1
.line 942
const-string v2, ":"
invoke-virtual {v6, v2}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
move-result-object v19
.line 943
.local v19, "mAddresses":[Ljava/lang/String;
invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v2
const v4, 0x7f070010
invoke-virtual {v2, v4}, Landroid/content/res/Resources;->getInteger(I)I
move-result v2
aget-object v6, v19, v2
.line 947
.end local v19 # "mAddresses":[Ljava/lang/String;
:cond_1
const/4 v2, 0x0
invoke-static {v6, v2}, Lcom/android/mms/data/Contact;->get(Ljava/lang/String;Z)Lcom/android/mms/data/Contact;
move-result-object v15
.line 948
.local v15, "contact":Lcom/android/mms/data/Contact;
invoke-virtual {v15}, Lcom/android/mms/data/Contact;->getSendToVoicemail()Z
move-result v2
if-nez v2, :cond_0
.line 953
const/4 v2, 0x3
move-object/from16 v0, v17
invoke-interface {v0, v2}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
move-result-object v7
.line 954
.local v7, "message":Ljava/lang/String;
const/4 v2, 0x0
move-object/from16 v0, v17
invoke-interface {v0, v2}, Landroid/database/Cursor;->getLong(I)J
move-result-wide v9
.line 955
.local v9, "threadId":J
const/4 v2, 0x1
move-object/from16 v0, v17
invoke-interface {v0, v2}, Landroid/database/Cursor;->getLong(I)J
move-result-wide v12
.line 956
.local v12, "timeMillis":J
const/4 v2, 0x4
move-object/from16 v0, v17
invoke-interface {v0, v2}, Landroid/database/Cursor;->getInt(I)I
move-result v11
.line 957
.local v11, "subId":I
const/4 v2, 0x5
move-object/from16 v0, v17
invoke-interface {v0, v2}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
move-result-object v20
.line 959
.local v20, "msgId":Ljava/lang/String;
const-string v2, "Mms"
const/4 v4, 0x2
invoke-static {v2, v4}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result v2
if-eqz v2, :cond_2
.line 961
const-string v2, "Mms"
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "addSmsNotificationInfos: count="
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-interface/range {v17 .. v17}, Landroid/database/Cursor;->getCount()I
move-result v5
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v4
const-string v5, ", addr="
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
const-string v5, ", thread_id="
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4, v9, v10}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
invoke-static {v2, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 966
:cond_2
const/4 v5, 0x1
const/4 v8, 0x0
const/4 v14, 0x0
const/16 v16, 0x0
move-object/from16 v4, p0
invoke-static/range {v4 .. v16}, Lcom/android/mms/transaction/MessagingNotification;->getNewMessageNotificationInfo(Landroid/content/Context;ZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;JIJLandroid/graphics/Bitmap;Lcom/android/mms/data/Contact;I)Lcom/android/mms/transaction/MessagingNotification$NotificationInfo;
move-result-object v18
.line 970
.local v18, "info":Lcom/android/mms/transaction/MessagingNotification$NotificationInfo;
invoke-static {}, Lcom/android/mms/ui/MessageUtils;->isMailboxMode()Z
move-result v2
if-eqz v2, :cond_3
.line 971
move-object/from16 v0, v18
iget-object v2, v0, Lcom/android/mms/transaction/MessagingNotification$NotificationInfo;->mClickIntent:Landroid/content/Intent;
sget-object v4, Landroid/provider/Telephony$Sms;->CONTENT_URI:Landroid/net/Uri;
move-object/from16 v0, v20
invoke-static {v4, v0}, Landroid/net/Uri;->withAppendedPath(Landroid/net/Uri;Ljava/lang/String;)Landroid/net/Uri;
move-result-object v4
invoke-virtual {v2, v4}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;
.line 974
:cond_3
move-object/from16 v0, p2
move-object/from16 v1, v18
invoke-interface {v0, v1}, Ljava/util/SortedSet;->add(Ljava/lang/Object;)Z
.line 976
invoke-static {v9, v10}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v2
move-object/from16 v0, p1
invoke-interface {v0, v2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
.line 977
const/4 v2, 0x0
move-object/from16 v0, v17
invoke-interface {v0, v2}, Landroid/database/Cursor;->getLong(I)J
move-result-wide v4
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v2
move-object/from16 v0, p1
invoke-interface {v0, v2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto/16 :goto_1
.line 980
.end local v6 # "address":Ljava/lang/String;
.end local v7 # "message":Ljava/lang/String;
.end local v9 # "threadId":J
.end local v11 # "subId":I
.end local v12 # "timeMillis":J
.end local v15 # "contact":Lcom/android/mms/data/Contact;
.end local v18 # "info":Lcom/android/mms/transaction/MessagingNotification$NotificationInfo;
.end local v20 # "msgId":Ljava/lang/String;
:catchall_0
move-exception v2
invoke-interface/range {v17 .. v17}, Landroid/database/Cursor;->close()V
throw v2
:cond_4
invoke-interface/range {v17 .. v17}, Landroid/database/Cursor;->close()V
goto/16 :goto_0
.end method
find and replace id's
0x7f070010 - <public type="integer" name="wap_push_address_index"
Click to expand...
Click to collapse
find below method
Code:
.method private static updateNotification(Landroid/content/Context;JILjava/util/SortedSet;)V
replace whole method with this texts
(it is too long. so i cant paste here. you can get the whole method from here )
Click to expand...
Click to collapse
find and replace id's
0x7f090372 - <public type="string" name="message_count_notification"
0x7f0200e7 - <public type="drawable" name="stat_notify_sms_breath"
0x7f0a007e - <public type="color" name="mms_theme_color"
0x1050006 - <public type="dimen" name="notification_large_icon_height" - framework-res
0x1050005 - <public type="dimen" name="notification_large_icon_width" - framework-res
0x7f0200d1 - <public type="drawable" name="stat_notify_sms"
0x7f0901e7 - <public type="string" name="menu_reply"
0x7f020087 - <public type="drawable" name="ic_reply" - 2 раза
0x7f090162 - <public type="string" name="qm_mark_read"
0x7f020058 - <public type="drawable" name="ic_mark_read"
0x7f090260 - <public type="string" name="menu_call"
0x7f02005d - <public type="drawable" name="ic_menu_call" - 2 раза
0x7f09022d - <public type="string" name="qm_wear_voice_reply"
0x7f020087 - <public type="drawable" name="ic_reply"
0x7f09022e - <public type="string" name="qm_wear_reply_by_voice"
0x7f090372 - <public type="string" name="message_count_notification"
Click to expand...
Click to collapse
5.Compile Mms and move to your device
if it is showing any error while compiling. you can use Compiled Mms.apk from attachment
Enjoy...

Guide How to add Native Blur on stock rom by @DGCM7 and @maxx35000

hi guy's i whant to share this guide :
Guide How to add Native Blur on stock rom 7.0 by @DGCM7 and @maxx35000
first you have to find some compatible libs with your device "from device with native blur" :
Code:
libandroid_runtime.so
libgui.so
libsurfaceflinger.so
libsurfaceflinger_ddmconnection.so
if missing libsensorhub.so
so now first edit :
SamsungWindowState.smali
you can found it in Samsung-services.jar
got to android/server/wm/SamsungWindowState.jar
scearch:
Code:
[COLOR="Red"]invoke-virtual {v1}, Lcom/android/server/wm/WindowState;->getBridge()Lcom/samsung/android/view/IWindowStateBridge;
move-result-object v8
invoke-interface {v8}, Lcom/samsung/android/view/IWindowStateBridge;->getSystemUiVisibility()I
[/COLOR]
and replace with:
Code:
[COLOR="Blue"]invoke-virtual {v1}, Lcom/android/server/wm/WindowState;->getSystemUiVisibility()I[/COLOR]
scearch and replace :
Code:
[COLOR="Red"]:cond_5
iget v5, p0, Lcom/android/server/wm/SamsungWindowState;->mSystemUiVisibility:I[/COLOR]
with:
Code:
[COLOR="Blue"]:cond_5
iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;
invoke-virtual {v8}, Lcom/android/server/wm/WindowState;->getSystemUiVisibility()I
move-result v5 [/COLOR]
and now find :
Code:
[COLOR="Red"]
.method public applyBlurEffect()V
.locals 0
return-void
.end method [/COLOR]
replace all the method with:
Code:
[COLOR="Blue"].method public applyBlurEffect()V
.locals 13
const/4 v12, -0x2
const/4 v7, 0x0
iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;
iget-object v8, v8, Lcom/android/server/wm/WindowState;->mAttrs:Landroid/view/WindowManager$LayoutParams;
iget v8, v8, Landroid/view/WindowManager$LayoutParams;->flags:I
and-int/lit8 v8, v8, 0x2
if-eqz v8, :cond_0
iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;
iget-object v8, v8, Lcom/android/server/wm/WindowState;->mAttrs:Landroid/view/WindowManager$LayoutParams;
iget v8, v8, Landroid/view/WindowManager$LayoutParams;->samsungFlags:I
and-int/lit8 v8, v8, 0x40
if-eqz v8, :cond_0
const/4 v5, 0x1
:goto_0
if-eqz v5, :cond_1
invoke-direct {p0}, Lcom/android/server/wm/SamsungWindowState;->getLegacyBlurRadius()I
move-result v0
:goto_1
if-eqz v5, :cond_2
invoke-direct {p0}, Lcom/android/server/wm/SamsungWindowState;->getLegacySaturation()I
move-result v6
:goto_2
iget v8, p0, Lcom/android/server/wm/SamsungWindowState;->mLastBlurRadius:I
if-ne v8, v0, :cond_3
iget v8, p0, Lcom/android/server/wm/SamsungWindowState;->mLastSat:I
if-ne v8, v6, :cond_3
return-void
:cond_0
move v5, v7
goto :goto_0
:cond_1
const/4 v0, 0x0
goto :goto_1
:cond_2
const/4 v6, 0x0
goto :goto_2
:cond_3
iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;
iget-object v8, v8, Lcom/android/server/wm/WindowState;->mWinAnimator:Lcom/android/server/wm/WindowStateAnimator;
if-nez v8, :cond_4
return-void
:cond_4
iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;
iget-object v8, v8, Lcom/android/server/wm/WindowState;->mAttrs:Landroid/view/WindowManager$LayoutParams;
iget-wide v8, v8, Landroid/view/WindowManager$LayoutParams;->dimDuration:J
const-wide/16 v10, -0x1
cmp-long v8, v8, v10
if-eqz v8, :cond_7
iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;
iget-object v8, v8, Lcom/android/server/wm/WindowState;->mAttrs:Landroid/view/WindowManager$LayoutParams;
iget-wide v2, v8, Landroid/view/WindowManager$LayoutParams;->dimDuration:J
:goto_3
invoke-static {}, Landroid/view/SurfaceEffects;->newBuilder()Landroid/view/SurfaceEffects$Effect$Builder;
move-result-object v8
sget-object v9, Landroid/view/SurfaceEffects$PixEffectType;->BLUR:Landroid/view/SurfaceEffects$PixEffectType;
invoke-virtual {v8, v9}, Landroid/view/SurfaceEffects$Effect$Builder;->setPixelEffectType(Landroid/view/SurfaceEffects$PixEffectType;)Landroid/view/SurfaceEffects$Effect$Builder;
move-result-object v1
iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;
invoke-virtual {v8}, Lcom/android/server/wm/WindowState;->getAttrs()Landroid/view/WindowManager$LayoutParams;
move-result-object v8
if-eqz v8, :cond_6
iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;
invoke-virtual {v8}, Lcom/android/server/wm/WindowState;->getAttrs()Landroid/view/WindowManager$LayoutParams;
move-result-object v8
iget v8, v8, Landroid/view/WindowManager$LayoutParams;->height:I
if-eq v8, v12, :cond_5
iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;
invoke-virtual {v8}, Lcom/android/server/wm/WindowState;->getAttrs()Landroid/view/WindowManager$LayoutParams;
move-result-object v8
iget v8, v8, Landroid/view/WindowManager$LayoutParams;->width:I
if-ne v8, v12, :cond_6
:cond_5
invoke-virtual {v1}, Landroid/view/SurfaceEffects$Effect$Builder;->makeFullscreen()Landroid/view/SurfaceEffects$Effect$Builder;
:cond_6
if-lez v0, :cond_8
sget-object v8, Landroid/view/SurfaceEffects$AnimationMode;->ONCE_STAY_END:Landroid/view/SurfaceEffects$AnimationMode;
invoke-virtual {v1, v8}, Landroid/view/SurfaceEffects$Effect$Builder;->setAnimationMode(Landroid/view/SurfaceEffects$AnimationMode;)Landroid/view/SurfaceEffects$Effect$Builder;
move-result-object v8
sget-object v9, Landroid/view/SurfaceEffects$AnimParam;->BLUR_RADIUS:Landroid/view/SurfaceEffects$AnimParam;
iget v10, p0, Lcom/android/server/wm/SamsungWindowState;->mLastBlurRadius:I
int-to-float v10, v10
sget-object v11, Landroid/view/SurfaceEffects$InterpMode;->HOLD:Landroid/view/SurfaceEffects$InterpMode;
invoke-virtual {v8, v9, v7, v10, v11}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;
move-result-object v8
sget-object v9, Landroid/view/SurfaceEffects$AnimParam;->BLUR_RADIUS:Landroid/view/SurfaceEffects$AnimParam;
long-to-int v10, v2
int-to-float v11, v0
sget-object v12, Landroid/view/SurfaceEffects$InterpMode;->SMOOTH_IN:Landroid/view/SurfaceEffects$InterpMode;
invoke-virtual {v8, v9, v10, v11, v12}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;
move-result-object v8
sget-object v9, Landroid/view/SurfaceEffects$AnimParam;->BLUR_SATURATION:Landroid/view/SurfaceEffects$AnimParam;
iget v10, p0, Lcom/android/server/wm/SamsungWindowState;->mLastSat:I
int-to-float v10, v10
sget-object v11, Landroid/view/SurfaceEffects$InterpMode;->HOLD:Landroid/view/SurfaceEffects$InterpMode;
invoke-virtual {v8, v9, v7, v10, v11}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;
move-result-object v7
sget-object v8, Landroid/view/SurfaceEffects$AnimParam;->BLUR_SATURATION:Landroid/view/SurfaceEffects$AnimParam;
long-to-int v9, v2
int-to-float v10, v6
sget-object v11, Landroid/view/SurfaceEffects$InterpMode;->SMOOTH_IN:Landroid/view/SurfaceEffects$InterpMode;
invoke-virtual {v7, v8, v9, v10, v11}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;
:goto_4
invoke-virtual {v1}, Landroid/view/SurfaceEffects$Effect$Builder;->build()Landroid/view/SurfaceEffects$Effect;
move-result-object v7
invoke-virtual {v7}, Landroid/view/SurfaceEffects$Effect;->getBytes()[I
move-result-object v4
iget-object v7, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;
iget-object v7, v7, Lcom/android/server/wm/WindowState;->mWinAnimator:Lcom/android/server/wm/WindowStateAnimator;
iget-object v7, v7, Lcom/android/server/wm/WindowStateAnimator;->mSurfaceController:Lcom/android/server/wm/WindowSurfaceController;
invoke-virtual {v7, v4}, Lcom/android/server/wm/WindowSurfaceController;->startSurfaceAnimation([I)V
iput v0, p0, Lcom/android/server/wm/SamsungWindowState;->mLastBlurRadius:I
iput v6, p0, Lcom/android/server/wm/SamsungWindowState;->mLastSat:I
return-void
:cond_7
const-wide/16 v2, 0xc8
goto :goto_3
:cond_8
sget-object v8, Landroid/view/SurfaceEffects$AnimationMode;->ONCE_DESTROY:Landroid/view/SurfaceEffects$AnimationMode;
invoke-virtual {v1, v8}, Landroid/view/SurfaceEffects$Effect$Builder;->setAnimationMode(Landroid/view/SurfaceEffects$AnimationMode;)Landroid/view/SurfaceEffects$Effect$Builder;
move-result-object v8
sget-object v9, Landroid/view/SurfaceEffects$AnimParam;->BLUR_RADIUS:Landroid/view/SurfaceEffects$AnimParam;
iget v10, p0, Lcom/android/server/wm/SamsungWindowState;->mLastBlurRadius:I
int-to-float v10, v10
sget-object v11, Landroid/view/SurfaceEffects$InterpMode;->HOLD:Landroid/view/SurfaceEffects$InterpMode;
invoke-virtual {v8, v9, v7, v10, v11}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;
move-result-object v8
sget-object v9, Landroid/view/SurfaceEffects$AnimParam;->BLUR_RADIUS:Landroid/view/SurfaceEffects$AnimParam;
long-to-int v10, v2
int-to-float v11, v0
sget-object v12, Landroid/view/SurfaceEffects$InterpMode;->SMOOTH_OUT:Landroid/view/SurfaceEffects$InterpMode;
invoke-virtual {v8, v9, v10, v11, v12}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;
move-result-object v8
sget-object v9, Landroid/view/SurfaceEffects$AnimParam;->BLUR_SATURATION:Landroid/view/SurfaceEffects$AnimParam;
iget v10, p0, Lcom/android/server/wm/SamsungWindowState;->mLastSat:I
int-to-float v10, v10
sget-object v11, Landroid/view/SurfaceEffects$InterpMode;->HOLD:Landroid/view/SurfaceEffects$InterpMode;
invoke-virtual {v8, v9, v7, v10, v11}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;
move-result-object v7
sget-object v8, Landroid/view/SurfaceEffects$AnimParam;->BLUR_SATURATION:Landroid/view/SurfaceEffects$AnimParam;
long-to-int v9, v2
const/4 v10, 0x0
sget-object v11, Landroid/view/SurfaceEffects$InterpMode;->SMOOTH_OUT:Landroid/view/SurfaceEffects$InterpMode;
invoke-virtual {v7, v8, v9, v10, v11}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;
goto :goto_4
.end method[/COLOR]
add new method :
Code:
[COLOR="Lime"].method public getAspectRatio()F
.locals 1
iget v0, p0, Lcom/android/server/wm/SamsungWindowState;->mAspectRatio:F
return v0
.end method[/COLOR]
find and replace;
Code:
[COLOR="Red"].method public resetEffects()V
.locals 0
return-void
.end method[/COLOR]
by:
Code:
[COLOR="Blue"].method public resetEffects()V
.locals 1
const/4 v0, 0x0
iput v0, p0, Lcom/android/server/wm/SamsungWindowState;->mLastBlurRadius:I
iput v0, p0, Lcom/android/server/wm/SamsungWindowState;->mLastSat:I
return-void
.end method[/COLOR]
now open in services.jar\smali\com\android\server\wm\WindowStateAnimator.smali
scearch :
Code:
[COLOR="Red"]invoke-virtual {v4}, Lcom/android/server/wm/WindowSurfaceController;->setLayerStackInTransaction()V
return-void[/COLOR]
and replace with :
Code:
[COLOR="Blue"] invoke-virtual {v4}, Lcom/android/server/wm/WindowSurfaceController;->setLayerStackInTransaction()V
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/server/wm/WindowStateAnimator;->mWin:Lcom/android/server/wm/WindowState;
invoke-virtual {v4}, Lcom/android/server/wm/WindowState;->getBridge()Lcom/samsung/android/view/IWindowStateBridge;
move-result-object v4
invoke-interface {v4}, Lcom/samsung/android/view/IWindowStateBridge;->applyBlurEffect()V
return-void[/COLOR]
Now open android/server/policy/GlobalActions.smali in services.jar
find:
Code:
iput-boolean[COLOR="Red"] v5[/COLOR], p0, Lcom/android/server/policy/GlobalActions;->mIsSupportedBlur:Z
and change to :
Code:
iput-boolean [COLOR="Lime"]v4[/COLOR], p0, Lcom/android/server/policy/GlobalActions;->mIsSupportedBlur:Z
find in same file :
Code:
const-string/jumbo v4, "CscFeature_Common_ConfigBikeMode"
edit all part V4 to V6 & all V6 to V7
on original file for me :
Code:
const-string/jumbo [COLOR="Red"]v4[/COLOR], "CscFeature_Common_ConfigBikeMode"
invoke-virtual {v3, [COLOR="Red"]v4[/COLOR]}, Lcom/samsung/android/feature/SemCscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
const-string/jumbo [COLOR="Red"]v4[/COLOR], "bikemode"
invoke-virtual {v3, [COLOR="Red"]v4[/COLOR]}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v3
if-eqz v3, :cond_1
invoke-static {}, Lcom/samsung/android/feature/SemCscFeature;->getInstance()Lcom/samsung/android/feature/SemCscFeature;
move-result-object v3
const-string/jumbo [COLOR="Red"]v4[/COLOR], "CscFeature_Common_ConfigBikeMode"
invoke-virtual {v3, [COLOR="Red"]v4[/COLOR]}, Lcom/samsung/android/feature/SemCscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
const-string/jumbo [COLOR="Red"]v4[/COLOR], "globalaction"
invoke-virtual {v3, [COLOR="Red"]v4[/COLOR]}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v3
if-eqz v3, :cond_1
const-string/jumbo v3, "com.samsung.android.app.bikemode"
invoke-direct {p0, v3}, Lcom/android/server/policy/GlobalActions;->isSBikeInstalled(Ljava/lang/String;)Z
move-result v3
if-eqz v3, :cond_1
iget-object v3, p0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string/jumbo [COLOR="Red"]v4[/COLOR], "isBikeMode"
invoke-static {[COLOR="Red"]v4[/COLOR]}, Landroid/provider/Settings$Secure;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object [COLOR="Red"]v4
[/COLOR]
iget-object [COLOR="Red"]v6[/COLOR], p0, Lcom/android/server/policy/GlobalActions;->mBikeModeObserver:Landroid/database/ContentObserver;
invoke-virtual {v3, [COLOR="Red"]v4[/COLOR], v5, [COLOR="Red"]v6[/COLOR]}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
after editing :
Code:
const-string/jumbo [COLOR="Lime"]v6[/COLOR], "CscFeature_Common_ConfigBikeMode"
invoke-virtual {v3, [COLOR="Lime"]v6[/COLOR]}, Lcom/samsung/android/feature/SemCscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
const-string/jumbo [COLOR="Lime"]v6[/COLOR], "bikemode"
invoke-virtual {v3, [COLOR="Lime"]v6[/COLOR]}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v3
if-eqz v3, :cond_1
invoke-static {}, Lcom/samsung/android/feature/SemCscFeature;->getInstance()Lcom/samsung/android/feature/SemCscFeature;
move-result-object v3
const-string/jumbo [COLOR="Lime"]v6[/COLOR], "CscFeature_Common_ConfigBikeMode"
invoke-virtual {v3, [COLOR="Lime"]v6[/COLOR]}, Lcom/samsung/android/feature/SemCscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
const-string/jumbo [COLOR="Lime"]v6[/COLOR], "globalaction"
invoke-virtual {v3,[COLOR="Lime"] v6[/COLOR]}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v3
if-eqz v3, :cond_1
const-string/jumbo v3, "com.samsung.android.app.bikemode"
invoke-direct {p0, v3}, Lcom/android/server/policy/GlobalActions;->isSBikeInstalled(Ljava/lang/String;)Z
move-result v3
if-eqz v3, :cond_1
iget-object v3, p0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string/jumbo [COLOR="Lime"]v6[/COLOR], "isBikeMode"
invoke-static {[COLOR="Lime"]v6[/COLOR]}, Landroid/provider/Settings$Secure;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object [COLOR="Lime"]v6
[/COLOR]
iget-object [COLOR="Lime"]v7[/COLOR], p0, Lcom/android/server/policy/GlobalActions;->mBikeModeObserver:Landroid/database/ContentObserver;
invoke-virtual {v3, [COLOR="Lime"]v6[/COLOR], v5, [COLOR="Lime"]v7[/COLOR]}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
Good job guys @DGCM7 @maxx35000
Awesome
Awesome Work @maxx35000 & @DGCM7
Is this done from the PC?
with abd?
I do not understand :v
make vedio to do this please
Will this work for a3 2016?
@parth111999 sir is this working on our j700f?
FerXray13 said:
Is this done from the PC?
with abd?
I do not understand :v
Click to expand...
Click to collapse
No need Of Adb
U will be needing Java JRE installed and An apk tool like Tickle My Android
Mikkel Nf said:
Will this work for a3 2016?
Click to expand...
Click to collapse
Yes it would Work On Many 7.0 Stock Roms.....But the Main thing matters is Proper Libs
Ayushj702 said:
@parth111999 sir is this working on our j700f?
Click to expand...
Click to collapse
I tried it with one of my base that didnt worked maybe i will try in some other base.....
Android 7.1.1
How i can do that on Android 7.1.1????
i cant find these files, i dont know the path, please help me
....
parth111999 said:
No need Of Adb
U will be needing Java JRE installed and An apk tool like Tickle My Android
Click to expand...
Click to collapse
How ? Please help me
Tell me step by step
How ??????
Please make guide to video please
Please respon ***** !
Antulut23 said:
Please make guide to video please
Click to expand...
Click to collapse
Please respond ***** !
---------- Post added at 06:21 AM ---------- Previous post was at 06:20 AM ----------
Bina Rahmawan said:
Please respond ***** !
Click to expand...
Click to collapse
@maxx35000
I want to delete that from RADICAL Quack 4.5
Can someone send me a 7.0 ROM?
For galaxy sm-j320fn model?

Categories

Resources