├── .classpath ├── .gitignore ├── .project ├── AndroidManifest.xml ├── LICENSE ├── README.md ├── bin ├── AndroidManifest.xml ├── Build.prop Editor.apk ├── classes.dex ├── classes │ └── org │ │ └── nathan │ │ └── jf │ │ └── build │ │ └── prop │ │ └── editor │ │ ├── BuildConfig.class │ │ ├── BuildPropEditor$1.class │ │ ├── BuildPropEditor.class │ │ ├── EditPropActivity$1.class │ │ ├── EditPropActivity$2.class │ │ ├── EditPropActivity$3.class │ │ ├── EditPropActivity$4.class │ │ ├── EditPropActivity$5.class │ │ ├── EditPropActivity.class │ │ ├── R$attr.class │ │ ├── R$color.class │ │ ├── R$drawable.class │ │ ├── R$id.class │ │ ├── R$layout.class │ │ ├── R$menu.class │ │ ├── R$string.class │ │ └── R.class ├── classes2 │ └── org │ │ └── nathan │ │ └── jf │ │ └── build │ │ └── prop │ │ └── editor │ │ └── BuildPropEditor.class ├── jarlist.cache ├── res │ ├── drawable-hdpi │ │ ├── ic_action_accept.png │ │ ├── ic_action_add.png │ │ ├── ic_action_discart.png │ │ └── ic_launcher.png │ ├── drawable-ldpi │ │ ├── ic_action_accept.png │ │ ├── ic_action_add.png │ │ ├── ic_action_discart.png │ │ └── ic_launcher.png │ ├── drawable-mdpi │ │ ├── ic_action_accept.png │ │ ├── ic_action_add.png │ │ ├── ic_action_discart.png │ │ └── ic_launcher.png │ └── drawable-xhdpi │ │ ├── ic_action_accept.png │ │ ├── ic_action_add.png │ │ ├── ic_action_discart.png │ │ └── ic_launcher.png └── resources.ap_ ├── gen └── org │ └── nathan │ └── jf │ └── build │ └── prop │ └── editor │ ├── BuildConfig.java │ └── R.java ├── proguard.cfg ├── project.properties ├── res ├── drawable-hdpi │ ├── ic_action_accept.png │ ├── ic_action_add.png │ ├── ic_action_discart.png │ └── ic_launcher.png ├── drawable-ldpi │ ├── ic_action_accept.png │ ├── ic_action_add.png │ ├── ic_action_discart.png │ └── ic_launcher.png ├── drawable-mdpi │ ├── ic_action_accept.png │ ├── ic_action_add.png │ ├── ic_action_discart.png │ └── ic_launcher.png ├── drawable-xhdpi │ ├── ic_action_accept.png │ ├── ic_action_add.png │ ├── ic_action_discart.png │ └── ic_launcher.png ├── layout │ ├── edit_prop.xml │ ├── list_item.xml │ └── main.xml ├── menu │ ├── context.xml │ ├── edit.xml │ └── main.xml └── values │ ├── strings.xml │ └── styles.xml └── src └── org └── nathan └── jf └── build └── prop └── editor ├── BuildPropEditor.java └── EditPropActivity.java /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.dex 3 | *.class 4 | *.ap_ 5 | *.apk 6 | *.keystore 7 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Build.prop Editor 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 14 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | build.prop Editor 2 | Copyright (C) 2012 Nathan Campos 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # build.prop Editor 2 | 3 | This app will let you easily edit your Android's build.prop file using a intuitive and friendly interface. 4 | 5 | *The developer is not responsible for any problem caused by editing the build.prop file* 6 | 7 | ## Screenshots 8 | 9 | ![Home Page][1] . ![Edit/Add Property][2] 10 | 11 | ## Requirements 12 | 13 | This app is compatible with 2.2 or newer and of course needs root access to write to your Android's ``/system`` directory. 14 | 15 | ## Changelog 16 | 17 | * **v2.0:** Holo redesign 18 | * **v1.0.1:** Minor fixes 19 | * **v1.0:** First release 20 | 21 | ## License 22 | 23 | build.prop Editor is licensed under GPLv3: 24 | 25 | > build.prop Editor 26 | > Copyright (C) 2012 Nathan Campos 27 | > 28 | > This program is free software: you can redistribute it and/or modify 29 | > it under the terms of the GNU General Public License as published by 30 | > the Free Software Foundation, either version 3 of the License, or 31 | > (at your option) any later version. 32 | > 33 | > This program is distributed in the hope that it will be useful, 34 | > but WITHOUT ANY WARRANTY; without even the implied warranty of 35 | > MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 36 | > GNU General Public License for more details. 37 | > 38 | > You should have received a copy of the GNU General Public License 39 | > along with this program. If not, see . 40 | 41 | 42 | [1]: http://i.imgur.com/MthRN.png 43 | [2]: http://i.imgur.com/MthRN.png -------------------------------------------------------------------------------- /bin/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 14 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /bin/Build.prop Editor.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/Build.prop Editor.apk -------------------------------------------------------------------------------- /bin/classes.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/classes.dex -------------------------------------------------------------------------------- /bin/classes/org/nathan/jf/build/prop/editor/BuildConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/classes/org/nathan/jf/build/prop/editor/BuildConfig.class -------------------------------------------------------------------------------- /bin/classes/org/nathan/jf/build/prop/editor/BuildPropEditor$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/classes/org/nathan/jf/build/prop/editor/BuildPropEditor$1.class -------------------------------------------------------------------------------- /bin/classes/org/nathan/jf/build/prop/editor/BuildPropEditor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/classes/org/nathan/jf/build/prop/editor/BuildPropEditor.class -------------------------------------------------------------------------------- /bin/classes/org/nathan/jf/build/prop/editor/EditPropActivity$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/classes/org/nathan/jf/build/prop/editor/EditPropActivity$1.class -------------------------------------------------------------------------------- /bin/classes/org/nathan/jf/build/prop/editor/EditPropActivity$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/classes/org/nathan/jf/build/prop/editor/EditPropActivity$2.class -------------------------------------------------------------------------------- /bin/classes/org/nathan/jf/build/prop/editor/EditPropActivity$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/classes/org/nathan/jf/build/prop/editor/EditPropActivity$3.class -------------------------------------------------------------------------------- /bin/classes/org/nathan/jf/build/prop/editor/EditPropActivity$4.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/classes/org/nathan/jf/build/prop/editor/EditPropActivity$4.class -------------------------------------------------------------------------------- /bin/classes/org/nathan/jf/build/prop/editor/EditPropActivity$5.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/classes/org/nathan/jf/build/prop/editor/EditPropActivity$5.class -------------------------------------------------------------------------------- /bin/classes/org/nathan/jf/build/prop/editor/EditPropActivity.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/classes/org/nathan/jf/build/prop/editor/EditPropActivity.class -------------------------------------------------------------------------------- /bin/classes/org/nathan/jf/build/prop/editor/R$attr.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/classes/org/nathan/jf/build/prop/editor/R$attr.class -------------------------------------------------------------------------------- /bin/classes/org/nathan/jf/build/prop/editor/R$color.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/classes/org/nathan/jf/build/prop/editor/R$color.class -------------------------------------------------------------------------------- /bin/classes/org/nathan/jf/build/prop/editor/R$drawable.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/classes/org/nathan/jf/build/prop/editor/R$drawable.class -------------------------------------------------------------------------------- /bin/classes/org/nathan/jf/build/prop/editor/R$id.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/classes/org/nathan/jf/build/prop/editor/R$id.class -------------------------------------------------------------------------------- /bin/classes/org/nathan/jf/build/prop/editor/R$layout.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/classes/org/nathan/jf/build/prop/editor/R$layout.class -------------------------------------------------------------------------------- /bin/classes/org/nathan/jf/build/prop/editor/R$menu.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/classes/org/nathan/jf/build/prop/editor/R$menu.class -------------------------------------------------------------------------------- /bin/classes/org/nathan/jf/build/prop/editor/R$string.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/classes/org/nathan/jf/build/prop/editor/R$string.class -------------------------------------------------------------------------------- /bin/classes/org/nathan/jf/build/prop/editor/R.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/classes/org/nathan/jf/build/prop/editor/R.class -------------------------------------------------------------------------------- /bin/classes2/org/nathan/jf/build/prop/editor/BuildPropEditor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/classes2/org/nathan/jf/build/prop/editor/BuildPropEditor.class -------------------------------------------------------------------------------- /bin/jarlist.cache: -------------------------------------------------------------------------------- 1 | # cache for current jar dependecy. DO NOT EDIT. 2 | # format is 3 | # Encoding is UTF-8 4 | -------------------------------------------------------------------------------- /bin/res/drawable-hdpi/ic_action_accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/res/drawable-hdpi/ic_action_accept.png -------------------------------------------------------------------------------- /bin/res/drawable-hdpi/ic_action_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/res/drawable-hdpi/ic_action_add.png -------------------------------------------------------------------------------- /bin/res/drawable-hdpi/ic_action_discart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/res/drawable-hdpi/ic_action_discart.png -------------------------------------------------------------------------------- /bin/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/res/drawable-ldpi/ic_action_accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/res/drawable-ldpi/ic_action_accept.png -------------------------------------------------------------------------------- /bin/res/drawable-ldpi/ic_action_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/res/drawable-ldpi/ic_action_add.png -------------------------------------------------------------------------------- /bin/res/drawable-ldpi/ic_action_discart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/res/drawable-ldpi/ic_action_discart.png -------------------------------------------------------------------------------- /bin/res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/res/drawable-mdpi/ic_action_accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/res/drawable-mdpi/ic_action_accept.png -------------------------------------------------------------------------------- /bin/res/drawable-mdpi/ic_action_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/res/drawable-mdpi/ic_action_add.png -------------------------------------------------------------------------------- /bin/res/drawable-mdpi/ic_action_discart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/res/drawable-mdpi/ic_action_discart.png -------------------------------------------------------------------------------- /bin/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/res/drawable-xhdpi/ic_action_accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/res/drawable-xhdpi/ic_action_accept.png -------------------------------------------------------------------------------- /bin/res/drawable-xhdpi/ic_action_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/res/drawable-xhdpi/ic_action_add.png -------------------------------------------------------------------------------- /bin/res/drawable-xhdpi/ic_action_discart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/res/drawable-xhdpi/ic_action_discart.png -------------------------------------------------------------------------------- /bin/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/resources.ap_: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/bin/resources.ap_ -------------------------------------------------------------------------------- /gen/org/nathan/jf/build/prop/editor/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /** Automatically generated file. DO NOT MODIFY */ 2 | package org.nathan.jf.build.prop.editor; 3 | 4 | public final class BuildConfig { 5 | public final static boolean DEBUG = true; 6 | } -------------------------------------------------------------------------------- /gen/org/nathan/jf/build/prop/editor/R.java: -------------------------------------------------------------------------------- 1 | /* AUTO-GENERATED FILE. DO NOT MODIFY. 2 | * 3 | * This class was automatically generated by the 4 | * aapt tool from the resource data it found. It 5 | * should not be modified by hand. 6 | */ 7 | 8 | package org.nathan.jf.build.prop.editor; 9 | 10 | public final class R { 11 | public static final class attr { 12 | } 13 | public static final class color { 14 | public static final int black=0x7f050000; 15 | public static final int grey=0x7f050002; 16 | public static final int white=0x7f050001; 17 | } 18 | public static final class drawable { 19 | public static final int ic_action_accept=0x7f020000; 20 | public static final int ic_action_add=0x7f020001; 21 | public static final int ic_action_discart=0x7f020002; 22 | public static final int ic_launcher=0x7f020003; 23 | } 24 | public static final class id { 25 | public static final int LinearLayout1=0x7f070002; 26 | public static final int add_menu=0x7f070009; 27 | public static final int backup_menu=0x7f07000a; 28 | public static final int context_delete=0x7f070006; 29 | public static final int context_edit=0x7f070005; 30 | public static final int discart_menu=0x7f070007; 31 | public static final int prop_desc=0x7f070004; 32 | public static final int prop_key=0x7f070001; 33 | public static final int prop_name=0x7f070000; 34 | public static final int prop_title=0x7f070003; 35 | public static final int restore_menu=0x7f07000b; 36 | public static final int save_menu=0x7f070008; 37 | } 38 | public static final class layout { 39 | public static final int edit_prop=0x7f030000; 40 | public static final int list_item=0x7f030001; 41 | public static final int main=0x7f030002; 42 | } 43 | public static final class menu { 44 | public static final int context=0x7f060000; 45 | public static final int edit=0x7f060001; 46 | public static final int main=0x7f060002; 47 | } 48 | public static final class string { 49 | public static final int about=0x7f04000b; 50 | public static final int add=0x7f04000a; 51 | public static final int add_prop=0x7f040001; 52 | public static final int app_name=0x7f040000; 53 | public static final int backup=0x7f04000c; 54 | public static final int cancel=0x7f040004; 55 | public static final int discart=0x7f040003; 56 | public static final int edit_key=0x7f040005; 57 | public static final int edit_name=0x7f040006; 58 | public static final int edit_prop_title=0x7f040007; 59 | public static final int restore=0x7f04000d; 60 | public static final int save=0x7f040002; 61 | public static final int unsaved_changes_message=0x7f040009; 62 | public static final int unsaved_changes_title=0x7f040008; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /proguard.cfg: -------------------------------------------------------------------------------- 1 | -optimizationpasses 5 2 | -dontusemixedcaseclassnames 3 | -dontskipnonpubliclibraryclasses 4 | -dontpreverify 5 | -verbose 6 | -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* 7 | 8 | -keep public class * extends android.app.Activity 9 | -keep public class * extends android.app.Application 10 | -keep public class * extends android.app.Service 11 | -keep public class * extends android.content.BroadcastReceiver 12 | -keep public class * extends android.content.ContentProvider 13 | -keep public class * extends android.app.backup.BackupAgentHelper 14 | -keep public class * extends android.preference.Preference 15 | -keep public class com.android.vending.licensing.ILicensingService 16 | 17 | -keepclasseswithmembernames class * { 18 | native ; 19 | } 20 | 21 | -keepclasseswithmembers class * { 22 | public (android.content.Context, android.util.AttributeSet); 23 | } 24 | 25 | -keepclasseswithmembers class * { 26 | public (android.content.Context, android.util.AttributeSet, int); 27 | } 28 | 29 | -keepclassmembers class * extends android.app.Activity { 30 | public void *(android.view.View); 31 | } 32 | 33 | -keepclassmembers enum * { 34 | public static **[] values(); 35 | public static ** valueOf(java.lang.String); 36 | } 37 | 38 | -keep class * implements android.os.Parcelable { 39 | public static final android.os.Parcelable$Creator *; 40 | } 41 | -------------------------------------------------------------------------------- /project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system use, 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | 10 | # Project target. 11 | target=android-14 12 | -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_action_accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/res/drawable-hdpi/ic_action_accept.png -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_action_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/res/drawable-hdpi/ic_action_add.png -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_action_discart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/res/drawable-hdpi/ic_action_discart.png -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-ldpi/ic_action_accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/res/drawable-ldpi/ic_action_accept.png -------------------------------------------------------------------------------- /res/drawable-ldpi/ic_action_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/res/drawable-ldpi/ic_action_add.png -------------------------------------------------------------------------------- /res/drawable-ldpi/ic_action_discart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/res/drawable-ldpi/ic_action_discart.png -------------------------------------------------------------------------------- /res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_action_accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/res/drawable-mdpi/ic_action_accept.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_action_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/res/drawable-mdpi/ic_action_add.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_action_discart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/res/drawable-mdpi/ic_action_discart.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_action_accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/res/drawable-xhdpi/ic_action_accept.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_action_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/res/drawable-xhdpi/ic_action_add.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_action_discart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/res/drawable-xhdpi/ic_action_discart.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpc/Build.prop-Editor/b3dd61f88a73ee524e9126ff3a447d187d1dc728/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/layout/edit_prop.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 20 | 21 | 27 | 28 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /res/layout/list_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 18 | 19 | 28 | 29 | -------------------------------------------------------------------------------- /res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /res/menu/context.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 10 | -------------------------------------------------------------------------------- /res/menu/edit.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 14 | -------------------------------------------------------------------------------- /res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 13 | 18 | -------------------------------------------------------------------------------- /res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | build.prop Editor 4 | Add Property 5 | Save 6 | Discard 7 | Cancel 8 | Property Key 9 | Property Name 10 | Edit/Add Property 11 | Unsaved Changes 12 | Would you like to set this property? 13 | Add 14 | About 15 | Backup 16 | Restore 17 | 18 | -------------------------------------------------------------------------------- /res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FF000000 4 | #FFFFFFFF 5 | #FF888888 6 | 7 | -------------------------------------------------------------------------------- /src/org/nathan/jf/build/prop/editor/BuildPropEditor.java: -------------------------------------------------------------------------------- 1 | package org.nathan.jf.build.prop.editor; 2 | 3 | import java.io.DataOutputStream; 4 | import java.io.File; 5 | import java.io.FileInputStream; 6 | import java.io.IOException; 7 | import java.util.ArrayList; 8 | import java.util.HashMap; 9 | import java.util.List; 10 | import java.util.Map; 11 | import java.util.Properties; 12 | 13 | import android.app.ActionBar; 14 | import android.app.ListActivity; 15 | import android.content.Intent; 16 | import android.os.Bundle; 17 | import android.os.Environment; 18 | import android.view.Menu; 19 | import android.view.MenuInflater; 20 | import android.view.MenuItem; 21 | import android.view.View; 22 | import android.widget.AdapterView; 23 | import android.widget.AdapterView.OnItemClickListener; 24 | import android.widget.ListView; 25 | import android.widget.SimpleAdapter; 26 | import android.widget.Toast; 27 | 28 | public class BuildPropEditor extends ListActivity { 29 | private ListView listView; 30 | private String tempFile; 31 | private boolean refreshList; 32 | private ActionBar actionBar; 33 | 34 | @Override 35 | public void onCreate(Bundle savedInstanceState) { 36 | super.onCreate(savedInstanceState); 37 | setContentView(R.layout.main); 38 | 39 | actionBar = getActionBar(); 40 | 41 | listView = getListView(); 42 | listView.setTextFilterEnabled(true); 43 | 44 | createTempFile(); 45 | populateList(); 46 | } 47 | 48 | @Override 49 | public void onDestroy() { 50 | super.onDestroy(); 51 | } 52 | 53 | @Override 54 | public void onResume() { 55 | super.onResume(); 56 | 57 | // TODO: This isn't working. 58 | if (refreshList) { 59 | // Something was added, better refresh 60 | populateList(); 61 | } 62 | } 63 | 64 | @Override 65 | public boolean onCreateOptionsMenu(Menu menu) { 66 | MenuInflater inflater = getMenuInflater(); 67 | inflater.inflate(R.menu.main, menu); 68 | return true; 69 | } 70 | 71 | @Override 72 | public boolean onOptionsItemSelected(MenuItem item) { 73 | switch (item.getItemId()) { 74 | case R.id.add_menu: 75 | refreshList = true; 76 | showEdit(null, null); 77 | break; 78 | case R.id.backup_menu: 79 | backup(); 80 | break; 81 | case R.id.restore_menu: 82 | restore(); 83 | break; 84 | } 85 | return true; 86 | } 87 | 88 | /*@Override 89 | public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { 90 | super.onCreateContextMenu(menu, v, menuInfo); 91 | MenuInflater inflater = getMenuInflater(); 92 | inflater.inflate(R.menu.context, menu); 93 | } 94 | 95 | @Override 96 | public boolean onContextItemSelected(MenuItem item) { 97 | switch (item.getItemId()) { 98 | case R.id.context_edit: 99 | // do one 100 | return true; 101 | case R.id.context_delete: 102 | // do remove 103 | return true; 104 | default: 105 | return false; 106 | } 107 | }*/ 108 | 109 | public void populateList() { 110 | final Properties prop = new Properties(); 111 | File file = new File(tempFile); 112 | try { 113 | prop.load(new FileInputStream(file)); 114 | } catch (IOException e) { 115 | Toast.makeText(getApplicationContext(), "Error: " + e, Toast.LENGTH_SHORT).show(); 116 | } 117 | 118 | final String[] pTitle = prop.keySet().toArray(new String[0]); 119 | final List pDesc = new ArrayList(); 120 | for (int i = 0; i < pTitle.length; i++) { 121 | pDesc.add(prop.getProperty(pTitle[i])); 122 | } 123 | 124 | ArrayList> list = buildData(pTitle, pDesc); 125 | String[] from = { "title", "description" }; 126 | int[] to = { R.id.prop_title, R.id.prop_desc }; 127 | 128 | SimpleAdapter adapter = new SimpleAdapter(this, list, R.layout.list_item, from, to); 129 | setListAdapter(adapter); 130 | 131 | listView.setOnItemClickListener(new OnItemClickListener() { 132 | @Override 133 | public void onItemClick(AdapterView parent, View view, int position, long id) { 134 | showEdit(pTitle[position], prop.getProperty(pTitle[position])); 135 | } 136 | }); 137 | } 138 | 139 | private ArrayList> buildData(String[] t, List d) { 140 | ArrayList> list = new ArrayList>(); 141 | 142 | for (int i = 0; i < t.length; ++i) { 143 | list.add(putData(t[i], d.get(i))); 144 | } 145 | 146 | return list; 147 | } 148 | 149 | private HashMap putData(String title, String description) { 150 | HashMap item = new HashMap(); 151 | 152 | item.put("title", title); 153 | item.put("description", description); 154 | 155 | return item; 156 | } 157 | 158 | public void showEdit(String name, String key) { 159 | Intent intent = new Intent(BuildPropEditor.this, EditPropActivity.class); 160 | 161 | intent.putExtra("name", name); 162 | intent.putExtra("key", key); 163 | 164 | startActivity(intent); 165 | } 166 | 167 | private void backup() { 168 | Process process = null; 169 | DataOutputStream os = null; 170 | 171 | try { 172 | process = Runtime.getRuntime().exec("su"); 173 | os = new DataOutputStream(process.getOutputStream()); 174 | os.writeBytes("mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system\n"); 175 | os.writeBytes("cp -f /system/build.prop " + Environment.getExternalStorageDirectory().getAbsolutePath() + "/build.prop.bak\n"); 176 | os.writeBytes("exit\n"); 177 | os.flush(); 178 | process.waitFor(); 179 | } catch (Exception e) { 180 | Toast.makeText(getApplicationContext(), "Error: " + e.getMessage(), Toast.LENGTH_SHORT).show(); 181 | } finally { 182 | try { 183 | if (os != null) { 184 | os.close(); 185 | } 186 | process.destroy(); 187 | } catch (Exception e) { 188 | Toast.makeText(getApplicationContext(), "Error: " + e.getMessage(), Toast.LENGTH_SHORT).show(); 189 | } 190 | } 191 | 192 | Toast.makeText(getApplicationContext(), "build.prop Backup at " + Environment.getExternalStorageDirectory().getAbsolutePath() + "/build.prop.bak", Toast.LENGTH_SHORT).show(); 193 | } 194 | 195 | private void restore() { 196 | Process process = null; 197 | DataOutputStream os = null; 198 | 199 | try { 200 | process = Runtime.getRuntime().exec("su"); 201 | os = new DataOutputStream(process.getOutputStream()); 202 | os.writeBytes("mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system\n"); 203 | os.writeBytes("mv -f /system/build.prop /system/build.prop.bak\n"); 204 | os.writeBytes("busybox cp -f " + Environment.getExternalStorageDirectory().getAbsolutePath() + "/build.prop.bak /system/build.prop\n"); 205 | os.writeBytes("chmod 644 /system/build.prop\n"); 206 | //os.writeBytes("mount -o remount,ro -t yaffs2 /dev/block/mtdblock4 /system\n"); 207 | os.writeBytes("exit\n"); 208 | os.flush(); 209 | process.waitFor(); 210 | } catch (Exception e) { 211 | Toast.makeText(getApplicationContext(), "Error: " + e.getMessage(), Toast.LENGTH_SHORT).show(); 212 | } finally { 213 | try { 214 | if (os != null) { 215 | os.close(); 216 | } 217 | process.destroy(); 218 | } catch (Exception e) { 219 | Toast.makeText(getApplicationContext(), "Error: " + e.getMessage(), Toast.LENGTH_SHORT).show(); 220 | } 221 | } 222 | 223 | Toast.makeText(getApplicationContext(), "build.prop Restored from " + Environment.getExternalStorageDirectory().getAbsolutePath() + "/build.prop.bak", Toast.LENGTH_SHORT).show(); 224 | } 225 | 226 | private void createTempFile() { 227 | Process process = null; 228 | DataOutputStream os = null; 229 | 230 | try { 231 | process = Runtime.getRuntime().exec("su"); 232 | os = new DataOutputStream(process.getOutputStream()); 233 | os.writeBytes("mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system\n"); 234 | os.writeBytes("cp -f /system/build.prop " + Environment.getExternalStorageDirectory().getAbsolutePath() + "/buildprop.tmp\n"); 235 | os.writeBytes("chmod 777 " + Environment.getExternalStorageDirectory().getAbsolutePath() + "/buildprop.tmp\n"); 236 | os.writeBytes("exit\n"); 237 | os.flush(); 238 | process.waitFor(); 239 | } catch (Exception e) { 240 | Toast.makeText(getApplicationContext(), "Error: " + e.getMessage(), Toast.LENGTH_SHORT).show(); 241 | } finally { 242 | try { 243 | if (os != null) { 244 | os.close(); 245 | } 246 | process.destroy(); 247 | } catch (Exception e) { 248 | Toast.makeText(getApplicationContext(), "Error: " + e.getMessage(), Toast.LENGTH_SHORT).show(); 249 | } 250 | } 251 | 252 | tempFile = Environment.getExternalStorageDirectory().getAbsolutePath() + "/buildprop.tmp"; 253 | } 254 | 255 | public boolean runRootCommand(String command) { 256 | Process process = null; 257 | DataOutputStream os = null; 258 | 259 | try { 260 | process = Runtime.getRuntime().exec("su"); 261 | os = new DataOutputStream(process.getOutputStream()); 262 | os.writeBytes(command+"\n"); 263 | os.writeBytes("exit\n"); 264 | os.flush(); 265 | process.waitFor(); 266 | } catch (Exception e) { 267 | Toast.makeText(getApplicationContext(), "Error: " + e.getMessage(), Toast.LENGTH_SHORT).show(); 268 | return false; 269 | } finally { 270 | try { 271 | if (os != null) { 272 | os.close(); 273 | } 274 | process.destroy(); 275 | } catch (Exception e) { 276 | Toast.makeText(getApplicationContext(), "Error: " + e.getMessage(), Toast.LENGTH_SHORT).show(); 277 | } 278 | } 279 | return true; 280 | } 281 | } 282 | -------------------------------------------------------------------------------- /src/org/nathan/jf/build/prop/editor/EditPropActivity.java: -------------------------------------------------------------------------------- 1 | package org.nathan.jf.build.prop.editor; 2 | 3 | import java.io.BufferedReader; 4 | import java.io.DataOutputStream; 5 | import java.io.File; 6 | import java.io.FileInputStream; 7 | import java.io.FileOutputStream; 8 | import java.io.FileReader; 9 | import java.io.FileWriter; 10 | import java.io.IOException; 11 | import java.io.Reader; 12 | import java.util.Properties; 13 | 14 | import android.app.Activity; 15 | import android.app.AlertDialog; 16 | import android.content.DialogInterface; 17 | import android.os.Bundle; 18 | import android.os.Environment; 19 | import android.view.Menu; 20 | import android.view.MenuInflater; 21 | import android.view.MenuItem; 22 | import android.widget.EditText; 23 | import android.widget.Toast; 24 | import android.text.Editable; 25 | import android.text.TextWatcher; 26 | 27 | public class EditPropActivity extends Activity { 28 | 29 | private EditText editName; 30 | private EditText editKey; 31 | protected boolean changesPending; 32 | private AlertDialog unsavedChangesDialog; 33 | private String tempFile; 34 | private String propReplaceFile; 35 | 36 | @Override 37 | protected void onCreate(Bundle savedInstanceState) { 38 | super.onCreate(savedInstanceState); 39 | setContentView(R.layout.edit_prop); 40 | 41 | tempFile = Environment.getExternalStorageDirectory().getAbsolutePath() + "/buildprop.tmp"; 42 | propReplaceFile = Environment.getExternalStorageDirectory().getAbsolutePath() + "/propreplace.txt"; 43 | setUpControls(); 44 | } 45 | 46 | private void setUpControls() { 47 | editName = (EditText)findViewById(R.id.prop_name); 48 | editKey = (EditText)findViewById(R.id.prop_key); 49 | 50 | String name = getIntent().getExtras().getString("name"); 51 | String key = getIntent().getExtras().getString("key"); 52 | 53 | if (name != null) { 54 | editName.setText(name); 55 | editKey.setText(key); 56 | } 57 | 58 | editName.addTextChangedListener(new TextWatcher() { 59 | @Override 60 | public void onTextChanged(CharSequence s, int start, int before, int count) { 61 | changesPending = true; 62 | } 63 | 64 | @Override 65 | public void beforeTextChanged(CharSequence s, int start, int count, int after) { 66 | // TODO: Nothing 67 | } 68 | 69 | @Override 70 | public void afterTextChanged(Editable s) { 71 | // TODO: Nothing 72 | } 73 | }); 74 | 75 | editKey.addTextChangedListener(new TextWatcher() { 76 | @Override 77 | public void onTextChanged(CharSequence s, int start, int before, int count) { 78 | changesPending = true; 79 | } 80 | 81 | @Override 82 | public void beforeTextChanged(CharSequence s, int start, int count, int after) { 83 | // TODO: Nothing 84 | } 85 | 86 | @Override 87 | public void afterTextChanged(Editable s) { 88 | // TODO: Nothing 89 | } 90 | }); 91 | } 92 | 93 | @Override 94 | public boolean onCreateOptionsMenu(Menu menu) { 95 | MenuInflater inflater = getMenuInflater(); 96 | inflater.inflate(R.menu.edit, menu); 97 | return true; 98 | } 99 | 100 | @Override 101 | public boolean onOptionsItemSelected(MenuItem item) { 102 | switch (item.getItemId()) { 103 | case R.id.save_menu: 104 | final Properties prop = new Properties(); 105 | 106 | try { 107 | FileInputStream in = new FileInputStream(new File(tempFile)); 108 | prop.load(in); 109 | in.close(); 110 | } catch (IOException e) { 111 | Toast.makeText(getApplicationContext(), "Error: " + e, Toast.LENGTH_SHORT).show(); 112 | } 113 | 114 | prop.setProperty(editName.getText().toString(), editKey.getText().toString()); 115 | 116 | try { 117 | FileOutputStream out = new FileOutputStream(new File(tempFile)); 118 | prop.store(out, null); 119 | out.close(); 120 | 121 | replaceInFile(new File(tempFile)); 122 | transferFileToSystem(); 123 | } catch (IOException e) { 124 | Toast.makeText(getApplicationContext(), "Error: " + e, Toast.LENGTH_SHORT).show(); 125 | } 126 | 127 | finish(); 128 | break; 129 | case R.id.discart_menu: 130 | cancel(); 131 | break; 132 | } 133 | 134 | return true; 135 | } 136 | 137 | protected void cancel() { 138 | if (changesPending) { 139 | unsavedChangesDialog = new AlertDialog.Builder(this) 140 | .setTitle(R.string.unsaved_changes_title) 141 | .setMessage(R.string.unsaved_changes_message) 142 | .setPositiveButton(R.string.save, new AlertDialog.OnClickListener() { 143 | @Override 144 | public void onClick(DialogInterface dialog, int which) { 145 | final Properties prop = new Properties(); 146 | 147 | try { 148 | FileInputStream in = new FileInputStream(new File(tempFile)); 149 | prop.load(in); 150 | in.close(); 151 | } catch (IOException e) { 152 | Toast.makeText(getApplicationContext(), "Error: " + e, Toast.LENGTH_SHORT).show(); 153 | } 154 | 155 | prop.setProperty(editName.getText().toString(), editKey.getText().toString()); 156 | 157 | try { 158 | FileOutputStream out = new FileOutputStream(new File(tempFile)); 159 | prop.store(out, null); 160 | out.close(); 161 | 162 | replaceInFile(new File(tempFile)); 163 | transferFileToSystem(); 164 | } catch (IOException e) { 165 | Toast.makeText(getApplicationContext(), "Error: " + e, Toast.LENGTH_SHORT).show(); 166 | } 167 | } 168 | }) 169 | .setNeutralButton(R.string.discart, new AlertDialog.OnClickListener() { 170 | @Override 171 | public void onClick(DialogInterface dialog, int which) { 172 | finish(); 173 | } 174 | }) 175 | .setNegativeButton(R.string.cancel, new AlertDialog.OnClickListener() { 176 | @Override 177 | public void onClick(DialogInterface dialog, int which) { 178 | unsavedChangesDialog.cancel(); 179 | } 180 | }).create(); 181 | unsavedChangesDialog.show(); 182 | } else { 183 | finish(); 184 | } 185 | } 186 | 187 | private void transferFileToSystem() { 188 | Process process = null; 189 | DataOutputStream os = null; 190 | 191 | try { 192 | process = Runtime.getRuntime().exec("su"); 193 | os = new DataOutputStream(process.getOutputStream()); 194 | os.writeBytes("mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system\n"); 195 | os.writeBytes("mv -f /system/build.prop /system/build.prop.bak\n"); 196 | os.writeBytes("busybox cp -f " + propReplaceFile + " /system/build.prop\n"); 197 | os.writeBytes("chmod 644 /system/build.prop\n"); 198 | //os.writeBytes("mount -o remount,ro -t yaffs2 /dev/block/mtdblock4 /system\n"); 199 | //os.writeBytes("rm " + propReplaceFile); 200 | //os.writeBytes("rm " + tempFile); 201 | os.writeBytes("exit\n"); 202 | os.flush(); 203 | process.waitFor(); 204 | } catch (Exception e) { 205 | Toast.makeText(getApplicationContext(), "Error: " + e.getMessage(), Toast.LENGTH_SHORT).show(); 206 | } finally { 207 | try { 208 | if (os != null) { 209 | os.close(); 210 | } 211 | process.destroy(); 212 | } catch (Exception e) { 213 | Toast.makeText(getApplicationContext(), "Error: " + e.getMessage(), Toast.LENGTH_SHORT).show(); 214 | } 215 | } 216 | 217 | Toast.makeText(getApplicationContext(), "Edit saved and a backup was made at " + Environment.getExternalStorageDirectory().getAbsolutePath() + "/build.prop.bak", Toast.LENGTH_SHORT).show(); 218 | } 219 | 220 | private void replaceInFile(File file) throws IOException { 221 | File tmpFile = new File(propReplaceFile); 222 | FileWriter fw = new FileWriter(tmpFile); 223 | Reader fr = new FileReader(file); 224 | BufferedReader br = new BufferedReader(fr); 225 | 226 | while (br.ready()) { 227 | fw.write(br.readLine().replaceAll("\\\\", "") + "\n"); 228 | } 229 | 230 | fw.close(); 231 | br.close(); 232 | fr.close(); 233 | } 234 | } 235 | --------------------------------------------------------------------------------