[DIY GUIDE] Create a personalized ROM yourself! [UPDATED: 28-07-2014] - Sony Cross-Device General

Introduction
After releasing my 'Update to .253' thread, I've figured it is something you might want to do your self, maybe because you like to use your own created FTF, or even want to modify your ROM a bit before flashing. This guide will help you through it, as secure and successful as possible!
Anyone can do it!
There is no need to unlock your bootloader to work this guide, however it did help me out of some sticky situations myself, as long as you keep a cool head while working on your ROM, you'll be able to get out of any situation.
The XDA mantra: MAKE BACKUPS!
Before you do anything on your phone, make sure you create a solid backup first. As CWM and TWRP both do not backup your internal storage, create a backup of it's contents too before trying to install your very own ROM.
Prerequisites
Flashtool version 0.9.x.x (the latest) - Windows / Linux / Mac
Needed to flash your phone, also needed to create the FTF bundle. The Linux version is already installed in the VM but you can download any other version too, to do the flashing and FTF building before hand in a desktop enviroment you are accustomed to.
[GUIDE] Download ANY firmware customization from Sony & create an FTF with Flashtool
This thread will help you make an FTF file for your DIY project, as we already have this excelent thread I will save myself the trouble of creating a guide for that
VMWare Player (76Mb) (Free for non-commercial use) and [NUT]'s UbuntuHost VM (Bittorrent: 4.84Gb)
The VM you download is OK to use on any 4.1.2 ROM as base.
If you wish to use a 4.2.2 ROM, you will need the DIYGuide UPDATE PACKAGE 1 (Bittorrent: 169Mb).
If you wish to use a 4.3 or 4.4 ROM, you will be needing DIYGuide UPDATE PACKAGE 2 (Bittorrent: 159Mb). Flashtool however needs to be updated to 0.9.15.0 if you are going to build a 4.4 ROM
See the index below for the link to the guide post that explains how to use it.
This you will need for the tricky bits, as modifying a ROM is safer on a Linux host with less chances of breaking file permissions. As most of the world around us uses Windows, I've created a VM to support you in your tasks. I've installed the Linux tools you need, for me this VM works just fine.
The VM needs about 10Gb space on your pc and you need around 1Gb of free RAM when trying to use it smoothly.
This VM also contains a build script, simple but effective, which will create the (unsigned) flashable zip for you, grabbing all the files it needs along the way and giving you time to edit what ever you want during the building process.
I've made sure you have fastboot and adb commands to be found in the PATH variable, and that the connection to most android phones and tablets will most probably work just fine. You can do adb and fastboot commands to your phone without having them in the directory where you keep the files, easy to use!
The VM has one user, which is called XDA Community. To log in on Ubuntu, use the following credentials:
User: xda
Password: xdauser
This user has SUDO privileges, so expect to type that password again when prompted to do so while installing packages or even when running the rombuilder script.
Download and install WinRAR or 7Zip to be able to unpack my VM.
Included in the ROM you will build using this DIY Guide
Your DIY ROM will be rooted with SuperUser (or SuperSU when you used an update package), including the reboot fix. It will also include XZDualRecovery 2.3 RELEASE (or newer if you used an update package). So you will end up with a cool ROM!
Extra's
You will be able to use my AROMA ROM Mutator package to fix your JB 4.1 ROM if anything might fall to pieces in the future regarding root. You'll also be able to use it to make the switch from SuperUser to SuperSU using the mutator, if you might change your mind in the future.
Guide Index
Chapter 1: Introduction and Prerequisites
Chapter 2: Installing VMWare Player and getting 'UbuntuHost' running
Chapter 3: Preparing the FTF for NOOB use
Chapter 4: Preparing and Extracting the ROM
Chapter 5: Building the (unsigned) flashable ZIP
Chapter 6: Installing your DIY ROM
Addendum: How to replace the recoveries to suit your device
Addendum: How to update your VM
Frequently Asked Questions

Installing VMWare Player and getting 'UbuntuHost' running
I'm assuming you have downloaded the VMWare Player application suitable for your system. Installing it is a basic knowledge to most Windows users, so I'm not going to elaborate on the actual installation.
I'm also assuming you have downloaded the VM. You can now unpack it to your Documents folder.
Now, fire up VMware player and when you see the following...
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Then click on 'Open a Virtual Machine' and navigate to the folder you just extracted:
Click on the UbuntuHost.vmx and confirm the choice. You'll end up with this view:
Now you can either double click on the name in the list on the left or click play on the right to start it.
Remember, the password is xdauser
NOTE: This Ubuntu has the Unity interface which means, among other things, the menus are moved from the application window to the top bar. Move your mouse over it and the menus will appear.
And you are ready for the next chapter!

Preparing the FTF for NOOB use
Why would you do that? Well... to make sure you won't screw up flashing the wrong bits and make it erase your userdata... better safe then sorry!
This step is actually also needed to unpack the system partition from the FTF you created using the guide I put in the OP.
Copy the FTF you created to the VM by dragging the file in to the VM window. You can see Ubuntu recognizes it as a ZIP, which it essentially is.
Open it by double clicking on it.
Now delete userdata.sin, cache.sin and appslog.sin from it. Then drag system.sin to the DIY Guide folder on the desktop. Once it's unpacked, delete system.sin from the FTF as well.
That was easy, wasn't it? Lets move on to the next chapter.

