custom update.zip for gapps - G Tablet Android Development

FIRST: I know that there are custom ROMs and this has been done via root/etc. I want as vanilla of a gtab as possble (i've tried the TnT Enhancement pack and I have all sorts of issues w/ viewing mp4 files and the device locking up 'Scanning the SD card' that I don't have w/ the OTA updates)
I'm trying to create a custom update.zip that will JUST install the gapps on my gtab. I've got the necessary files from a previous thread: http://forum.xda-developers.com/showthread.php?t=827209
I've created a directory struction w/ update\system (with the files in the gapps zip from the thread) and update\META-INF\com\google\android with an update-script that says:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
I zip it up and sign it:
java -classpath testsign.jar testsign my1stupdate.zip update.zip
then I go to install it, have the \recovery with the command file that says "--update_package=SDCARD2:/update.zip" and it looks like it's installing it fine (get the standard square status screen with the install package icon looking like its going to install) until within a second or two I get the triangle with the exclaimation point in the middle and it reboots (package never gets installed)
what am I missing? anyone provide some insight into how I can figure out what happened to troubleshoot further?
Thanks in advance.
-Deniz

Do you mean something like this which is only the Google apps? No sense in reinventing the wheel.
http://android.d3xt3r01.tk/cyanogen/gapps/gapps-mdpi-tegra-20101020-signed.zip

tullywork;11012789
I'm trying to create a custom update.zip that will JUST install the gapps on my gtab. I've got the necessary files from a previous thread: [url said:
http://forum.xda-developers.com/showthread.php?t=827209[/url]
Click to expand...
Click to collapse
not sure why you are reading an old/closed thread when that thread actually directs you to the currently stickied thread:
http://forum.xda-developers.com/showthread.php?p=9257637

tullywork said:
FIRST: I know that there are custom ROMs and this has been done via root/etc. I want as vanilla of a gtab as possble (i've tried the TnT Enhancement pack and I have all sorts of issues w/ viewing mp4 files and the device locking up 'Scanning the SD card' that I don't have w/ the OTA updates)
I'm trying to create a custom update.zip that will JUST install the gapps on my gtab. I've got the necessary files from a previous thread: http://forum.xda-developers.com/showthread.php?t=827209
I've created a directory struction w/ update\system (with the files in the gapps zip from the thread) and update\META-INF\com\google\android with an update-script that says:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
I zip it up and sign it:
java -classpath testsign.jar testsign my1stupdate.zip update.zip
then I go to install it, have the \recovery with the command file that says "--update_package=SDCARD2:/update.zip" and it looks like it's installing it fine (get the standard square status screen with the install package icon looking like its going to install) until within a second or two I get the triangle with the exclaimation point in the middle and it reboots (package never gets installed)
what am I missing? anyone provide some insight into how I can figure out what happened to troubleshoot further?
Thanks in advance.
-Deniz
Click to expand...
Click to collapse
so what you want is a stock rooted rom with gapps? I wanted the same exact thing, if this is what you wanted let me know and I will let you know how i did it

1st: thanks for the replies.
I looked at the CyanogenMod update.zip and it has 33 different apks that get installed, which again, I don't want all the 'garbage' just gapps (they've got twitter, facebook, carhome, htc email/etc, passion quickoffice...etc..etc).
I've rooted it successfully and installed GApps, so I know how to get it to work successfully....i was just hoping for something easier (eg. load the update.zip on boot after doing a clean NVFlash and all the gapps stuff was there).
I was also hoping to learn a bit more about building my own update.zip and curious what I did wrong (i got pretty far along before it choked), obviously there are probably easier wasy to get this done other than building an update.zip, the learning is half the fun right?!
Thanks again for your replies/help.
-D

I do not have a gtab but a advent vega and believe they are similar.
I made a update.zip from the market_update.zip. Just added the apps i wanted to system/app folder in the zip file, and flash from the software update tool. Not sure if my edited one will work on the gtab because it has the advent vega framework to give a small taskbar.
Original thread: http://forum.xda-developers.com/showthread.php?t=931337
I have posted the original unedited one, hope it helps you out

Related

All-In-One Auto-Root Script

