[LB] Create ROOTED update package from stock FTF (Windows)

Search This thread
With the latest firmwares not directly rootable you need to download or create an update package with root and recovery and update your system via recovery. This won't delete your data and root will be there on 5.x.x. I made this complete tutorial so that everyone can make an update from an FTF file.

THIS IS FOR LOCKED BOOTLOADER and/or STOCK KERNEL ONLY !!!

MAKE SURE YOU HAVE A BACKUP !!!

1.1 You need obviously an already rooted phone with [NUT]'s DualRecovery installed and working (this can be achieved on firmwares with Android 4.4 and 5.0.2)
If you don't have the recovery, you can install it from here: [Z2][TWRP][PhilZ Touch][CWM] XZDualRecovery Q&A see post #2 there for instructions. 2.8.12 and later should work on KitKat and Lollipop too!
1.2 You need Flashtool with working USB drivers (Make sure flashmode works - which means the drivers are properly installed on your system, especially on Windows 8/8.1/10 - before you start this tutorial).

2. Download the newest FTF update file for your phone/branding. Use the same customization version (xxxx-xxxx) that is on your phone now!
This you can do with Flashtool (Devices/Check Updates menu) or download it from the [FTF] STOCK FIRMWARES for Xperia Z2 thread.
(Alternative option for advanced users: XperiFirm -> you can create an FTF from the downloaded firmware files with Flashtool.)

3.1 Download PRFCreator v1.1.zip from [TOOL] PRFCreator - easily create pre-rooted firmwares.
3.2 Download latest stable SuperSU update package from here.
3.3 Download XZDualRecovery's latest - 2.8.23 - flashable version (Z2-lockeddualrecovery2.8.xx-RELEASE.combined.zip) from here (XZDualRecovery section).

You will have 5 files so far:
PRFCreator v0.5.zip
D650x_23.x.1.A.x.xxx.ftf (with different name and firmware version number)
UPDATE-SuperSU-v2.46.zip
Z2-lockeddualrecovery2.8.x-RELEASE.flashable.zip

4. Unzip PRFCreator and run it.

5. Load the FTF, SuperSU and Z2-lockeddualrecovery (flashable) zip files into the three section.

6. Uncheck all the Include options [ ], we don't need them, we will flash them with Flashtool after the update. I think it's still safer to flash kernel, baseband, boot and other system critical parts of the firmware from Flashtool.
(But if you want to include them anyway then you can skip part 11 and start your phone normally.)

There is a Legacy mode option in the latest version. Without it PRFCreator will use a direct sin flashing method for system update. If you check the legacy option it will use the older repack method for system. The direct sin flashing should work in most cases if not then use the legacy option.

7. Push Create. After it's finished (wait for the Create button to be available again), you'll find a flashable.zip in the folder of PRFCreator.
Check the contents of the zip file, it should look like this with PRFCreator v0.5:
Code:
data
META-INF
system
utils
partition-image.sin
system.sin
dualrecovery.zip
SuperSU.zip
If something is missing, redo the process from step #4 until all is there.

8. Copy flashable.zip to the internal/external SD card of your phone. If you want to go for 100% working root and recovery copy UPDATE-SuperSU-v2.46.zip and Z2-lockeddualrecovery2.8.x-RELEASE.flashable.zip there too.

9. Boot your phone into recovery (use TWRP!).

10. Install flashable.zip in recovery. After finished DO NOT REBOOT !!!
*Optional step: install SuperSU and Recovery again so if something went wrong during the system flashing you'll still have a working recovery.
Clear Cache/Dalvik only and go back to Home and choose Reboot/Power off.

11. Start Flashtool and with the Flash device icon flash the kernel and other baseband files from the FTF in Flashmode.

Use the following configuration (or similar):
Wipe:
Code:
[ ] APPSLOG
[ ] CACHE
[ ] DATA
Which means nothing is wiped, this is good for a system update only, that reserves your settings, applications and data. (If you want a clean system or run into errors after updating only the system, you can wipe all the three.)