Preparing and Extracting the ROM
Click on the Terminal icon on the left, type 'cd FlashTool' and then './FlashTool'.
NOTE: Use 'sudo' and your password you used to login to run FlashTool as root if you run in to problems.
In the Tools menu, you can select Sin Editor, select the system.sin in your DIY_Guide folder in your home.
Then click 'Extract data' to start the extraction, now go get a cup of coffee, this might take a while
Once it's done you will end up with a file called 'system.ext4' inside your DIY_Guide directory.
Click Close and close FlashTool using the orange X in the top left corner.
You can rename it to something you like but it should end with '.ext4' to allow the scripts to recognize it. Just open up the DIY Guide folder on the desktop and right click on the system.ext4 file and choose 'Rename'. For purpose of demonstration I renamed mine to 'nuts.ext4'
NOTE: The scripts allow for more then one flashable system to be created, so you can repeat the above multiple times, just remember to rename the system.ext4 to something else, otherwise you'll just end up overwriting the same file over and over again
Because of size considerations, the virtual disk is not really big (10Gb) so you'll run out of space fairly quickly, do not forget to empty the trash after this step!
That's it for this chapter, lets move on!

Building the (unsigned) flashable ZIP
Now we can open the Terminal by clicking on the icon on the left with the '>_' sign in the 'monitor'. Change directory to DIY_Guide and type 'ls -la' to show the following
You can start the build process using the rombuilder script by typing './rombuilder' and it will ask you for your password before it starts.
Once it successfully mounts the system partition it will open it for you. The script will pause for you to complete whatever modifications you want to do to it. Remember the XDA Mantra? Well... a backup would be good to make right now.
If you have more then one system.sin extracted, the above process will repeat itself until it passes all the various .ext4 files it has found.
NOTE: The mounted ext4 image has been mounted as root and as the contents are owned by root, you will need to sudo your actions when modifying the contents!
Tip: To make it easy on yourself you can use the terminal to open a file manager running as root. Type ctrl+shift+t, this will open a new terminal tab. In there type 'sudo nautilus' which starts the file manager again, but with an appropriate warning at the top of the explorer window, that one will be running as root. Be careful, you might wreck your entire VM if you mess things up big!
Once you are finished with the modifications or just enter through to the next bit, it will pack up the system partition and repeat or when done it will continue to create a flashable ZIP for each of the different .ext4 files you created.
You're almost done! Lets move to the next chapter...

Installing your DIY ROM
FOR 4.1.2 ROM's:
Before doing these steps, remember to have any recovery installed on your phone if you are doing this with a locked bootloader, otherwise you won't be able to flash the zip you've built!
Put your '$NAME.flashable.zip' on (the external) SDcard;
Put the 'FTF' inside the FlashTool/firmwares folder;
Create a backup of your phone in CWM or TWRP and don't forget to backup the contents of 'SDCard0';
Flash everything in the 'FTF' to your phone and boot the phone straight to recovery after that;
NOTE: If you have an unlocked bootloader, you CAN flash the kernel, but you do not need to, to keep your custom kernel.
Flash '$NAME.flashable.zip' in recovery (Works in both CWM and TWRP!)
Reboot to system without clearing (dalvik-/)cache.
And you're done! :victory:
FOR 4.2.2 AND 4.3 ROM's:
Before doing these steps, remember to have any recovery installed on your phone if you are doing this with a locked bootloader, otherwise you won't be able to flash the zip you've built! You will need XZDualRecovery 2.5 BETA or newer to make this work.
NOTE: This guide assumes you are coming from a 4.1.2 ROM. If you have a 4.2.2 ROM already installed, you can skip this one and use the above guide.
Put your '$NAME.flashable.zip' on (the external) SDcard;
Put the 'FTF' inside the FlashTool/firmwares folder;
Create a backup of your phone in CWM or TWRP and don't forget to backup the contents of 'SDCard0';
Flash '$NAME.flashable.zip' in TWRP, then TURN YOUR PHONE OFF AFTERWARDS - DO NOT BOOT IT YET!
Flash everything in the 'FTF' to your phone;
Now boot to system without clearing (dalvik-/)cache.
And you're done! :victory:

Addendum: How to replace the recoveries to suit your device
Download XZDualRecovery specific for your device, the flashable package to be precise.
Drag the file to the VM window and open the zip. You will see 2 folders in there, traverse in to system/bin where you will see the files you need most.
Open the DIY_Guide on the VM's desktop, traverse to updater/system/bin and drag all the files from the zip in to this directory, replacing all the files already in your VM and you are set to go
On the Xperia Z Ultra, Z1 Compact, Z1 and (Tablet) Z2, don't forget to copy the disableric file from the tmp folder inside the recovery zip to the updater/system/xbin folder. Forgetting to do so will cause your system partition to be not fully accessible from the fully booted ROM.
For completeness, you could copy the dr.prop file inside the zip to the updater directory too: this will ensure people downloading your package will know what XZDR version was included.

Addendum: How to update your VM
The update package 1 contains the following:
FlashTool 0.9.11.0
XZDualRecovery 2.5 BETA
The Remount-Reboot fix
Superuser has been replaced by SuperSU
IMPORTANT NOTE: This update makes your flashable ZIP assume you are updating from a 4.1.2 ROM to a 4.2.2 ROM. So the resulting flashable ZIP will move the contents of your internal storage to the new 4.2.2 location. If you are creating a package to go from a 4.2.2 ROM to a 4.2.2 ROM, you will need to edit the updater-script to stop it from doing that
Code:
ui_print(" Moving contents of the internal storage to it's new location...");
ui_print("");
ui_print(" NOTE: This may take a while!");
ui_print("");
run_program("/sbin/busybox", "mv", "/data/media", "/data/temporary");
run_program("/sbin/busybox", "mkdir", "/data/media");
run_program("/sbin/busybox", "mv", "/data/temporary", "/data/media/0");
set_progress(0.850000);
Remove the above portion from updater/META-INF/com/google/android/updater-script using gedit and you're set! :fingers-crossed:
The update package 2 contains the following:
Flashtool 0.9.13.0
SuperSU 1.86
XZDualRecovery 2.7.62.
How to update:
Download the update package from the link in the OP;
Open the Home directory in the VM on the bar on the left;
Drag the file in to the home directory straight from your host PC's location where you stored the downloaded package;
Remove the FlashTool and DYI_Guide folders or rename them (to rename, right click on them to get the menu with the rename option);
Now open the diyvm-update.tar.gz, drag the 2 folders in to the Home directory.
All done! :good:

