[Q&A] [MOD]Stock SystemUI and Stock Firmware DXMD1[DEODEXED] for GT-S6102 - Galaxy Y GT-S5360 and Duos 6102 Q&A, Help & Troubl

Q&A for [MOD]Stock SystemUI and Stock Firmware DXMD1[DEODEXED] for GT-S6102
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [MOD]Stock SystemUI and Stock Firmware DXMD1[DEODEXED] for GT-S6102. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!

De-odexed!!!
Well, here again, hmm, it looks like the main problem with my swipe to remove is that I don't have a fully deodexed ROM(Xduos V3) which is why it's not working. sigh, and I was preparing myself to go for the hard way.
Guess my questions are answered here as for now.
marcussmith2626
Click to expand...
Click to collapse
will meet again.
New question
Can I save the little space I have in internal storage with a deodexed rom? deodexed rom is going to solve my issues with the rom's UI but I am concerned as to what effect it will have on my sgy performance?

billysam said:
Well, here again, hmm, it looks like the main problem with my swipe to remove is that I don't have a fully deodexed ROM(Xduos V3) which is why it's not working. sigh, and I was preparing myself to go for the hard way.
Guess my questions are answered here as for now. will meet again.
New question
Can I save the little space I have in internal storage with a deodexed rom? deodexed rom is going to solve my issues with the rom's UI but I am concerned as to what effect it will have on my sgy performance?
Click to expand...
Click to collapse
If the rom is odex you will see .odex files in system/app and framework
To deodex follow these steps
Requirements
Pc
Android kitchen
Cygwin
Rooted phone with Busybox & terminal emulator
Winrar
Notepad++ (different from the windows notepad)
Alot of patience & a little knowledge
Please note I'm writing this from memory - some steps may vary
First root your phone & install Busybox (open app & click install) from the playstore
Also install terminal emulator
https://play.google.com/store/apps/details?id=stericson.busybox
https://play.google.com/store/apps/details?id=jackpal.androidterm
Set your screen timeout to 30mins
Open terminal emulator
Type the following (a new line represent push enter after the line before)
Su
tar -c system/* >> sdcard/system.tar
Note it may take around 5mins to complete - You will know it's done when the prompt cursor returns
This will copy your phones system folder to the root of your site
card and call it system.tar
Copy this tar file to your pc
Next head to this thread
http://forum.xda-developers.com/showthread.php?t=2195858
Download and install Cygwin and Android kitchen
There is a YouTube video which explains how on the thread so watch it
This is the part I can't remember exactly from memory
You need to setup a working folder - I can't
remember if you place the tar file in the rom folder in the kitchen directory or you unzip it & copy it to a working folder - that thread will say
Start Cygwin as administrator (right click on icon & run as administrator) if you get a load of errors turn off your antivirus
Navigate to your kitchen folder (you can bring up a list of folders by typing ls and type cd to change directory
Type ./menu
Kitchen will start
You have the option to create a working folder which will look in the rom folder - if a tar file is acceptable it will extract your tar into a working folder - can't remember if that's how you do it
Next goto advance (or extra options can't remember what it says)
Goto deodex
You need to change the api level so it matches your Android version
Now you are finally ready to deodex
Deodex both folders
Once done build the rom (lazy mode options should be fine Think it signs rom create scripts & so on)
Once it's built collect your rom zip
Now download any custom stock rom - maybe hyperion 9 for 5360
Open your rom zip with winrar
Delete boot.img if present
Goto meta-inf folder and I think it's in com/google/andoid
Delete the update binary and replace with the one from hyperion9
Next open extract the updater script from both roms from the same folder the binary way in
Open them both in notepade++
Replace everything in your script above where the symlinks start with what is written in the hyperion9 one
Save & copy this script back to your rom zip meta in folder replacing the one that is there
Copy zip to sd card
Go into Cwm
Create a nandroid backup
Format system data cache
Mount system data cache
Flash your rom zip
Error codes
Status 0 wrong update binary
Status 6 error with updater script
Hopefully there will be no errors and it will flash and when you restart you will have a fresh deodexed rom
You can go into Cwm and advance restore data only
This should restore your contacts sms and app data
For extra storage create a 2nd ext partition on your site card in Cwm (note that this will format your ad card so copy it's contents to a pc then copy back once done)
Once you have a 2nd ext partition you can download link2sd from the playstore and link apps to sd card - you can also use the app to uninstall bloatware from the system
Note you will need to use a kernel that supports ext and try ext4 first from the link2sd menu that will pop up & work your way back up if that fails
I don't normally post such a long explanation but I'm feeling generous - anything else please research yourself

Very Much Appreciated
marcussmith2626 said:
If the rom is odex you will see .odex files in system/app and framework
To deodex follow these steps
Requirements
Pc
Android kitchen
Cygwin
Rooted phone with Busybox & terminal emulator
Winrar
Notepad++ (different from the windows notepad)
Alot of patience & a little knowledge
Please note I'm writing this from memory - some steps may vary
First root your phone & install Busybox (open app & click install) from the playstore
Also install terminal emulator
https://play.google.com/store/apps/details?id=stericson.busybox
https://play.google.com/store/apps/details?id=jackpal.androidterm
Set your screen timeout to 30mins
Open terminal emulator
Type the following (a new line represent push enter after the line before)
Su
tar -c system/* >> sdcard/system.tar
Note it may take around 5mins to complete - You will know it's done when the prompt cursor returns
This will copy your phones system folder to the root of your site
card and call it system.tar
Copy this tar file to your pc
Next head to this thread
http://forum.xda-developers.com/showthread.php?t=2195858
Download and install Cygwin and Android kitchen
There is a YouTube video which explains how on the thread so watch it
This is the part I can't remember exactly from memory
You need to setup a working folder - I can't
remember if you place the tar file in the rom folder in the kitchen directory or you unzip it & copy it to a working folder - that thread will say
Start Cygwin as administrator (right click on icon & run as administrator) if you get a load of errors turn off your antivirus
Navigate to your kitchen folder (you can bring up a list of folders by typing ls and type cd to change directory
Type ./menu
Kitchen will start
You have the option to create a working folder which will look in the rom folder - if a tar file is acceptable it will extract your tar into a working folder - can't remember if that's how you do it
Next goto advance (or extra options can't remember what it says)
Goto deodex
You need to change the api level so it matches your Android version
Now you are finally ready to deodex
Deodex both folders
Once done build the rom (lazy mode options should be fine Think it signs rom create scripts & so on)
Once it's built collect your rom zip
Now download any custom stock rom - maybe hyperion 9 for 5360
Open your rom zip with winrar
Delete boot.img if present
Goto meta-inf folder and I think it's in com/google/andoid
Delete the update binary and replace with the one from hyperion9
Next open extract the updater script from both roms from the same folder the binary way in
Open them both in notepade++
Replace everything in your script above where the symlinks start with what is written in the hyperion9 one
Save & copy this script back to your rom zip meta in folder replacing the one that is there
Copy zip to sd card
Go into Cwm
Create a nandroid backup
Format system data cache
Mount system data cache
Flash your rom zip
Error codes
Status 0 wrong update binary
Status 6 error with updater script
Hopefully there will be no errors and it will flash and when you restart you will have a fresh deodexed rom
You can go into Cwm and advance restore data only
This should restore your contacts sms and app data
For extra storage create a 2nd ext partition on your site card in Cwm (note that this will format your ad card so copy it's contents to a pc then copy back once done)
Once you have a 2nd ext partition you can download link2sd from the playstore and link apps to sd card - you can also use the app to uninstall bloatware from the system
Note you will need to use a kernel that supports ext and try ext4 first from the link2sd menu that will pop up & work your way back up if that fails
I don't normally post such a long explanation but I'm feeling generous - anything else please research yourself
Click to expand...
Click to collapse
Well, thank you for your valuable time and efforts in getting me involved to the basics. your generosity is very much appreciated, I am on my path to research it all myself.

Related

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

[UPDATE 22/08/12] ROM Cooking Guide (One Package)

This is how I made ROM, I'll try to write the steps as simple as I can. For advanced users only!
Update 22/08/11:
Revised packaging steps.
Update 13/08/11:
Removed unwanted method for ROM cooking.
Update 04/08/11:
Modified extract and repack ROM guide and added extracting system.rfs guide.
Things you need:
Base firmware
Archiver software (7zip recommended)
Any Linux environment to build ROM or Cygwin
APK Manager to optimize and decompile *.apk files
MagicISO (Optional) if you want to extract system.rfs
And the last thing is... You need enough experience in android world
So, here is the steps to cook a ROM:
Flash your phone with your desired base firmware
Make required modifications
Pull system.rfs from your phone by running this command on adb shell or Terminal Emulator:
Code:
dd if=/dev/stl12 of=/sdcard/system.rfs
Extract any *.tar.md5 files from your base firmware to your working folder with 7zip
Replace the current system.rfs with your modified one
EDIT: Pack your ROM by running this code via terminal or just pack it with 7zip/WinRAR as *.tar
Code:
tar -H ustar -c * >> ROMNAME.tar
change ROMNAME to your desired, well, ROM name.
Here is (yet) useful guide to modify your ROM.
Extract system files on system.rfs to make modding easier:
Extract PDA file (*.tar.md5) files with 7zip
Open system.rfs with MagicISO
To extract it, just drag and drop
NOTE: Never edit your ROM with MagicISO because the file permissions will be ignored, use MagicISO only for extracting files from system.rfs
Deodex, and Zipalign (optimize) your ROM apk files:
Ready to use deodex + root for KPN: http://forum.xda-developers.com/showthread.php?t=1196230
Ready to use deodex + root for KPH and other firmware: http://forum.xda-developers.com/showthread.php?t=1118048
Open APK Manager
To zipalign your apk files, in apk manager folder /place-apk-here-to-batch-optimize put your:
framework-res.apk, twframework-res.apk and all system apk
but not these:
AxT9IME, Calculator, Camera, Email, MMS, Phone, Screen Capture, Settings, Swype, Thinkdroid, Voice search
Choose Choose option 15
Then choose both (zp)
Let it run and done.
Now put back the apk files where they belong in the ROM.
How to put these apk files to my ROM? Copy these files to appropriate locations, such as /system/app to your ROM's /system/app, and etc.
Another handy modification guide:
Unpack and repack boot.img - http://forum.xda-developers.com/showthread.php?t=1173427
Convert firmware filesystem to ext4 - http://forum.xda-developers.com/showthread.php?t=1202049
Overscroll glow for any firmware - http://forum.xda-developers.com/showthread.php?t=1215933"
Give thanks to all dev who made that possible!
If you have more guides to put here, please PM me.
Am I pertamax?
hehe..just kidding.
Nice Info....great share.
I would want the Fla.sh Rom :'(
Thats a gr8 share...Thank you...)
saiftheboss7 said:
I would want the Fla.sh Rom :'(
Click to expand...
Click to collapse
sorry... once again, I'm sorry, I can't continue my ROM
Helpful thread man!
Thanks!
Great job taking your time to make this! Unfortunately, i dont even know the basics but now I know where to check when I do
fla.sh said:
sorry... once again, I'm sorry, I can't continue my ROM
Click to expand...
Click to collapse
Hey!
THX man, nice thread. Very useful!
Just PM to MOD, that they close you previous thread, a bout fla.sh.ROM. Or ppl just waiting it and asking.
CHEERS!
i think the most troublesome problem i encounter is to repack system.rfs. yes it can be mounted in magiciso, but howto repack/compile it back?
an0nym0us_ said:
i think the most troublesome problem i encounter is to repack system.rfs. yes it can be mounted in magiciso, but howto repack/compile it back?
Click to expand...
Click to collapse
Just save it.
didnt work when i just save it. my device got bootloop
an0nym0us_ said:
didnt work when i just save it. my device got bootloop
Click to expand...
Click to collapse
What modification you've added to your ROM? Maybe that modification causing the problem...
fla.sh said:
What modification you've added to your ROM? Maybe that modification causing the problem...
Click to expand...
Click to collapse
As Linux, MagicISO read RFS image as a FAT filesystem. File permissions can not be maintained. A better way but need linux:
1. Mount system.rfs as FAT and mount it to /tmp/rfs
2. Make ext4 image, and mount it to /tmp/system
3. Copy /tmp/rfs contents to /tmp/system
4. Make modification inside /tmp/system
5. Fix file permissions inside /tmp/system
6. Umount both image
7. Make ODIN flashable image, contains system.rfs (now in ext4 format) and CF-Root-S5830 boot and recovery image (for ext4 support)
8. Boot to Windows and flash your new firmware using ODIN.
ketut.kumajaya said:
As Linux, MagicISO read RFS image as a FAT filesystem. File permissions can not be maintained. A better way but need linux:
1. Mount system.rfs as FAT and mount it to /tmp/rfs
2. Make ext4 image, and mount it to /tmp/system
3. Copy /tmp/rfs contents to /tmp/system
4. Make modification inside /tmp/system
5. Fix file permissions inside /tmp/system
6. Umount both image
7. Make ODIN flashable image, contains system.rfs (now in ext4 format) and CF-Root-S5830 boot and recovery image (for ext4 support)
8. Boot to Windows and flash your new firmware using ODIN.
Click to expand...
Click to collapse
I use this command to mount rfs:
Code:
mount -o loop system.rfs /some_dir
Can you share us the command?
now thats really informative. thanks
ROM unpacking and repacking gude has been corrected. Tested by me. If you have any problems, just ask here.
Thanks.
I think you should add the date of update in the title, so that everyone can know about the update...
BTW thanks for this amazing guide...
Love it!!!
After making changes to system.rfs, how to save it as .rfs again?
adiles said:
After making changes to system.rfs, how to save it as .rfs again?
Click to expand...
Click to collapse
Please take look at the first page, it's updated, you know?
After I created md5 file and selected it in odin, it says "invalid image type" and "invalid model binary". How to solve that? After that I continued, skipped these errors and flashed, my phone stopped at boot screen with text "Galaxy ACE....". Plz help me

[Q] U8800 2.3 owerseas remove stock apk

Since I cant post in development section I will ask here if someone can help me. I have U8800 with 2.3 stock rom and I cant remove stock apps (swype in my case).I am rooted with DooMLoRD_v3_ROOT and SU is instaled. I did find apk file (/cust/hw/default/apk) but I am not able to remove it. I tried with titanium backup, root explorer, terminal emulator (cant find target) and with super manager.It seems like I am half rooted as root explorer cant mount rw in cust directory but works in system directory.Any idea is welcome,thank you!
You need to do it manually via adb shell. First to mount the partition as rw and then to remove it. I want to remove this file too, so I' ll try it asap.
EDIT:
I tried but this partition which is on /dev/block/loop0 cannot be mounted rw, I get a permission denied error.
.
In pinkscreen mode delete cust.image file,then delete apps with titanium backup.
We want to delete only some apps.
With your way we loose all huawei' s custom configuration, it' s like we don' t install step3.
This is not a solution.
I hope that we can find solution for this as I want to instal costum swype with my language enabled (slovenian) and can not do it untill I remove stock one. If any of you can post in development section maybe you can ask there if they know the solution for this, thank you!
I fixed it.
I deleted all unneeded apks (stock apps) that stored in cust.img
My method;
1. On Slitaz Linux 3.0
2. Open terminal
3. Copy cust.img from phone to /home folder
4. mkdir tmp
5. mount cust.img /home/tmp
6. cd /home/tmp/hw/default/app
7. Delete apk files what you don't want
8. unmount tmp
9. Copy cust.img from /home folder to phone
Ok, but I dont have linux or terminal on my computer. Is there any way to do this via terminal emulator on the phone? Or is there some step by step guide how to do it as I am not really familiar with terminal or its use.
http://www.multiupload.com/EKPGJ7EUGO
This is "cleared" cust.img. That contains only these apks;
BeyondTheSkyTheme.apk
Calendar.apk
CalendarProvider.apk
DeskClock.apk
ToolBox.apk
1. Download this rar archive and open it.
2. Start your phone in pink screen mode
3. Backup original cust.img to your computer
4. Copy "cleared" cust.img from rar to phone.
Thank you,I managed to install swype in my language and it works great. I was wondering if there is any chance to extract all factory .apk files and post them somewere so people could donload them and install them if they want. I am missing that weather clock widget but swype is far more important to me, so thank you again to make it possible.
This rar archive contains all apks that stored in cust.img -->> http://www.multiupload.com/8DWKNVTXML
Just copy apk file (which ones do you want) to "/system/app" folder and restart.
or
This is only TotemWeather.apk -->> http://www.multiupload.com/IWX7U3G5FU
Just copy to "/system/app" folder and restart.
Thank you, you are the best. Will this cust.img work with 2.3 beta which will be released this thursday according to Huawei? If not I wont update again as I just managed to adjust phone to my needs.
I hope, it will works with the new update. If not, i'll fix it when update released.
could you give us a cleared cust.img for the official 2.3.5???

[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.

[Q] dsixda android kitchen rom

As a learner, I am looking for a stock rom to build.
Is there any working DDLK2 rom that can be used in dsixda android kitchen?
I have already made a set-up on android kitchen in my linux operating system.
Can PDA_S5360_DDLK2.tar.md5 be used in the working folder?
I failed extracting this file.
I need only that rom and not any other rom.
Please reply me as soon as possible.
Also I found a trick to make a nandroid backup and use that file for developing. But I need some other way.
I am not sure whether someone had already posted this question before me. If so, attach the links.
flash stock rom on your phone
root it
install busybox (get installer from playstore)
install android terminal emulator (playstore)
open android terminal emulator
type
su
tar -c system/* >> sdcard/system.tar
after typing su press enter and grant super user then type next line
if you get error tar blablabla not found you have not installed busybox
wait about 5 mins - its a good idea to set screen timeout to 30 mins so the screen stays on whilst its doing it
you will know its finished when the command prompt returns
once done you will now have a file called system.tar on the root of your sd card
copy this file to kitchen/original_update
when you run kitchen select create working folder then select your tar file
kitchen will then create the working folder
and as a bonus the rom in the working folder will already be rooted as any changes you make before creating the tar file will be pulled
and deodex the rom in kitchen before you start making changes (make sure sdk level is set to 10)

Categories

Resources