Exclude:
Code:
[ ] BOOTBUNDLE
[x] PARTITION
[ ] KERNEL
[ ] FOTA
[ ] BASEBAND
[x] SYSTEM
[ ] ELABEL
Which means system, partition and ta options are unchanged and won't be wiped/overwritten. You can exclude fota, elabel and baseband too, but some phone functions may be limited. Always use your phone's original customization version when choosing FTFs. Never exclude = never check (x) kernel. It is the main reason we're flashing this.
TA -> not always present in the FTF file, but if you see it, then EXCLUDE it, just to be sure, you don't simlock your device

Code:
[x] No final verification
[ ] Reset customization

Connect the micro USB to your phone and get ready with the other end of the cable in your hand :D
Push Flash button.
Push the Volume down button and connect the USB cable to the computer's USB port. Wait until Flashtool begins with the flashing and you can release the Volume button now.
When finished, unplug the the phone, start it and wait until it completes the first boot. After it is fully working, check SuperSU and if you can mount system R/W too (in Root Explorer or in other root file manager).

ENJOY another rooted version of Android ;) I can give support only for this process, for the tools you need to ask your questions in the appropriate threads above.

Thanks to @zxz0O0 for creating the PRFCreator and the Lollipop fixes, it makes things easier in this process (you don't need to mess with linux mounts, virtual machines and other scripts copying system images and recovery updates to a zip).
 
Last edited:

zxz0O0

Senior Member
Apr 18, 2011
1,533
5,165
Nice guide. Please let me know the bugs in PRFCreator v0.6 (you can drop me a pm as I don't have a lot of time for xda at the moment). Also, is step 12 really necessary? Dualrecovery should already be included in the flashable zip (same for step 11 if you include those files).
 
  • Like
Reactions: AK2H

ravdo

Senior Member
Mar 22, 2013
200
48
Will downgrading 4.4.4 to 4.4.2 without wiping data cause a bootloop?
 
Nice guide. Please let me know the bugs in PRFCreator v0.6 (you can drop me a pm as I don't have a lot of time for xda at the moment). Also, is step 12 really necessary? Dualrecovery should already be included in the flashable zip (same for step 11 if you include those files).

I didn't use the v0.6 because more people complained in the tool's thread about it. V0.5 is working, I can test v0.6 later (maybe tomorrow).
Dualrecovery is included with the flashable.zip but the RIC killer isn't working in that version, it needs to be installed again with the PC installer. Maybe someone (I mean @[NUT] :cool:) could clean up the process ;)
 
Last edited:
  • Like
Reactions: felicioht

ptmaniac

Senior Member
Jul 17, 2009
373
215
Aveiro
Nexus 7 (2013)
Sony Xperia XZ
Hi zxz0O0, the updater script is looking for 3 files in /utils but when the zip is created on 0.6 those files remain in the root of the zip so you get error when flashing. i think that's the problem with 0.6 but i can be wrong as i didn't test it :)
 
  • Like
Reactions: zxz0O0

Ningyou Higeki

Senior Member
Jan 14, 2012
159
25
I didn't use the v0.6 because more people complained in the tool' thread about it. V0.5 is working, I can test v0.6 later (maybe tomorrow).
Dualrecovery is included with the flashable.zip but the RIC killer isn't working in that version, it needs to be installed again with the PC installer. Maybe someone (I mean @[NUT] :cool:) could clean up the process ;)

http://forum.xda-developers.com/showpost.php?p=56542112&postcount=130
It may be an alternative for Step 12 to modify the flashable dualrecovery .zip file as the post of the link above, I think.
 
Hi zxz0O0, the updater script is looking for 3 files in /utils but when the zip is created on 0.6 those files remain in the root of the zip so you get error when flashing. i think that's the problem with 0.6 but i can be wrong as i didn't test it :)

Please use his thread for error reporting, thanks! ;)

http://forum.xda-developers.com/showpost.php?p=56542112&postcount=130
It may be an alternative for Step 12 to modify the flashable dualrecovery .zip file as the post of the link above, I think.

