[Xperia Arc General] popthosegaskets:
Hi all XDA members, today I am going to show you how to edit xml files in your framework-res.apk so you can edit auto - rotation on lockscreen or CRT - Animation. This does not apply to the Arc only, most Android phone's framework can be edited this way except maybe Samsung or HTC phones which have an extra resource file. This guide contains screenshots and is meant to be noob friendly so everything is self explanatory, you don't need a rocket scientist to explain everything.

What you need:

Framework-res.apk you want to edit

Apktool

Notepad++ is recommended for editing XMLs.

7-zip

So let's get started:

1. If you want to edit the framework file, naturally you should have extracted it from your phone. If you have not done so, the framework-res.apk can be found in system/framework/framework-res.apk(requires root access)

2. Place the file into apktool directory

4. Press shift and right click the directory(don't select any file, just press shift right click in the empty space of your apktool directory, you should see "Open command window here")

5. You should see a command window like this:

6. Type this command: apktool if framework-res.apk. You should get a response like this:

7. Now type this command:apktool d framework-res.apk. This will decompile your framework-res.apk so you can access the xml files.

8. Go back to your apktool file. You should see a new folder called framework-res(Yes, please take a good look. I circled it for your sake.)

9. Open the folder. go to res/values/bools.xml

10. Right click on file, select edit with Notepad++

11. Now open in Notepad++, you can edit and choose the functions you want to add just by editing the boolean with "true" or "false"

That's it, you are now ready to choose if you want auto rotation lockscreen or enable CRT animation.

Stay tuned to this thread, I will make a second thread about recompiling your framework and signing it for use on your phone.

If you have found any errors in this tutorial, please send me a PM and I shall rectify it.

At the request of some users, I have updated the thread with the compiling and signing steps as well, so please continue reading.

12. Firstly we need some files to sign the apks, so go to your original framework-res.apk, right click -> 7 zip -> Open Archive

13. Extract the folder "META-INF" and the file "AndroidManifest.xml" from the framework-res.apk

13a. Alternatively, you can find the files in <your framework-res folder> -> Original // No "<>" symbols, please see attached screenshot

14. Before we compile the framework, please rename the folder to avoid any conflicts with the existing framework-res.apk

15. Type this command: apktool b <your framework-res folder> and press Enter // No "<>" symbols, please see attached screenshot

16. You should get a response like this:

17. Go to <your framework-res folder> -> dist -> framework-res.apk // No "<>" symbols, please see attached screenshot

WARNING! DO NOT PUSH THIS FILE INTO YOUR PHONE YET. IT HAS NOT BEEN SIGNED AND WILL CAUSE A BOOTLOOP IF YOU PUSH IT TO /SYSTEM. PLEASE CHECK THAT THESE FEW STEPS HAVE BEEN COMPLETED BEFORE PUSHING IT TO /SYSTEM

18. Right click the file, go to 7-zip -> Open Archive

19. Select the files you extracted or received from step 10 or 10a

20. Drag and drop into 7-zip. You will get a warning message. Press "Yes".

21. You should have both files copied into the apk. You have signed the framework-res.apk and the file is OK for use.

22. Push the framework-res.apk into /system/framework, set RW-R--R-- permissions and reboot.

That's it. Your phone should be functioning normally and the changes you did internally should take effect.

If you have found any errors in this tutorial, please send me a PM and I shall rectify it.

Also, please PM me or comment if you have questions.

If the question has been asked before, please read the previous posts if there are any.

Repeat questions will not be entertained.