Hey guys,
So I noticed my flash_installer_signed_v3 zip I've been using (for hex edited flash so hulu works) no longer works with any Gingerbread builds. Flashing the zip makes it not boot (could be because of the newer CWM), but usually I was able to modify the libflashplayer.so in /data/data/com.adobe.flashplayer/libs (or something like that) and boom I was good.
After some research it seems that Gingerbread extracts those files from the flash apk to the /data/data/com.adobe.flashplayer/libs/ on boot, so the hack doesn't stick upon reboot. In the same threads I saw people had posted modified APKs to install, which resolves this issue, because the hex edited flash file is embedded into the APK. Problem solved right? no....
The instructions for this method mentions installing the latest flash 10.3.185.24 (version number checks out, from market and their posted files). Then via ADB (I did it from within CWM to be extra safe) you take their com.adobe.flash-1.apk and replace the one in /data/app with the one they posted. When I do this flash is not recognized at all in either Browser or Dolphin. I've also tried (at other's suggestions) simply replacing the built in, preinstalled flash (in the rom, located at /system/app) and renaming their posted file com.adobe.flashplayer-1.apk to install_flash_player.apk (as it is called this when it is on the rom instead of data/market installed), still no luck.
Is there anyone out there that's had luck with modified hulu on ANY gingerbread builds? It isn't simply hulu related, as it simply lies about being a desktop machine I'm sure others could use this for HBO, possibly netflix if they have a browser viewer.
EDIT:
SOLUTION: I discovered it was impossible to get any of the built apks to work, and also that the files would be replaced on every reboot. The solution was to edit the init.rc file in root to copy the replacement hacked files on boot as shown below.
First, I downloaded the latest flash version from the market (note, this must match the hacked files you will be copying for it). Next, I took the latest APK posted here http://forum.xda-developers.com/showpost.php?p=12433036&postcount=1 (which does contain files for 10.3.185.24, latest market version currently) and using root explorer (I believe, that or astro) opened the hacked apk, and extracted all 4 files from the lib folder into /sdcard/extracted. Next, I created a folder in /data/ called "flash" and put the extracted files in there (4). Next, I edited the file init.rc by adb push/pull (although root explorer should also work) and added the following lines below at the end of the file to copy the hacked files over the legit ones:
#fix flash
cp /data/flash/libflashplayer.so /data/data/com.adobe.flashplayer/lib/
cp /data/flash/libstagefright_froyo.so /data/data/com.adobe.flashplayer/lib/
cp /data/flash/libstagefright_honeycomb.so /data/data/com.adobe.flashplayer/lib/
cp /data/flash/libysshared.so /data/data/com.adobe.flashplayer/lib/
Note, something I noticed when trying this the first time, You must have busybox installed, preferably from the busybox installer from the market. The reason is android does not have a built-in copy utility (crazy I know). You can double check this via adb console or consolebot/local by typing in cp --help. If it can't find it, you must find the busybox installer in the market and install (I did mine to /system/bin, not sure it matters).
I hope this helps everyone who loves gingerbread and the HUGE performance boost in flash but hates their new DRM enforcement
This is above my head, but I'm excited nonetheless.
UPDATE: Just wanted to let you guys know I believe I've got a working zip all worked out, just waiting on permission from the OP of the lib files I used to reply to me saying it's cool for me to post it (imneveral0ne, posted it in the Thunderbolt forums). With everything that's going down right now figure it's best to get permission first, even if it is just for hex-editing of adobes files
Is there any update on this? Is this still the only method?
http://forum.xda-developers.com/showthread.php?t=1142155
This worked for me
Grapes
Related
I know many of us are new to the whole rooting thing. I'm coming from the Windows Mobile world of custom ROMs, kitchens, etc., but I do have some linux experience. However, I can't for the life of me figure out how to do a lot of what comes "standard" in MoDaCo's ROM. Obviously it would be easier to simply install Paul's ROM and be done with it, but I'd really like to learn how to do it on my own too.
So, that being said, maybe we can pull together some tutorials, guides, and/or links to existing guides which explain how to go about setting up our Rooted phones manually. Here are some of the built-in mods the MoDaCo ROM comes with which would be nice to be able to do manually or on a one-off basis:
Included in MoDaCo 1.1 'core':
Rooted with 'adb remount' permission and superuser APK
A2SD included (fully automatic thanks cyanogen!) create a EXT2 partition as your second partition to use. dalvik-cache remains on device.
Added Jbed Java
Added Dropbear SSH running by default, check 'About' screen for password (port 2222). You can now remove this by running /system/bin/removedropbear.sh
Added Notes app from Dragon
Added Spare Parts (run it and switch the 2 animation types to 'fast' for an even better experience!)
Added android-wifi-tether 1.60 pre3 (props to the developer, this is a great app!)
Added WiFi Status indicator, with kind permission of Andrew Schwimmer
Added busybox 1.15.2 tweaked such that 'get information' in Swapper now works as desired
Added nano 2.09 text editor for use in shell mode
Added parted and sqlite tools
Added terminfo and settings to boot.img to allow nano etc. use
Added files required for Debian linux including loxley's updated bootdeb script
Moved Quickoffice to data partition to allow easy uninstall
Moved Google Maps and Google Voice Search to data partition to allow easy update
Silenced boot sound (it's still there and can be reactivated with a file edit)
Click to expand...
Click to collapse
*********
*********
!Working!
Wireless Tethering:
http://android-wifi-tether.googlecode.com/
Go to the "Downloads" tab and download version 1.61-pre
!Not Working!
Superuser Whitelist App
I found two threads here that describe how to install Superuser.apk.
http://forum.xda-developers.com/showthread.php?t=582140
http://forum.xda-developers.com/showpost.php?p=4897587&postcount=5
Using the first one, I was able to get the files onto the phone and I used the chmod commands found in the second file in the hopes this would work; however, whenever I try to use it, nothing happens. The ES File Explorer, in particular, used to work with MoDaCo. When I'd try to browse as root, Superuser would pop-up and ask if I wanted to grant the app permissions. Now it just hangs there (black screen) and ES File Explorer says I don't have root access. Other Root apps work fine though, it's just they don't seem to be dependant on Superuser Whitelist.
'adb remount' permission
This requires that the default.prop file be edited from ro.secure=1 to ro.secure=0. Unfortunately, I can't seem to get this file to stick. If I use the mv command using adb shell, I get some kind of permissions error. If I use the cp command when booting into the recovery menu and using adb shell, the file reverts to the original on boot. Or maybe it's simply not being overwritten, but not throwing any errors either
I think I may have found a thread that will help with the default.prop changes. Looks like this has to be done in the recovery.img which apparently overwrites any modifications in the root of the device on each reboot. I'll post an update if/when I figure it out.
HOWTO: Unpack, Edit, and Repack Boot Images
http://forum.xda-developers.com/showthread.php?t=443994
The adb remount permission issue is driving me crazy. Please keep us updated if you figure out a way of resetting that without installing a new ROM.
I ended up modifying one of the MoDaCo update scripts to set up ADB Remount, Superuser.apk, and Busybox. It's been working fine for me, but be sure to do a backup before you apply the update. Check it out here:
http://forum.xda-developers.com/showthread.php?t=593952
Hey guys. I'm trying to push a libwebcore.so file from one .zip onto my current MyTouch phone that has CM 6 on it. The reason why I'm doing this is to have the Arabic browser support. This file causes the letters to be connected which they are in text messages, but not the browser. I heard pushing the libwebcore.so from a downloaded source (or from a rom .zip that has it from another rom) will do the trick.
However, everytime I try to push it to /system/lib it gives me an error saying that there is no room on the device. That's pretty unprobable since I'm sure I have a lot of space. How do I fix this and sucessfully push the file?
Shadowafs8 said:
Hey guys. I'm trying to push a libwebcore.so file from one .zip onto my current MyTouch phone that has CM 6 on it. The reason why I'm doing this is to have the Arabic browser support. This file causes the letters to be connected which they are in text messages, but not the browser. I heard pushing the libwebcore.so from a downloaded source (or from a rom .zip that has it from another rom) will do the trick.
However, everytime I try to push it to /system/lib it gives me an error saying that there is no room on the device. That's pretty unprobable since I'm sure I have a lot of space. How do I fix this and sucessfully push the file?
Click to expand...
Click to collapse
Do "adb shell df -h" to see how much room is available in your system partition. You may have to remove some unused system apps to make room.
I'm trying that now...but is it safe to delete the current libwebcore.so now and add the new one? If so what's the command. Also, if the libwebcore.so was for a testing version of CM 6 (specifically RC3), will it still work?
Also, is there a way to take some space from other parts of the system?
First of all, i'm going to move this to General since I fail to see how this is regarding the Development of anything. Some good information, but not related to Development.
Secondly, have you considered performing a nandroid backup, booting to recovery, mount the /system directory, then 'adb shell rm /system/lib/webcore.so' to remove your file then 'adb push webcore.so /system/lib'
Also, if you use the file directly from SOURCE it may not work since it may need to be compiled first. I'm not sure about that though since I've never tried it.
If any of the above goes wrong you can always nandroid restore and try again.
I personally use Clockwork Recovery since you can restore specific partitions individually (such as System) so it saves time.
Good luck.
I'm pretty much done trying...unless somebody can comply the file for me and test it. I'm really done trying this when all it does is fail over and over again. Hopefully somebody can come up with something
So I received the OTA Update for my Samsung EPIC 4G stock build Eclair DI18.
Unfortunately it did not install due to missing packages.
I was rooted.
I was not running any custom roms,
I did use the SDX Stock App Remover to remove "nascar",
I have seen other people having problems because they are missing the "Asphalt Demo" apk.
Unfortunately if you remove Nascar or Asphalt you will get that error message when you try to install the OTA EC05 update, as well as if you try the manual method of upgrading by copying the update.zip. This happens because the installer is trying to verify packages for the upgrade (which you no longer have).
I went nuts considering all the different methods I could take to apply this update. I wanted the quickest and easiest method, and one that would leave my data intact.
So if this matches your situation, you don't have to reflash back to stock DI18 to recover a couple of missing stock apps and you don't need Odin or the 255 mb tar ROM that's out there (SPH-D700-DI18-8Gb-REL.tar.md5) etc. with this method.
So here is the method I used to restore my Stock Sprint apps so I could get the installer to run.
Before you start, make sure you know which packages you need to restore back to your /system/app folder. (unfortunately, their is no way of knowing which package(s) you're missing if you don't remember what you removed. You could cross reference what you have with someone who has all the stock apps OR the easiest way is to try to apply the update and write down or remember which apk it is complaining about. Chances are you already know which APK you're missing and that's why you're here. If you removed multiple stock apps, then you might have already guessed that you are going to have to restore each apk one by one, and so you may need to go through this process more than once to discover exactly which apk files are missing.)
These instructions also assume that you've already copied the DI18-EC05 update.zip file found in this thread http://forum.xda-developers.com/showthread.php?t=1005593 to your sdcard.
Download the stock Sprint apk packages from:
http://forum.xda-developers.com/showthread.php?t=987777
The file you are looking for that is linked from that thread is:
http://www.nubecoder.com/files/andro...store_EB13.zip (Even though these are EB13 app's it doesn't matter that you're on DI18, we just need the file to be there so we can trick the installer into running.)
Unzip this file and copy the apk's you need to your sdcard by first mounting your android phone in mass storage mode (usb debugging disabled). After you have copied the apk's to your sdcard, you will need to remount your system folder and copy the apks to that /system/apps location for the update installer to recognize it (simply installing the app to your phone won't cut it).
To continue you will need the Samsung drivers ( I am not providing links because this can be found anywhere on the web. My particular Samsung driver archive is called "usb_drivers_GalaxyS_x64.zip" (reboot your system after installing if necessary).
You will also need the "one click root" zip archive (or any other package that can give you access to the adb shell.) I used the adb shell from the "epic aio one click root" file archive "epic.aio.v1.13.zip".
Enable USB Debugging mode in your phone, and then plug your phone into usb.
Follow the instructions below to remount your /system partition as rw so that you can copy back (to /system/app) the missing apk packages that you've already copied to your sdcard.
Navigate to the location where your adb executable is installed:
1. cd C:\android-sdk-windows\tools> adb shell
2. $ su
3. # mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
4. # cd /system/app
5. # ls (make sure it is mounted)
6. # cd /sdcard
7. # ls *.apk (show the apk package filenames)
8. # cp "apkfilename" /system/app (copy from current working directory [/sdcard] to /system/apps)
On step 8, replace "apkfilename" with apk's you want to copy. Repeat process as many times as necessary to copy back all the default apk's that you removed.
Taken partially from http://androidforums.com/2079717-post6.html
After you have copied all of your stock apk's back, simply unplug your phone, and reboot. Once you have rebooted press and hold volume down, power and camera buttons until the recovery menu pops back up, then simply select install update.zip
This time the installer will not error out on missing packages.
If you want to root your phone after installing the EC05 Stock Update:
http://forum.androidcentral.com/epi...optional-ext4-new-updated-2-a.html#post760733
For those who only need the stock epic asphalt demo here it is.
(Note to mods, this is a 5 minute demo only, not a full game. As such I believe it is ok to post.)
I was looking inside the run.bat file and I used a run.bat file that did not remove asphalt5.apk and freeHDGamesDemo.apk.
Now I don't know if you need the freeHDGamesDemo.apk or where to find it.
I was going to reinstall the asphalt5.apk, but do I erase the /sdcard/gameloft/ folder and if I do will it be recreated again or should I leave it in?
You can get rid of the gameloft folder on sdcard, thats where it puts the file it downloads when you launch the asphalt demo and it prompts to download. Be careful though, if you have other gameloft games they will also use that folder.
I'm not sure on the free hd demo file, if the ota complains about it we should be able to pull it from the eb13 tar file. If it's not posted by time the ota rolls out I'll add it here for ease.
Sent from my SPH-D700 using XDA App
rocket321 said:
You can get rid of the gameloft folder on sdcard, thats where it puts the file it downloads when you launch the asphalt demo and it prompts to download. Be careful though, if you have other gameloft games they will also use that folder.
I'm not sure on the free hd demo file, if the ota complains about it we should be able to pull it from the eb13 tar file. If it's not posted by time the ota rolls out I'll add it here for ease.
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
Thanks, I am not a big game player so the little asphalt5 demo is about all I need - I never even opened the freeHDDemo file so I don't know what it does, I was only looking for it incase it stopped you from getting any minor updates via OTA's.
I didn't think the Odin EC05 no data loss upgrade version would remove those two apps on Androidcentral.
i did everything but when i went to the system menu to intall the update.zip i dont have that file...
where do i get it from?
Joph said:
i did everything but when i went to the system menu to intall the update.zip i dont have that file...
where do i get it from?
Click to expand...
Click to collapse
Check this thread:
http://forum.xda-developers.com/showthread.php?t=1005593
Overview:
This thread is a guide on how to fix the apply_patch_check error message experienced during an upgrade of the Android OS. Specifically, this will detail the steps for an upgrade of Jelly Bean from 4.1.1 to 4.1.2 on the Nexus 7 with CWM Recovery for a user of Windows. I'm sure similar steps will work for other recoveries/upgrades/devices and PC OSes.
You should only bother with this if you don't want to flash the entire system.img file to your phone, which is way easier.
Here is an example of the error message I'm talking about:
Code:
assert failed: apply_patch_check("/system/app/Chrome.apk", "819b34b66335c6faec86404d736a002b8871600", "9d6b55e63b0bf20bea433fb1ee7089f88ab73fb6")
E: Error in /sdcard/03a4eaf95f73.signed-nakasi-JZO54K-from-JRO03D.03a4eaf9.zip
(Status 7)
Installation aborted.
A few notes about the error:
This doesn't have to happen with the Chrome.apk specifically -- it could happen with any app in /system/app or .so in /system/lib.
Those random strings of numbers/letters are SHA-1 hashes of the apk.
The first one is the hash of the apk installed on your device. In my example, this happens to be the version of Chrome that comes with JB 4.1.2.
The second one is the expected hash of the apk that comes with JB 4.1.1.
Cause of the problem:
The reason this error occurs is because the file was somehow modified from its original state. In my case -- and most likely your case -- this was done by Titanium Backup. TB has an option to "Integrate updates of system apps into ROM", which will cause the apk in /system/app (and associated library files in /system/lib, if needed) to be overwritten with the updated apk.
Solution:
Download this zip file which contains the full /system/app and /system/lib directory from the JB 4.1.1 factory image. *
Extract the zip to a location of your choosing on your PC.
In the extracted folder, locate the .apk or .so file referenced in the error message on your device.
Copy this file to your device via your preferred method (USB cable works fine). I put my file in /sdcard/Download.
On your device, use a root file explorer to move the file from /sdcard/Download to /system/app (or /system/lib).
If you don't have a program that can do this, I use ES File Explorer. Be sure to go to Settings > Root Settings and turn on Root Explorer, Up to Root, and Mount File System.
Reboot into your Recovery and try to install the update again.
Repeat steps 3-6 for each subsequent file that produces an error. You will basically need to do this for each app you integrated using TB and maybe a few library files, too. **
* Future updates (above 4.1.2):
Since I won't be keeping the zip file from step #1 up-to-date, here's how to get the directories that I included in the zip for yourself:
Obtain a factory image for your device's current Android version (the version you're updating from).
For JB 4.1.1, this file is called nakasi-jro03d-factory-e102ba72.tgz.
If you're reading this guide at a later date, the JB 4.1.2 file is called nakasi-jzo54k-factory-973f190e.tgz.
You can try your luck at the official Google site, but they seem to only provide the version you're trying to update to, not from.
Extract the .tgz file somewhere on your PC.
Locate the image-naksi-jro03d.zip file and extract that, as well.
In the folder you just extracted from the previous step, located the system.img file.
Download and use a program called sgs2toext4 (View attachment 645320) to convert the system.img to system.ext4.img. ***
Download and use a program called Linux Reader to open system.ext4.img.
Do this by going to Drives > Mount Image > Next > select your file.
It will then be listed under the Hard Disk Drives section in red as "Linux Ext Volume 1".
Navigate to: Linux Ext Volume 1/system.
Right-click on the app (or lib) directory and pick Save > Next > Output to dir of your choice.
You now have the directories that were included with the zip file from Solution step #1, so just follow those steps now.
** How to avoid repeating steps:
If you'd rather not have to try to reinstall after updating only one file, just to find another file that needs updating, try this:
Obtain the /system/app and /system/lib folders from the factory image and save them to your PC.
For the sake of this guide, let's say you save them to C:\factory_app and C:\factory_lib.
Copy the /system/app and /system/lib directories from your phone to your PC.
For the sake of this guide, let's say you saved them to C:\phone_app and C:\phone_lib.
Download the File Checksum Integrity Verifier utility from Microsoft.
Start > Run > cmd
fciv.exe -sha1 -xml factory_app.xml -wp C:\factory_app
fciv.exe -sha1 -xml factory_app.xml -v -bp C:\phone_app
Don't ask me why, but you need to use -bp instead of -wp for the second command.
Don't forget the -v on the second command.
The output of the last command will show you the list of files that are different. These are the files you need to take from C:\factory_app and put into the /system/app directory on your phone.
Do the same for the lib directories (just replace all instances of "_app" with "_lib" in the previous commands).
Summary:
I hope that this post helped some of you who really didn't want to have to flash the system.img or wipe your device just to update. In the future, use TB to back up the original.
I wouldn't normally bother writing up a guide like this (it took almost as long to write as it did to figure out how to do this) but I couldn't find this solution anywhere even though I saw that I wasn't the only person with the problem. Sorry for not posting this guide sooner (update has been out for a while now), but the forum required me to make a bunch of useless spam posts before I could include any links in my guide and I didn't get around to making those posts right away.
*** I would like to thank balamu96m for his guide on extracting data from the system.img file and drphrozen for making the sgs2toext4 program.
Thanks for this. Will try now.
Worked great. Had to copy the apk and odex file.
Good job! It's great to see the steps for Windows users!
Just a heads up that I simply extracted the files I needed from and on my N7 using Root Explorer, without using my PC at all.
Great guide! Method worked perfectly on my Nexus 7 going from 4.1.2 to 4.2, thanks
Please... is there some other way to update the files w/o installing Java on my Windoze PeeCee? I accidentally messed up my YouTube.apk with Titanium Backup... now I can't update from 4.1.2 --> 4.2 JB.
EDIT: JavaPortable FTW... updating (fingers crossed)
EDIT: SUCCESS TY OP!
For anyone who flashed the 4.2 clock/keyboard already
Hey, for anyone who flashed the 4.2 clock and keyboard on their Nexus 7 already and need to roll back to do the 4.2 update, I used OP's method to make a flashable zip that puts the 4.1.2 clock and keyboard back.
Worked perfectly for my Nexus 7 to get me up and running. Hope it helps anyone!
cantthinkofa.com/files/RestoreClockKeyboard.zip
galaxy nexus
Hi can you post a guide for galaxy nexus? Or if it is the same, can you post the link of JB factory image for galaxy nexus? Sorry, I can't find any thread for galaxy nexus, and I don't want to complete flash the stock image since I don't want to wipe my phone.
Thanks in advance!
Nice Guide
perfect, the guide works just fine. Now finally running 4.2.
Awesome guide... Thanks... Happily running 4.2 now aften beeing stuck at libutils.so...
Sent from my Nexus 7 using xda premium
damagno said:
Hi can you post a guide for galaxy nexus? Or if it is the same, can you post the link of JB factory image for galaxy nexus? Sorry, I can't find any thread for galaxy nexus, and I don't want to complete flash the stock image since I don't want to wipe my phone.
Thanks in advance!
Click to expand...
Click to collapse
I don't have a Galazy Nexus, but I think the steps should be the same. Here is a link to the factory images: https://developers.google.com/android/nexus/images#takju . It looks like they now have links for older versions, rather than just the newest images (which is how it was when I made my guide). So that's pretty sweet.
Thanks a lot man, i succeeded to "patch" my system files to update from 4.2 to 4.2.1. I first check what files didn't correspond with fciv (9 files counting both apks and odex) and then replaced them in system/app. In fact they were the apps I previously integrated with tb (learned lesson: never do it if you want to remain stock and receive OTAs). I also noticed many not-matching files in system/lib but i didn't touch them and the update went smooth the same.
Another thing: when in the OP you say it's way easier just to reflash the system.img you mean just run from bootloader "fastboot flash system system.img" (taken from the factory image as usual) or there's some other thing to do in order to fix the system partition in the right way?
GallStones said:
Thanks a lot man, i succeeded to "patch" my system files to update from 4.2 to 4.2.1.
Click to expand...
Click to collapse
I was wondering if you could tell me how you did it? I'm searching a way to install 4.2.1 with no avail as of yet :crying:
GallStones said:
Thanks a lot man, i succeeded to "patch" my system files to update from 4.2 to 4.2.1. I first check what files didn't correspond with fciv (9 files counting both apks and odex) and then replaced them in system/app. In fact they were the apps I previously integrated with tb (learned lesson: never do it if you want to remain stock and receive OTAs). I also noticed many not-matching files in system/lib but i didn't touch them and the update went smooth the same.
Another thing: when in the OP you say it's way easier just to reflash the system.img you mean just run from bootloader "fastboot flash system system.img" (taken from the factory image as usual) or there's some other thing to do in order to fix the system partition in the right way?
Click to expand...
Click to collapse
Yes. I am having the same issue. I cannot update mine from 4.2 to 4.2.1. I wonder to know which original stock image you have used. Can you list a detail procedure?
Thank you very much.
Ric
dev/block/param
legom said:
Overview:
This thread is a guide on how to fix the apply_patch_check error message experienced during an upgrade of the Android OS. Specifically, this will detail the steps for an upgrade of Jelly Bean from 4.1.1 to 4.1.2 on the Nexus 7 with CWM Recovery for a user of Windows. I'm sure similar steps will work for other recoveries/upgrades/devices and PC OSes.
You should only bother with this if you don't want to flash the entire system.img file to your phone, which is way easier.
Here is an example of the error message I'm talking about:
Code:
assert failed: apply_patch_check("/system/app/Chrome.apk", "819b34b66335c6faec86404d736a002b8871600", "9d6b55e63b0bf20bea433fb1ee7089f88ab73fb6")
E: Error in /sdcard/03a4eaf95f73.signed-nakasi-JZO54K-from-JRO03D.03a4eaf9.zip
(Status 7)
Installation aborted.
A few notes about the error:
This doesn't have to happen with the Chrome.apk specifically -- it could happen with any app in /system/app or .so in /system/lib.
Those random strings of numbers/letters are SHA-1 hashes of the apk.
The first one is the hash of the apk installed on your device. In my example, this happens to be the version of Chrome that comes with JB 4.1.2.
The second one is the expected hash of the apk that comes with JB 4.1.1.
Cause of the problem:
The reason this error occurs is because the file was somehow modified from its original state. In my case -- and most likely your case -- this was done by Titanium Backup. TB has an option to "Integrate updates of system apps into ROM", which will cause the apk in /system/app (and associated library files in /system/lib, if needed) to be overwritten with the updated apk.
Solution:
Download this zip file which contains the full /system/app and /system/lib directory from the JB 4.1.1 factory image. *
Extract the zip to a location of your choosing on your PC.
In the extracted folder, locate the .apk or .so file referenced in the error message on your device.
Copy this file to your device via your preferred method (USB cable works fine). I put my file in /sdcard/Download.
On your device, use a root file explorer to move the file from /sdcard/Download to /system/app (or /system/lib).
If you don't have a program that can do this, I use ES File Explorer. Be sure to go to Settings > Root Settings and turn on Root Explorer, Up to Root, and Mount File System.
Reboot into your Recovery and try to install the update again.
Repeat steps 3-6 for each subsequent file that produces an error. You will basically need to do this for each app you integrated using TB and maybe a few library files, too. **
* Future updates (above 4.1.2):
Since I won't be keeping the zip file from step #1 up-to-date, here's how to get the directories that I included in the zip for yourself:
Obtain a factory image for your device's current Android version (the version you're updating from).
For JB 4.1.1, this file is called nakasi-jro03d-factory-e102ba72.tgz.
If you're reading this guide at a later date, the JB 4.1.2 file is called nakasi-jzo54k-factory-973f190e.tgz.
You can try your luck at the official Google site, but they seem to only provide the version you're trying to update to, not from.
Extract the .tgz file somewhere on your PC.
Locate the image-naksi-jro03d.zip file and extract that, as well.
In the folder you just extracted from the previous step, located the system.img file.
Download and use a program called sgs2toext4 (View attachment 645320) to convert the system.img to system.ext4.img. ***
Download and use a program called Linux Reader to open system.ext4.img.
Do this by going to Drives > Mount Image > Next > select your file.
It will then be listed under the Hard Disk Drives section in red as "Linux Ext Volume 1".
Navigate to: Linux Ext Volume 1/system.
Right-click on the app (or lib) directory and pick Save > Next > Output to dir of your choice.
You now have the directories that were included with the zip file from Solution step #1, so just follow those steps now.
** How to avoid repeating steps:
If you'd rather not have to try to reinstall after updating only one file, just to find another file that needs updating, try this:
Obtain the /system/app and /system/lib folders from the factory image and save them to your PC.
For the sake of this guide, let's say you save them to C:\factory_app and C:\factory_lib.
Copy the /system/app and /system/lib directories from your phone to your PC.
For the sake of this guide, let's say you saved them to C:\phone_app and C:\phone_lib.
Download the File Checksum Integrity Verifier utility from Microsoft.
Start > Run > cmd
fciv.exe -sha1 -xml factory_app.xml -wp C:\factory_app
fciv.exe -sha1 -xml factory_app.xml -v -bp C:\phone_app
Don't ask me why, but you need to use -bp instead of -wp for the second command.
Don't forget the -v on the second command.
The output of the last command will show you the list of files that are different. These are the files you need to take from C:\factory_app and put into the /system/app directory on your phone.
Do the same for the lib directories (just replace all instances of "_app" with "_lib" in the previous commands).
Summary:
I hope that this post helped some of you who really didn't want to have to flash the system.img or wipe your device just to update. In the future, use TB to back up the original.
I wouldn't normally bother writing up a guide like this (it took almost as long to write as it did to figure out how to do this) but I couldn't find this solution anywhere even though I saw that I wasn't the only person with the problem. Sorry for not posting this guide sooner (update has been out for a while now), but the forum required me to make a bunch of useless spam posts before I could include any links in my guide and I didn't get around to making those posts right away.
*** I would like to thank balamu96m for his guide on extracting data from the system.img file and drphrozen for making the sgs2toext4 program.
Click to expand...
Click to collapse
my error 7 was generated by emmc: dev/block/mmdblk0p7 (the file is "param" any suggestions?
Thanks. After searching for a lot of time, this post helped me updating my SGS3.:victory: I previously tried to integrate youtube update into rom using titanium backup.
GallStones said:
Another thing: when in the OP you say it's way easier just to reflash the system.img you mean just run from bootloader "fastboot flash system system.img" (taken from the factory image as usual)
Click to expand...
Click to collapse
Yes, that's what I mean. The reason I didn't want to do this on my device is because I had modified some other system files that I wanted to keep the modifications for.
Wow, thanks a lot OP! Your guide helped me fixing an error during the update to 4.2.2 on my Nexus 4.
please include a video ,im getting lost in the details
solved.
Hi,
I have two old modded NST's with kindle and a bunch of other apps loaded on it.
I want kindle to sync on both, but it won't due to the cacerts.blk file needing updating. So on one of them with ES File Explorer already loaded, I have swapped the cacerts.blk file and sync works fine.
I followed instructions here: https://forum.xda-developers.com/showpost.php?p=65503037&postcount=24 to get it working - no issues.
The other NST has the same apps loaded, but unfortunately not ES File Explorer.
So I can't copy the files to the /system directory.
So I downloaded two old versions of the ES File Explorer apk and uploaded to the SD card via the USB cable (with ADB Konnect already on the device).
I can't find any way to get the .apk to install. I have tried this with two old versions (1.6.2.3 & 3.0.5.5) loaded to the sdcard/download folder.
Its ages since I did this - so probably forgot how to do this.
When I go to this directory via the base file manager in the modded env I see the .apk, but when I select them it gives me a Parse error.
Can anyone please tell me either how to load the ES File Explorer apk, or another way to get the damn cacerts.blk into /System/etc/Security.
Thanks
meggiedude said:
Hi,
I have two old modded NST's with kindle and a bunch of other apps loaded on it.
I want kindle to sync on both, but it won't due to the cacerts.blk file needing updating. So on one of them with ES File Explorer already loaded, I have swapped the cacerts.blk file and sync works fine.
I followed instructions here: https://forum.xda-developers.com/showpost.php?p=65503037&postcount=24 to get it working - no issues.
The other NST has the same apps loaded, but unfortunately not ES File Explorer.
So I can't copy the files to the /system directory.
So I downloaded two old versions of the ES File Explorer apk and uploaded to the SD card via the USB cable (with ADB Konnect already on the device).
I can't find any way to get the .apk to install. I have tried this with two old versions (1.6.2.3 & 3.0.5.5) loaded to the sdcard/download folder.
Its ages since I did this - so probably forgot how to do this.
When I go to this directory via the base file manager in the modded env I see the .apk, but when I select them it gives me a Parse error.
Can anyone please tell me either how to load the ES File Explorer apk, or another way to get the damn cacerts.blk into /System/etc/Security.
Thanks
Click to expand...
Click to collapse
Use the 1.6.2.3 version.
Since you have ADB working you can install the app that way.
Code:
ADB install yourappfilename.apk
The only stipulation is that the app you are trying to install should be in the same directory as ADB. Oh, and no spaces in the file name.
nmyshkin said:
Use the 1.6.2.3 version.
Since you have ADB working you can install the app that way.
Code:
ADB install yourappfilename.apk
The only stipulation is that the app you are trying to install should be in the same directory as ADB. Oh, and no spaces in the file name.
Click to expand...
Click to collapse
Thanks,
Tried that, but I get an install error. Does this suggest that the ADB on the NST is older than my Win10 PC is using?
E:\Simon\Downloads\platform-tools_r28.0.1-windows\platform-tools>adb install es-file-explorer-1-6-2-3-es-en-br-fr-de-it-cn-jp-ru-nl-pl-kr-se-android.apk
adb server version (31) doesn't match this client (40); killing...
* daemon started successfully
es-file-explorer-1-6-2-3-es-en-br-fr-d.... 1.4 MB/s (22531795 bytes in 14.894s)
pkg: /data/local/tmp/es-file-explorer-1-6-2-3-es-en-br-fr-de-it-cn-jp-ru-nl-pl-kr-se-android.apk
Failure [INSTALL_FAILED_OLDER_SDK]
rm failed for -f, Read-only file system
E:\Simon\Downloads\platform-tools_r28.0.1-windows\platform-tools>
Click to expand...
Click to collapse
Cheers
meggiedude said:
Thanks,
Tried that, but I get an install error. Does this suggest that the ADB on the NST is older than my Win10 PC is using?
Cheers
Click to expand...
Click to collapse
Hmm...
First, just for the future, you can rename apk files so you don't have to type so much (and make mistakes like I always do). So just ESFileExplorer.apk would work OK. Renaming the file does not change anything internally and the internals are what ADB (or a package manager) looks at.
I see two possibilities. One is that you may be right, but I don't know enough about ADB to answer definitely. I've always used this tool: https://forum.xda-developers.com/showthread.php?t=2317790, although my version is older than what is currently posted. Looks like my adb.exe goes back to February 2013. Anyway, I've never seen that error.
To me, the error message also suggests that the flag for installing from unknown sources might not be set. Why that would be I can't say. Since NookManager is non-destructive and can be run repeatedly, you may want to just try that. You can use the package as is or take some of my update suggestions (one of which will install ES File Explorer during the process). This would insure that the flag is set correctly AND also put the app on the device. There's even an update option to install the cacerts.bks file (second post down).