[Tutorial][ROOT][4.3]Root your own stock 4.3 firmware - Xperia SP General

Since every "best way to root stock 4.3" guide for LB in this forum involves flashing a deodexed ROM from a region that might not be yours and taken from someone's phone that might be different from yours, I've decided to make this guide which will (I hope) help you make YOUR OWN pre-rooted flashable zip using YOUR OWN phone and an FTF for YOUR OWN region.
Just a mandatory precaution: I'm not responsible for whatever happens to you, your phone, your family, your house, your dog, your car, etc resulting from the use of this guide.
Here goes.
What's needed:
==========================
1. Your SONY Xperia SP running a rooted stock ROM. You might need to downgrade to 4.1.2 and root that.
2. A recovery. See: http://forum.xda-developers.com/showthread.php?t=2649923 (Note: I only use CWM. I have not tried Philz or TWRP.)
3. SONY PC Companion
4. Flashtool
5. su + busybox binaries
6. META-INF
7. SuperSU
8. Stock .266 kernel. You could make this yourself, but for the sake of simplicity, just use this one instead.
8b. Stock .201 kernel.
9. (Optional) be2_album for Bravia Engine fix.
The good part:
=====================
1. Follow this guide to download and make your own FTF file. This file will contain the stock firmware for your own phone and region.
2. Then follow this guide to extract the system folder, but stop at step 9.
3. Navigate to the "bin" folder inside the system folder you just extracted and delete anything that's <10 bytes in size. Those are symlinks which will be recreated automatically in the flashing process. (Ignore this step if there are no files smaller than 10 bytes. Anything larger than 100 bytes should NOT be deleted.)
4. Extract the META-INF.zip file you downloaded above and copy the META-INF Folder in the folder alongside the system folder.
5. You should now have 2 folders, META-INF and system.
6. Extract the su + busybox binaries and put them in system/xbin.
6b. (Optional) Extract be2_album and put it in /system/etc.
7. Zip the two folders (META-INF and system) using store only (no compression).
8. Congrats, you just made your own pre-rooted pure stock ROM. Copy this zip and SuperSU into your sd card and we're good to go.
How to flash:
================
This might sound familiar, because this part is the same as the other guides.
1. Boot into CWM.
2. Clear dalvik cache and wipe cache. (Optional: wipe data)
3. Flash the zip you just made.
4. Flash SuperSU.
5. Power off.
6. Flash kernel using flashtool.
7. Boot up your phone and enjoy (or not) using a ROOTED STOCK firmware that was meant for YOUR phone and not for someone else's phone in another country on the other side of the world.
8. (Optional) If you get a reboot when remounting (e.g. when using Foldermount), apply this fix.
As a side note: Memory management is kinda crappy on 4.3. Dropping dalvik.vm.heapgrowthlimit to 64m and dalvik.vm.heapsize to 96m helps somewhat, but YMMV. Please experiment on your own to find a limit that works best for you.
This guide will (in theory) work for ANY future official release as long as the partitions stay the same. I hope this will at least reduce the nagging the devs (especially DoomLord) gets for a root exploit for stock 4.3.

Nice one

Grrrreeeatt.. This what I looking for all this time..
Whereas just last night I'd stay up finding how the way to put my region stock fw flashed to my device with root via dsixda andro kitchen, but the update script f***ing my brain all day long..
5 times xperimental flashing, but nothing happen. All kind of error Stats 7, 6, 0, etc just appear..
deodexed rom is suck considering it's not came from my own region..
I will try soon..
=============================
Edit :
- in step 3, are u sure to delete <10 "bytes" file? Bcause nothing here below 10 bytes. Just 10 kb are there..
Sent from my C5302 using XDA Premium 4 mobile app

Thanks!
I have ROOT

nasroed said:
- in step 3, are u sure to delete <10 "bytes" file? Bcause nothing here below 10 bytes. Just 10 kb are there..
Click to expand...
Click to collapse
Yes, I'm sure. Ignore this step if there are no files smaller than 10 bytes. Anything larger than 100 bytes should NOT be deleted.

Okay I followed the guide step by step. I have removed anything that was 7 bytes.. The others are min 156 bytes and 178 bytes the others are going to KB. So now I have to put the SU+Busybox into Xbin, make a .zip and flash it, flash Su and kernel?
See attachment for files smaler then 10 bytes

After few flashtattemps i get installtion aborted on touch CWM and TWRP cant even find the files.
Also I got some errors due to missing paths via the updater.script. Worth taking a look there.

mrjraider said:
Okay I followed the guide step by step. I have removed anything that was 7 bytes.. The others are min 156 bytes and 178 bytes the others are going to KB. So now I have to put the SU+Busybox into Xbin, make a .zip and flash it, flash Su and kernel?
See attachment for files smaler then 10 bytes
Click to expand...
Click to collapse
Yes. The zip should contain 2 folders. META-INF and system. Can you give me a listing of what you zipped? This guide is exactly how I rooted my 4.3 and it works fine. Also, try using store only when zipping. Sometimes the recovery doesn't work with zips that are to aggressively compressed.
Sent from my C5302 using xda app-developers app

Followed the guide step by step and the problem I have is it wont flash. It says instalation aborted and there were some errors about paths?
I zipped the meta-inf and system folder.
Added to archive and seleted .zip and store.. After copying to SD and flashing I got instalation aborted.
I will try this later tho. I just need my phone in a few hours

Please send me the directory listing of what you zipped and I'll look into it.
Sent from my C5302 using xda app-developers app

quetzalcoatl2435 said:
Please send me the directory listing of what you zipped and I'll look into it.
Sent from my C5302 using xda app-developers app
Click to expand...
Click to collapse
I can also share the entire zip if you want xD

