Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 ?

share|improve this question
Why -1 ? Whats wrong ?? – ViTo Brothers Apoyan May 3 '12 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 Read May 3 '12 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 (…) – ViTo Brothers Apoyan May 3 '12 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 Conrad May 3 '12 at 15:24
Acutally, 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 Clarris May 3 '12 at 15:31
up vote 2 down vote accepted

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.

share|improve this answer

protected by Community Dec 10 '15 at 14:48

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.