[tools][Nougat][windows] auto extract system.new.dat - Xiaomi Mi 5 Guides, News, & Discussion

==============================================
automatic system.new.dat extractor(Supports Nougat)
==============================================
==============================================
Requiremnets
==============================================
1. python v3.x
2. 7-Zip v16.x
Note: make sure your environment variables path is correctly set for python and 7-Zip(set it in system properties-->advance-->environment variable-->path)​
==============================================
How To
==============================================
1) extract system_new_dat_extractor.zip into a folder and open extractor.cmd
2) select your rom zip file for which you want to extract system.new.dat
3) wait for few seconds
4) folder named system will open, once it has finished extracting
5) have fun tweaking
==============================================
Credits
==============================================
1) And_pda for imgextractor
2) xpirt for sdat2img.py
==============================================
Tool In Action
==============================================
==============================================
Change-log
==============================================
Code:
* initial release
-------
V2 supports Nougat
converts file_contexts.bin to file_contexts
source​

Related

[TUTORIAL] Extract Kernel from ROM

This simple tutorial is so easy and powerful
This Tutorial is made from me and it has the Copyright!
1) put the ROM from which you want to extract the kernel into original_update folder (C: \ cygwin \ home \ username \ etc..)
2) Run Cygwin and go into the kitchen
3) Select option 1 and select the ROM you want to extract the kernel
4) Option 20 (boot image tools) and choose w
5) Go into BOOT EXTRACTED folder and take the zImage file
6) Now go to WORKING_NameProject / system / lib / modules and copy all files inside.
7) Take a zip of another kernel and switch the components
DONE!
Easy no?

APK name?