I made this for all the people that seem to be having issues with rooting their phone, installing the recovery partition, and installing the new rom.
This is an all-in-one package. It's about 200MB. Includes the original root rom, recovery image, the new rom (2.1OTA rom that was just released today), as well as a few extras. It's a batch script to automate the entire process.
Here's the README file:
Code:
These are automated scripts to root your Eris phone with Android 1.5 (NOT 2.1 LEAK!!!!!)
YOU NEED THE ANDROID SDK IN ORDER FOR THIS TO WORK!
If you don't have the SDK working, visit guide on the forums for instructions.
INSTRUCTIONS:
Unzip this file to your \tools\ directory of your Android SDK. Then run one of the following files:
install_root.bat
------------------------
This script will do the following:
1) Install the root image onto your phone
2) Install the recovery partition onto your phone
3) Install the current rom using the recovery partition
install_extras.bat
------------------------
This script will do the following:
1) Install live wallpapers
2) Install the Nexus Launcher
3) Install the Nexus photo gallery
4) Remove HTC Lockscreen
5) Install wireless tethering
NOTE!
------------------------
1) NOT ALL LIVE WALLPAPERS YOU FIND IN THE MARKET WILL WORK!
2) You cannot use the Nexus photo gallery when in the Nexus Launcher, it will crash
These scripts were put together by GrdLock.
Credit for all of the included files goes to ivan, amon, jcase, and everyone else
who chipped in!
Install this by unzipping it into your \tools\ directory of your Android SDK, then run install_root.bat.
I'm not running Windows so I didn't test this, but I proof read it like 10 times, and I'm 99.99% sure it should work 100%. If anyone gets any errors using it, post and I'll fix them immediately. Make sure USB debugging is turned on before running it.
You can download the whole package here: http://www.multiupload.com/Y7UC8UU2JE
-------------------------------------------------------------------
If you just want the 2.1OTA rooted rom, you can download that here: http://www.multiupload.com/YP1BIUOF60 (this rom includes busybox, the otacert fix, and a few other minor things)
I also put together an update. This will update you to the new 2.1 OTA leak "official" without wiping. Wipe your dalvik and that's it. Do a nand backup first though just incase! http://www.multiupload.com/3OPZCD6NRA
GrdLock said:
I made this for all the people that seem to be having issues with rooting their phone, installing the recovery partition, and installing the new rom.
This is an all-in-one package. It's about 200MB. Includes the original root rom, recovery image, the new rom (2.1OTA rom that was just released today), as well as a few extras. It's a batch script to automate the entire process.
Here's the README file:
Code:
These are automated scripts to root your Eris phone with Android 1.5 (NOT 2.1 LEAK!!!!!)
YOU NEED THE ANDROID SDK IN ORDER FOR THIS TO WORK!
If you don't have the SDK working, visit guide on the forums for instructions.
INSTRUCTIONS:
Unzip this file to your \tools\ directory of your Android SDK. Then run one of the following files:
install_root.bat
------------------------
This script will do the following:
1) Install the root image onto your phone
2) Install the recovery partition onto your phone
3) Install the current rom using the recovery partition
install_extras.bat
------------------------
This script will do the following:
1) Install live wallpapers
2) Install the Nexus Launcher
3) Install the Nexus photo gallery
4) Remove HTC Lockscreen
5) Install wireless tethering
NOTE!
------------------------
1) NOT ALL LIVE WALLPAPERS YOU FIND IN THE MARKET WILL WORK!
2) You cannot use the Nexus photo gallery when in the Nexus Launcher, it will crash
These scripts were put together by GrdLock.
Credit for all of the included files goes to ivan, amon, jcase, and everyone else
who chipped in!
Install this by unzipping it into your \tools\ directory of your Android SDK, then run install_root.bat.
I'm not running Windows so I didn't test this, but I proof read it like 10 times, and I'm 99.99% sure it should work 100%. If anyone gets any errors using it, post and I'll fix them immediately. Make sure USB debugging is turned on before running it.
You can download the whole package here: http://www.multiupload.com/09DM1FI1D1
md5: 535c300411cd47acd319e667fee8cf16
-------------------------------------------------------------------
If you just want the 2.1OTA rooted rom, you can download that here: http://www.multiupload.com/5HH0H1M4T1 (this rom includes busybox, the otacert fix, and a few other minor things)
md5: 6d95e5e8846c6912fda42c54daa0cb34
I also made a kernel-only update that can be flashed without wiping anything: http://www.sendspace.com/file/5ptpmc
md5: cc4e95034dc7e8adaa776483251952bf
Click to expand...
Click to collapse
Thanks....I will be using this on the wifes (soon to be mine) phone tonite as with the new OTA update I now feel my phone is stable enough for her not to freak out over
appreciate your work....
does the script disable OTA's ?
rvpartsguy said:
Thanks....I will be using this on the wifes (soon to be mine) phone tonite as with the new OTA update I now feel my phone is stable enough for her not to freak out over
appreciate your work....
does the script disable OTA's ?
Click to expand...
Click to collapse
Yes, I built the otacert fix into the rom.
Thanks for all your work grid, and all the others that have worked on this. Just got a new refurb the other day and was going to tackle rooting this weekend, gonna make the task so much easier.
Can you please explain what was fixed? Thanks again for your work.
The current rom is a rooted rom using the new 2.1 leak that was just released today, which is SUPPOSEDLY the "official" 2.1 update from Verizon.
What setting should be used for the phone, HTC Sync, USB, Mount SD, or nothing?
Nothing. Just connect it to your USB, and enable USB debugging. Don't mount your sdcard.
Does the market work now?
(I recall hearing that the market wouldn't work because of the test/dev certificate that was in the leaked rom)
The market will work if it doesnt work now, itll work when the OTA comes out.
Grd, this looks fantastic. I've been patient so far, and haven't upgraded to the leaked or original rooted 2.1 builds, but with the news of the latest one (and initial reports saying that it's mostly bug-free), I'm ready to take the plunge. This should be a huge help to me.
A couple of questions:
Does the big package (the 200MB one) include jcase's ROM (bare-bones basic), or yours with the tweaks? I ask because you mentioned removing pdfviewer, which I use.
Also, has anyone else gone through this process yet? Call me timid, but I'm not too keen on being the first one.
K0CAW said:
Grd, this looks fantastic. I've been patient so far, and haven't upgraded to the leaked or original rooted 2.1 builds, but with the news of the latest one (and initial reports saying that it's mostly bug-free), I'm ready to take the plunge. This should be a huge help to me.
A couple of questions:
Does the big package (the 200MB one) include jcase's ROM (bare-bones basic), or yours with the tweaks? I ask because you mentioned removing pdfviewer, which I use.
Also, has anyone else gone through this process yet? Call me timid, but I'm not too keen on being the first one.
Click to expand...
Click to collapse
It includes my rom. You should be able to restore pdfviewer if you need it though. I can post the files in a bit.
Great. I was pretty sure that the apps could be reinstalled if needed, but wanted to confirm. I'm downloading the package now, so I'll keep you updated. I'm pretty excited about this, since I'm still at stock 1.5.
Issues, Well first It copied the PB image fine, it didnt reboot the phone i had to manually do it with vol -, now im on step two installing amons image, it transfers but it cant start files\flash_image, no such file or directory and then it cant chmod it cause its not there.
Could you copy/paste the command prompt text you're seeing? (you gotta right-click the cmd window and select Mark)
Installing Amon's Recovery Image.
1545 KB/s (3926016 bytes in 2.480s)
cannot stat 'files\flash_image': No such file or directory
Unable to chmod /system/bin/flash_image: No such file or directory
flash_image: not found
-
Finished
Your phone will now reboot and test the recovery partition.
Press any key to continue . . .
Ahh, crap...
http://www.sendspace.com/file/obtx2w
Download that file, put it in the \tools\files\ directory, then try again and let me know.
I think I got delete-happy removing some temp files and deleted flash_image by accident.
Worked great
I just went through the install.bat file and everything worked 100% just as promised. I have not installed any of the extras yet. Thanks for the great work!
flash_image was it worked a treat its in amon_ra now was trying manually and came across it missing, went to post it and you had just now
One suggestion before letting adb copy the 2.1 rooted img to the phone have it delete the PB so users dont accidently click on it. Just a lil cleanup to help things out. So far its flashing 2.1 rooted I will let you know about the first error, ill go back through it again and get it to recreate.

Error after sign Zip Files. "Can't find update script"

I followed each one of your steps. I get an error when trying to install the signed zip. "Can't find update script" Can anyone please help me with this.
thank you
I'm doing option 2. I get it signed just get an error "Can't find update script"
This quick guide will teach you how to sign ROMs!
WARNING : YOU WILL NEED AT LEAST A BASE KNOWLEDGE OF HOW TO USE COMMAND PROMPT.
The knowledge of signing ROMs can prove useful to anyone! By knowing how to sign ROMs, you can modify your favorite ROM to add or delete APKs, so when you flash the ROM your favorite apps will be present! Or you can delete apps you don't use so they will not be installed when flashing the ROM!
Before starting, you need a couple of things. First you will need Java SE Development Kit and Java SE Runtime Environment . You can download them HERE.
After you have downloaded and installed both, you will need a very useful tool made by someone at XDA-Developers (if you know who it is please let me know).
Download this tool (attached) and unzip everything inside of it into one common folder. I personally unzipped everything into my Android SDK folder.
Signing
Now run the autosign.bat. You will have to go through commands 1(Set PATH variable for SDK) ,2 (Set CLASSPATH variable for signing tool) and 3 (Install registry entries). They are very easy to use and just follow the instructions. If you are asked to confirm and/or replace a file, always select yes!
Now you are finally ready to sign! There are two options to sign the .zip
1)Find the ROM (.zip) and right click and select "Resign Zip". If you use this option a command prompt box should quickly appear and disappear.
OR
2) Using the Autosign.bat, select option 4, and then write the directory and file name of the ROM. For example,
D:\Android\ROMs\YourROMHere.zip
It will hang for a bit at the part where it says "signing", and then it should say something along the lines of "Successfully completed if no errors above"
If this helped you, comment below!
http://androidforums.com/developer-101/8665-how-signing-roms.html
Anyone...... I know someone knows
You have to zip the contents of the rom, not the rom itself. i.e. if you sign the rom folder, it will be ROM_Signed.zip->ROM->system/data/metainf... you get the picture. Go into the folder you want to zip and then sign, select the contents, and zip them. It will then be ROM_Signed.zip->/system/data/metainf. Then just sign it.
update-script is a script that tells the flash utility what to do. It is located in the zip as part of the following directory structure:
META-INF/com/google/android
The contents can vary. For Darktremor A2SD 2.6.1, here's the contents:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
PACKAGE is used by android to reference the actual zip file, or package file.
SYSTEM is used to represent /system
DATA is used to represent /data
CACHE is used to represent /cache
BOOT is used to represent the boot partition (which is where you flash boot.img)
RECOVERY is used to represent the recovery partition. Never actually seen this used. I guess it used for an update.zip that you would flash via fastboot.
The zip file has to be structured in the same way as the file system on your phone. If you want to install something to, say, /system/bin, you must have a system folder, which in turn has a bin folder.
What I would do is take one of the available ROMs and unzip it. Then look for their update-script. Usually ROM packages are more detailed in the update-script.
If you don't have update-script in your zip file, the flash utility in recovery won't know what to do.
networx2002 said:
I followed each one of your steps. I get an error when trying to install the signed zip. "Can't find update script" Can anyone please help me with this.
thank you
I'm doing option 2. I get it signed just get an error "Can't find update script"
This quick guide will teach you how to sign ROMs!
WARNING : YOU WILL NEED AT LEAST A BASE KNOWLEDGE OF HOW TO USE COMMAND PROMPT.
The knowledge of signing ROMs can prove useful to anyone! By knowing how to sign ROMs, you can modify your favorite ROM to add or delete APKs, so when you flash the ROM your favorite apps will be present! Or you can delete apps you don't use so they will not be installed when flashing the ROM!
Before starting, you need a couple of things. First you will need Java SE Development Kit and Java SE Runtime Environment . You can download them HERE.
After you have downloaded and installed both, you will need a very useful tool made by someone at XDA-Developers (if you know who it is please let me know).
Download this tool (attached) and unzip everything inside of it into one common folder. I personally unzipped everything into my Android SDK folder.
Signing
Now run the autosign.bat. You will have to go through commands 1(Set PATH variable for SDK) ,2 (Set CLASSPATH variable for signing tool) and 3 (Install registry entries). They are very easy to use and just follow the instructions. If you are asked to confirm and/or replace a file, always select yes!
Now you are finally ready to sign! There are two options to sign the .zip
1)Find the ROM (.zip) and right click and select "Resign Zip". If you use this option a command prompt box should quickly appear and disappear.
OR
2) Using the Autosign.bat, select option 4, and then write the directory and file name of the ROM. For example,
D:\Android\ROMs\YourROMHere.zip
It will hang for a bit at the part where it says "signing", and then it should say something along the lines of "Successfully completed if no errors above"
If this helped you, comment below!
http://androidforums.com/developer-101/8665-how-signing-roms.html
Click to expand...
Click to collapse
HeroMeng said:
You have to zip the contents of the rom, not the rom itself. i.e. if you sign the rom folder, it will be ROM_Signed.zip->ROM->system/data/metainf... you get the picture. Go into the folder you want to zip and then sign, select the contents, and zip them. It will then be ROM_Signed.zip->/system/data/metainf. Then just sign it.
Click to expand...
Click to collapse
It took my brain a min, but i got it.
Thanks

