[MOD] Z2_MM_486_Beta_Settings_Bug_Fixed

The MM beta ROM have just been released several days ago, while since it’s a beta, i have already met several bugs, such wifi issues. here is a another bug in Settings.apk: if you open Settings, and navigate to Developer options, tap Select USB Configuration, the list you see it’s partly wrong, it has two MIDI options and other mistkakes.
Hence, I modified the Settings.apk and the correctness includes all languages!

Screenshot_20160321-132822

Installation: manually rename the file to ‘Settings.apk’ and replace the one in ‘/root/system/priv-app/Settings/’ (644 permission).

Download (odexed or deodexed sytem): Settings.apk

[TOOL]a simple script to move .odex files (for Z2/Z3 beta_MM_ROM)

In the MM_beta system.img, sony adopts symlinks for .odex files ranther than real .odex files, so moving every .odex file to its right place is a boring job. thus, i wrote a simple script which will help u to move these stupid .odex files.
PS: it’s a .bat file, so pls run it in windows

@echo off
set outloc=D:\Z2_MM\system\app\
set loc=\oat\arm\
For /r %%i in (*.odex) DO (
echo %%~ni
copy "%%i" %outloc%%%~ni%loc%
)
pause

Steps (example: moving .odex files to ***\system\app\):
1. put the ‘copy.bat’ in the ‘***\arm\’ folder with lots of .odex files which we have just generated
2. edit it with any textediter and change the ‘inloc’ value to your ‘***\system\app\’ location (do not forget the “” in the end)
3. run it (no worries if you run it twice by mistake).

for ‘***\system\priv-app\’ floder, just do the simliar steps again
for ‘***\system\framework\’ floder, just copy manaully (do care the ‘SemcGenericUxpRes.odex’).

Download: GOOGLE DRIVE

[TUTORIAL] Unlock Xperia Camera Features (continuing)

This tutorial will show you how to enable some features for Xperia Camera.

1. Decompile SemcCameraUI.apk
2. Choose the features you want to enable
3. Compile it and done!

Features:

A. Enable SuperiorAuto 20MP/23MP (Thank Chocolatetrain)
Step 1: modify the file “SemcCameraUI\res\values\bools.xml

 
    false
    true

Step 2: modify the file “SemcCameraUI\res\values\arrasy.xml

    
    
        TWENTY_THREE_MP
        TWENTY_MP_WIDE
        EIGHT_MP
        EIGHT_MP_WIDE
        THREE_MP
        TWO_MP_WIDE
    
    
        TWENTY_MP
        FIFTEEN_MP_WIDE
        EIGHT_MP
        EIGHT_MP_WIDE
        THREE_MP
        TWO_MP_WIDE
    
    
        TWENTY_THREE_MP
        TWENTY_MP_WIDE
        TWENTY_MP
        FIFTEEN_MP_WIDE
        EIGHT_MP
        EIGHT_MP_WIDE
        THREE_MP
        TWO_MP_WIDE
    
    
        TWENTY_MP
        FIFTEEN_MP_WIDE
        EIGHT_MP
        EIGHT_MP_WIDE
        THREE_MP
        TWO_MP_WIDE
    

B. Enable more ISO values for 20MP/23MP
Step: modify the file “SemcCameraUI\smali\com\sonyericsson\android\camera\configuration\parameters\Iso.smali

    const/16 v9, 0xf00    # (HEX)f00 = (DEC)3840
    const/16 v9, 0x1760    # (HEX)1760 = (DEC)5984

C. Enable SCN(Scene selection) for 20MP/23MP
Step: modify the file “SemcCameraUI\smali\com\sonyericsson\android\camera\parameter\dependency\DependencyApplier.smali

    const/16 v1, 0xf00    # (HEX)f00 = (DEC)3840
    const/16 v1, 0x1760    # (HEX)1760 = (DEC)5984

[GUIDE]Add “Delete” button to the screenshot preview

Hey, guys, we know that some ROMs don’t have the “Delete” button on the screenshot preview like the Sony Xperia series. Hence, here is the guide that can help you add “Delete” button to your screenshot preview.

1.    Copy the “system/priv-app/SystemUI.apk” to you computer;
2.    Decompile it (if you are using an odexed ROM, you need to combine the “SystemUI.apk” and “SystemUI.odex” first);
3.    Open “SystemUI/res/values/strings.xml” and add these two line below;

Delete
Screenshot deleted.

4. Unzip the “add_delete_button.zip” provided here below and copy it to “SystemUI/”;

5. Open “SystemUI/smali/com/android/systemui/screenshot/ SaveImageInBackgroundTask.smali” and you will find this line:

    invoke-virtual/range {v18 .. v21}, Landroid/app/Notification$Builder;->addAction(ILjava/lang/CharSequence;Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;

6. Add these lines below:

    new-instance v8, Landroid/content/Intent;

    invoke-direct {v8}, Landroid/content/Intent;-><init>()V

    .local v8, "deleteIntent":Landroid/content/Intent;
    const-class v19, Lcom/android/systemui/screenshot/DeleteScreenshot;

    move-object/from16 v0, v19

    invoke-virtual {v8, v5, v0}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;

    const-string v19, "com.android.systemui.SCREENSHOT_URI"

    invoke-virtual/range {v17 .. v17}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v20

    move-object/from16 v0, v19

    move-object/from16 v1, v20

    invoke-virtual {v8, v0, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 241
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/android/systemui/screenshot/SaveImageInBackgroundTask;->mNotificationBuilder:Landroid/app/Notification$Builder;

    move-object/from16 v19, v0

    const v20, 0x7f020021

    const v21, 0x7f090049

    move/from16 v0, v21

    invoke-virtual {v12, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v21

    const/16 v22, 0x0

    const/high16 v23, 0x10000000

    move/from16 v0, v22

    move/from16 v1, v23

    invoke-static {v5, v0, v8, v1}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v22

    invoke-virtual/range {v19 .. v22}, Landroid/app/Notification$Builder;->addAction(ILjava/lang/CharSequence;Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;

7. Change the addresses “v8, v5, v12, v17, v23, v22, v21, v20, v19” to the correct addresses.

Before - After
v8  - v15
v5  - v3
v12 - v11
v17 - v16
v23 - v22
v22 - v21
v21 - v20
v20 - v19
v19 - v18

8. Compile the package and then decompile it;

9. Open “SystemUI/smali/com/android/systemui/screenshot/DeleteScreenshot.smali” and you will find this line and then replace it with yours’:

    const v3, 0x7f09004a    # systemui/res/values/public.xml -screenshot_delete_confirmation

10. Open “SystemUI/smali/com/android/systemui/screenshot/ SaveImageInBackgroundTask.smali” and you will find these two lines and then replace the values with yours’:

    const v20, 0x7f020021    # systemui/res/values/public.xml - ic_menu_delete

    const v21, 0x7f090049    # systemui/res/values/public.xml - screenshot_delete_action

11. Open “SystemUI/ AndroidManifest.xml” and you will find this line below (if can’t, please search the keyword “screenshot”, and you will find a similar sentence):

        <service android:exported="false" android:name=".screenshot.TakeScreenshotService" android:process=":screenshot" />

12. Change it to:

        <service android:exported="false" android:name=".screenshot.TakeScreenshotService" android:process=":screenshot" />
        <receiver android:exported="true" android:name=".screenshot.DeleteScreenshot"/>

13. Compile it and then copy it to your phone, enjoy!