Frequently Asked Questions
Q: Could I use this for any other Xperia device?
A: Sure you can! The proof is starting to pop up now and then
Just make sure you put in the right recovery pieces to support your specific device
Q: Am I allowed to release my ROM to the public?
A: Of course! I only require a simple mention or a humble thank you in your topic, where ever that may be. I like to know where my work travels to, so post or PM me the links to it
Q: Am I allowed to change the updater script to suit my needs?
A: You are allowed to change whatever you wish, I have NO copyright or license stuck to my work, simply because I consider anything with a license or copyright not to be 100% pure open source.
Q: I would like to make a ROM for my device, but there is no XZDualRecovery for it?
A: Try to integrate a recovery package available for your device. You can of course also request XZDR support, but it can take some time before that happens.
Q: I want to expand the storage capacity of the VM, is there any guide for that?
A: Yes, @gregbradley posted one here.
Q: My VM disk is slowly filling up, while I am keeping the trash empty, how come?
A: @GavTheStoner found out why, read his post on the subject and the solution he found.

Would be very useful! Thank you for the nice and clear guide!
Could you please also provide the script and other files needed such recovery etc. ? The whole VM image is large...

Fishmanzero said:
Would be very useful! Thank you for the nice and clear guide!
Could you please also provide the script and other files needed such recovery etc. ? The whole VM image is large...
Click to expand...
Click to collapse
No
It's not hard to find parts in my releases...
Sent from my C6603 using xda app-developers app

Great guide! Thanks a lot for this!
Gesendet von meinem Xperia Z via Tapatalk

Don't suppose anyone's come up with a way to rebuild to FTF?
Would love to be able to do that and just load with FlashTool.

Johbremat said:
Don't suppose anyone's come up with a way to rebuild to FTF?
Would love to be able to do that and just load with FlashTool.
Click to expand...
Click to collapse
Me too, but unfortunately that's just impossible... Sorry
Sent from my C6603 using xda app-developers app

Great Guide
Thanks for sharing - I was able to create my own deodexed and zipaligned 10.1.1.A.1.307 firmware. I tweaked it a bit so it doesn't reboot when changing system to R/W.
Next I'll try creating one for the Japanese 10.1.D.0.343 build

I was able to create a working 10.1.D.0.343 build for the SO-02E variant using your guide. Is it cool with you if I upload it and share it for our Japanese friends? I'll give you credit of course. :good:

lancebukkake said:
I was able to create a working 10.1.D.0.343 build for the SO-02E variant using your guide. Is it cool with you if I upload it and share it for our Japanese friends? I'll give you credit of course. :good:
Click to expand...
Click to collapse
Of course you can
If I didn't want you to release it to the public I'd have that explicitly stated in the OP ... which I haven't, so go right ahead! :good:
--- ON A DIFFERENT NOTE ---
I'll be updating the VM soon to reflect the changes in the updater script, the remount-reboot fix and the latest XZDualRecovery.
I'll also make a tar archive with a little guide in one of the reserved posts to help you update your VM so you won't have to download it all over again

Thanks!
But its possible to create a ROM out of a CWM Backup on Windows.. I.E. thats more simple
Thanks for the VM though

jader13254 said:
Thanks!
But its possible to create a ROM out of a CWM Backup on Windows.. I.E. thats more simple
Thanks for the VM though
Click to expand...
Click to collapse
I know it is, but that is basically a TAR backup and requires a few extra steps: flashing the FTF to your phone, then booting to recovery to make that backup, dragging that to your PC and stripping the META info from the nandroid backup process adds to the TAR (which makes it a non-standard tar archive!) and you still risk losing all permissions and ownership information on the files inside the archive when extracting that to integrate it in your flashable zip... which is a ZIP and does not know about the extended file permissions and ownership from a Linux system... so you will have to make your updater-script reset permissions or instruct your users to do so using recovery... :silly:
Using this VM and my method of using the SIN file to extract a ROM prevents a huge heap of possible issues and keeps the updater-script nice and small and the installation a breeze

[NUT] said:
I know it is, but that is basically a TAR backup and requires a few extra steps: flashing the FTF to your phone, then booting to recovery to make that backup, dragging that to your PC and stripping the META info from the nandroid backup process adds to the TAR (which makes it a non-standard tar archive!) and you still risk losing all permissions and ownership information on the files inside the archive when extracting that to integrate it in your flashable zip... which is a ZIP and does not know about the extended file permissions and ownership from a Linux system... so you will have to make your updater-script reset permissions or instruct your users to do so using recovery... :silly:
Using this VM and my method of using the SIN file to extract a ROM prevents a huge heap of possible issues and keeps the updater-script nice and small and the installation a breeze
Click to expand...
Click to collapse
I just used a nice tool called "yaffey" which keeps the file structure and I set permissions via updater-script.
Works really fine but may be more difficult
Reall great way though and big thanks for this guide

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