mrjraider said:
I can also share the entire zip if you want xD
Click to expand...
Click to collapse
Do whichever is easier for you. Hahaha.
Sent from my C5302 using xda app-developers app

edit:
I know the probem xD
It was a sort of my fault
zip file>firmware> meta-inf and System
There was an extra folder that did not needed to be there
Will try it later tho.

Alright back to testing.. Will flash my own zip when downgrading and rooting is done
---------- Post added at 07:22 PM ---------- Previous post was at 06:37 PM ----------
It worked!!! Thank you!
---------- Post added at 08:15 PM ---------- Previous post was at 07:22 PM ----------
http://forum.xda-developers.com/showthread.php?t=2682651

quick one question I'm on doomlord v5 and Ultimate PureXSP (.266). But got some reebots. When I change kernel to stock via flashtool my root will stay? (quite noob question :< )

Awesome - a rather clean method of rooting - inserting a modified meta-inf and su/busybox into the system file and flash it.
LocaMobile said:
quick one question I'm on doomlord v5 and Ultimate PureXSP (.266). But got some reebots. When I change kernel to stock via flashtool my root will stay? (quite noob question :< )
Click to expand...
Click to collapse
I don't think so, as there are very few and 'minor' changes to the system file...
[not going to 4.3 as I didn't like the lag - still mulling about it]
Edit: A question
For the necessary process, one needs to downgrade in order to install CWM, say .254.
If I flash the new modified system+meta-inf, plus the original .266 (kernel only), I am still on hybrid 254+266 system, yes?
[after all there are other sin files not replaced: eg loader, fota, partition, etc]

how big is the zip file after making the compression? is 1,08 GB normal?

noel_din said:
how big is the zip file after making the compression? is 1,08 GB normal?
Click to expand...
Click to collapse
So is mine...

headache59 said:
So is mine...
Click to expand...
Click to collapse
thanks, so its normal, will try in my C5302

Locked bootloader
hello...is this guide is applicable for locked boot loader also ?

Related

[Q] 3.2 root without downgrading?

hey guys!
im new with my Iconia A500. i just updated to 3.2 and found out it cant be rooted.
is there any new way of rooting it coming up without downgrading the software?
im currently on Acer_A500_7.006.03_COM_GEN1
mewan said:
hey guys!
im new with my Iconia A500. i just updated to 3.2 and found out it cant be rooted.
is there any new way of rooting it coming up without downgrading the software?
im currently on Acer_A500_7.006.03_COM_GEN1
Click to expand...
Click to collapse
Not yet. We have to wait and see.
By the way, how about a "call for dev" to the people who rooted A500 in the first place?
Not yet, but could use some help
I captured the update.zip and rooted it but can't get it to run. I'm not sure if it only works if the manufacturer signs the update.zip because I can only sign with a test certificate, trying to get this resolved.
I have to get these Iconia 500 rooted as it is fubar'ng our fleet. We root and install a sales/inventory/delivery system in /system/app and then un-root. Therefore employees can reset them all they want and not have to set them back up and they can wipe them clean of personal data when they leave the company without fubaring the company application. Deploying via the market place cannot be done (we only want employees using the app) and using 'unknown sources' isn't a solution. Plus, most of our employees easily wipe them clean all the time as they play around and learn them. Having the application in /system/app solves every one of these issues. The ACER's update nukes everything is system. Why would they not just modify their applications and leave mine alone?
Thanks to ACER, these folks just deleted out all of our applications and data because all the employees said 'yes/ok' to the update. Now who won't do that?
So, I've got several here for testing and welcome anyone's ideas because they are junk or I will have to flash them back to 3.1 and remove the ability to do updates.
Thanks
http://code.google.com/p/acer-a500/downloads/list
EDIT: changed to second set of four files (5-8)!
First 4 files on that page are a rared version of stock 3.2.
Open rar1 and it will unrar all 4. Flash the tablets with it, but I'm not sure you can unroot it afterwards?
CWM - Not loadable is it?
This uses the clockwork recovery doesn't it? You cannot load the CWM unless your have root??? What I really need is to be able to use the stock recovery.
So how do you use CWM without out rooting? Sort of a catch 22?
Now I could download to 3.1 and then install CWM and then apply the update using the modified CWM, but that sort of is a long way around isn't it?
timmyDean said:
This uses the clockwork recovery doesn't it? You cannot load the CWM unless your have root??? What I really need is to be able to use the stock recovery.
So how do you use CWM without out rooting? Sort of a catch 22?
Now I could download to 3.1 and then install CWM and then apply the update using the modified CWM, but that sort of is a long way around isn't it?
Click to expand...
Click to collapse
If you're already stuck on stock 3.2 it's your only option.
kjy2010 said:
First 4 files on that page are a rared version of stock 3.2.
Open rar1 and it will unrar all 4. Flash the tablets with it, but I'm not sure you can unroot it afterwards?
Click to expand...
Click to collapse
thanx alot bro!
im kinda new to this so...to flash the files i just paste it in my sd card as "update.zip" and then power off and then hold (power on) + (vol+)..then it should automatically happen right??
also i am currently on 3.2.. will it work?
mewan said:
thanx alot bro!
im kinda new to this so...to flash the files i just paste it in my sd card as "update.zip" and then power off and then hold (power on) + (vol+)..then it should automatically happen right??
also i am currently on 3.2.. will it work?
Click to expand...
Click to collapse
Ummm no lol, you'll have to go back to 3.1, root, cwm, and then update.
kjy2010 said:
Ummm no lol, you'll have to go back to 3.1, root, cwm, and then update.
Click to expand...
Click to collapse
ahh damn!!
i guess i gotta downgrade or just wait!
thanx alot man!!
kjy2010 said:
Ummm no lol, you'll have to go back to 3.1, root, cwm, and then update.
Click to expand...
Click to collapse
so is it possible for me to downgrade to 3.1 from 3.2 just by flashing the OTA 3.1 given in this post
[ http://forum.xda-developers.com/showthread.php?t=1113878 ]
using the default recovery?
Root for 3.2 can be done!!
From a post by eglathangion on the Developer’s Board:
Googling and surfing around the 'net, I found this repository.
Go to code.google.com/p/acer-a500/downloads/list
The latest filelist shows:
CWM_Root_Acer_A500_7.006.03_COM_GEN1.part1.rar
CWM_Root_Acer_A500_7.006.03_COM_GEN1.part2.rar
CWM_Root_Acer_A500_7.006.03_COM_GEN1.part3.rar
CWM_Root_Acer_A500_7.006.03_COM_GEN1.part4.rar
My remarks on what I did when tried this out and it worked!
1.I downloaded the (4) files, extracted them to a new folder as .zip files.
2.Copied to my ext-sdcard in a folder
3. After the (4) files were installed as described above, I then booted into Recovery and installed each one individually. After each file I DID NOT "Reboot system now", but rather chose to install the next .zip until all (4) were installed.
4. Rebooted system. All my apps were still there. The only things I did have to do is root with Iconia Root app, install Superuser and set up my e-mail accounts again. When I ran an app that required root access, I simply had to allow access with Superuser.
Everything else was there as it was before the install and everything is working great. ! Did this 3 days ago and no issues!
so, can i download these 4 files, extract into the 1 large file, put on my ext-sd renamed as update.zip and flash from clockwork?
bidniss said:
From a post by eglathangion on the Developer’s Board:
Googling and surfing around the 'net, I found this repository.
Go to code.google.com/p/acer-a500/downloads/list
The latest filelist shows:
CWM_Root_Acer_A500_7.006.03_COM_GEN1.part1.rar
CWM_Root_Acer_A500_7.006.03_COM_GEN1.part2.rar
CWM_Root_Acer_A500_7.006.03_COM_GEN1.part3.rar
CWM_Root_Acer_A500_7.006.03_COM_GEN1.part4.rar
My remarks on what I did when tried this out and it worked!
1.I downloaded the (4) files, extracted them to a new folder as .zip files.
2.Copied to my ext-sdcard in a folder
3. After the (4) files were installed as described above, I then booted into Recovery and installed each one individually. After each file I DID NOT "Reboot system now", but rather chose to install the next .zip until all (4) were installed.
4. Rebooted system. All my apps were still there. The only things I did have to do is root with Iconia Root app, install Superuser and set up my e-mail accounts again. When I ran an app that required root access, I simply had to allow access with Superuser.
Everything else was there as it was before the install and everything is working great. ! Did this 3 days ago and no issues!
Click to expand...
Click to collapse
If anyone has success with this please post. Thank you.
bidniss said:
From a post by eglathangion on the Developer’s Board:
Googling and surfing around the 'net, I found this repository.
Go to code.google.com/p/acer-a500/downloads/list
The latest filelist shows:
CWM_Root_Acer_A500_7.006.03_COM_GEN1.part1.rar
CWM_Root_Acer_A500_7.006.03_COM_GEN1.part2.rar
CWM_Root_Acer_A500_7.006.03_COM_GEN1.part3.rar
CWM_Root_Acer_A500_7.006.03_COM_GEN1.part4.rar
My remarks on what I did when tried this out and it worked!
1.I downloaded the (4) files, extracted them to a new folder as .zip files.
2.Copied to my ext-sdcard in a folder
3. After the (4) files were installed as described above, I then booted into Recovery and installed each one individually. After each file I DID NOT "Reboot system now", but rather chose to install the next .zip until all (4) were installed.
4. Rebooted system. All my apps were still there. The only things I did have to do is root with Iconia Root app, install Superuser and set up my e-mail accounts again. When I ran an app that required root access, I simply had to allow access with Superuser.
Everything else was there as it was before the install and everything is working great. ! Did this 3 days ago and no issues!
Click to expand...
Click to collapse
are you sure you are on the stock 3.2 recovery??
because as far as i know and correct me if im wrong, the 3.2 stock recovery does not give you the ability to chose which file you wish to flash. it just flashes the file "update.zip" file..
Also , just for clarification. If i do as previously mentioned to install this, will I still have clockwork recovery or will it flash he new Acer stock recovery?
bidniss said:
From a post by eglathangion on the Developer’s Board:
Googling and surfing around the 'net, I found this repository.
Go to code.google.com/p/acer-a500/downloads/list
The latest filelist shows:
CWM_Root_Acer_A500_7.006.03_COM_GEN1.part1.rar
CWM_Root_Acer_A500_7.006.03_COM_GEN1.part2.rar
CWM_Root_Acer_A500_7.006.03_COM_GEN1.part3.rar
CWM_Root_Acer_A500_7.006.03_COM_GEN1.part4.rar
My remarks on what I did when tried this out and it worked!
1.I downloaded the (4) files, extracted them to a new folder as .zip files.
2.Copied to my ext-sdcard in a folder
3. After the (4) files were installed as described above, I then booted into Recovery and installed each one individually. After each file I DID NOT "Reboot system now", but rather chose to install the next .zip until all (4) were installed.
4. Rebooted system. All my apps were still there. The only things I did have to do is root with Iconia Root app, install Superuser and set up my e-mail accounts again. When I ran an app that required root access, I simply had to allow access with Superuser.
Everything else was there as it was before the install and everything is working great. ! Did this 3 days ago and no issues!
Click to expand...
Click to collapse
DO NOT listen to this post (1 post wonder).
First off those four files are rar files that once you begin the extraction, will extract themselves into one large file. There is no way to flash those four files seperately.
Second, root and su are included in that ROM, so no need to root (as indicated in the title of the files).
Please don't Brick your device by listening to these directions!
---------- Post added at 11:16 AM ---------- Previous post was at 11:14 AM ----------
ichnach said:
so, can i download these 4 files, extract into the 1 large file, put on my ext-sd renamed as update.zip and flash from clockwork?
Click to expand...
Click to collapse
The answer to your question is YES, that's the proper way to install this ROM.
I gave the link to this on the previous page of this thread.
kjy2010 said:
DO NOT listen to this post (1 post wonder).
First off those four files are rar files that once you begin the extraction, will extract themselves into one large file. There is no way to flash those four files seperately.
Second, root and su are included in that ROM, so no need to root (as indicated in the title of the files).
Please don't Brick your device by listening to these directions!
---------- Post added at 11:16 AM ---------- Previous post was at 11:14 AM ----------
The answer to your question is YES, that's the proper way to install this ROM.
I gave the link to this on the previous page of this thread.
Click to expand...
Click to collapse
Didn't work. Got stuck at the ACER screen.
mkomarinski said:
Didn't work. Got stuck at the ACER screen.
Click to expand...
Click to collapse
Pilot error then, explain your steps please?
mkomarinski said:
Didn't work. Got stuck at the ACER screen.
Click to expand...
Click to collapse
as far as i know, if you are on 3.2 already it wont work!
mewan said:
as far as i know, if you are on 3.2 already it wont work!
Click to expand...
Click to collapse
If he's trying to flash ROMs with stock 3.2 recovery, he needs to sell his tab and get an IPad before he bricks his tab lol

[How-To] Re-Odex a Rom

Why this tutorial?
I made this tutorial for the galaxy 3, but then some user reported me that it worked on another phone, so I post this thread here again.
I wanted a good odexed rom, but there isn't any here. So I tried to make my own odexed rom, but it wasn't so good. So I read something about re-odexing and tried it out. I modified it a little bit and I don't know all about re-odexing, so if someone know something better, pls post it here in the thread for everyone. English is also not my mother language, but I hope you'll understand me
What is a odexed and a deodexed rom?
When you look at a stock rom in the folder /system/app, you will see files with the ending .odex and the apks doesn't contains classes.dex files. When you look at a deodexed rom, you'll see that there are no .odex files and the apks contains classes.dex files. Basically every apk contains a classes.dex files. Then the dalvik virtual machine generates a dalvik cache based of the classes.dex file. When you load a app, it will be loaded from the the dalvik cache, not from the apk. Samsung built the odexed rom using a tool called dexopt-wrapper. This tool generates .odex files based from the classes.dex, that means it does the same job like the dalvik vm. The .odex files were pushed in the /system. The files are the replacement for the dalvik cache. Like I wrote above, apps are loading from the dalvik cache, not from apk or classes.dex file, so classes.dex are not needed anymore, so they are deleted in odexed roms. Deodexing using xUltimate means regenerating a classes.dex based from the .odex file, merging it into the apk and deleting .odex.
What are the advantages and disadvantages from a deodexed rom?
Advantages:
-All needed things are in one apk, so modding/theming is (better) possible
-Needs less space on /system
Disavantages:
-Needs more space on /data
-Is not so stable than a odexed rom
-Slower on first boot(because a odexed rom has already execute ready .odex files, a deodexed rom needs to generate dalvik cache)
What do I need to re-odex?
-A rooted phone
-A full NANDroid Backup
-More than 30 mb free space on /system
-ADB drivers for Option 1
-Titanium Backup Pro for Option 2
How can I re-odex a Rom?
There are 2 Options to do it, but only the first does a full re-odex.
Before doing anything make sure that you have a full NANDroid Backup because you'll propably get into a bootloop and I cant guarantee that it works on your device/rom.
Option 1 using dexopt-wrapper:
I used first the script from puppet13th, but I got into a bootloop. So Ive done some changes and tried it until it worked
Some users told me that you can re-odex the rom without being in CWM, so you can may skip Step 2, but you could get into a bootloop without Step 2, but you can try it out, there is no risk with a NANDroid backup
Step 1: Configure the script for your device:
The attached script is made for the galaxy 3, so you have to configure the script for your device. If you done it, pls upload it and post it here for other users.
Download the zip(link below) for your system and unzip it. Then go to the folder "odex" and then open there the file/script "odex" with your favourite text editor(I suggest Notepad++).
You only have to replace the $BOOTCLASSPATH. You can find the valid $BOOTCLASSPATH in /init.rc. Enter your $BOOTCLASSPATH after "BOOTCLASSPATH=" for example so(beginning from Line 8):
Code:
BOOTCLASSPATH=replace_this_with_your_bootclasspath
cd /system/framework
for filename replace_this_with_your_bootclasspath
In the line
Code:
for filename replace_this_with_your_bootclasspath
you must replace the ":" character between framework files with a space.
Step 2(optional): Reboot your phone into cwm recovery and get adb access there
For best results you should re-odex in the recovery menu. Some users told me that it also works in a running system, so you can also try it in a running system, but you must mount /system rw before.
So if you want to re-odex in the recovery menu, reboot into recovery and make sure you have adb access.
Step 3: Ensure /system & /data is mounted, Connect your phone and run reodex script
Make sure that /system and /data is mounted in rw mode(in recovery: go to mount & storages, in a running system:use root explorer) and connect your phone with your computer.
You already downloaded the re-odex script in step 1. Your computer will push it over adb with the needed binaries to your phone. The script will create odex files, will delete classe.dex from the apk/jar, will rezipalign your apks and will delete the dalvik cache.
For windows users: double click on odex.cmd
For linux users: open a terminal and navigate to the folder which contains the unzipped attachment and run
Code:
chmod +x reodex.sh
./reodex.sh
After its finished, simply reboot and enjoy your fully re-odexed rom.
Step 4 (optional) convert /data:
I dont know if there is a better option, but after a re-odex with Option 1, my phone didnt showed the right free space on /data. So I converted /data to a other filesystem and back and then it showed the right free space.
So check your free space and if its wrong, convert your filesystem if you kernel support that.
Option 2 using Titanium Backup Pro:
You need to have Titanium Backup pro for re-odexing.
Step 1:
Select Menu -> More -> integrate sys dalvik into rom and wait until its finished. Then you should have more space on /data. I had when I tried it before 105 and after 135 mb free space on /data and 0kb free space after it on /system, so its not all.
You can also undo it. Its good when you want to try out a new theme, so you can undo and redo it using TB Pro.
Simply select Menu -> More -> Undo sys dalvik integration
and you're done.
Option 1 vs. Option 2
-Option 1 does a full re-odex, you have full free space on /data(Option 2 does only re-odex the apps in /system/app, not the framework(/system/framework)
-Option 1 deletes classes.dex from apks and jars(against Option 2), so you have more space free on /system
-You can undo Option 2 fast, so theming/modding is also possible by undo, theme and redo it, you can also undo Option 1, its called deodexing, but its not so fast
Download Links
XDA gaves me only 500 Errors when uploading was done, so I uploaded it to min.us
Re-Odex Script for Windows
Re-Odex Script for Linux(probably doesnt work, I cant reupload because I dont have the file anymore)
Working on...
There are only phones in the list, which were reported as working by users. It can aso work on a phone which isnt in the list.
Samsung Galaxy 3(working with default script)
HTC Amaze 4G(no script attached)
HTC Evo 4G(script here)
Samsung Galaxy S2(script here)
Motorola Atrix(script here)
Nexus S (4G)(script here)
XPeria Ray(script here)
SGS 1 maybe(working script for ICS aokp here and a working script for 2.3.6 (XWJW5) here)
Wildfire S(script here)
Nexus 7(script here)
TF700T & TF300T(script here)
Xperia Ray GB REPACK4PDA_V7(script here)
Acer A510 and Asus Transformer Prime TF201(script here)
Credits
puppet13th for making orginal script
If I helped you, you can press the thanks button under the post.
Thanks very much! I can confirm this works on the HTC EVO 4G. I have attached my odex file. I had to upload it as a ".txt" file, be sure to remove the ".txt" from the "odex.txt" before using
Thanks, I will have a look and try this on my xperia play
Sent from my R800i using xda premium
Thanks a lot. This works on the Atrix.
Odex file attached.
working on Galaxy S II
edited odex file in attachments
Yup mines work on the evo 4G too thanks. Now I have a odex rom. would post the file but swagstr beat me to it. same path as mine.
Nice to see that it's worked without problems on all devices, which tried by users. If I forgot to mention: a g3 rom developer asked me, if he is allowed to publish a rom which was reodexed with my script.
And yes all secs are allowed to publish rom's which are reodexed with my script. You must not add me to the credits, but it would be great if you do it.
Anyway to individually re-odex .apks with this mod?
swagstr said:
Anyway to individually re-odex .apks with this mod?
Click to expand...
Click to collapse
Yes, in my reodex package is a folder odex, theres a binary "dexopt-wrapper": copy this to your phone and give it executeable rights and then run over adb or term-emulator:
Code:
dexopt-wrapper <input.apk> <output.odex> <$BOOTCLASSPATH>
Working on Sony neo v so should work on Xperia 2011 range
Reserved
Sent from my SGH-T989 using xda premium
Works great!
I'll upload my odex file for the Nexus S 4G
Edit: Here's my odex file for the Nexus S 4G (probably the same for Nexus S)
jr_718 said:
Reserved
Sent from my SGH-T989 using xda premium
Click to expand...
Click to collapse
For what reserved?
Hey, is there any way to do this on a PC? Like, place /system/app and /system/framework/ in specified folders then run the odex script and it can odex the apk's and jar's on the desktop?
fergie716 said:
Hey, is there any way to do this on a PC? Like, place /system/app and /system/framework/ in specified folders then run the odex script and it can odex the apk's and jar's on the desktop?
Click to expand...
Click to collapse
You need the android phone to execute dexopt-wrapper binary. But you can do that over adb. You can reodex all over adb and then pull the reodexed files, but you can also do a nandroid backup, reodex your rom and make then
Adb pull /system/app/
Adb pull /system/framework/
After that you have the files on the pc and you can restore your nandroid backup.
TearsDontFalls said:
You need the android phone to execute dexopt-wrapper binary. But you can do that over adb. You can reodex all over adb and then pull the reodexed files, but you can also do a nandroid backup, reodex your rom and make then
Adb pull /system/app/
Adb pull /system/framework/
After that you have the files on the pc and you can restore your nandroid backup.
Click to expand...
Click to collapse
I see.. Yea that makes sense.
Thank you!
Hmm....but its not a good to go option for ROM developers with no device.
Can anyone make bat script to do this without andro phone?(I m not good windows dev )
I mean the same way dsixdas kitchen de-odexes
Sent from my Micromax_A70 using Tapatalk 2 Beta-4
varun.chitre15 said:
Hmm....but its not a good to go option for ROM developers with no device.
Can anyone make bat script to do this without andro phone?(I m not good windows dev )
I mean the same way dsixdas kitchen de-odexes
Sent from my Micromax_A70 using Tapatalk 2 Beta-4
Click to expand...
Click to collapse
Rom developers without device? Okay, it might be possible to do that under linux and im pretty sure that the binarys should work under linux, but windows isnt possible.
TearsDontFalls said:
Rom developers without device? Okay, it might be possible to do that under linux and im pretty sure that the binarys should work under linux, but windows isnt possible.
Click to expand...
Click to collapse
TommyTomatoes had something going on maybe you could borrow his script and improve on it or work together.
Sent from my powered Shooter E3D with Infection of AnthraX Jamz by wolf.
.Elite_The_King. said:
TommyTomatoes had something going on maybe you could borrow his script and improve on it or work together.
Sent from my powered Shooter E3D with Infection of AnthraX Jamz by wolf.
Click to expand...
Click to collapse
Sorry, i dont understood anything. Whats tommytomatoes script about?

[Guide] Create your own ROM (Beginners Welcome)

Did you Ever Wanted your Own Custom ROM? Did you don't understand other Guides? Do you don't Like ROM Kitchens? Than this Guide is the right Guide for you! Just Try It and you can create your Own Custom ROM!
​​​
General Information​
So, Before we start with this Guide, i just want to tell you some General Informations about [highlight]Custom Roms[/highlight]. When you buy your phone, you will have a [highlight]Stock ROM [/highlight]installed. A [highlight]Stock ROM [/highlight] is just that Software, your Company has created, especially for your phone. It's a Software like Android 2.3.4 with Touchwiz 4 or Android 4.0.4 with Sony UI. Those Softwares may be good, but there are many Things to Improve, for the Best Xperience, while using your Phone. A [highlight]Custom ROM [/highlight]can be complete different to [highlight]Stock ROM [/highlight], like [highlight]Cyanogenmod 10 [/highlight], or be just a improved Version of the [highlight]Stock ROM [/highlight]. To Build a [highlight]Custom ROM [/highlight] you need to know a few Words, and have a Phone with Root Acess + S-OFF / Unlocked Bootloader. So in this Guide we will concentrate on the Easy Way, the [highlight]Improved Stock ROM [/highlight]. You Can also Build a [highlight]ROM [/highlight] out of Source from Google, but thats too complicated for beginners. Setting up compile envirment can be quite complicated . So let's take a look at stuff you need to know:
[highlight]Root Acess[/highlight]
Complete Acess to all System Files, like Administrator on Windows. To Root Your Phone, search XDA. Rooting your Phone is done by putting su library to /system and manage acess with SuperSu or Superuser. When you buy your Phone, it doesn't have Root Acess. Root Acess is needed for installing CWM, mount your /system as Read & Writeable ----> You can delete system files, and installing apps to /system/app, by copying them to /system/app. By Rooting your Phone you loose Warranty, but you can reinstall stock software and no one will notice
[highlight]ClockWorkMod Recovery (CWM)[/highlight]
Recovery Mode of your Phone. In Recovery you can install flashable zips and roms, wipe and format your device, mount different partititons and fix permissions... To Get CWM search XDA. There are different Ways for every Device. You can enter recovery before your device is fully booted, and since touchscreen drivers are not yet available you need to use the volume buttons for controlling the recovery. There are different ways of entering cwm for every device.
[highlight]Rom & Kernel[/highlight]
ROM means: [highlight] Read-Only-Memory[/highlight] . The Funny Thing is that we can Read and Write on our Read-Only-Memory. Anyway, its a partition which includes large parts of the OS ----> operating system of your Phone. In a [highlight]ROM[/highlight] for Android Phones are included apps, framework, libs & many more and since android is modular, there is an app for everything (keyboard, launcher, statusbar). Together with a [highlight]Kernel[/highlight] it's the "Life" of your Phone.
The Kernel is needed for a working Phone. You Can Install Stock or Custom Kernel. When you buy a Phone Stock Kernel is preinstalled of course. The kernel includes many drivers, controlls the cpu and does many more... Just rember that word ​​
General Information
1. Install Stock ROM to your Phone - This Can be Done by Flashing via Flashtool or Odin. You Need a Clean Base to Start. Recomnend is a Stable, Official ROM, like Gingerbread, Ice Cream Sandwich or maybe Jelly Bean.
2. Root the ROM. This Can be done with Different Tools, Very Popular is for Example SuperOneClick Tool.
Just search for "my device name root" in xda if your not sure
3. Improve Stock ROM on Your Phone. So, After You Have Installed the Stock ROM and Rooted the ROM You Can Start. Now You Need To Change Some Things, To Make the Stock ROM to a Customized ROM. You Can do a lot Things, Here are a Few Examples:
- Install Latest Superuser SuperUser
- Install Latest BusyBox Auto-Installer
- Supercharge the ROM, enable Zipalign etc.. ----> here
- Remove Bloatware. Use Es File Explorer to remove not longer needed apps in system/app partitition
- Tweak Build.prop by going with ES File Explorer to /system and editing your build.prop. now you can change the Name shown in Settings and do a lot more ----> http://forum.xda-developers.com/showthread.php?t=1227269
- Change the Bootanimation. You can find a lot of them by Going to themes and apps of your own device.
- Add or Change Apps. Check out Themes and Apps Selection of Your Device and Install a few Of Them, If You Are Allowed to use MooDeD Apps created by other Users
3.1 Now Delete/remove all backups in clockworkmod/backup folder
4. Now Make Sure You Have Installed CWM. If You Have Changed a Lot Things and You Think Your ROM is good enough, Boot to CWM, select wipe data/factory reset and Boot up again. If You Are Still able to Boot, Check the ROM for Bugs or Problems. Write them Down. Try to fix them. You can always take a logcat (adb logcat)
Than Boot again to CWM select wipe data / Factory reset ---> yes advanced ---> wipe battery stats ---> yes. Now Select backup & Restore ---> Backup.
5. Connect Your sd card to PC and go to Clockworkmod/backup folder. Now Go to the only 1 backup folder and copy "system.img" to your PC.
6. On PC Open Yaffey and Choose Open ---> system.img and than extract to empty folder called system.
7. Now You Will Get a Folder "system" which contains the System of your Phone. Now Create an Empty .zip file and paste in extracted Meta-inf folder Download and copy folder "system" inside. ROM should be flashable for NOW!
Remeber to mount /system before flashing // replace with mount Script for ur device... You can check this by dowoading any rom 4 ur device
NOTE: This has nothing to do with developmemt or original development in any way. Its theming a stock ROM in the simplest way...
Just Press thanks if this was helpfull in any way...
How to
[[ Placeholder ]]
[[ Placeholder ]]
[!][RESERVED][!]
[[ Placeholder ]]
1 year later:laugh:
Sorry... I will finish this guide later...
And so on...
Sent from my GT-S7500 using xda premium
To infinity and beyond!
saiz136 said:
To infinity and beyond!
Click to expand...
Click to collapse
Beyond Smart xD
Updated Thread and Added a First Guide
so where is the guide ? lol ...
maybe make the guide before in PC and the create the thread ? .. just sayin
ruizit0 said:
so where is the guide ? lol ...
maybe make the guide before in PC and the create the thread ? .. just sayin
Click to expand...
Click to collapse
There is a guide lol
jader13254 said:
There is a guide lol
Sent from my LT18i using xda app-developers app
Click to expand...
Click to collapse
ahaha sorry .. i was thinking that was a little intro explaining clocklowrk and stuff .. to a coocking tutorial ahaha
maybe you can expecify more in title or something
nice tutorial to create a rom this way .. i read somewhere that the next clockwork will have this feature
Will try..
Sent from my GT-N8000 using Tapatalk 2
kaipro said:
Will try..
Sent from my GT-N8000 using Tapatalk 2
Click to expand...
Click to collapse
You need different commands for wiping on g Note, just search your device forum
Sent from my LT18i using xda app-developers app
Where is the system.img? I didnt have one when i backed up with cwm
very noob-friendly !
CovXX said:
Where is the system.img? I didnt have one when i backed up with cwm
Click to expand...
Click to collapse
check clockworkmod/backup folder... there should be system.xxxx.img

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

[6045*] [TWRP] custom recovery 2.8.7.0

TWRP 2.8.7.0 custom recovery
thanx to user @Unjustified Dev we have TWRP custom recovery for our phone.
download HERE
So anyone who download the TWRP should send him a dollar for beer or at least thank him!
Of course you do everything on your own!
To test before installation (linux users need sudo before fastboot):
Code:
fastboot -i 0x1bbb boot twrp-2.8.7.0-idol3.img
To install (linux users need sudo before fastboot):
Code:
fastboot -i 0x1bbb flash recovery twrp-2.8.7.0-idol3.img
!BEFORE YOU START, PLEASE READ THIS!
And don´t forget to thank Famewolf for the tutorial, because this could save your phone when something go bad!​
Thanks, tried it. It worked.
I also just installed SU directly, bypassing the previous root thread.
1. Download the .zip package from here: https://download.chainfire.eu/696/SuperSU/UPDATE-SuperSU-v2.46.zip
2. Put it on the root of my SD card.
3. In TWRP click install and find the .zip.
Wonderful. Just a question: is this recovery for Idol 3 4.7 (6039) or 5.5 (6045) ?
Gynoid said:
Wonderful. Just a question: is this recovery for Idol 3 4.7 (6039) or 5.5 (6045) ?
Click to expand...
Click to collapse
It's for 6045. For 4.7 TWRP, see this post: http://forum.xda-developers.com/showpost.php?p=61976520&postcount=18
Thanks!
is it functional for backing up our system in TWRP?
@DallasCZ could you please provide the original link to TWRP. That was a bit unfair to upload it elsewhere as I tend to track the number of downloads.
Sent from my LGMS395 using Tapatalk
gecko702 said:
is it functional for backing up our system in TWRP?
Click to expand...
Click to collapse
Yes although to my knowledge noone has actually done a restore yet. He's fixing some minor bugs and will be releasing a new version at some point.
famewolf said:
Yes although to my knowledge noone has actually done a restore yet. He's fixing some minor bugs and will be releasing a new version at some point.
Click to expand...
Click to collapse
i am in touch with the dev and allready downloading the new build..will be soon on my google drive
Unjustified Dev said:
@DallasCZ could you please provide the original link to TWRP. That was a bit unfair to upload it elsewhere as I tend to track the number of downloads.
Sent from my LGMS395 using Tapatalk
Click to expand...
Click to collapse
sorry, i corrected the link...
Convert TWRP Backup into flashable rom zip
I found these instructions that explain how to take a TWRP backup and turn it into a flashable zip file. This would allow someone to create a "factory" rom pre-rooted to be flashed.
For TWRP Backup
Transfer the TWRP backup from Phone to PC.
You’ll see a file named system.ext4.win which is the System partition backup of your device. Rename it to system.ext4.tar (Changing its extension from .win to .tar)
Extract the system.ext4.tar using an archive software like Winrar or 7zip.
If your TWRP backup is not in compression mode, you will directly get the system folder, else you will get a file named system.ext4, which should be renamed again to system.ext4.tar and extract it to get the system folder.
Take the boot.emmc.win file and rename it to boot.img.
Now collect a META-INF folder from any custom ROM which is made for your device. Make sure you get the correct Meta-Inf folder, else the Zip won’t work and might worsen the condition of your device.
Select the META-INF, System folders and the boot.img and right click your mouse and select add to Archive.
In the Archive settings, choose the extension of the compressed file as Zip (Make sure of this part)
Now you can use this Zip file to flash it on your Custom recovery.
we dont have the meta-inf folder...there is one in the update i got, but i dont know if this id the right one.
and we dont have custom rom to get meta-inf from.
also the main thing is, that i cannot unpack the system win file when renamed to .tar i dunno why (i got latest 7-zip app).
DallasCZ said:
we dont have the meta-inf folder...there is one in the update i got, but i dont know if this id the right one.
and we dont have custom rom to get meta-inf from.
also the main thing is, that i cannot unpack the system win file when renamed to .tar i dunno why (i got latest 7-zip app).
Click to expand...
Click to collapse
What they primarily want is the "update-binary" which is device specific. I don't remember if the update had one....I did take apart an update-supersu.zip and it uses a script as it's update binary...thought about trying to convert that. Theoretically you could take a meta-inf for another device's rom...and use it's meta-inf making sure to replace the update-binary. It also has an installer script that tells it to mount system and data....extract files from the zip and where to put them. I learned a bit when I was trying to make an update.zip to fix my build.prop.
It untar'd fine for me on my linux pc:
[email protected]:/workarea/android/idol3/TWRP/BACKUPS/408adcbe/1970-01-01--22-28-53_LRX22G_release-keys/work > tar -xvf ../system.ext4.win000
tar: Removing leading `/' from member names
/system/app/
/system/app/AntHalService/
/system/app/AntHalService/AntHalService.apk
/system/app/AntHalService/arm64/
/system/app/AntHalService/arm64/AntHalService.odex
/system/app/BasicDreams/
/system/app/BasicDreams/BasicDreams.apk
/system/app/BasicDreams/arm64/
/system/app/BasicDreams/arm64/BasicDreams.odex
/system/app/Bluetooth/
/system/app/Bluetooth/Bluetooth.apk
/system/app/Bluetooth/arm/
/system/app/Bluetooth/arm/Bluetooth.odex
famewolf said:
What they primarily want is the "update-binary" which is device specific. I don't remember if the update had one....I did take apart an update-supersu.zip and it uses a script as it's update binary...thought about trying to convert that. Theoretically you could take a meta-inf for another device's rom...and use it's meta-inf making sure to replace the update-binary. It also has an installer script that tells it to mount system and data....extract files from the zip and where to put them. I learned a bit when I was trying to make an update.zip to fix my build.prop.
It untar'd fine for me on my linux pc:
[email protected]:/workarea/android/idol3/TWRP/BACKUPS/408adcbe/1970-01-01--22-28-53_LRX22G_release-keys/work > tar -xvf ../system.ext4.win000
tar: Removing leading `/' from member names
/system/app/
/system/app/AntHalService/
/system/app/AntHalService/AntHalService.apk
/system/app/AntHalService/arm64/
/system/app/AntHalService/arm64/AntHalService.odex
/system/app/BasicDreams/
/system/app/BasicDreams/BasicDreams.apk
/system/app/BasicDreams/arm64/
/system/app/BasicDreams/arm64/BasicDreams.odex
/system/app/Bluetooth/
/system/app/Bluetooth/Bluetooth.apk
/system/app/Bluetooth/arm/
/system/app/Bluetooth/arm/Bluetooth.odex
Click to expand...
Click to collapse
i allready build some roms for my older device, so i know what it is about.
For the proper rom zip you have to make the updater script with all the simlinks and metadata ...in the latest update there were no simlinks in the updater script...
without them you can brick your phone.
for example simlinks from 4.4.2 Os from zte V5
Code:
symlink("/data/misc/audio/mbhc.bin", "/system/etc/firmware/wcd9306/wcd9306_mbhc.bin");
symlink("/data/misc/audio/wcd9320_anc.bin", "/system/etc/firmware/wcd9306/wcd9306_anc.bin");
symlink("/persist/WCNSS_qcom_cfg.ini", "/system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini");
symlink("/persist/WCNSS_qcom_wlan_nv.bin", "/system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin");
symlink("/system/lib/modules/pronto/pronto_wlan.ko", "/system/lib/modules/wlan.ko");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("libGLESv2.so", "/system/lib/libGLESv3.so");
symlink("mksh", "/system/bin/sh");
this you cannot copy from another device....
Never mind. I installed the second build.
How do I boot into the custom recovery? Is it power up + power button on the Idol 3?
Acreo Aeneas said:
Never mind. I installed the second build.
How do I boot into the custom recovery? Is it power up + power button on the Idol 3?
Click to expand...
Click to collapse
Reboot or power on till you see the alcatel screen pop up....right away hold down up arrow and it should go into recovery.
Thank you so much...been waiting for this....
so now let ROM's start pouring in )))))))
Hmm odd. I had to reflash it. For some reason it didn't take the first time I flashed the second build TWRP to my Idol 3.
What partitions should I backup using TWRP? I'd assume: Boot, System, and Data? Should I include System Image too?
Acreo Aeneas said:
Hmm odd. I had to reflash it. For some reason it didn't take the first time I flash the second build TWRP to my Idol 3.
What partitions should I backup using TWRP? I'd assume: Boot, System, and Data? Should I include System Image too?
Click to expand...
Click to collapse
The default of boot, system and data should be fine for personal use however if you have not yet rooted please read here first! http://forum.xda-developers.com/idol-3/help/want-to-able-to-install-ota-updates-t3163745
So Awesome! best looking twrp Ive seen yet xD. Also, works well too. I havent tested backing up data, but I did a successful restore of the system and boot So far so good!

Categories

Resources