[TOOL] Convert sin to flashable.zip

Search This thread

munjeni

Senior Member
Jun 2, 2011
9,720
22,375
Disclaimer:

Our tool was made for testing and educational purposes, ME is not responsible for what you do on/with your device using our tool, you must agree that you using our tool on your own risk, I am not responsible if you brick your device or anything else!

What is this for:

This tool converts xperia sin file and directly create flashable.zip for use to flash your android device with recovery.

Changelog:

- version 1. (missing selinux label generator)
- version 2. (implemented selinux label generator tool. Missing static busybox)
- version 3.
- version 4. some small corections, added missing update-binary
- version 5. some improvements, new sin unpack tool

How to use:

Extract sin2zip.rar archive & simple run CONVERT.bat & chose system.sin image , tool will produce flashable.zip

What you need to check or probably modify in generated flashable.zip:

1. busybox I have used is 32bit, it will work on 64bit too (not busybox.exe !!), I not recommend to change busybox, but before you go for busybox replace make sure it is STATIC busybox and have working (chcon and chown) with -h parameter!
2. check updater-script e.g. first 3 lines and last 2 lines!
3. this -> https://xdaforums.com/showpost.php?p=80593639&postcount=7

Source code:

modified ext4_read tool is in attachment. Original ext4_read is here, many thanks to author! I have notified Igor, hope we see selabels listing integration in 7z without need for hackish ext4_read
sony dump tool -> https://github.com/munjeni/anyxperia_dumper
 

Attachments

  • ext4_read.rar
    7.8 KB · Views: 265
  • sin2zip.rar
    2.1 MB · Views: 107
Last edited:

bigrammy

Senior Member
Apr 8, 2011
2,962
2,592
huddersfield
This tool converts xperia sin file and directly create flashable.zip for using with recovery. 75 percent is done. 25 percent of the things is missing, selinux related things. I need help for implement selinux to the 7z to list selinux labels from ext4! Here is work in proogress
Maybe @SuperR. of SuperR's Kitchen fame HERE could give you some pointers on this. :fingers-crossed:
Maybe you could work together to integrate some of your great Sony specific tools into the Kitchen :D
 

munjeni

Senior Member
Jun 2, 2011
9,720
22,375
That kitchen do not have anything related to our tool. I have done some progress in extracting selabels from ext4 by searcing with inode number \0/ :)
Right now tool is able to extract selabels by inode number pointing :)
 
Last edited:

serajr

Recognized Developer / Recognized Themer
Apr 21, 2011
5,071
18,700
São Paulo - SP
So you are on the drawing board again! Cool... :highfive:
About what you wrote in the j4nn's thread (1. to make fota unpack tool), count on me if you need help, ok!
If I'm not mistaken, I sent you a ota update_package file from my x performance some time ago, but if I am, here it goes again.
Cheers.
 
  • Like
Reactions: munjeni

munjeni

Senior Member
Jun 2, 2011
9,720
22,375
So you are on the drawing board again! Cool... :highfive:
About what you wrote in the j4nn's thread (1. to make fota unpack tool), count on me if you need help, ok!
If I'm not mistaken, I sent you a ota update_package file from my x performance some time ago, but if I am, here it goes again.
Cheers.

Thanks! I will look into ota package till after I finish our tool
 
  • Like
Reactions: serajr

munjeni

Senior Member
Jun 2, 2011
9,720
22,375
Almost done! New version v2 is out! Made small tool to read ext4 image and print selabels to updater-script, it look like this:

if regular file or folder:
Code:
run_program("/tmp/busybox", "chcon", "u:object_r:location_exec:s0", "/system/bin/xtwifi-inet-agent");

if symlink:
Code:
run_program("/tmp/busybox", "chcon", "-h", "u:object_r:vendor_file:s0", "/system/bin/xxd");

Tool is curently 95 percent done, not realy ready for flashig produced flashable.zip , need to implement 5 percent of the things. You can try but plese do not try to flash with recovery it will not work corectly!
 
Last edited:
  • Like
Reactions: funiewski

munjeni

Senior Member
Jun 2, 2011
9,720
22,375
Version 3 done! Before you flash flashable.zip please check updater-script first 3 lines and last 2 lines! Do in mind our tool didn't include the rest of firmware like kernel, vendor...etc, tool only convert one sin file to flashable.zip, if you need the rest of firmware run CONVERT.bat and chose another sin file, do merges in zip by hand and do merges-modification in updater-script by hand too. Not recommended for newbies! I can't tell you if produced flashable.zip is working I'm not tried to flash flashable.zip, but I think it going work. Important thing is initial tool is done and somebody need to test. Let me know :) Enjoy!
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    Disclaimer:

    Our tool was made for testing and educational purposes, ME is not responsible for what you do on/with your device using our tool, you must agree that you using our tool on your own risk, I am not responsible if you brick your device or anything else!

    What is this for:

    This tool converts xperia sin file and directly create flashable.zip for use to flash your android device with recovery.

    Changelog:

    - version 1. (missing selinux label generator)
    - version 2. (implemented selinux label generator tool. Missing static busybox)
    - version 3.
    - version 4. some small corections, added missing update-binary
    - version 5. some improvements, new sin unpack tool

    How to use:

    Extract sin2zip.rar archive & simple run CONVERT.bat & chose system.sin image , tool will produce flashable.zip

    What you need to check or probably modify in generated flashable.zip:

    1. busybox I have used is 32bit, it will work on 64bit too (not busybox.exe !!), I not recommend to change busybox, but before you go for busybox replace make sure it is STATIC busybox and have working (chcon and chown) with -h parameter!
    2. check updater-script e.g. first 3 lines and last 2 lines!
    3. this -> https://xdaforums.com/showpost.php?p=80593639&postcount=7

    Source code:

    modified ext4_read tool is in attachment. Original ext4_read is here, many thanks to author! I have notified Igor, hope we see selabels listing integration in 7z without need for hackish ext4_read
    sony dump tool -> https://github.com/munjeni/anyxperia_dumper
    4
    Version 5 done.
    3
    That kitchen do not have anything related to our tool. I have done some progress in extracting selabels from ext4 by searcing with inode number \0/ :)
    Right now tool is able to extract selabels by inode number pointing :)
    3
    Version 4 done. Enjoy!
    2
    Version 3 done! Before you flash flashable.zip please check updater-script first 3 lines and last 2 lines! Do in mind our tool didn't include the rest of firmware like kernel, vendor...etc, tool only convert one sin file to flashable.zip, if you need the rest of firmware run CONVERT.bat and chose another sin file, do merges in zip by hand and do merges-modification in updater-script by hand too. Not recommended for newbies! I can't tell you if produced flashable.zip is working I'm not tried to flash flashable.zip, but I think it going work. Important thing is initial tool is done and somebody need to test. Let me know :) Enjoy!