How To Manually Replace framework-res.apk On Stock ROMs

Status
Not open for further replies.

Traveller

Administrator
Staff member
Jun 16, 2012
2,871
986
A little while back I was asking for a copy of the modified framework-res.apk to enable network location. The reason I wanted a different copy was that I had compiled my own, but thought I had done something wrong in the compiling process. The reality is that something went wrong in the installation process. I was simply copying framework-res.apk over to \system\framework and causing my tablet to bootloop. I then created a flashable zip and ran the zip through Clockworkmod, but even after fixing permissions the tablet bootlooped. This was a bit of a surprise for me at the time because my theme I use on my Dell Streak has a modified framework-res.apk, and installing the flashable zip with the file inside worked without an issue.

7:30am this morning it finally dawned on me what it was I was doing wrong. I took my compiled copy of framework-res.apk and installed it using the steps below, and the end result is a network location service that works correctly. Installing the changed file also resolves issues with Google Earth force closing. So, for future reference, if you want or need to manually change your framework-res.apk, follow these steps.

  1. Have a backup of your system in case of problems.
  2. Root your tablet if not already rooted.
  3. Install a file manager with system r/w capability.
  4. Copy the framework-res.apk from wherever you have it stored to \system. Do not copy the file to \system\framework at this point or you will cause the system to bootloop.
  5. Change the file permissions to rw-r--r--. Graphically it would look something like this:

    $permissions.png

    You may also have the option to set the Owner and the Group. With the file manager I use, Super Manager, I have this option when setting permissions. If you do have this option, change both Owner and Group to 0. This sets both to root.
  6. Move framework-res.apk from \system to \system\framework, letting it overwrite the original. You will have been successful if the tablet does not instantly reboot upon copying.
  7. Completely power down your tablet, then power it back up.
If you wish to do this yourself, I am providing my copy of framework-res.apk with the fixes already applied. This framework-res.apk comes from my MID9742 and should work without issue on any MID9742 running the stock ROM. Other Coby tablets are not supported, thus you apply this fix to your units at your own peril.

UPDATE: As of 10/14, I now have a flashable zip available that can be installed through Clockworkmod. Busybox is required for the install to work, so if you don't have busybox installed, get it.

As of 10/17, I have consolidated all my preferred tweaks into one thread. The frameworks in the aforementioned thread include new battery indicators for the status bar. However, the original framework and its flashable zip will remain available for those who don't wish to have a new battery indicator.
 
Last edited:
Interesting post. What file manager do you use to fix the permissions ? Also, are these the same permission settings to use in your solution to the "not compatible on Google Play Store ?" When I try to download the vlc beta app, Play store reports wrong country...
 
Any file manager with root capability should have the ability to fix permissions, but you must have skimmed my post a bit as I mention which file manager I use within it.

All the files I make available in this thread and in my signature have the same permissions (rw-r--r--, root:root). The only difference is that the .xml files and build.prop included in my tweaks zip file can be copied directly into their correct locations without having to set the permissions beforehand. framework-res.apk must have its permissions set prior to moving into /system/framework or the tablet immediately reboots and stays stuck on the Android logo.
 
Last edited:
As an addendum to your question, some apps do not appear in the Play Store even after applying the tweaks, e.g. Tune-in Radio. There are various reasons why they don't appear. Tune-in Radio doesn't appear as it considers the version of Android Coby uses as "unofficial". The authors of the app don't support their app on "unofficial" versions of Android and have a flag set in the Play Store to hide it from view.

From what I recall, this isn't fixable by replacing the build.prop in its entirety because Coby expects to see certain things in the build.prop and throws a fit when it doesn't find them. The only other options are using alternate app stores or sideloading.
 
As an addendum to your question, some apps do not appear in the Play Store even after applying the tweaks, e.g. Tune-in Radio. There are various reasons why they don't appear. Tune-in Radio doesn't appear as it considers the version of Android Coby uses as "unofficial". The authors of the app don't support their app on "unofficial" versions of Android and have a flag set in the Play Store to hide it from view.

From what I recall, this isn't fixable by replacing the build.prop in its entirety because Coby expects to see certain things in the build.prop and throws a fit when it doesn't find them. The only other options are using alternate app stores or sideloading.


Before applying your method of changing permissions, Play store would not display the App "vlc-beta" in a search.

After your permission changes, play store displayed the file. Now it still wouldn't download, due to some machine id error. But progess was seen by me.


BtW, I use the 1mobile.com version of tuneinradio and it works great.
 
Thanks for writing this post. Curiously, how hard was it to make a new framework-res.apk (that worked 100% on the particular tablet)? Did you have any sources from Coby to start? Or were they generic ICS? I want to build a custom framework-res.apk for my 7042 to build a demo prototype on a friendly low cost platform. I am a SW engineer and familiar with Linux, uboot, Android, etc. Any help here would be appreciated.
 
This thread on TabletRepublic explains exactly what you need to do in order to enable Location Services in framework-res.apk. In that thread there is a download with a Linux script which will automatically make the changes to all the framework XML files once framework-res.apk is decompiled.

I didn't use that script because I don't have Linux on my laptop. I wasn't going to install Cygwin simply for one script. So I did the edits by hand, using notepad++.
 
All my tweaks are now in one thread. This post and the files available on it will remain for reference purposes.
 
Status
Not open for further replies.
Back
Top