Originariamente inviato da
ntony17
Ink effect enabling
[hide]
This is handy one :crying:
To do this you will need to play with 2 files (android.policy.jar and SecSettings.apk) and lib folder.
Please download ink effect resources from
here.
A. android.policy.jar file:
1.Copy the contents of “to android.policy.jar” folder.
2.Decompile
android.policy.jar by backsmali/smali program.
3.Go to classout\com\android\internal\policy\impl\sec\ folder and paste the content of “to android.policy.jar” folder there and accept overwriting.
4.Now compile (smali), the result will be class.dex file. Open the original android.policy.jar by WinRAR and drag drop class.dex file inside android.policy.jar file
Now push the new modified android.policy.jar to system\framework in your phone
B. SecSettings.apk file:
Decompile SecSettings.apk by APK-Multi tool
I. Image resource
Copy all images in “to res.drawable-xhdpi” folder to res\drawable-xhdpi
II. Adding lines to strings.xml resources
1.Go to res\values and open
strings.xml by notepad++
2.Go to the end of strings.xml file and just before
</resources> line add new strings for ink color that are missing; here we will add 3 lines for the 3 missing colors, so we will just add the following lines:
codice:
<string name="ink_effect_color_none">None</string>
<string name="ink_effect_color_pink">Pink</string>
<string name="ink_effect_color_lightblue">Light Blue</string>
3.Now save your file.
III. InkeffectPreview.smali
1.Copy the files InkeffectPreview.smali
2.Go to smali\com\android\settings and pate it there and accept changes.
Now this is the tricky part..!!
3.Open it and go to the following section:
codice:
:array_14
.array-data 0x4
0xb7t 0x3t 0x2t 0x7ft
0xb9t 0x3t 0x2t 0x7ft
0xcet 0x1t 0x2t 0x7ft
0xcat 0x1t 0x2t 0x7ft
0xc6t 0x1t 0x2t 0x7ft
0xcct 0x1t 0x2t 0x7ft
0xd0t 0x1t 0x2t 0x7ft
0xc8t 0x1t 0x2t 0x7ft
0xb5t 0x3t 0x2t 0x7ft
.end array-data
:array_2a
.array-data 0x4
0xb8t 0x3t 0x2t 0x7ft
0xbat 0x3t 0x2t 0x7ft
0xcft 0x1t 0x2t 0x7ft
0xcbt 0x1t 0x2t 0x7ft
0xc7t 0x1t 0x2t 0x7ft
0xcdt 0x1t 0x2t 0x7ft
0xd1t 0x1t 0x2t 0x7ft
0xc9t 0x1t 0x2t 0x7ft
0xb6t 0x3t 0x2t 0x7ft
.end array-data
4.You can see here several numbers... these are [ink_ nameofcolor] ids for array_14 and [ink_ nameofcolor _h] ids for array_0a in public.xml.
5.So you have to open
public.xml file from res\values folder
6.Search for colors ids you added… for start search for “
ink_none” for array_14 section and “
ink_none_h” for array_0a section.
We will start with “
ink_none”
The line will be something like this:
codice:
<public type="drawable" name="ink_none" id="0x7f0203b7" />
And if you noticed the
array_14 section in
InkeffectPreview.smali the first line will represent the
ink_none in
public.xml file. So we have to convert public.xml ids to array_14, SO PLEASE match to colors here:
codice:
<public type="drawable" name="ink_none" id="0x7f0203b7" />
to in array_14 section:
codice:
0xb7t 0x3t 0x2t 0x7ft
Yes that’s it!! Do the same for “
ink_none_h” id in array_0a section.
codice:
<public type="drawable" name="ink_none_h" id="0x7f0203b8" />
to in array_0a section:
codice:
0xb8t 0x3t 0x2t 0x7ft
7.Now we have finished editing InkeffectPreview.smali for the two none color ids (ink_none & ink_none_h)
8.Do the same for the rest of colors (the orders of array_14 & array_0a will represent the order of ink colors in your settings menu later on, so it must be in exact order)
ti mando su xda che è meglio ahahahah:
[DEV][MODDING] CRT, Airview, 4-way reboot, ink effect, phone hack, SMS hack...etc - xda-developers