[ROM DUMP] Viewsonic Stock 3389

Anyone able to post a system dump of a GTablet that is stock with the latest OTA applied? I want to look at the stock framework and see about creating my own custom ROM - I am coming from the Android phone dev environment and would love to start putting together a custom ROM and/or themes
Thanks in advance.
jerdog said:
Anyone able to post a system dump of a GTablet that is stock with the latest OTA applied? I want to look at the stock framework and see about creating my own custom ROM - I am coming from the Android phone dev environment and would love to start putting together a custom ROM and/or themes
Thanks in advance.
Click to expand...
Click to collapse
Download here: http://tapntap.http.internapcdn.net/tapntap/viewsonic/update-smb_a1002-3389-user.zip
Unpack system.img with unyaffs, a binary exists for both windows and linux on the web.
Might have to run as admin in windows: unyaffs.exe system.img
Linux: chmod +x unyaffs
./unyaffs system.img
rothnic said:
Download here: http://tapntap.http.internapcdn.net/tapntap/viewsonic/update-smb_a1002-3389-user.zip
Unpack system.img with unyaffs, a binary exists for both windows and linux on the web.
Might have to run as admin in windows: unyaffs.exe system.img
Linux: chmod +x unyaffs
./unyaffs system.img
Click to expand...
Click to collapse
Thanks! It's what I needed. wasn't sure if that update was one that completely started over or just patched what existed.
Their updates are complete system.img wipes, so 3389 is a good starting point.
roebeet said:
Their updates are complete system.img wipes, so 3389 is a good starting point.
Click to expand...
Click to collapse
In the Android phone arena, we see more update.zip's that are applied via a custom recovery (CW or AmonRA) since we haven't fully cracked (most) system recoveries. Here it looks like any update.zip can be used with the system recovery...
We also don't flash system images, instead we format the SYSTEM partition and then copy the new system or data package over via:
copy_dir PACKAGE:system SYSTEM:
copy_dir PACKAGE:data DATA:
What are the parameters for creating an update.zip for this? What signed process is needed with the system recovery?
What custom roms are you familar with? I really like Apex on my droid x
jerdog said:
In the Android phone arena, we see more update.zip's that are applied via a custom recovery (CW or AmonRA) since we haven't fully cracked (most) system recoveries. Here it looks like any update.zip can be used with the system recovery...
We also don't flash system images, instead we format the SYSTEM partition and then copy the new system or data package over via:
copy_dir PACKAGE:system SYSTEM:
copy_dir PACKAGE:data DATA:
What are the parameters for creating an update.zip for this? What signed process is needed with the system recovery?
Click to expand...
Click to collapse
Unsure what you are saying exactly. Since they don't have to be signed, I hardly ever mess with it. Most of mine have been canabalized stock update.zip's, like you downloaded.
Also, typically we have had better luck with updater-script(updater-binary required and found in your downloaded 3389 update) format/syntax compared to the update-script one.
lilgotti56 said:
What custom roms are you familar with? I really like Apex on my droid x
Click to expand...
Click to collapse
On the Evo, there's (to name a few):
- Myn's
- Azrael X
- Calkulin's EViO
All have taken the stock, and removed as much bloat as is possible and then added in enhancements that make use of the full capabilities of the phone, etc.
rothnic said:
Unsure what you are saying exactly. Since they don't have to be signed, I hardly ever mess with it. Most of mine have been canabalized stock update.zip's, like you downloaded.
Also, typically we have had better luck with updater-script(updater-binary required and found in your downloaded 3389 update) format/syntax compared to the update-script one.
Click to expand...
Click to collapse
That is great they don't need to be signed - much easier to put together.
What has been the issue with the update-script process?

[Solved]Hulu for Gingerbread?

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

[GUIDE] Fix "assert failed: apply_patch_check" error

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.

Categories

Resources