I don't want to change [NUT]'s recovery installers (everyone can edit scripts if wants), this may be a longer process but more user friendly.
 

RedSkyRoad

Senior Member
Nov 11, 2010
2,949
343
Johannesburg
Flash a previous ftf (not 4.4.4), root it, install recovery and restore your backup.

Did you got any errors during the process?

During the flashing of the ZIP (before FTF), there was something that failed (set_perm) but it still said SUCCESSFUL... But I want a clean update. Can I clean DATA at least?
 
Last edited:

RedSkyRoad

Senior Member
Nov 11, 2010
2,949
343
Johannesburg
@norti, I tried EVERYTHING again. This does NOT work. Bootloop...

When flashing the Zip, I get an error with the set_perm:

Please link a pre-rooted ROM which has NOT been de-odexed or de-bloated...

PS: After selecting to turn off the phone, it tells me "the phone does not seem to be rooted. Do I want to root" Do I need to select to root it?

---------- Post added at 11:26 PM ---------- Previous post was at 11:18 PM ----------

I get the following when flashing the FTF as-is:

08/025/2014 23:25:54 - ERROR - Processing of system.sin finished with errors.
08/025/2014 23:25:54 - INFO - Ending flash session
08/025/2014 23:25:54 - ERROR - ERR_SEVERITY="MINOR";ERR_CODE="0017";ERR_DYNAMIC="8009001C";
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 149
    With the latest firmwares not directly rootable you need to download or create an update package with root and recovery and update your system via recovery. This won't delete your data and root will be there on 5.x.x. I made this complete tutorial so that everyone can make an update from an FTF file.

    THIS IS FOR LOCKED BOOTLOADER and/or STOCK KERNEL ONLY !!!

    MAKE SURE YOU HAVE A BACKUP !!!

    1.1 You need obviously an already rooted phone with [NUT]'s DualRecovery installed and working (this can be achieved on firmwares with Android 4.4 and 5.0.2)
    If you don't have the recovery, you can install it from here: [Z2][TWRP][PhilZ Touch][CWM] XZDualRecovery Q&A see post #2 there for instructions. 2.8.12 and later should work on KitKat and Lollipop too!
    1.2 You need Flashtool with working USB drivers (Make sure flashmode works - which means the drivers are properly installed on your system, especially on Windows 8/8.1/10 - before you start this tutorial).

    2. Download the newest FTF update file for your phone/branding. Use the same customization version (xxxx-xxxx) that is on your phone now!
    This you can do with Flashtool (Devices/Check Updates menu) or download it from the [FTF] STOCK FIRMWARES for Xperia Z2 thread.
    (Alternative option for advanced users: XperiFirm -> you can create an FTF from the downloaded firmware files with Flashtool.)

    3.1 Download PRFCreator v1.1.zip from [TOOL] PRFCreator - easily create pre-rooted firmwares.
    3.2 Download latest stable SuperSU update package from here.
    3.3 Download XZDualRecovery's latest - 2.8.23 - flashable version (Z2-lockeddualrecovery2.8.xx-RELEASE.combined.zip) from here (XZDualRecovery section).

    You will have 5 files so far:
    PRFCreator v0.5.zip
    D650x_23.x.1.A.x.xxx.ftf (with different name and firmware version number)
    UPDATE-SuperSU-v2.46.zip
    Z2-lockeddualrecovery2.8.x-RELEASE.flashable.zip

    4. Unzip PRFCreator and run it.

    5. Load the FTF, SuperSU and Z2-lockeddualrecovery (flashable) zip files into the three section.

    6. Uncheck all the Include options [ ], we don't need them, we will flash them with Flashtool after the update. I think it's still safer to flash kernel, baseband, boot and other system critical parts of the firmware from Flashtool.
    (But if you want to include them anyway then you can skip part 11 and start your phone normally.)

    There is a Legacy mode option in the latest version. Without it PRFCreator will use a direct sin flashing method for system update. If you check the legacy option it will use the older repack method for system. The direct sin flashing should work in most cases if not then use the legacy option.

    7. Push Create. After it's finished (wait for the Create button to be available again), you'll find a flashable.zip in the folder of PRFCreator.
    Check the contents of the zip file, it should look like this with PRFCreator v0.5:
    Code:
    data
    META-INF
    system
    utils
    partition-image.sin
    system.sin
    dualrecovery.zip
    SuperSU.zip
    If something is missing, redo the process from step #4 until all is there.

    8. Copy flashable.zip to the internal/external SD card of your phone. If you want to go for 100% working root and recovery copy UPDATE-SuperSU-v2.46.zip and Z2-lockeddualrecovery2.8.x-RELEASE.flashable.zip there too.

    9. Boot your phone into recovery (use TWRP!).

    10. Install flashable.zip in recovery. After finished DO NOT REBOOT !!!
    *Optional step: install SuperSU and Recovery again so if something went wrong during the system flashing you'll still have a working recovery.
    Clear Cache/Dalvik only and go back to Home and choose Reboot/Power off.

    11. Start Flashtool and with the Flash device icon flash the kernel and other baseband files from the FTF in Flashmode.

    Use the following configuration (or similar):
    Wipe:
    Code:
    [ ] APPSLOG
    [ ] CACHE
    [ ] DATA
    Which means nothing is wiped, this is good for a system update only, that reserves your settings, applications and data. (If you want a clean system or run into errors after updating only the system, you can wipe all the three.)

    Exclude:
    Code:
    [ ] BOOTBUNDLE
    [x] PARTITION
    [ ] KERNEL
    [ ] FOTA
    [ ] BASEBAND
    [x] SYSTEM
    [ ] ELABEL
    Which means system, partition and ta options are unchanged and won't be wiped/overwritten. You can exclude fota, elabel and baseband too, but some phone functions may be limited. Always use your phone's original customization version when choosing FTFs. Never exclude = never check (x) kernel. It is the main reason we're flashing this.
    TA -> not always present in the FTF file, but if you see it, then EXCLUDE it, just to be sure, you don't simlock your device

    Code:
    [x] No final verification
    [ ] Reset customization

    Connect the micro USB to your phone and get ready with the other end of the cable in your hand :D
    Push Flash button.
    Push the Volume down button and connect the USB cable to the computer's USB port. Wait until Flashtool begins with the flashing and you can release the Volume button now.
    When finished, unplug the the phone, start it and wait until it completes the first boot. After it is fully working, check SuperSU and if you can mount system R/W too (in Root Explorer or in other root file manager).

    ENJOY another rooted version of Android ;) I can give support only for this process, for the tools you need to ask your questions in the appropriate threads above.

    Thanks to @zxz0O0 for creating the PRFCreator and the Lollipop fixes, it makes things easier in this process (you don't need to mess with linux mounts, virtual machines and other scripts copying system images and recovery updates to a zip).
    3
    Good to see most of you figured out that if you follow the steps and install the patched recovery it will solve your problems :)
    I made more comments in the OP too (see point 1,2,3 now). If you do every step as described, you should get success with root on 4.4.4.
    3
    I want to give confirmation that [NUT]'s DualRecovery 2.8.7 works fine. I had bundled the flashable zip in prf creator. I can boot to recovery from ndr utilities, from volume buttons just fine. Made a nandroid backup of system via TWRP successfully.
    Thanks norti! Ur method works! I have full root, r/w, recovery,??

    ---------- Post added at 10:31 AM ---------- Previous post was at 10:29 AM ----------

    Shud i upload screenshots?
    3
    Guys, if we'll have a new firmware version in the future, I'll modify a the patched dualrecovery, because right now it works only on the firmwares with number: 23.0.1.A.3.9, 23.0.1.A.0.167, 17.1.2.A.0.323, 17.1.2.A.0.314.

    Until [NUT]'s away I can only do edit patches after a new firmware is released. If I'll have a bit more time, I'll create a separate patch for the recoveries and that will be independent from [NUT]'s work.