Hi guys!
I have cooked my rom!
Deodexed - rooted and zipaligned!
I have tryed flash with recovery.. it's OK!
when the phone starts I get an error
"the application has stopped working "
what is the APK name of message?
How to solve this error?
I have Galaxy S3
Only thing I can suggest is grabbing a logcat and seeing what is crashing, you aren't giving a whole lot of info there.
how do I view the logcat?
After you have recorded it then just open it in a text editor.
Sent from my SCH-R760 using Tapatalk 2
how do i view logcat?
Click to expand...
Click to collapse
not sure if you ment how to open the logcat file
or how to actually get the logcat file.
heres how to get it.
use adb
best way to do it.
you need to have adb setup on your computer
connect device to computer
open terminal or cmd
Code:
adb
this will give you usage info about adb if not adb needs to be added to PATH
Code:
adb logcat -d > path/to/ desktop/logcat.txt
you can find market app that will save logcat to your sd card
if I remember correctly "alogcat"
This is my logcat
App "Message" crashed!
http://paste.ubuntu.com/1062350/
line 7777
Help please :'(
Did you remove CSC folder?
I never had a folder csc
Code:
[email protected]:~/Scrivania/ROM/WORKING_062512_024231/system$ ls
app cameradata framework media usr vsc
bin etc hdic preloaddata vendor wakeupdata
build.prop fonts lib tts voicebargeindata xbin
roxdragon said:
I never had a folder csc
Code:
[email protected]:~/Scrivania/ROM/WORKING_062512_024231/system$ ls
app cameradata framework media usr vsc
bin etc hdic preloaddata vendor wakeupdata
build.prop fonts lib tts voicebargeindata xbin
Click to expand...
Click to collapse
You didn't extract it , it's included on the "cache.img", we can work without it on sgs2 but it's a must on sgs3.
Code:
============================================================
Android Kitchen 0.196 - by dsixda (xda-developers.com)
============================================================
11 - Deodex files in your ROM
12 - Add task killer tweak for speed (stock ROM only)
13 - Add /data/app functionality
14 - Add Nano text editor + sysro/sysrw
15 - Add Bash (command shell)
16 - Add Apps2SD
17 - Add /etc/init.d scripts support (busybox run-parts)
18 - Add custom boot animation functionality
19 - Porting tools (experimental)
20 - Tools for boot image (unpack/re-pack/etc.)
21 - Unpack data.img
22 - Sign APK or ZIP file(s)
23 - Convert update-script or updater-script
24 - Miscellaneous options / Plugin scripts
99 - Build ROM from working folder
0 - BACK TO MAIN MENU
Enter option: 0
============================================================
Android Kitchen 0.196 - by dsixda (xda-developers.com)
============================================================
1 - Set up working folder from ROM
2 - Add root permissions
3 - Add BusyBox
4 - Disable boot screen sounds
5 - Add wireless tethering
6 - Zipalign all *.apk files to optimize RAM usage
7 - Change wipe status of ROM
8 - Change name of ROM
9 - Check update-script for errors
10 - Show working folder information
0 - ADVANCED OPTIONS
99 - Build ROM from working folder
u - Update/About kitchen
x - Exit
Enter option:
How to extract cache.img?
with kitchen?
i have execute this:
Code:
CREATE WORKING FOLDER FOR ROM
==============================
Ensure there is at least one ROM under the 'original_update' folder!
Select an option:
s - Show supported formats
x - Abort, don't create working folder
Or press Enter to continue
? s
----------------------------------------------------------------------
The format for each ROM must be one of the following:
- system.img + optional boot.img/lib.img (e.g. stock ROM or Nandroid)
- ZIP file for a custom ROM (e.g. update.zip)
- ZIP file containing *.img (e.g. stock rom.zip)
- ZIP file containing shipped ROM in SYSTEM + BOOT folder format
- Working folder made with this kitchen (e.g. WORKING_old_rom)
Other formats:
Samsung Galaxy S:
- factoryfs.rfs + optional cache.rfs/zImage
- PDA.tar.md5 + optional CSC.tar.md5/PHONE.tar.md5
- PDA.tar + optional CSC.tar/PHONE.tar
- TAR/ZIP file containing factoryfs.rfs + more
- TAR/ZIP file containing PDA.tar.md5/PDA.tar + more
Samsung Galaxy S Plus:
- system.img.ext4 + optional cache.img.ext4/boot.img
- TAR/ZIP file containing system.img.ext4 + more
Samsung Galaxy SII:
- factoryfs.img + optional cache.img/zImage
- system.img.ext4 + optional cache.img.ext4/boot.img
- TAR/ZIP file containing factoryfs.img/system.img.ext4 + more
- system.ext4.tar + optional boot.img (Nandroid backup)
Huawei:
- APP file from Huawei software update (e.g. UPDATE.APP)
----------------------------------------------------------------------
Press Enter to continue, or type 'x' to abort:
Available ROMs:
(1) system.img and boot.img
Enter selection number (default=1, cancel=0):
Found original_update/system.img
Found original_update/boot.img
The new working folder will be named WORKING_062712_171010
Change the name (y/n)? (default: n):
Creating working folder WORKING_062712_171010 ...
Copying boot.img ...
Copying system.img ...
Adding an update-script ...
"system.img" -> "../system.img.ext4"
Warning: No cache.img.ext4 found. You can unpack this file separately
by running the plugin script in the kitchen's Advanced menu options.
If your device doesn't use a CSC, then just ignore this message.
Analyzing system.img.ext4 ...
Compiling simg2img ...
simg2img successfully compiled
Converting system.img.ext4 into a format for unpacking ...
computed crc32 of 0xb9d9b0e7, expected 0x00000000
Mounting ext4_system.img to loopback device and then extracting files ...
..............
..........
...
N.B
Code:
Warning: No cache.img.ext4 found. You can unpack this file separately
by running the plugin script in the kitchen's Advanced menu options.
If your device doesn't use a CSC, then just ignore this message.
into my original_update have:
Code:
[email protected]:~/Scrivania/ROM/original_update$ ls
boot.img cache.img hidden.img modem.bin recovery.img system.img
Can you help me please? Thank u
roxdragon said:
Code:
============================================================
Android Kitchen 0.196 - by dsixda (xda-developers.com)
============================================================
11 - Deodex files in your ROM
12 - Add task killer tweak for speed (stock ROM only)
13 - Add /data/app functionality
14 - Add Nano text editor + sysro/sysrw
15 - Add Bash (command shell)
16 - Add Apps2SD
17 - Add /etc/init.d scripts support (busybox run-parts)
18 - Add custom boot animation functionality
19 - Porting tools (experimental)
20 - Tools for boot image (unpack/re-pack/etc.)
21 - Unpack data.img
22 - Sign APK or ZIP file(s)
23 - Convert update-script or updater-script
24 - Miscellaneous options / Plugin scripts
99 - Build ROM from working folder
0 - BACK TO MAIN MENU
Enter option: 0
============================================================
Android Kitchen 0.196 - by dsixda (xda-developers.com)
============================================================
1 - Set up working folder from ROM
2 - Add root permissions
3 - Add BusyBox
4 - Disable boot screen sounds
5 - Add wireless tethering
6 - Zipalign all *.apk files to optimize RAM usage
7 - Change wipe status of ROM
8 - Change name of ROM
9 - Check update-script for errors
10 - Show working folder information
0 - ADVANCED OPTIONS
99 - Build ROM from working folder
u - Update/About kitchen
x - Exit
Enter option:
How to extract cache.img?
with kitchen?
i have execute this:
Code:
CREATE WORKING FOLDER FOR ROM
==============================
Ensure there is at least one ROM under the 'original_update' folder!
Select an option:
s - Show supported formats
x - Abort, don't create working folder
Or press Enter to continue
? s
----------------------------------------------------------------------
The format for each ROM must be one of the following:
- system.img + optional boot.img/lib.img (e.g. stock ROM or Nandroid)
- ZIP file for a custom ROM (e.g. update.zip)
- ZIP file containing *.img (e.g. stock rom.zip)
- ZIP file containing shipped ROM in SYSTEM + BOOT folder format
- Working folder made with this kitchen (e.g. WORKING_old_rom)
Other formats:
Samsung Galaxy S:
- factoryfs.rfs + optional cache.rfs/zImage
- PDA.tar.md5 + optional CSC.tar.md5/PHONE.tar.md5
- PDA.tar + optional CSC.tar/PHONE.tar
- TAR/ZIP file containing factoryfs.rfs + more
- TAR/ZIP file containing PDA.tar.md5/PDA.tar + more
Samsung Galaxy S Plus:
- system.img.ext4 + optional cache.img.ext4/boot.img
- TAR/ZIP file containing system.img.ext4 + more
Samsung Galaxy SII:
- factoryfs.img + optional cache.img/zImage
- system.img.ext4 + optional cache.img.ext4/boot.img
- TAR/ZIP file containing factoryfs.img/system.img.ext4 + more
- system.ext4.tar + optional boot.img (Nandroid backup)
Huawei:
- APP file from Huawei software update (e.g. UPDATE.APP)
----------------------------------------------------------------------
Press Enter to continue, or type 'x' to abort:
Available ROMs:
(1) system.img and boot.img
Enter selection number (default=1, cancel=0):
Found original_update/system.img
Found original_update/boot.img
The new working folder will be named WORKING_062712_171010
Change the name (y/n)? (default: n):
Creating working folder WORKING_062712_171010 ...
Copying boot.img ...
Copying system.img ...
Adding an update-script ...
"system.img" -> "../system.img.ext4"
Warning: No cache.img.ext4 found. You can unpack this file separately
by running the plugin script in the kitchen's Advanced menu options.
If your device doesn't use a CSC, then just ignore this message.
Analyzing system.img.ext4 ...
Compiling simg2img ...
simg2img successfully compiled
Converting system.img.ext4 into a format for unpacking ...
computed crc32 of 0xb9d9b0e7, expected 0x00000000
Mounting ext4_system.img to loopback device and then extracting files ...
..............
..........
...
N.B
Code:
Warning: No cache.img.ext4 found. You can unpack this file separately
by running the plugin script in the kitchen's Advanced menu options.
If your device doesn't use a CSC, then just ignore this message.
into my original_update have:
Code:
[email protected]:~/Scrivania/ROM/original_update$ ls
boot.img cache.img hidden.img modem.bin recovery.img system.img
Can you help me please? Thank u
Click to expand...
Click to collapse
Use "24" option on Advanced options then "Extract_SGS2_CSC_from_cache.img", i think cache.img must be the root working folder, it will convert it to ext, then follow the displayed steps.
wanam said:
Use "24" option on Advanced options then "Extract_SGS2_CSC_from_cache.img", i think cache.img must be the root working folder, it will convert it to ext, then follow the displayed steps.
Click to expand...
Click to collapse
Code:
PLUGIN SCRIPTS
--------------------------------------
(1) Extract_SGS_CSC_from_cache.rfs
(2) Decompile_and_Compile_Deodexed_File
(3) Install_SGS2_CWM_Manager
(4) Batch_Deodex
(5) Sample
(6) Extract_SGS2_Kernel_Initramfs
(7) ReadMe
(8) Extract_SGS2_CSC_from_cache.img
--------------------------------------
0 - Exit r - Refresh list
Enter an option: 8
Samsung Galaxy S2 CSC Extractor
-------------------------------
This script will extract the CSC (Customer Software Customization)
from the cache.img of a stock Samsung Galaxy S2 firmware. The CSC
comes in a file called 'sec_csc.zip' which contains location and
carrier-specific configurations and software.
Proceed (y/n)? (default: y):
Creating folder /home/gianni/Scrivania/ROM/csc_062712_205036 ...
---> Place stock cache.img or cache.img.ext4 into the folder mentioned above <--
Press Enter to continue
Compiling simg2img ...
simg2img successfully compiled
Unpacking cache.img into a format for unpacking ...
computed crc32 of 0x20453d0a, expected 0x00000000
Mounting ext4_cache.img to loopback device and then extracting files ...
[sudo] password for gianni:
Finished! Your file is at csc_062712_205036/sec_csc.zip.
You can unzip this file and copy the contents of the 'system'
folder to your ROM's system folder.
I have a package "sec_csc.zip"
I have extracted sec_csc.zip and i have into *.zip
META-INF
system
i need copy all files into system to /WORKING_FOLDER/system? and META-INF?
now??
Solved thank u
Another quesyion..
How to remove default app during installation of custom rom?
MyTaxy.apk, videohub, rhs hotel .... etc...?
Sent from my GT-I9300 using xda app-developers app

