I have compiled Android Source codes and get settings.apk now I wonder can I install that application on my phone ? When I try to do that my phone say "CAnnot install application" what can I do to install that application ?
-
2Why -1 ? Whats wrong ??– ViTo Brothers ApoyanMay 3, 2012 at 13:49
-
Why are you trying to do this? What's wrong with the Settings application that came with and was likely customized for your phone?– Matthew ReadMay 3, 2012 at 14:46
-
@MatthewRead I need to get access to System PIN application in that order I make some changes in android sources and recompile them now I need to install android settings.apk in to my phone (stackoverflow.com/questions/10106837/…)– ViTo Brothers ApoyanMay 3, 2012 at 14:58
-
you need to root the device and copy the settings.apk to the /system/app directory. if your device is odex'd you can't just throw the apk in there, you first would need to "de-odex" your device or install a custom rom that is already de-odex'd.– Ryan ConradMay 3, 2012 at 15:24
-
3Acutally, in /system/app you can mix odex and de odex, just be sure to delete the corresponding odex file (or the dalvik cache file if going the other way). It's /system/framework where you can't mix. Make sure you set permissions right as well though (and, not always necessary, but set owner and group too)– Drake ClarrisMay 3, 2012 at 15:31
1 Answer
System application are odexed, which means the code part it extracted and kept separate and also some crucial parts of the application are kept in framework.jar. If you want to copy your freshly-compiled application to your phone, you have to deodex it first, which restores the missing parts and only then you may replace /system/Settings.apk with your new file. And, please, make sure you delete old /system/Settings.odex file, otherwise it won't work.
As usually, it's recommended to save old Settings.apk/odex files just in case when something goes wrong.