View Single Post
Old 10-21-2011, 07:24 PM   #144
vldmr
Bigendian confidologist
vldmr has a complete set of Star Wars action figures.vldmr has a complete set of Star Wars action figures.vldmr has a complete set of Star Wars action figures.vldmr has a complete set of Star Wars action figures.vldmr has a complete set of Star Wars action figures.
 
vldmr's Avatar
 
Posts: 60
Karma: 494
Join Date: Oct 2011
Device: edge & edgejr
Replacing Settings.apk -- failed

ktwombley, ptsenter - thanks for hints, both tools complements each other nicely

So I did disassembled Settings.apk, located rogue code responsible for disabling power saving settings on anything except edgejr:
Quote:
public class Settings extends PreferenceActivity
{
protected void onCreate(Bundle paramBundle)
{
if (Utilities.getDeviceType() == 12) // Type 12is edgejr
return;
int j = Log.d("Settings", "Not pocket device removing power saving settings");
// deletes preferences here
}
}
Removed offending code in smali replacing it with single return, rebuilt using apktool, signed, aligned, all is good, but install fails:
Quote:
$ adb install -r Settings/dist/Settings.aligned.apk
361 KB/s (1416294 bytes in 3.821s)
pkg: /data/local/tmp/Settings.aligned.apk
Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
So it won't let me replace app with a new one signed by a different sertificate. Replacing apk file with new one does not work. Uninstalling com.android.settings does not work. Hand editing /data/system/packages.xml does not work.

This paranoic signing business drives me nuts. I give up. If anyone wants it to give it another try, i can send modified Settings.apk
vldmr is offline   Reply With Quote