[Sony Xperia M] paper13579:
Hey guys this is a noob-friendly tutorial on how to deodex stock 4.3 Firmware on a locked bootloader. This tutorial is for windows only, im sorry, that's what i have.

Requirements:

1. A fully rooted xperia M.

2. Busybox installed

3. Winrar

4. A brain

5. Time and patience.

BEFORE WE START, MAKE SURE YOU HAVE INSTALLED BUSYBOX:

1. Go to playstore.

2. Search busybox

3. Download the one by stericsson, not busybox x, not anyother busybox. If you are using busybox x or something else. This app will replace the one you downloaded so do it anyway.

4. Open the app

5. Click normal install

6. After installation, reboot.

PART 1:

Here i will show you how to setup adb as a variable. This is NOT optional.

1. Go to this website: http://developer.android.com/sdk/index.html

2. Scroll down

3. Click download for other platforms.

4. Go to the sdk tools only list and download the zip for windows 32&64 bit. NOT THE EXE, THE ZIP.

5. After downloading is finished, right click on the file and click "extract files..."

6. Click the "C:\" directory and the extract.

6.1. Download this file: http://www.mediafire.com/?d5wj9bslikmf53d

6.2. Extract it into the root of the android-sdk-windows folder, in the "C:\" directory.

7. After thats done, Right click on "Computer" ("my computer" for windows xp)

8. Click "properties"

9. Click on the advanced tab

10. Click environment variables

11. double click on the text entry named "Path" in the lower list box

12. At the end of it, add: ";C:\android-sdk-windows\platform-tools" (without quotation marks)

13. Click on OK to exit out of the dialog

14. then OK again to get out of My computer's properties

15. Reboot computer.

PART 2:

Here i will show you how to deodex your firmware.

16. For both single sim download this: http://d-h.st/VWr

For C2004 download this: https://www.dropbox.com/s/90qbypc36kde8y9/deodex_c2004_dual.zip

For c2005 download this: https://www.dropbox.com/s/mkzfnt05vhwjcta/deodex_c2005__Latest.zip

17. Extract to anywhere, the file for you from the above links.

18. In the extracted folder open system

19. Take both app and framework folders and paste them onto your desktop.

20. Rename the app folder to done_app

21. Rename the framework folder to done_framework.

22. Connect your phone to computer via usb

23. Copy the done_app and done_framework folders to the root of your external sd card. So these files can be found at /ext_card/done_app and /ext_card/done_framework.

24. disconnect phone

25. On phone, go to settings

26. Click developer options

27. Enable usb debugging

28. Click revoke usb debugging authorisation, then ok

29. Connect phone to pc again

30. On pc, Click start

31. Click run

32. Type cmd in the box, then ok

33. A command prompt window should open up.

34. Type adb shell, and hit enter. If it says that your phone is unauthorised, then check your phone, grant the computer permissions to use adb.

35. Type adb shell and hit enter again if you got the unauthorised error. This should start daemon. If you didn't get the unauthorised error, dont type it again.

36. Now type these commands line by line, hitting enter as you type each line, NOT all of them at the one go. Copy and paste would be better than typing them.

su

stop

mount -o rw,remount /system

rm /system/app/*.odex

rm /system/framework/*.odex

cp /ext_card/done_app/* /system/app/

cp /ext_card/done_framework/* /system/framework/

mount -o ro,remount /system

reboot

39. When you're phone reboots itself, you will have a fully deodexed

Stock firmware.

TROUBLESHOOTING (MUST READ THIS!!!!) :

1. If you got an error like system is busy when typing in the second last command, wait a minute then retype it. If it happens again after you retype it then run the STOP command again and retry.

2. If settings app force closes after you deodex, download this on your phone: http://www.mediafire.com/?ygyuln0heu25qb9. Extract it using a file manager. In the extracted folder, open system then app then move all three files there to /system/app overwriting the old settings app. Set all three files' permissions to rw-r-r. Reboot. It should now work fine.

3. If any other of your apps give a force close, then uninstall and reinstall them. This is very unlikely though, none of your apps should give a force close error.

CREDITS: [MENTION=5482320]paper13579[/MENTION] for creating this thread and editing the code a little bit. A big thanks to [MENTION=5113927]gamer649[/MENTION] who showed me the method to deodex. [MENTION=5278961]arshh19[/MENTION] for providing deodexed files for single sim. [MENTION=4865085]stalin.sk2[/MENTION] for providing deodexed files for C2004 and C2005. [MENTION=5010777]ansebovi[/MENTION] for creating the moddified settings.apk