[Sony Cross-Device General] DaRk-L0rD:
Hello everyone :)

Today i will teach you how to add Autostarts ;)

​

REQUIREMENTS:

You need to know how to decompile, compile and sign an apk.

Notepad++

A Deoxeded Rom.

Settings.apk

The attachment View attachment 2542285

If you are using apktool 2.x.x download this file:View attachment 2709395 thanks incodnita

STEPS:

1. Download the attachment.

2. Decompile your Settings.apk.

3. Navigate to res\xml\settings_headers.xml

Now add the following line (Make sure that there is no space between autostarts and LewaManageAutostarts)

Screenshot

4. Save it and close it.

5. In the xml folder, paste from the downloaded folder the autostarts_settings_header.

6. Now navigate to \res\values\ strings.xml. Add the following lines:

Screenshot

7. Save it and close it.

8. Now navigate to \res\values\ids.xml. Add the following lines:

Screenshot

9. Now paste from the folder your downloaded the ic_settings_autostarts icon in drawable-xdpi folder.

10. Now paste from the downloaded folder the manage_autostarts and the manage_autostarts_item in the layout folder.

12. Now copy from the attachment the whole autostarts folder to: smali/com/android/settings/

13.Now compile your Settings.apk

14. Now decompile the Settings.apk you just compiled.

NOW IT'S THE HARD PART, SO BE CAREFUL! ALSO THE IDS PROBABLY WILL BE DIFFERENT FOR YOU, SO DON'T COPY THE ONE YOU SEE​

14. Navigate to res\values\public.xml and open it.

15. Navigate to smali\com\android\settings\autostarts\LewaManageAutostarts.smali

16. In public.xml find manage_autostarts

17. Copy the id and paste it in LewaManageAutostarts.smali line 632

Screenshot

18. You have to follow this procedure for the next lines:

In public.xml we look for: manage_autostarts

In LewaManageAutostarts.smali we register the id in the line 632

In public.xml we look for: autostarts_allowed

In LewaManageAutostarts.smali we register the id in the line 305

In public.xml we look for: autostarts_prohibited

In LewaManageAutostarts.smali we register the id in the line 401

In public.xml we look for: autostarts_allow_progress_msg

In LewaManageAutostarts.smali we register the id in the line 831

In public.xml we look for: autostarts_prohibit_progress_msg

In LewaManageAutostarts.smali we register the id in the line 190

In public.xml we look for: autostarts_empty_msg

In LewaManageAutostarts.smali we register the id in the line 688 and 772

In public.xml we look for: autostarts_optimize_empty_msg

In LewaManageAutostarts.smali we register the id in the line 799

In public.xml we look for: autostarts_optimize_btn_title

In LewaManageAutostarts.smali we register the id in the line 612 and 765

In public.xml we look for: autostarts_all_btn_title

In LewaManageAutostarts.smali we register the id in the line 792 and 584

19. Now save the LewaManageAutostarts.smali and close it.

20. Now open the LewaManageAutostarts$AppAdapter.smali

21. As before:

In public.xml we look for: <public type="layout" name="manage_autostarts_item"

In LewaManageAutostarts$AppAdapter.smali we restiger the id in the line 164

In public.xml we look for: <public type="id" name="icon"

In LewaManageAutostarts$AppAdapter.smali we restiger the id in the line 174

In public.xml we look for: <public type="id" name="appName"

In LewaManageAutostarts$AppAdapter.smali we restiger the id in the line 195

In public.xml we look for: <public type="id" name="status"

In LewaManageAutostarts$AppAdapter.smali we restiger the id in the line 217

In public.xml we look for: <public type="id" name="app_on_sdcard"

In LewaManageAutostarts$AppAdapter.smali we restiger the id in the line 236

22. Save the file and close it.

23. Now recompile your Settings.apk and sign it.

24. Enjoy!