[GUIDE] [LINUX/UBUNTU] Extract/Modify/Rebuild Lollipop ROMs !

Extracting:
1. Download this package: https://tusfiles.net/oaiw9ze20tbl
2. Extract to a folder and chmod 777 -r /path/to/the/folder
3. cd (change directory) to that folder
4. Run prereq.sh
5. Place system.transfer.list and system.new.dat into the folder
6. Open extractor.sh using a text edit program
7. Find the line containing chown command, replace yash:yash with yourusername:yourusername
8. Run extractor.sh
9. Modify contents found in output folder​
Rebuilding:
1. Do above first and then run compress.sh
2. Find the rebuilt system.new.dat and system.transfer.list in sdat folder​
Making it into a ROM:
1. Do above first
2. Find a zip ROM for OnePlus 2 that contains system.transfer.list and system.new.dat
3. Replace it with your rebuilt ones from above mentioned steps
4. Voila! ROM ready!​
NOTE:
The package contains OxygenOS SELinux file contexts in progs subfolder...
So, to modify CM ROMs you need to get file_contexts file from the zip of the ROM and replace the one found in progs subfolder
Credits:
@xpirt
Please mention​
Two questions; Is this a rom kitchen like tool for OxygenOS? Are there any libs or binaries or other dependencies?
I'm a bit busy, but I'll take it for a spin when I can.
Oh one last thing, is there a repo for this?
Ta,
ALQI
Sent from me mobile.
Nice guide
alquimista said:
Two questions; Is this a rom kitchen like tool for OxygenOS? Are there any libs or binaries or other dependencies?
I'm a bit busy, but I'll take it for a spin when I can.
Oh one last thing, is there a repo for this?
Ta,
ALQI
Sent from me mobile.
Click to expand...
Click to collapse
The dsixda kitchen had much more functions then this but you may cknsidet it as a temporary lollipop kitchen with not much extra functionality..
This was like a automation script for me and was a quick one so repo wasn't needed
I have used this script on Ubuntu 64bit and the only extra dependency apart from those included in package are installed by prereq.sh
Btw this is not just for oxygen os it can also be used for any cm or cm based rom here but.do read the note then
Yash98 said:
Extracting:
1. Download this package: https://tusfiles.net/oaiw9ze20tbl
2. Extract to a folder and chmod 777 -r /path/to/the/folder
3. cd (change directory) to that folder
4. Run prereq.sh
5. Place system.transfer.list and system.new.dat into the folder
6. Open extractor.sh using a text edit program
7. Find the line containing chown command, replace yash:yash with yourusername:yourusername
8. Run extractor.sh
9. Modify contents found in output folder​
Rebuilding:
1. Do above first and then run compress.sh
2. Find the rebuilt system.new.dat and system.transfer.list in sdat folder​
Making it into a ROM:
1. Do above first
2. Find a zip ROM for OnePlus 2 that contains system.transfer.list and system.new.dat
3. Replace it with your rebuilt ones from above mentioned steps
4. Voila! ROM ready!​
Click to expand...
Click to collapse
So does this allow you to make ROM's for the OP2 from ROM's based on other devices, or what? Sorry if I'm sort of a noob, I just don't understand what is being done.
Thanks!
Me1256 said:
So does this allow you to make ROM's for the OP2 from ROM's based on other devices, or what? Sorry if I'm sort of a noob, I just don't understand what is being done.
Thanks!
Click to expand...
Click to collapse
You can make ROMs from prebuilt ROMs like OxygenOS or any other built ROM like Exodus, CM12, etc.
Basically modify ROMs without rebuilding from source (which takes a lot of time!)
Sir I downloaded your tool and followed ur guide....But after I run extract.sh there is no files/folders in output folder.Plz reply thankz in advancw
Thank you. I really wanted to extract .dat file..
Sent from my ONE A2003 using Tapatalk
This is a great tool but I wanted to know how to edit the system folder in ubuntu. Like using chmod and chown to pre-root and uninstall some other apps. Can somebody please direct me in that direction.
I go test...

