Originally Posted by totalundone
Alright. So I've *properly* decompiled the apk (I'm working on the newest X10i build, v435). It references the UXprof url from framework-res.apk. I found where the url is in that file and changed it to the url for the Tmobile G2 (just to see if that change will work). Unfortunately, I need to recompile framework-res.apk and from everything I've read, it's recommended not to do that.
I'll keep on reading to see if I can do it, but has anyone recompiled framework-res.apk for the x10?
I've dealt with framework-res.apk before. It was just to add the Super Circle Battery, but I can tell you what works.
Compiling the APK seems to encrypt the XML files one by one. If you change any of the resources (like adding images), then you also need to compile a new resources.asrc. Fortunately, since it's a system file, you don't need to sign the APK.
Check this thread for lots of good info on modifying framework-res.apk (thanks to _calum_ and MrRusch):
- The XML files and resources.asrc need to be compiled.
- The APK doesn't need to be signed.
- You can compile the XML and resources.asrc with APK Manager, then extract them from the "unsigned" APK it creates, and then reinsert them into a copy of the original APK using WinRAR (or your favorite zip tool).
- Compression should be set to "store" (a.k.a. no compression).
Be sure to have a backup copy of your original framework-res.apk.
It's best to leave a copy on your SD card somewhere.
Be careful when replacing framework-res.apk. Copying it with Root Explorer isn't a good idea. I think the permissions get screwed up or something, and you don't have time to change it because it reboots right away. It's better to copy it onto your SD card and use the dd command through ADB.
adb shell dd if=/sdcard/framework-res.apk of=/system/framework/framework-res.apk
If you mess up, then you may not be able to boot the phone. Don't panic. ADB is still available even when it hasn't booted yet, so just use dd to replace it with your old one.