[Guide][HOW TO]Install a GNU/Linux and tools to make Custom ROMs

HOW to install a distribution of GNU/Linux and configure the necessary tools for the development of ROMs
Autores: TugaPower aka danieldmm e porfirio
Firstly, it is important to say that GNU/Linux is open source software / free, robust, reliable, free and easy installation for any user, even if you have few computer skills.
There are dozens of distributions of GNU/Linux, all available free at: http://distrowatch.com/, so choose that of your choice and according to the hardware capabilities of the machine will be installed where the distribution chosen by you.
The choice of authors this "HOWTO" is based on the distribution of GNU/Linux, Ubuntu 11.10, with the XFCE desktop environment and also the GNOME desktop environment. This is abolished by default the manager's main Gnome desktop environment and in its place put XFCE, to perform the daily tasks of work, which is very lightweight and fast. Or if they want to be more direct, Xubuntu and will soon install from scratch, which will get the same results. Personally, I'm a fan of this graphical environment (XFCE), attending to its lightness, speed, customization, etc..
What will be explained in this HOWTO:
1. Install Ubuntu or any other distribution, such as: Xubuntu, manager native XFCE desktop environment, Kubuntu, manager native KDE graphical environment; Lubuntu, manager native LXDE graphical environment, which uses less hardware resources on the machine all present in this work. Basically, we are always talking about Ubuntu, what changes is only the GUI (Graphic User Interface), where the user goes to work.
2. The process of installation and basic configuration for any of these variants, it is always the same.
3. Do not expect to find in this work, the whole process complete installation and configuration. Only the main roads and where possible, with visual aids. However there are situations so redundant, that does not need that same help. Not the purposes of this HOWTO, other possible configurations, eg setup SAMBA, APACHE, a home FTP server, desktop, etc..
4. Let's begin as follows:
4.1 Installing Ubuntu on dual boot with WIndows 7 via USB Universal Installer;
4.2 From the field 16 is a normal installation via live DVD of Ubuntu (Xubuntu, Kubuntu, Edubuntu, Lubuntu).
4.3 Installing and configuring the basic tools for the development of ROMs for the Android operating system (smartphones) on GNU/Linux.
4.4 Some illustrative examples of these tools in place to obtain "cooked," ready to use for users.
GETTING STARTED
1. Installing Ubuntu on dual boot with WIndows 7 via USB Universal Installer.
1.1 To start this process, you must be made to download an image of the Ubuntu operating system for the machine architecture, or x86 (for CPU 36 bit) or x64 (for 64-bit CPUs).
1.1.1 However, this day, there is some controversy on this subject. Some say that if the machine has 4GB of RAM or more, we always use the 64 bit version, even if the CPU is x86 and also say that if the machine has less than 4GB of RAM, we use the 32 bit version regardless of the CPU is x36 or x64.
NOTE: Rarely, modern computers, whether desktops, laptops, at least have at least 4GB of RAM standard. However, do not relinquish that each CPU (x86 or x64), must have the OS corresponding to your architecture. Therefore it is up to each one choose the best option.
2. ISO Images
2.1 Ubuntu 02.01 11.10 (32bit)
2.2 Ubuntu 02.02 11.10 (64bit)
3.Universal USB Installer
3.1 Now we do download the appropriate version of the distribution, we will have to download the USB Installer: www.pendrivelinux.com/downloads/Universal-USB-Installer/
But what is the purpose of this installation process?
3.2 Firstly, we can be a machine, you have not installed a drive read / write CD / DVD.
3.3 Secondly, avoid using a CD or DVD drive for installation.
4. Run the USB Installer, as Administrator of the OS and this not to happen errors during the copy of the OS to the thumb drive. This procedure is performed as follows:
- Click on the icon of the program with the button on the right mouse button and select Run as Administrator option.
5. After installing the USB Installer, run the program and click on I Agree.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
6. Now we set the distribution of GNU/Linux, we will be using. I choose Ubuntu 11.10.
7. Now calm down! I hope you remember where it was saved the iso image of Ubuntu! Only then will the USB Installer will be able to recognize and perform the installation on the pen drive. Will normally be in downloads.
8. Insert the flash drive and expect it to be recognized by Windows. In this case explanation, their location is in F.
9. At this point, we select the Format F: Drive to FAT32.
NOTE: If you wish, can create a little more memory to the pen, in case it is likely to change. This is an optional. If your interest, as it is put in the picture.
Now we have everything configured properly, we will click Creat.
10. At this point you will get a WARNING message. All contents of pen drive will be erased. Click YES and continue.
11. Now it is time for a coffee, etc., etc. and wait for the installation process to complete. After this step, we will be ready for installation on the computer distribution.
11.1 While the above task does not end, we can and must perform other actions, such as creating a partition for the Ubuntu operating system.
11.2 Let's Start Menu;
11.3 Clicking the right-click Computer and then Manage;
11.4 Now on the left menu, click Disk Manager;
Arrived here, the C partition, let's click and select Shrink Volume.
12. Let us wait quietly, and very soon we will be faced with the option to reduce the partition chosen. For a minimal installation of Ubuntu, will require approximately 10 GB. However, if we want to later install the updates, music, videos, etc. ... recommend 25 GB. To be closer to the 25GB, 26GB put!
13. The next step is to reduce and click new partition will be marked in black. We will then activate this partition:
13.1 Click on the partition, with the right mouse button and select New Simple Volume.
13.2 Click Next> Next> and choose a letter to the new drive (eg U).
13.3 Now let's change the Volume Label. Put Ubuntu.
13.4 Next Run. We have created the partition and active.
NOTE: Wait now that Universal USB Installer program in the following screen appears indicating that the installation was completed and then click Close.
14. Restart the computer.
15. Immediately press F12 and select USB stick and then press ENTER.
15.1 will appear something like this:
Calm ..... very quiet .... Choose the option Install Ubuntu on a Hard Disk.
16. Now it is like to install via DVD, which I dispense to comment on "How to install Ubuntu 11.10 per DVD." See 4.2 The field from the field 16 is a normal installation of Ubuntu live via DVD.
16.1 After appearing Choose Setup Language, Portuguese choose and click Next. (You pick the language that you anderstand)
Preferably, you must have a fast Internet connection, so that the OS be upgraded soon. In the situation of not being currently available internet connection, do not put the "seen". No problem your installation will proceed smoothly. You can do it later.
17. Then will click on: One more thing, in order to choose the partition for installation.
18. CAUTION ... CAUTION!
18.1 In this field, we have all the possible CARE! The Windows partition can die!
18.2 Should be selected before the partition created in Windows (which is named Ubuntu), and then click Modify. After selecting the partition that was created on Windows (Ubuntu). In the new partition size, and put 21,000 Mount Point select /. After running OK.
The aspect should be this:
19. Now let us take the remaining space in the example 1490MB. Click Modify, and followed by the option Use as we choose and swap area and click OK.
It should be something like this:
20. Next, click Install Now and wait ......
21. Choose the location of the user:
22. Now the installation of the default keyboard ....
23. Enter personal information and click Continue.
24. Installation completed. Reboot the PC.
25. And Behold .....
Choose from the boot menu option Ubuntu .... There is also the option Windows ... Choose!
26. I chose .... Ubuntu with the Gnome GUI!
7. There is a method, also very reliable, to expedite this process, but directed to Mint distribution, which can be obtained here: community.linuxmint.com/tutorial/view/744
NOTE: TugaPower friend and colleague, will use the Mint 12 in the process of compiling ROMs. (In this case S2 i9100 ROM 4.0.3 ICS)
Version used: Linux Mint x64 12 vKDE
Download Links: http://blog.linuxmint.com/?p=1927
4.3 Installing and configuring the basic tools for the development of ROMs for the Android operating system (smartphones) on GNU / Linux.
4.3.1 Installing the JAVA
Open the Synaptic package manager and install the openjdk-7-jdk and mark their dependencies:
Approval for the changes made​​:
Download the required files:
Installation of the necessary files and OpenJDK 7:
Now we have to install JAVA on the machine fully realized, we will proceed to their inspection.
To do so open the command line terminal to write the following command: java-version
4.3.2 Check if the package is installed 7zip more specifically p7zip-full, if not select for installation:
Once this is done we can then proceed with the installation of the Kitchen.
4.4 Installing the Kitchen
4.4.1 Initial Procedures
All information to carry out this section were collected on: forum.xda-developers.com/showthread.php?p=5626292#post5626292
Therefore, our choice falls on dsixda Android's Kitchen (Support Several devices)
(The Custom ROM made in this Guide its based to the Galaxy S2 i9100)
Download link of Kitchen: http://github.com/dsixda/Android-Kitchen/archives/master
Informational Page on Kitchen: http://forum.xda-developers.com/showthread.php?p=5626292#post5626292
After these preliminary procedures have been performed, we proceed to next steps.
By default, you will be allocated in the Downloads folder files.
4.4.2 Click on the file up with the right button of mouse and perform the extraction of the file to the Downloads folder:
4.4.3 Change the file name for kitchen (it's easier to work).
4.4.3.1 Move or Copy to folder or Personal Home:
They should stick with a structure like this:
4.5 Perform download the ROM Stock
NOTE: I personally recommend two sites:
http://forum.xda-developers.com/showthread.php?t=1075278
http://www.sammobile.com/firmware/?page=3&t=1&o=1&m=GT-I9100&r=1#regional
Download the ROM to be used in Kitchen, in this case we use the XDA, specifically the XWLP7:
NOTE: The screenshot references XWLP4 because at that time had not XWLP7
4.5.1 Download the kernel corresponding CF-root (This way remains CWM Recovery Busybox and SuperUser GB, if ICS SuperSU depends the kernel used to cook the ROM.
4.5.2 Download the kernels on CF-root: http://forum.xda-developers.com/showthread.php?t=1103399
NOTE: This case will be used the latest available to ICS, the CF-root-SGS2_XX_OXA_LPS-v5.4-CWM5.zip
NOTE: It is already available in the XDA KERNEL CF ROOT XWLP7.
4.5.3 Copy the file from the ROM inside the Kitchen to the folder original_update
4.5.3.1 If the file is in the form *******. Tar.md5 have to remove the. Md5 so that it only ********. Tar
After these steps have been made ​​in all its fullness, then we have all the necessary files to start our cooked
4.5.4 Some illustrative examples of these tools in place to obtain "cooked," ready to use for users.
4.5.4.1 In order to run our furnace we have run the Kitchen in a command line also known as terminal or console, for it will open a command prompt within the folder Kitchen:
In order to execute the Kitchen just run the following command as root sudo. / Menu in the terminal:
6. First thing to do is point 1 or set a folder where we work. In this process the Kitchen will get to select and give the stock ROM original_update previously placed in the folder, simply enter the next screen and then select the ROM list:
Therefore, we select the first option because we only have a ROM in the kitchen, so just to enter a default because it's one
6.1 In the kitchen will then ask if we want to keep the name.
This name stock is organized as follows: WORKING_DATA_HORA, this can be changed to whatever you want, the only thing required is to keep the WORKING_
In this case I press the button to change the name ye WORKING_XWLP7_TugaPower:
To continue then just press Enter.
7. The kitchen will start the process of extracting the file from the ROM to the folder with the name we gave earlier WORKING_ ********
In this process we have to decide if we want to use the CSC (NET configuration and applications) that are included with the Stock ROM or NO.
By default this is set to YES ...
Thus, we can, because the Kitchen gives the following list of apks existing CSC and if we add the folder WORKING_ *****
Remember that in most cases, there is no problem in using the CSC Stock ROM, just advise not to use the apks the CSC because they are essentially propaganda NETWORK, which can be set to follow in the next menu to the Kitchen already well default to not add the apks:
Ready to the next step?
8. After the CSC will appear in the information regarding the boot.img, here we select the letter n because for the effect of Custom ROM do not need!
9. Then will come the question if we want to see information about the ROM.
This option is your choice will; default is Y. I personally put n. Now let's return back to the first screen which means that the necessary files are all ready ....
10. In this field, you may want to check whether there is a need to use option 2 and 3.
10.1 In the case of using the KERNEL Stock are advised to do option 2 and 3.
If the kernel you are going to use is for example the CF ROOT or any other that already have root then there is necessary to make the option 1 and 2.
10.2 In this case I will use the CF KERNEL, we will open the zip file of CF ROOT Kernel, find a file ****.tar, opening the file we find the zImage (KERNEL), selecting the zImage we proceed to the extraction process to the working folder of the Kitchen, in this case to the folder: Working_XWLP7_TugaPower
A new window will appear saying that the file already exists, just select and replace the existing ...
11. We will now switch to the Kitchen 7. Kitchen is a default to NO WIPE ROM, option 7 serves to change this ...
12. In this case I do WIPE version, you just will access option 7 in the next field and put y:
12.1 This procedure will eventually lead back to the main menu of the Kitchen. Now we have to think whether we want a ROM or deodexed ODEXED Stock ...
12.2 If we use a version ODEXED we can switch to the option 99 which will be explained below, because I'll use this version deodexed and before passing the option will be option 0 99: ADVANCED OPTIONS
IMG]http://i.imgur.com/XtfZp.png[/IMG]
13. Here I select option 11 to deodexed ROM:
13.1 Now we need one more aspect to consider: what kind of ROM, if GB or ICS.
In this case as I am using a ROM ICS will change the level of API's Kitchen and they default to GB, so I'll use the v
14. Then I confirm that I change the level of the API key y.
In this case I set the API level to 15 which corresponds ROM will be concerned that I'm using ICS 4.0.3:
14.1. Now set the API, I will proceed to the DEODEX ROM for option b, which is advised, because this way, will deodexed the system / app and system / framework.
15. Will be asked if you want a log deodex, this is your charge, if you put y, a file will be created in the root folder of the Kitchen with Deodex process, this log can be used to screen for possible errors that occur in deodexed; I always use the log file because the design is not great and always give way if there are problems in deodexed.
16. After this step made ​​the Kitchen will carry out the relevant technical Deodexed ROM:
17. Now just wait, if you can go for a coffee or a cigarette because it still takes a bit if they do not get any errors and the process goes well deodexed will be presented the following screen:
18. Pressing the Enter, go to the submenu of Kitchen Advanced Menu.
We will then press 0 to return to the main Kitchen; next step we change the name of the build of the ROM (this information that appears in the menu on the About the Phone.
18.1 For this press the key 8 from the Main Menu of the Kitchen, in which case I will change to XWLP7 Stock by TugaPower:
http://i.imgur.com/I6ZXw.png[IMG]
19. Press Enter, then we will change back to the Main Menu Kitchen, now is the time better, create CWM zip file for flashing the ROM :)
19.1 For this we will then press the Option 99:
[IMG]http://i.imgur.com/eYhj4.png
NOTE: Because you are beginning to learn how to make Custom ROMs recommend the first option which is already the default and that the Kitchen, then just do enter in the respective options that appear to the end:
Until we reach the end of file creation can change the name of it, this is the last question that makes the kitchen:
Done this you can find the ROM inside the OUTPUT folder in the Kitchen ...
You only need to copy to the memory of the phone and make the flash.
Have a good cooked and good flash
ROM that was created in TUTU --->
XWLP7 Stock By TugaPower
a hell lot of screenshots, foolproof guide, really great one for beginner
Thanks.. Must have !!
Thanks fool proof, full of screens and has each and every detail.
:thumbup:
randommmm said:
a hell lot of screenshots, foolproof guide, really great one for beginner
Click to expand...
Click to collapse
aditya_7298 said:
Thanks fool proof, full of screens and has each and every detail.
:thumbup:
Click to expand...
Click to collapse
Thanks guys...
Cheers
wow really Great Guide.....................

[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&A] [MOD]Stock SystemUI and Stock Firmware DXMD1[DEODEXED] for GT-S6102

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.

[HOW TO] DeOdex YOUR lollipop Rom

How to DeOdex YOUR 0A6 Rom.
I would like to note that I appreciate all the work that developers have put forth in creating and maintaining modified Roms. there are some awesome feature rich implementations available. My intentions are not to be critical of any specific Rom or mod. Without the developers we would have nothing.
Firt off, Let me explain why I'm writing this guide of sorts. I've always enjoyed an essentially stock ODEXED rom with a minnimum of tweaks.
When 0A6 arrived with ART support odexing is not currently possible. I attempted to use prepared deoxed varietys but there was always something that was a dealbreaker for me. I have nothing against features but a ROM completely loaded with bells and whistles tends to allow bugs and stability issues creep in. and the requirements to wipe 15 times and do a clean flash while singing a gregorian chant just to get it to boot didn't settle well with me.
Using one of the DeOdexed varietys, I was having problems with duplicate apk's being created in /data/app and erronoius Play store updates compounding this issue. There was also an issue with Private Mode and a variety of FC's. In frustration I reverted to a stock rooted configuration and my phone was rock solid.
BUT, I really missed a few mods that I had grown very accustomed to having namely,
5-Way Reboot
Hotspot Mod
PRL Write
Extra Toggles
So instead of trying to install clean why not create a way for me to Custom DeOdex *MY* rom? and not have to start from scratch everytime allowing a dirty flash without creating some crazy stability issue.
This method is very common knowledge I thought I'd just explain it in an easy to understand way.
Here is what you need.
A stock 0A6 ROOTED configurated phone. Debloat as needed. Set the phone up exactly how you like it with apps and such.
Make sure it's stable. (If you have issues before DeOdexing they will be there afterward!)
Here's the files you may need to make this happen
LBD2.4.zip
7-Zip
Installer template (at end of post)
1> Make sure ADB is working on your computer. USB debugging turned on. Create a folder to store your soon to be download system files and launch a DOS shell from that working folder. Working folder name should NOT contain spaces. With the phone hooked up you should be able to type adb shell and get a prompt.
2> Type these commands
adb pull /system/app app/
adb pull /system/priv-app/ priv-app/
adb pull /system/framework framework/
This will take awhile and you will be left with three folders
Create a new folder named "system" and place these three folders inside.
3> Extract and launch LBD2.4 (This is the DeOdexer and is AWESOME). Point it at your recently created "system" folder and let it do it's thing.
I'll assume this will occur without errors as I have never had any.
4> At this point you can manually apply modded apk's to the system folder but I don't really recommend it. They can be applied afterward using the seperate installer zips.
5> with 7-Zip installed open the provided Installer template. Do not Extract it. Just open it in the 7-Zip file browser using the right click context menu in windows.
Drag-Drop the contents of your system folder into the empty system folder in the 7-Zip browser It should be the three folders previously created but now they are Deodexed. Close the 7-zip file manager and select Yes if it asks you to save.
Note: The provided installer template has been modified to only wipe and replace the three system directories.
6. Copy the created installer to your sdcard and install with recovery. Wipe cache and Dalvik before rebooting.
Go have lunch. You will sit at a boot screen for about 10 minutes. Then another 20 to rebuild caches. Time varies.
7. Your system will now be Deodexed! At this point you can install your mods one at a time, I recommend this so you can test your system between installs to determine if a specific mod is creating problems.
This method has so far removed ALL of my stability issues.
The InstallerTemplate is valid for other devices? E.g. Samsung S4.
Thanks.
quinielascom said:
The InstallerTemplate is valid for other devices? E.g. Samsung S4.
Thanks.
Click to expand...
Click to collapse
I, too, would like to know if I can use this on my Note 4 (N910G).
Now I haven't used adb in a while but every time I try to run 'adb pull /system/app app/' it runs for about 4 seconds then quits. Then I try to run any other command and it says the device is offline. I have everything up to date, so I'm at a loss right now.
EDIT: So I couldn't get adb to work right so I pulled the folders using ES file manager then copied them to my PC. When I run the deoxeder I get two errors, Invalid Application Directory -"Application folder and Rom folder should not have spaces" and Error -"Invalid Rom Folder"
EDIT: I had a space at the end of a folder title, currently running, will test, and report back.
stuck
stuck on boot :S s5 g900h
so confused, i dont know what to do
I am on a Sprint Samsung Galaxy S5 running stock lolipop 5.0. I want to deodex my Rom so that I can intall xposed. After 8 hours I am practically in tear because absolutely NO-one can help
I dont know what to do for Rom System Path. I followed alll the instruction to detail and eveytime I click run it tells me that there is no space or something.. Here is the path I have no idea whre to go from here
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The rom system path would be what you did in step two:
2> Type these commands
adb pull /system/app app/
adb pull /system/priv-app/ priv-app/
adb pull /system/framework framework/
This will take awhile and you will be left with three folders
Create a new folder named "system" and place these three folders inside.
So you would click 'browse' then go to the system folder you made and place the other three folders in.
Pulling files via adb gave me errors, so I downloaded it by root explorer
Now I'm deodexed, thanks a lot
daswahnsinn said:
The rom system path would be what you did in step two:
2> Type these commands
adb pull /system/app app/
adb pull /system/priv-app/ priv-app/
adb pull /system/framework framework/
This will take awhile and you will be left with three folders
Create a new folder named "system" and place these three folders inside.
So you would click 'browse' then go to the system folder you made and place the other three folders in.
Click to expand...
Click to collapse
Zhekin said:
Pulling files via adb gave me errors, so I downloaded it by root explorer
Now I'm deodexed, thanks a lot
Click to expand...
Click to collapse
How have you guys replaced back the three deodexed folders???
Sent from my Samsung Galaxy S3 GT-i9300 using Tapatalk 4
PIRATA! said:
How have you guys replaced back the three deodexed folders???
Sent from my Samsung Galaxy S3 GT-i9300 using Tapatalk 4
Click to expand...
Click to collapse
There's an update zip in the OP's first thread. Now that being said I have a Note 3 and haven't tried it yet. Been a little busy but I have a complete deodex'd the three folders w/o errors.
Boot loop. SM-G900M
I got stuck on boot scrren, and my recovery can't format cache partition in the recovery.
daswahnsinn said:
There's an update zip in the OP's first thread. Now that being said I have a Note 3 and haven't tried it yet. Been a little busy but I have a complete deodex'd the three folders w/o errors.
Click to expand...
Click to collapse
Did you pulled with device rooted or not? Is it the same to pull with root or no root?
I am doing that now with no root and I had some skipping special file 'xxxxxxx.so' at the beginning of pulling the /app/ folder.
Is that ok??
PIRATA! said:
Did you pulled with device rooted or not? Is it the same to pull with root or no root?
I am doing that now with no root and I had some skipping special file 'xxxxxxx.so' at the beginning of pulling the /app/ folder.
Is that ok??
Click to expand...
Click to collapse
I couldn't get ADB to pull the folders/files so I used a root file explorer. So, yes I did use a rooted device. I don't know if it's the same as if it weren't rooted but it should be. I would say some files may not get pulled for some reason but I'd retry. I'm not a dev so I'm not much help. I tinker with things until I other break it or make what I what work.
daswahnsinn said:
I couldn't get ADB to pull the folders/files so I used a root file explorer. So, yes I did use a rooted device. I don't know if it's the same as if it weren't rooted but it shouldn't be. I would say some files may not get pulled for some reason but I'd retry. I'm not a dev so I'm not much help. I tinker with things until I other break it or make what I what work.
Click to expand...
Click to collapse
Mmmh.... but I've read that a lot of people does it without rooting.....or not??
About your situation, have you extracted the same exact folder so, right?
Tnx.
tiago.rici said:
I got stuck on boot scrren, and my recovery can't format cache partition in the recovery.
Click to expand...
Click to collapse
I used Root Explorer and did a manual copy of these folders (instead use adb pull). And worked!
Now I'm waiting 1st boot.
---------- Post added at 02:57 PM ---------- Previous post was at 02:49 PM ----------
Zhekin said:
Pulling files via adb gave me errors, so I downloaded it by root explorer
Now I'm deodexed, thanks a lot
Click to expand...
Click to collapse
How long have you waited on boot scrren? I'm about almost 20 minutes and still nothing. :fingers-crossed:
problems with the process on my SM-T530NU with stock 5.0.2 ROM
Hi,
Sorry to bother you, but if its not too much trouble, can you please answer a few questions for me about the deodex process?
I tried to adb pull the 3 system folders, /system/app, /system/framework, and /system/priv-app, but some of the files gave me an error on copying. So I tried copying them with es explorer to my external SD which worked OK.
Next, I tried copying the 3 folders to my PC. I copied the correct amount of files (894), but the amount of directories went down from 1013 to 506. Is this correct?
I then tried running the folders through ldb 2.5. most of the files were successful, but there were a few which failed. (Maps, services, and a few others.) is this OK? Can I still use the output to burn to my Tab4?
Thanks for any help that you can give.
Motisu
motisu said:
Hi,
Sorry to bother you, but if its not too much trouble, can you please answer a few questions for me about the deodex process?
I tried to adb pull the 3 system folders, /system/app, /system/framework, and /system/priv-app, but some of the files gave me an error on copying. So I tried copying them with es explorer to my external SD which worked OK.
Next, I tried copying the 3 folders to my PC. I copied the correct amount of files (894), but the amount of directories went down from 1013 to 506. Is this correct?
I then tried running the folders through ldb 2.5. most of the files were successful, but there were a few which failed. (Maps, services, and a few others.) is this OK? Can I still use the output to burn to my Tab4?
Thanks for any help that you can give.
Motisu
Click to expand...
Click to collapse
I've just ben informed test the correct way should be to extract those folders from a stock firmware downloaded.
Other method but risky, as you could also get extra apps not natively born with your device, is to copy them or pull them from recovery using a file manager like Aroma File Manager or TWRP integrated file manager, or use adb from recovery.
Other "while system is running" methods are not preferred as they could give errors back.
Cheers.
Sent from my Samsung Galaxy S3 GT-i9300 using Tapatalk 4
PIRATA! said:
I've just ben informed test the correct way should be to extract those folders from a stock firmware downloaded.
Other method but risky, as you could also get extra apps not natively born with your device, is to copy them or pull them from recovery using a file manager like Aroma File Manager or TWRP integrated file manager, or use adb from recovery.
Other "while system is running" methods are not preferred as they could give errors back.
Cheers.
Sent from my Samsung Galaxy S3 GT-i9300 using Tapatalk 4
Click to expand...
Click to collapse
OK, I did exactly as you recommended and got exactly the same result. I used the advanced file manager in TWRP recovery to make copies oof the 3 subfolders and then copied the copies to my PC. I got exactly the same results. still missing folders and getting errors in LBD.
motisu said:
OK, I did exactly as you recommended and got exactly the same result. I used the advanced file manager in TWRP recovery to make copies oof the 3 subfolders and then copied the copies to my PC. I got exactly the same results. still missing folders and getting errors in LBD.
Click to expand...
Click to collapse
Use Total Commander for transferring in Windows ambient.
It's good also for coping from micro-sb to hard-disk.
Enable hidden files!
Sent from my Samsung Galaxy S3 GT-i9300 using Tapatalk 4
thank you
Thank you very much for this well detailed explanation. I am not developer. It took me 2 wks searching, working on how to deodex my rom untill finally found this tutorial. It help me a lot.???

Categories

Resources