[KITCHEN][PHP] Lego_Infinity's Kitchen [Windows] (v1.0)

Lego_Infinity's Kitchen
-------------------------------------------
Warning! This app is in alpha stage. I did some tests, and all did good. I will wait your feedback.
You will need to manually copy a ROM to the created project.
Requirements:
- Windows: XAMPP Control Panel
- Linux: 'apache2' and 'php5' (install them with 'sudo apt-get install' command)
^ Linux is not supported yet.
Installation:
- Windows:
1. Install XAMPP Control Panel
* When instaling, you'll have a list with programs to install. Make sure Apache and PHP are checked.
2. Download this app from attachments.
3. Extract the ZIP with the app in 'htdocs'.
* You'll find 'htdocs' in XAMPP's folder. Depends where you installed it.
4. Launch XAMPP Control Panel and start Apache.
5. Open browser and navigate to 'http://localhost'.
6. You're good to go.
- Linux:
1. Install 'apache2' and 'php5'.
* 'sudo apt-get install apache2'
* 'sudo apt-get install php5'
2. Make sure Apache is running.
* 'sudo service apache2 start'
3. Download this app from attachments.
4. Extract the ZIP with the app in 'htdocs'.
* Search for 'htdocs' in '/var/www'. I don't know exactly the name of the folder in Linux.
5. Open browser and navigate to 'http://localhost'.
6. You're good to go.
Some tips:
1. Extract the ZIP with the app in 'htdocs'. The app may not work if you extract it in another folder.
Screenshots:
http://imgur.com/a/LaUni
Features:
- Debloat
- Build
More features soon.
Awesome!!

