So thanks goes out to @dagrim1 for his guide on how to create multiDPI apks for Samsung devices (please remember to thank him for his guide and work; this is just a copy and paste job to let people know!):
I have added two MultiDPI apks below that are compatible with 5.1.1 COH4 n910c deodexed (specifically with WanamLite Clean Stock).
1. Backup the old files (/system/app/SamsungCamera3/SamsungCamera3.apk AND /system/priv-app/SecContacts_Note/SecContacts_Note.apk)
2. Extract the archives and replace the original files in their original locations with the extracted ones
3. Change the permissions of the apks to rw-r--r-- (root explorer is handy)
4. Reboot
Also added the modded services.jar if someone needs it.
For the rest check out the ORIGINAL THREAD (remember to use b instead of c when compiling the final apk)dagrim1 said:*** Make samsung system apk multidpi compatible ***
Install APKTool v2
https://ibotpeaches.github.io/Apktool/
Copy Framework-res.apk and twframework-res.apk from framework folder to computer
Install frameworks in apktool using the following commands:
apktool if Framework-res.apk
apktool if twframework-res.apk
Copy relevant apk to folder
Decompile using apktool with the following command:
apktool d <name>.apk -o <name_output_folder>
Edit the dimens.xml file in <name_output_folder>\res\values\ folder (And also the dimens.xml file in <name_output_folder>\res\values-land\ folder if that exists, this contains the landscape mode values)
Change all the values "xxxdip", where xxx is a number, to "yyypx" where yyy is 4 times xxx. So "640dip" would become "2560px"
I created an awk script for this, which uses gawk on windows: replace_xml.awk. First copy the xml file to be edited (%xml_file%) to another location (%xml_copy%)
Next call the awk script on the copy, outputting to the xml file:
gawk -f replace_xml.awk %xml_copy% > %xml_file%
Recompile the apk, keeping the original META-INF content (which can be done because we don't change the manifest.xml file) using the following command:
apktool b <name_output_folder> -o <name_output_apk>
*** Contacts/Dialer & Patching Services.jar***
For the contacts/dialer an extra step has to be taken, that is patching services.jar to skip checks for properly signed files
Copy services.jar from system\framework to computer
Decompile it:
apktool d services.jar -o services_jar
Open services_jar\smali\com\android\server\pm\PackageMa nagerService.smali ( I used notepad++ )
Change the following part (might not be the exact same):
Code:
TO:Code:.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I .locals 7 .parameter "s1" .parameter "s2" .prologue .line 2160 if-nez p0, :cond_8 .line 2161 if-nez p1, :cond_6 const/4 v6, 0x1 .line 2180 :goto_5 return v6 .line 2161 :cond_6 const/4 v6, -0x1 goto :goto_5 .line 2165 :cond_8 if-nez p1, :cond_c .line 2166 const/4 v6, -0x2 goto :goto_5 .line 2168 :cond_c new-instance v3, Ljava/util/HashSet; invoke-direct {v3}, Ljava/util/HashSet;-><init>()V .line 2169 .local v3, set1:Ljava/util/HashSet;,"Ljava/util/HashSet<Landroid/content/pm/Signature;>;" move-object v0, p0 .local v0, arr$:[Landroid/content/pm/Signature; array-length v2, v0 .local v2, len$:I const/4 v1, 0x0 .local v1, i$:I :goto_14 if-ge v1, v2, :cond_1e aget-object v5, v0, v1 .line 2170 .local v5, sig:Landroid/content/pm/Signature; invoke-virtual {v3, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z .line 2169 add-int/lit8 v1, v1, 0x1 goto :goto_14 .line 2172 .end local v5 #sig:Landroid/content/pm/Signature; :cond_1e new-instance v4, Ljava/util/HashSet; invoke-direct {v4}, Ljava/util/HashSet;-><init>()V .line 2173 .local v4, set2:Ljava/util/HashSet;,"Ljava/util/HashSet<Landroid/content/pm/Signature;>;" move-object v0, p1 array-length v2, v0 const/4 v1, 0x0 :goto_26 if-ge v1, v2, :cond_30 aget-object v5, v0, v1 .line 2174 .restart local v5 #sig:Landroid/content/pm/Signature; invoke-virtual {v4, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z .line 2173 add-int/lit8 v1, v1, 0x1 goto :goto_26 .line 2177 .end local v5 #sig:Landroid/content/pm/Signature; :cond_30 invoke-virtual {v3, v4}, Ljava/util/HashSet;->equals(Ljava/lang/Object;)Z move-result v6 if-eqz v6, :cond_38 .line 2178 const/4 v6, 0x0 goto :goto_5 .line 2180 :cond_38 const/4 v6, -0x3 goto :goto_5 .end method
Code:
Recompile the edited folderCode:.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I .locals 7 const/4 v0, 0x0 return v0 .end method
apktool b services_jar -o services.jar
I have added two MultiDPI apks below that are compatible with 5.1.1 COH4 n910c deodexed (specifically with WanamLite Clean Stock).
1. Backup the old files (/system/app/SamsungCamera3/SamsungCamera3.apk AND /system/priv-app/SecContacts_Note/SecContacts_Note.apk)
2. Extract the archives and replace the original files in their original locations with the extracted ones
3. Change the permissions of the apks to rw-r--r-- (root explorer is handy)
4. Reboot
Also added the modded services.jar if someone needs it.
Attachments
-
7.9 MB Views: 388
-
5.1 MB Views: 184
-
5.4 MB Views: 146
Last edited: