yashsingh1/xdaforums huggingface dataset:
[Sony Cross-Device General] _SIL_:
Rootk1t, o-l-a-v, zxz0O0, I never format system before flashing preroot firmware and I always don't have any problem with this. But. Some people (not me) has strange situation. They updated firmware by prerooted zip. And all fine, but in configuration in about phone showed older version of firmware. And this bug stays even they flashed prerooted zip again even with wipes all caches. But after they are formated system partition and then flashed prerooted zip again, version of firmware shows correct. Strange.

It seems that sinflash don't does something that formatting is doing.

I think that forcing of formating of system partition in PRFC before flashing of system.sin (not system.ext4) give to us more stable and reliable final result.
[Sony Cross-Device General] fqr:
i encountered the same "set_perm some changes failed" problem mentioned earlier in this thread and the flash process stopped after a few sec. as i couldnt switch to TWRP due to a locked bootloader, i took version 0.9 of PRFCreator. it worked and the update seemed to go flawlessly.

so i guess the problem is really related to version 1.0 in connection with nuts dual recovery (at least with the one for Z3), but are there any drawbacks in using PRF version 0.9, instead of 1.0? i mean, it actually should do the same thing, shouldn't it?
[Sony Cross-Device General] juanpirulo:
hi, I am having some trouble with my prerooted firmwares. I make a prerooted for z1 5.1.1 with legacy mode to be able to make some changes in the system.ext4 on Linux but sometimes i am doing something wrong and i think system.ext4 is corrupted because i get bootloop and with no recovery after rebooting. The thing is that twrp didnt show any message while flashing, seems like is flashing well and if i look inside system i can see system is there. Is there any way that twrp reconigzed a bad flashing? .

Also i think that format system should be optional, so we can check if prerooted zip is working well without losing system or recovery. cheers
[Sony Cross-Device General] zxz0O0:
The recovery menu will just copy system.ext4 to the system partition. If you made changes which prevent booting or corrupted the image there is no way to detect that.
[Sony Cross-Device General] carminedev:
Hi guys , after using this tool someone experienced issues to send sms ?
[Sony Cross-Device General] utsav911:
So I was creating zip for Xperia Z3 (23.4.A.1.200) and it got stuck on partition image.

Does anyone know what's the problem?
[Sony Cross-Device General] zxz0O0:
Redownload the latest version of the tool.
[Sony Cross-Device General] brenyoka:
I am trying to make a pre-rooted image with this tool for my Xperia ZR C5503. I am already on a rooted 5.1.1. (10.7.A.0.222) but I am afraid I accidentally deleted a few system apps so now want to flash again.

I downloaded all necessary files, current to 1 Oct 2015. Some background:

- my bootlocker is unlocked

- previously I have already flashed the advanced kernel which includes TWRP 2.8.7. It works well.

- I downloaded the latest 5.1.1 firmware (Nordic combined) through flashtool and the latest SuperSu (v2.49, beta).

Please confirm that the following configuration is correct:

- won't include kernel as I already have that

- won't include FOTAkernel as I won't have OTA updates since the bootloader is already unlocked

- I plan to include Modem and LTALabel. Not sure if it's a problem, given that I will use the phone mostly in Australia and New Zealand, but the image is 'Nordic combined"?

Since I already have recovery, and don't want to flash other/extra ones, do I still need to select that RICDefeat.zip for flashing?

Is it better to use SuperSU 2.49 (beta) or the stable, but older v2.46?

Thank you in advance.
[Sony Cross-Device General] zxz0O0:
Released new version v1.1 :cowboy:

Major changes:

Users can now add APK files to Extra Files and specify if they should be installed to system or data partition

Fixed a bug where SuperSU was not installed when system partition was mounted before flashing the firmware

sinflash now supports compression which reduces the size of the firmware (most recovery menus only support flashable zips up to 2GB)

Add system image at the end of the zip which will speed up generation significantly (Idea by _SIL_)
[Sony Cross-Device General] RyTekk:
Got a small issue.
[Sony Cross-Device General] fluffi444:
Very nice idea! Have a suggestion to add PRIV-APP to dropdown list... What do you think?

Is there a difference between system/app and system/priv-app? Some say that on system/priv-app there are some more permissions...
[Sony Cross-Device General] dex87xda:
same problem like Tekk ...
[Sony Cross-Device General] zxz0O0:
Thanks for report. I will fix it in a few minutes and reupload v1.1. The flashable zip is still generated successfully so you should be able to flash it.

Yes, that's a good idea. I will add that in the future.
[Sony Cross-Device General] Rootk1t:
Great!

But the new option is not dumb-proof:silly:

I know that apps can be installed in /system/ or in /data/.

But not all users can choose right where to install. If their choice is not correct, the easiest thing, that app won't work, but the worst one it can screw up PRF zip.

So what's the reason of this choice?
[Sony Cross-Device General] RyTekk:
Done without the previous problem, and new change has boosted the flashing speed faster a lot (I look into commits that you changed to use /tmp folder instead of /sdcard/prf).
[Sony Cross-Device General] russel5:
[MENTION=3975929]zxz0O0[/MENTION] build preroot .232 with your last version and this zip NOT flashed in TWRP

some logs:

I:Set page: 'install'
I:Set page: 'flash_confirm'
I:Set page: 'flash_zip'
I:operation_start: 'Flashing'
Installing '/external_sd/Tools/flashable-prerooted-signed.zip'...
Checking for MD5 file...
Skipping MD5 check: no MD5 file found
I:Zip does not contain SELinux file_contexts file in its root.
I:Legacy property environment initialized.
Archive: /external_sd/Tools/flashable-prerooted-signed.zip
unzip: zip flags 1 and 8 are not supported
chmod: META-INF/com/google/android/update-binary2: No such file or directory
/tmp/updater: line 15: META-INF/com/google/android/update-binary2: not found
I:Legacy property environment disabled.
Updating partition details...
I:Data backup size is 2205MB, free: 7141MB.
I:Unable to mount '/usb-otg'
I:Actual block device: '', current file system: 'vfat'
...done

And after reboot i steel have 4.4.4

Sad

UPDATE: After re-create zip archive manualy with winrar, all flashed as it should.
[Sony Cross-Device General] zxz0O0:
Hm, still this error. I wonder how these flags get added. I will check if this can be fixed. If this happens again, could you upload the zip?
[Sony Cross-Device General] russel5:
del
[Sony Cross-Device General] sigprof:
These flags are definitely added by signapk.jar (the zip file is written in a single pass without seeking, therefore the 0x08 flag bit is set in file headers to indicate “streaming mode”, and this is not supported by unzip from old busybox). Looks like omitting the signing also will not help, because the DotNetZip library also uses streaming mode when adding files to a zip archive.

The problem in this case is not caused by the busybox version inside the created zip file — it happens much earlier, when the update-binary shell script is executed and tries to unzip update-binary2; at this time unzip comes from the recovery.

I found only one example of a signed flashable zip which was not written in the streaming mode — the SuperSU zip; apparently it was signed with something else than stock signapk.jar (all signapk versions which I had seen are using the streaming mode). That zip also uses a shell script as update-binary which calls unzip from the recovery, but in this case even the old unzip works.
[Sony Cross-Device General] zxz0O0:
Thanks for input. I will check signing. DotNetZip should actually add zip files as seekable, only if the output stream is not seekable it will revert to streamable. (see here: https://github.com/haf/DotNetZip.Se...0063c0727dabcb/src/Zip/ZipEntry.Write.cs#L975 )

But in russel5's case, it seems some entries are still seekable (for example update-binary was extracted successfully, but extracting update-binary2 failed). update-binary2 should never be touched by PRFCreator so it shouldn't modify its flags (and in the original zip, the flag is not set).

By the way, it seems even the latest busybox version does not support these flags: http://git.busybox.net/busybox/tree/archival/unzip.c

Edit: Obviously update-binary was extraced successfully, because it's extraced by recovery using minzip and not using unzip :cyclops:
[Sony Cross-Device General] Blizz1982:
I have 3 questions...

I make my first flashable prerooted rom:

1. I downloaded form XperiFirm rom 5.1.1 customized CE1 for Xperia Z1

2. I making now FTF file in flashtool and here is the first question:

Should I add to FTF file simlock.ta?

When i will flash rom created in PRFCreator in TWRP with this file my simlock can be blocked or no?

Second question:

I should add to PRFCreator UPDATE-SuperSU-v2.46.zip or i should add non-update version apk - SuperSU.v2.46.apk

Third question:

I don't need stripped FTF file in this case?

I will make update from 4.4.4 Kit kat rom and i have locked bootloader.

Should I check all options on right pane? (kernel, FOTAkernel, Modem, LTALabel, Sign zip and legacy mode)?
[Sony Cross-Device General] brenyoka:
I just want to report that I made my first custom, pre-rooted 5.1.1 [10.7.A.0.222] rom for my ZR (C5503) with this tool, based on "nordic combined" ftf.

I flashed the zip in twrp recovery and everything went perfect.

Thanks for the time & effort!
[Sony Cross-Device General] Miche1asso:
Great tool, thanks! I successully rooted with it Lollipop on Xperia M2! :)

I had an issue, though. I added UPDATE-SuperSU-v2.46.zip to the PRF file but when flashing it (with Philz recovery if it matters), the flashing for the rooting package failed. I know because I had flashed that alone previously and it shows a nice log. So I flashed it manually after the PRF and everything worked.

I downloaded the version 1.1 12 hours ago or so, thus I believe it was the latest. Oh, and I was also connected with adb shell, because I wanted to check if the installation went fine.
[Sony Cross-Device General] aidy.lucas:
V1.1 works flawlessly lots faster than before. Not sure if I had supersu problem as I flashed the su zip again whilst in recovery just to make sure. great job as always

D2303 customised NCB 5.1 full root with nuts t2u dual recovery
[Sony Cross-Device General] zxz0O0:
Are you using a custom busybox with dualrecovery? I just tried to extract a streamable zip file with stock busybox which is bundled with dualrecovery and it worked.

If you are using a custom busybox, make sure you have defined ENABLE_DEKSTOP ( https://github.com/CyanogenMod/android_external_busybox/blob/cm-12.0/archival/unzip.c#L51 )
[Sony Cross-Device General] juanpirulo:
ok i need some help to make my rom deodexed with 5.1.1 firmware. I ve got all files and i want to replaced the odex files by the deodex ones To do this i used Ubuntu with this commands. First i ve got prerooted firmware with v1.1 with legacy mode to get system.ext4 then

(Copy system.ext4 to linux machine, run commands as root or with sudo)

mkdir -p /vdisk

mount -o loop system.ext4 /vdisk

cd /vdisk

(make changes as you want, make sure replaced file have same permission as previous one)

(after you finish making changes: )

umount /vdisk

(copy system.ext4 back inside zip)

The problem is that i am doing something wrong when replaced the folders app framework and priv-app into the system and the system.ext4 image i think get corrupt and doesnt boot up and i lost recovery. If someone can put me in the right dirección in the way i have to replaced this folders i would really aprecciatted. I have to say that i did this with the 5.02 firmware and have no problems so i dont know really what i doing wrong.

I add last recovery log.

Never mind I finally got it. cheers :p
[Sony Cross-Device General] Wolfbreak:
Really nice App. Is it possible to make a flashable zip without system.sin? I just want to have Baseband, Kernel and everything to make a zip File for Stock Sony ROMs if Users come from different ROMs that they can flash this Package.
[Sony Cross-Device General] juanpirulo:
Just erase system .sin from zip

Enviado desde mi C6903 mediante Tapatalk
[Sony Cross-Device General] Masoud.Ser:
hi one problem

i after add apps apks to Extra files and

after that flash rom flashable apps apk are not installed None

I've tested on both type (App-data and App-system)

but When add one flashable zip app system example : Xposed framework or one Font It works

Why is not installed Apks with rom?

thanks
[Sony Cross-Device General] zxz0O0:
You also have to edit updater-script, otherwise the flashing will abort if it can't find system.sin ;)

Can you upload your flashable zip?
[Sony Cross-Device General] Masoud.Ser:
no i'm sorry Its size is more than 1.4G

but me attached Photos of related files

I hope to get help
[Sony Cross-Device General] zxz0O0:
Can you check if the apps exist in /data/app? Maybe it's a problem because the apk names have spaces. Can you try a flashable zip with apps that have no spaces in their name?
[Sony Cross-Device General] Masoud.Ser:
i got Checked None of the apps Not in nowhere rom after installed

and About apk names spaces I have to say xposedinstaller3 and indidorange apk in data /app no spaces in name also Album7.2 in system/app

Is specified in pictures Previous Post
[Sony Cross-Device General] juanpirulo:
is it possible to modified the script in case I add data/app manually after doing the prerooted zip? because if I do it in this way nothing is flashed. cheers

mmm looking two post above i wonder if i add the apps when i make the prerooted zip so probably its something missing in the flashapps.sh script? . cheers
[Sony Cross-Device General] hafezs:
does it work for Lollipop 5.1 (Sony M2 dual) ?
[Sony Cross-Device General] casouzaj:
I don't see why not! Make a nandroid backup prior to flashing the generated flashable-prerooted.zip file. Better safe than sorry!
[Sony Cross-Device General] aidy.lucas:
Yes it works with Xperia m2 use latest version v1.1 used it myself works great

D2303 5.1 lollipop customised NCB rooted de-bloated LB t2u nut dual recovery x-reality+supervivid
[Sony Cross-Device General] juanpirulo:
delete
[Sony Cross-Device General] klausstoertebeker:
Hello!

I have some problems in understanding the way to create the prerooted firmware:

1) If I look at the window of PRFCreator it seems to be VERY easy to create a prerrooted firmware: download the stock FTF file (zip-format), add the current SuperSU (zip-format) and a recovery (zip format), press "Create" and that's it! Is it really so easy? If so I'll try with my new Sony Xperia Z5 compact...

2) When I try to flash a recovery with locked bootloader I always get the error that I can't flash a recovery without unlocking my bootloader. Will I get this error when trying to flash a PRFCreator-created zip file?

3) What about the DRM keys? Will they be deleted when flashing a firmware file?

4) If I add a zip file to the "Extra files" section, will they be installed to the correct locations (for example: Xpodes for Lollipop consists of an ".apk" and a ".zip". The zip file conten is to be installed into the "System" folder)?

5) And how do I a nandroidbackup if I don't have a custom recovery (CWM or TWRP) installed?

Regards
[Sony Cross-Device General] Rootk1t:
You can make prerooted ROM for Z5C, but can't flash it (at least now) because:

1). XZDR recovery doesn't support devices manufactured in 2015 (not only Z5/Z5C/Z5P, but also previous flagmans Z3+/Z4, "super mid-range" M5 and C5 Ultra).

So you can't just install it. (also it needs root for installation).

2). To install PRF you should already have Root and recovery, but you have none.

3). By unlocking bootloader you will delete TA partition with DRM keys, and potentially degrade camera performance and quality.

There is a Backup TA utility, but it is not maintained anymore, it does not support latest devices, and furthermore for it's work it needs root.

Things are definitely complicated for a new Z5 series.

So you have to wait when a way to root Z5 without unlocking bootloader will be discovered or unlock it right now and flash TWRP recovery if it exists for Z5 series. From TWRP you can flash SuperSU to root device, but with unlocked bootloader getting root access was never an issue, actually.
[Sony Cross-Device General] andyblessing:
error: could not find amss_fs_1 and 2...

Tried version 0.7 and 1.1, same problem...

Is it safe to flash...???
[Sony Cross-Device General] aidy.lucas:
Yes it's fine...

D2303 5.1 lollipop customised NCB rooted de-bloated LB t2u nut dual recovery bravia engine 2+x-reality+supervivid
[Sony Cross-Device General] andyblessing:
Setting some permission failed after flashing via recovery on kk and Rom must install stock recovery and it cannot be undone...

I chose No

No root or Superuser after booting...

Sent from my D2403
[Sony Cross-Device General] juanpirulo:
[MENTION=3975929]zxz0O0[/MENTION] could you have a look at your script to flash app data and app system? I think its not working. cheers
[Sony Cross-Device General] zxz0O0:
Just tried it and worked fine. What apps are you including (file name)? Do the apps exist in /system or /data but maybe have wrong permission? What is the recovery log output?
[Sony Cross-Device General] juanpirulo:
I wiil check again, i added firts to the data partición (cpu.apk & stats.apk) and check with root explorer in data, and nothing was there, At the end i added manually to the zip as usually do it with my rom deleting your script lines and adding mines. Cheers

Enviado desde mi C6903 mediante Tapatalk
[Sony Cross-Device General] jcgechevarria:
Sorry zxz0O0, on which terminal are you testing it?, it's beacouse, i can't make it with more than one apk added to the data/app folder, only the first apk were installed, i tested it on 0.8, 0.9, and 1.1.

Thanks.

If you need, you can acces to the apk's i used at this link:

https://drive.google.com/folderview?id=0B11GPXDPOFpAVmVRS2Q1aElmU0E&usp=sharing

So obviously, i renamed it to simple names without spaces or simbols before add it to the prfcreator.
[Sony Cross-Device General] zxz0O0:
You are right. I tested now with multiple apps and seems there is a problem with unzipping. I will fix this bug. :fingers-crossed:
[Sony Cross-Device General] Rootk1t:
Waiting for a next release:fingers-crossed:
[Sony Cross-Device General] XSYLUS:
I did a search and couldn't find anything specifically related to my issue in the forum. Of course I may have just overlooked it. Anyway, the issue I'm experiencing is that I add SuperSU and DualRecovery flashable files to my ftf and make the flashable zip. Under TWRP I install the zip and it goes though the main firmware process fine but then it says installing superuser and recovery and stops without actually installing either. I have to manually run both to ensure I keep root and dualrecovery. Any idea why it says it's installing them but fails to actually run either flashable file?
[Sony Cross-Device General] jcgechevarria:
Sorry but i never had this issue...
[Sony Cross-Device General] juanpirulo:
did you modify anything on the updater-script inside the zip? .cheers
[Sony Cross-Device General] XSYLUS:
No, nothing was modified. I unzipped the latest version of PRFCreator put the dualrecovery flashable file and the supersu 2.46 in the same folder and added the FTF and both zips per the tool. Upon installing from TWRP the readout simply says installing SuperSU and Recovery zip files and then ends without ever actually running either. I've gone through the same process for both my Xperia table and Xperia smartphone using the specific dualrecovery file respectively for each device. The flashable zips install fine when I run them manually after installing the ftf so I know the zip files aren't corrupt.
[Sony Cross-Device General] Rootk1t:
I think you have recovery issue. Try latest 2.8.22 BETA.

[MENTION=3975929]zxz0O0[/MENTION]

Any news on v1.2 with bugfixes?
[Sony Cross-Device General] K3NNYH:
So its this easy to make a firmware? Just put the FTF, SuperSU and Recovery?

It seems too easy to be true! :D
[Sony Cross-Device General] jcgechevarria:
Yes!!! you can trust it, it's so easy to create pre rooted flashable roms, but it's not to easy to add more than one apk to install automatically.
[Sony Cross-Device General] zxz0O0:
Only the APK feature is fixed, I didn't do any other important changes. Do you think I should release v1.2 only with that?
[Sony Cross-Device General] Rootk1t:
You can release it as a bugfix release or implement some new features (if there are any) in a new release.
[Sony Cross-Device General] NRG-R9T:
This stops me from preceeding

Error: Not enough disk space. Please make sure that you have atleast 4GB free space on drive C:\. Currently you only have 3830MB available

How can I change the directory to process the files? The directory that PRFCreator uses is always "C:", even though the prefcreator.exe runs in another drive ("G:").
[Sony Cross-Device General] ecksdeeay:
Q&d. Just move some junk (170+Mb) off your C:
[Sony Cross-Device General] bigrammy:
Thanks for the tut very helpful indeed especially for me who is totally new to this weird Sony Xperia format :eek:

Respect to [MENTION=3975929]zxz0O0[/MENTION] for making this tool :cool:
[Sony Cross-Device General] MickieH:
You're welcome. Glad I helped.

I'm on the latest CE1 region firmware now as it was more up to date than the UK version, and gets updates sooner. The process is pretty much the same, although the tools have been updated since I wrote that post.
[Sony Cross-Device General] zxz0O0:
It uses C:\ because the default temp folder is located there. In the directory of PRFCreator there is a XML file, you can change the temp folder there. Just open the file with notepad.
[Sony Cross-Device General] bigrammy:
I have just got a refurb Xperia ZL from china which is like new :D but this is my first Sony device so things are a little different to what i am used to.

It's kinda hard picking your way through all the info as most of it seems outdated especially for the ZL :eek:

I am now on Lollipop 5.1.1 totally stock (Had to update from 4.3 one update at a time to make sure I didn't miss anything :eek: )

I will test the phone over the next view days then if all is cool I will root it and install a custom recovery etc. :fingers-crossed:

Thanks again :good:
[Sony Cross-Device General] ecksdeeay:
My ZR was an import (though not from East) and I had to go through all the upgrades... I wished I'd saved the ftf of the kitkats, for rooting later.
[Sony Cross-Device General] bigrammy:
Hmmm yes just reading some stuff now maybe I went a couple of updates too far for easy rooting of 5.1.1 :eek:

Still trying to get my head around how the recovery thing works :eek:

I assume stock recovery is combined with the boot.img or whatever it's called by Sony :laugh:

Well I will keep picking through the available info. :cowboy:
[Sony Cross-Device General] akkufix:
Yes. Some short offtopic ;)

Sony's devices are using kernel and recovery in one file --> boot.img

For using a custom recovery in a boot.img, your Sony has to be unlocked - so bootloader open.

Then you can flash every custom rom and kernel.

As long as it is locked, you only can use stock kernels.

For using a recovery on an unlocked bootloader, have a look here.

http://xdaforums.com/showthread.php?t=2261606
[Sony Cross-Device General] bigrammy:
Yes sorry for the OT kind wandered off a bit as a lot of ZL threads have been dead for quite a while it seems.

Which I suppose is a good thing as that normally means things are pretty stable.

Thanks for that link BTW I think I will just go ahead and unlock the bootloader now I made it to 5.1.1 without any issues. :good:
[Sony Cross-Device General] K3NNYH:
Hi guys, i made a FTF firmware and it installed fine. After install i tried to mount system in TWRP but it wouldnt let me... can anyone help? I was trying to install Xposed if that matters.