Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

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
1  
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 (stackoverflow.com/questions/10106837/…) –  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
3  
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
show 1 more comment

1 Answer

up vote 1 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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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