How To Guide [Guide] How to make Miui Mix fully read/write and decrypted

How to make Miui Mix fully read/write and decrypted using only your phone with UKA kitchen:
DISCLAIMER NOTICE:
* I'm not responsible for bricked devices, dead SD cards.
* YOU are choosing to make these modifications.
This guide should work with any a11 rom built under brotli compression inside rom.zip (system.new.dat.br, vendor.new.dat.br..), and it won't work with roms under payload.bin compression.
1- You need at least +30gb of space in internal memory.
2- Install UKA_5.6_eng_magisk.zip magisk module.
Dowload from here:
Unpacker Kitchen for Android(UKA)
version: 4.9.4 Last update of the program in the header: 04/06/2020 Developer: kory-vadim For the program to function, root privileges are required. Install: flash as Magisk module Short description: Unpacking, assembling and converting...
forum.xda-developers.com
3- Reboot and Install termux and type:
su <enter>
menu <enter>
4- Using mt manager app or X-plore app (i use both) copy MiuiMix.zip into internal memory (which will be modded).
5- Extract system.new.dat.br, system.patch.dat & system.transfer.list from MiuiMix.zip to /data/local/SystemUnpacker/
6- In termux type 6 then 1, then type cd /data/local/UnpackerSystem, then 1 to unpack *.br.
7- With mt manager app check /data/local/SystemUnpacker/ if the extraction has been done sucessefully, and delete: system.new.dat.br, system.patch.dat, system.transfer.list and system.img.
8- In termux type 9 then 1 then 0 then 1 .. and while the compression process, choose 5 as compression level (levels from 0 to 7) to repack system again into br format (with r/w permissions).
9- Copy/overwrite the new: system.new.dat.br, system.patch.dat & system.transfer.list into MiuiMix.zip ( update files inside zip).
10- In termux type type 12 then 1 to clean folder.
11- Do same steps (from step 5 to 10) for :
product.new.dat.br, product.patch.dat & product.transfer.list.
12- Do same steps (from step 5 to 10) for :
system_ext.new.dat.br, system_ext.patch.dat & system_ext.transfer.list.
13- Now we will decrypt vendor:
Extract vendor.new.dat.br, vendor.patch.dat, vendor.transfer.list & dynamic_partitions_op_list from MiuiMix.zip to /data/local/SystemUnpacker/
14- Open /data/local/UnpackerSystem/vendor/etc/fstab.default wth text editor (i prefer using mt manager), search for "fileencryption" and replace it wth "encryptable" and save.
15- Do same with /data/local/UnpackerSystem/vendor/etc/fstab.emmc.
16- Delete: vendor.new.dat.br, vendor.patch.dat, vendor.transfer.list and vendor.img.
17- In termux type 9 then 3, then type cd /data/local/UnpackerSystem, then 1, and while the compression choose 4 for android11 compatibility and choose 5 for compression level.
18- with mt manager open/data/local/UnpackerSystem/config/vendor/vendor_size_out.txt and copy the new vendor partition size ("1859366912" for example).
19- With mt manager open /data/local/UnpackerSystem/dynamic_partitions_op_list as text and replace values:
Grow partition vendor_a from 0 to 1715535872
resize vendor_a 1715535872
Replace two values "1715535872" with "1859366912" and save.
20- Copy/overwrite the new: vendor.new.dat.br, vendor.patch.dat, vendor.transfer.list & dynamic_partitions_op_list into MiuiMix.zip (update files inside zip).
21- Save the new MiuiMix.zip in Sd card.
22- Boot into ofox recovery , wipe metadata, data & cache , install the new MiuiMix.zip, reinstall ofox, reboot to ofox recovery, format data, reboot to system and pray
Thanks to @kory-vadim for UKA kitchen and @RajivShastri king for the translation of this cool tool from russian to english language.
Thanks to MiuiMix team.

Categories

Resources