DEVS PLEASE!!! Rmvngand Adding Windows (i.e. Settings>Phone Info)

PatrickAkridge

"The Button Pusher"
Sep 23, 2011
587
94
0
Hello developers!

I need to remove the Factory Reset window from my ROM and I can't figure out how to do it. I would also like to add a window or menu to Settings.

I know how to decompile (decode) and compile an APK file, I know how to edit simple XML files (i.e. strings.xml) but I don't know how to do this. Please guide me to some resources, a guide, or just teach me how to do it, please.

I need help and this issue is causing a stump in my ROM developing hobby. Yes, I have Googled the topic and found nothing to help me. I figured out what submenus are (but not how to add and remove them from Android Developers..)

Please help me as best as you can, drew, kraven, anyone that can help.

Thanks for your time in advance.
 
Last edited:
Sorry, u might not want this post, u probably want one that tells u what to do, but I think that since Rom developing is a hobby of yours, u should post some of ur roms for us to try out!

Sent from my LS670 using Android Central Forums
 
Sorry, u might not want this post, u probably want one that tells u what to do, but I think that since Rom developing is a hobby of yours, u should post some of ur roms for us to try out!

Sent from my LS670 using Android Central Forums

I have. Joylicious Optimus, my port of JoyOS, the iPhone experience for Android is my ROM. It is the ONLY JoyOS ROM that is posted for our phones. The ROM is called Joylicious Optimus. Take a look at it. You'll be surprised.

Sent from my LG-LS670 using Android Central Forums
 
He HAS been posting them. Its just, like, 1-2 roms is it?


Now, your question, I have no access to a PC, so I can't test myself, and this may be hard to understand.

http://forum.xda-developers.com/showthread.php?p=24317850#post24317850

Notice in that thread how they rearrange the settings around by messing with the XML files. Maybe you can find and delete code inside just like it for how you want it.:)



Sorry, u might not want this post, u probably want one that tells u what to do, but I think that since Rom developing is a hobby of yours, u should post some of ur roms for us to try out!

Sent from my LS670 using Android Central Forums



Sent from my LG-VM670 using Tapatalk 2
 
Could really help any. I wasn't really complete to me. I didn't understand it. :banghead::confused:

Sent from my LG-LS670 using Android Central Forums
 
Yeah. I'm confused with it to. I couldn't find any thread for settings, but I was hoping that was related. :(

Maybe the guy who made DanteRom could help.(Sorry, I forgot your name :()

Sent from my LG-VM670 using Tapatalk 2
 
Re: DEVS PLEASE!!! Rmvngand Adding Windows (i.e. Settings>Phone I

If you are building from source I think Drew still has a fork of the settings.apk you could reference that; I know for a fact it removes Factory Reset (pointed the code out to Drew when he was working on cm7 last year but my goldfish memory keeps me from remembering what it was or similar)...

If you are building from a binary port it's a little more complicated but there's an old walk through on the V forums for it (could find it with a search or 3); I wanna say it was written up by mmarz but I'm not sure if that's right.

Edit: just looked, I don't see Drew's fork of settings anymore; but Jerry does https://github.com/JerryScript/android_packages_apps_Settings/commit/2888d636e04f387d0c9bee9989bb43b812411a7a
 
Last edited:
Re: DEVS PLEASE!!! Rmvngand Adding Windows (i.e. Settings>Phone I

Depends what rom you are trying to remove it from. Decompile the Settings.apk. Navigate to /res/xml/privacy_settings.xml . Then remove these lines from cm7. Then recompile.

Code:
    <PreferenceCategory
            android:title="@string/personal_data_section_title">
        <!-- Factory reset -->
        <PreferenceScreen
                android:title="@string/master_clear_title"
                android:summary="@string/master_clear_summary">
            <intent android:action="android.intent.action.MAIN"
                    android:targetPackage="com.android.settings"
                    android:targetClass="com.android.settings.MasterClear" />
        </PreferenceScreen>
    </PreferenceCategory>

There's another option where if you have a rom that has no privacy reset already... only if the xml folder is visible. Open both Settings.apk in 7zip and just swap out the privacy_settings.xml via 7zip without decompile/recompiling.
 
Re: DEVS PLEASE!!! Rmvngand Adding Windows (i.e. Settings>Phone I

Depends what rom you are trying to remove it from. Decompile the Settings.apk. Navigate to /res/xml/privacy_settings.xml . Then remove these lines from cm7. Then recompile.

Code:
    <PreferenceCategory
            android:title="@string/personal_data_section_title">
        <!-- Factory reset -->
        <PreferenceScreen
                android:title="@string/master_clear_title"
                android:summary="@string/master_clear_summary">
            <intent android:action="android.intent.action.MAIN"
                    android:targetPackage="com.android.settings"
                    android:targetClass="com.android.settings.MasterClear" />
        </PreferenceScreen>
    </PreferenceCategory>
There's another option where if you have a rom that has no privacy reset already... only if the xml folder is visible. Open both Settings.apk in 7zip and just swap out the privacy_settings.xml via 7zip without decompile/recompiling.

Thnx. I will try. I want to do this Joylicious.

When I ported it, a menu came up here: Settings > About Phone > Privacy Clear something. It is still using your CM7 base so it should work. I couldn't figure out witch XML to edit then recompile.

Apparently you do know! Thanks. I will try tonight and if I have any more trouble I will ask in this thread.

Now, how do you ADD a menu?

There is another menu I wanna remove called the SIM Settings menu found in Settings > Security > SIM Settings I think... Thanks kraven.

EDIT! The code isn't there. Maybe another apk... The factory reset is in Settings > About Phone > Reset

There are XML files located within the APK that are called master-reset-final.xml and stuff like that... could that be it. After that privacy reset menu, I just want to remove the SIM Settings menu and move around menus. Could you help me with that? Thanks again Jon.