Automated system/boot.img unpack/repack script - Galaxy S III Mini Q&A, Help & Troubleshooting

Hello everyone,
I've been playing around with adding root to my stock ROM these past few days, and have found it very slow and tedious trying to remember all the commands to unpack and repack the images.
To make things simpler I've created a script that automates almost the whole process.
I've named it worker as it does all the work for you, and it is just simply a bash script. But it makes things a lot quicker and easier.
I have only been able to test with my S3 Mini, but should work with any ROM that has boot.img and system.img
Simply extract the .img files from the tar.md5 or .zip ROM file, and place them in the original folder.
Once you have those in the original folder just simply run the worker.txt file from the terminal, making sure you are in the worker folder directory.
When the script is run you will be given the options to unpack/repack system.img, mount system.img (This is after you extract it do not try and mount the original file it wont work), unpack/repack boot.img, unpack/repack ramdisk, create ROM (This will create an odin flashable tar.md5 from the repacked files) and finally clean up (This will clear all unpacked and repacked files only leaving the files in the original folder)
To select an option simply type y then enter to execute that command or just hit enter to skip.
When the system.img is mounted it will be mounted in the mount folder.
When repacking the system.img you will be prompted to enter the file size, if you have and S3 Mini I8190N simply type s3mini for the size (This may work for other S3 models but I have no way of testing so let me know). If you have a different device use the file size of the original UNMODIFIED system.img, enter the size in bytes or MB (If entering in MB use this format, xxx being a number. xxxM).
Please give me feedback for improvements or problems,
Thanks for reading.
P.S. Sorry if in wrong place please move if necessary
EDIT: If you can't run the script with the ./ command, chmod +x the file

Antonyb1995 said:
Hello everyone,
I've been playing around with adding root to my stock ROM these past few days, and have found it very slow and tedious trying to remember all the commands to unpack and repack the images.
To make things simpler I've created a script that automates almost the whole process.
I've named it worker as it does all the work for you, and it is just simply a bash script. But it makes things a lot quicker and easier.
I have only been able to test with my S3 Mini, but should work with any ROM that has boot.img and system.img
Simply extract the .img files from the tar.md5 or .zip ROM file, and place them in the original folder.
Once you have those in the original folder just simply run the worker.txt file from the terminal, making sure you are in the worker folder directory.
When the script is run you will be given the options to unpack/repack system.img, mount system.img (This is after you extract it do not try and mount the original file it wont work), unpack/repack boot.img, unpack/repack ramdisk, create ROM (This will create an odin flashable tar.md5 from the repacked files) and finally clean up (This will clear all unpacked and repacked files only leaving the files in the original folder)
To select an option simply type y then enter to execute that command or just hit enter to skip.
When the system.img is mounted it will be mounted in the mount folder.
When repacking the system.img you will be prompted to enter the file size, if you have and S3 Mini I8190N simply type s3mini for the size (This may work for other S3 models but I have no way of testing so let me know). If you have a different device use the file size of the original UNMODIFIED system.img, enter the size in bytes or MB (If entering in MB use this format, xxx being a number. xxxM).
Please give me feedback for improvements or problems,
Thanks for reading.
P.S. Sorry if in wrong place please move if necessary
Click to expand...
Click to collapse
work on gt-i8200n to?

linklusitano said:
work on gt-i8200n to?
Click to expand...
Click to collapse
No reason why not, I'm just not able to test others

Antonyb1995 said:
No reason why not, I'm just not able to test others
Click to expand...
Click to collapse
testing

linklusitano said:
testing
Click to expand...
Click to collapse
Great let me know if it works!
EDIT: Make sure you enter the right size for the system.img file, the pre entered size using s3mini may work fine as they are very similar devices.

Antonyb1995 said:
Great let me know if it works!
EDIT: Make sure you enter the right size for the system.img file, the pre entered size using s3mini may work fine as they are very similar devices.
Click to expand...
Click to collapse
how do i run worker.txt?

linklusitano said:
how do i run worker.txt?
Click to expand...
Click to collapse
Your using Linux right?
Open a terminal and change directory to the worker folder, once there type ./worker.txt and it should run. If it doesn't issue this command chmod +x worker.txt that should fix it.

Antonyb1995 said:
Your using Linux right?
Open a terminal and change directory to the worker folder, once there type ./worker.txt and it should run. If it doesn't issue this command chmod +x worker.txt that should fix it.
Click to expand...
Click to collapse
windows 8.1

linklusitano said:
windows 8.1
Click to expand...
Click to collapse
Ah okay, If you install Cygwin you can run bash scripts in Windows.
LINK: https://www.cygwin.com/

Related

[HOWTO] Cook your custom rom for LG P500

Hi there, we are going to use excellent dsixda's HTC Android Kitchen to cook our custom ROMs for LG P500. The list of the things we are going to need:
Original ROM (Check this thread)
LG Utils 0.4.2 (Check this URL)
DzDecryptor v1.0b(Check this thread)
Cygwin (Check this URL
Unyaffsmbn (Check this thread)
Dsixda's HTC Android Kitchen (Check this thread)
Note: I have a "romcooking" folder on my home (C:\Users\Patricio\romcooking), inside i have all the utils needed, and the .kdz file for the stock ROM. I recommend to use tab to complete filenames since they are too long.
First we need to get a dz from the kdz (original firmware), extract LG Utils 0.4.2 and open KP500-Utils-EN.exe (You need to run this as administrator, or else you are getting an empty .cab file), select the I option (Extract files from KDZ file), and type the route to your .kdz file (Mine is C:\Users\Patricio\romcooking\V10A_00.kdz). Now, you must have a V10A_00.cab (Or another name, it depends on the stock rom you downloaded), open it with a extractor like 7zip or similar and extract the file "LGP500AT-00-V10a-EUR-XX-SEP-25-2010+0.dz" or similar to our romcooking folder.
Then we are going to uncompress the .dz with DZDecrypt (Press Win + R, type cmd and enter, then you cd to the folder where DzDecrypt is located (ex:
Code:
cd C:\Users\Patricio\romcooking\DZDecryptor_v1.0b
then we type:
Code:
DZDecrypt.exe "C:\Users\Patricio\romcooking\LGP500AT-00-V10a-EUR-XX-SEP-25-2010+0.dz" C:\Users\Patricio\romcooking\stockrom
This is going to create a "stockrom" folder in our original romcooking folder, you are going to see a lot of files in the stockrom folder, the important ones are boot.img and system.mbn (DZDecrypt should have merged your system.mbn_0, system.mbn_1 and system.mbn_2)
We need to install cygwin, open the setup.exe, just keep hitting next until you are on the select packages screen, go to "Devel" menu and select to install gcc, gdb and make, in "Interpreters" check perl, in "Archive" check zip and unzip, in "Web" check wget, in "Editors" check nano and vim and in "Utils" select cpio, util-linux and ncurses. Make some tea and wait for the cygwin install to finish and we are ready to go to the next step.
We are going to compile unyaffsmbn, copy the extracted files from unyaffsmbn, system.mbn and boot.img to C:\cygwin\home\Patricio, now fire up cygwin and compile unyaffsmbn with:
Code:
gcc -o unyaffsmbn unyaffsmbn.c
Now uncompress system.mbn, delete symlinks of bin/ and zip everything with:
Code:
mkdir system
cd system
../unyaffsmbn.exe ../system.mbn
find bin -type l -exec rm {} +
cd ..
zip -r stockrom.zip boot.img system/
We are ready to go to the kitchen (We have a stockrom.zip on C:\cygwin\home\Patricio, remember that)
Now we are going to use dsixda's HTC Android Kitchen, we need to have installed JDK. After we have downloaded and uncompressed the kitchen (Mine is in C:\cygwin\home\Patricio\kitchen), we need to put the ziped file we got in the previous step into the original_update folder of the kitchen. We are ready to go! fire up cygwin and cd to the kitchen location and exec ./menu , select option 1, you should see the zip file, put the number of it, and you are ready to go (It will create a WORKING_XXXXXX_XXXXXX folder, you can modify the files in WORKING_XXXX_XXXXX/system, add APKs, modify the apns file, etc).
This command also gives us a lot of options for our rom: enable root, add busybox, deodex our files, zipalign, etc. If you are going to edit text files, use an editor like Notepad++ or any other program that can open/edit/save files in linux compliant style. It's pretty easy to use the kitchen, just check the official thread for options or help
The common options i use are:
Add root permission (option 2), press f when asked and you are done
Add Busybox
Change name of the rom, easy cake
Advanced options, press 0
Add /data/app functionality
Add Apps2SD
Add custom boot animation functionality
Deodex files in your ROM
And Finally: Zipalign all *.apk files to optimize RAM usage
That should do the trick, when you are ready to cook your rom, just type 99, wait for it to build and it should be in the OUTPUT_ZIP folder in your kitchen folder.
Took info from this thread (About decompressing .dz and .mbn, and making it to work with the kitchen), and info from ruigui and tritant in this thread. The awesome android kitchen by dsixda. Sorry if i forgot to mention any work, just post it or pm me
If you have anything you want to add to the guide, just post it
You don't need to dual boot to linux. It can be done with cygwin.
When you follow dsixda's guide to install kitchen, do as said but don't install cygwin from that guide.
Instead, download from official site, choose default options, but add these packages (it will be compliant with kitchen and give a little extra funcionality):
Devel: gcc, gdb, make
Interpreters: perl
Utils: cpio, util-linux, ncurses
Archive: zip, unzip
Web: wget
Editors: vi, nano
Good guide, nicely done
EDIT:
In my wife's machine (using windows 7 64bit. i'm without computer, for now....), i've installed cygwin as said above.
Then added two folders to my home dir:
kitchen and unyaffsmbn
In kitchen, use the kitchen
In unyaffsmbn, copy the files from unyaffsmbn.zip to that dir, then compile it there
EDIT2:
If you edit text files under windows, USE NOTEPAD++, or any other program that can open/edit/save files in linux compliant style.
There are differences in Windows and Linux when ENTER is pressed, and you'll have issues when trying to flash or run your custom ROM
hi there... thanks a lot for your guide.
I'm trying to do the things you wrote step by step... I have extracted the dz file successfully, then I extracted the content using DZDecrypter... I found three files called system.mbn0, system.mbn1 and system.mbn2. The first and second are 80 Mbytes, the third just 17... Which one is the correct? When I try to use the command "unyaffsmbn system.mbn" (obviously I renamed the first and then the second) I get an error message ("impossible to execute binary file", or somenthing like that... I don't know how's in english because I'm italian).. Is that concerning to the presence of those three different files? Did somethind go wrong with the extracting process? Or maybe I didn't do somenthing important? Before doing this, I installed "build-essential" and did "gcc -o unyaffsmbn unyaffs.h" but apparently nothing happend... I got neither errors nor processes...
can you help me?
Awesome bro, I can try to make custom rom with indian version, ty.
vinnux said:
hi there... thanks a lot for your guide.
I'm trying to do the things you wrote step by step... I have extracted the dz file successfully, then I extracted the content using DZDecrypter... I found three files called system.mbn0, system.mbn1 and system.mbn2. The first and second are 80 Mbytes, the third just 17... Which one is the correct? When I try to use the command "unyaffsmbn system.mbn" (obviously I renamed the first and then the second) I get an error message ("impossible to execute binary file", or somenthing like that... I don't know how's in english because I'm italian).. Is that concerning to the presence of those three different files? Did somethind go wrong with the extracting process? Or maybe I didn't do somenthing important? Before doing this, I installed "build-essential" and did "gcc -o unyaffsmbn unyaffs.h" but apparently nothing happend... I got neither errors nor processes...
can you help me?
Click to expand...
Click to collapse
you shouldn't get three system.mbn files, did you used the 1.0b of DzDecryptor? when i used it, it said something about merging, i think that it gets the three files and then combines them to get a proper system.mbn
I used the downloaded version from the link you posted. At least I guess... :/ Well I'm going to try again soon! Thanks a lot again for your guide!
Sent from my LG-P500 using XDA App
Other methode for exctract mbn file, not need to connect the phone.
Windows only....
(1) Download LG-Utils 0.4.2: http://www.assembla.com/spaces/ks360...tils-0.4.2.zip
(2) Run KP500-Utils-EN.exe (or whatever language you prefer out of the available choices) and select I to extract the KDZ.
(3) Open the resulting CAB file and extract the DZ file.
(4) Download DZExtract: http://www.frenchcoder.com/upload/DZExtract-V0.2.zip
(5) Use DZExtract to extract the MBN files:
DZExtract -x GW620RAT-V10c-OCT-21-2009-RGS-CA_DZ+0.dz C:\extractedTo\
after compiling and chmod I do:
Code:
[email protected]:~/work/unyaffsmbn$ unyaffsmbn system.mbn
unyaffsmbn: command not found
both files are in that folder. Am I doing anything wrong?
Cheers.
@tritant - LG-Utils link not working
So.... You MUST compile unyaffsmbn first. Only then you'll have an "executable".
Code:
gcc unyaffsmbn.c -o unyaffsmbn
Then copy system.mbn to unyaffsmbn folder.
After that, do:
Code:
cd PATH_TO_UNYAFFSMBN
./unyaffsmbn system.mbn
You missed the ./
You can download lg utils from here
tuxcomputing said:
after compiling and chmod I do:
Code:
[email protected]:~/work/unyaffsmbn$ unyaffsmbn system.mbn
unyaffsmbn: command not found
both files are in that folder. Am I doing anything wrong?
Cheers.
@tritant - LG-Utils link not working
Click to expand...
Click to collapse
'course I compiled
of course your method worked and the one in the first post didn't...
exist only a windows version of dzextract?
ioshi said:
exist only a windows version of dzextract?
Click to expand...
Click to collapse
couldn't find a linux version, sorry.
btw, i'm rewriting the guide, hope to update it soon
please add the compiling method from ruigui (in the previous page). For some reason that's the only way I was able to compile on Ubuntu 10.
Cheers
It was a typo in first post (he switched file to be used in gcc).
Give the man some time to reorganize his thread
I did not mean to be rude by any means!
I appreciate the effort to create the how-to! Hopefully people will read the thread if they get stuck and use the right commands so that they don't abandon the idea of creating their own ROM
I also didnt want to call you rude... Sorry...
But we were exhanging some pms and he is redoing this tutorial.
Sometimes we make mistakes while typing long posts
installation aborted
thanks for this great tutorial
everything works like a charm , but when i flash my new rom i have an error says no enough space while writing boot image
any idea?
Update: okay i solved the problem, it seems that i missed up with the boot settings!
I finally made the zip file, but when I start the kitchen and select it, i find this:
"Warning: No META-INF folder found under working folder!
Warning: No META-INF/com/google/android folder found, creating it.
Did not find an update-script. Shall I create one (y/n)? (default: y): "
is that normal? and what should I do? :/
vinnux said:
I finally made the zip file, but when I start the kitchen and select it, i find this:
"Warning: No META-INF folder found under working folder!
Warning: No META-INF/com/google/android folder found, creating it.
Did not find an update-script. Shall I create one (y/n)? (default: y): "
is that normal? and what should I do? :/
Click to expand...
Click to collapse
yes this is normal, i got that warning, and i entered "yes" to create one, and everything went just fine!
good luck
For me, work with wine on linux mandriva 2010.2
[[email protected] rootlg]$ wine DZDecrypt.exe "LGP500AT-00-V10b-EUR-XX-OCT-01-2010+0-DZ.dz" rom
DZ-Decryptor v1.0b *ALPHA RELEASE* by BIGB0SS from COPS.
[■] Opening file "LGP500AT-00-V10b-EUR-XX-OCT-01-2010+0-DZ.dz".
[■] Allocated memory: 280 Mo.
[■] Unpacking informations:
- Unpacking "amss.mbn" (Packed:008D2935 - Unpacked:010F6000).
- Unpacking "partition.mbn" (Packed:000000E9 - Unpacked:00000390).
- Unpacking "qcsblhd_cfgdata.mbn" (Packed:00000240 - Unpacked:00002534).
- Unpacking "qcsbl.mbn" (Packed:00007D88 - Unpacked:0000DFF0).
- Unpacking "oemsblhd.mbn" (Packed:00000026 - Unpacked:00000028).
- Unpacking "oemsbl.mbn" (Packed:0002C637 - Unpacked:0005EFB4).
- Unpacking "amsshd.mbn" (Packed:00000028 - Unpacked:00000028).
- Unpacking "appsboothd.mbn" (Packed:00000022 - Unpacked:00000028).
- Unpacking "appsboot.mbn" (Packed:00008A6F - Unpacked:0000D484).
- Unpacking "boot.img" (Packed:00385B3F - Unpacked:0038A800).
- Unpacking "system.mbn_0" (Packed:0307280E - Unpacked:05000000).
- Merging "system.mbn_1" (Packed:028EAA5A - Unpacked:05000000).
- Merging "system.mbn_2" (Packed:00738F81 - Unpacked:01003F40).
- Unpacking "recovery.img" (Packed:003BE683 - Unpacked:003C3800).
- Unpacking "splash.img" (Packed:00001C3A - Unpacked:0004B000).
[■] SubFiles: 0x780C3E84. (DzCreator)
[■] Closing file "LGP500AT-00-V10b-EUR-XX-OCT-01-2010+0-DZ.dz".

Tweaking rom - begginer question ;)

Hi!
Since xda-univeristy arised i thought it would be nice to learn something about green droid
I am going to learn about tweaking and theming:and here comes dozens of my questions:
1. I have downloaded Official ics repack by N00BY0815
2. I extracted it and i have:
2 folders ( META-INF and System)
2 files boot.ing and system.img
How can i extract this system.img ?
I tried to use 7zip but it says that" it cannot open it as archive"
Thanks in advance and please for leniency
it can be opened with Diskinternals Linux Reader. if not. use "sgs2toext4.jar" to convert it to .img.ext4 and then open it
Nihiliu said:
Hi!
Since xda-univeristy arised i thought it would be nice to learn something about green droid
I am going to learn about tweaking and theming:and here comes dozens of my questions:
1. I have downloaded Official ics repack by N00BY0815
2. I extracted it and i have:
2 folders ( META-INF and System)
2 files boot.ing and system.img
How can i extract this system.img ?
I tried to use 7zip but it says that" it cannot open it as archive"
Thanks in advance and please for leniency
Click to expand...
Click to collapse
Everything for theming is in the System folder. All the APK's(Applications) Boot.img is probably the recovery image it installs. But to theme you would need to decompile the apks in the system folder
Everythink was in system folder in gingerbread, in this system folder i have only app folder with su.apk and bin folder with su file.
So files i need are in system.img
@broodplank1337 thanks for help, program works well, now i can begin
But first only one question, now i can extract files, but can i pack them using same tool ?
Nihiliu said:
Everythink was in system folder in gingerbread, in this system folder i have only app folder with su.apk and bin folder with su file.
So files i need are in system.img
@broodplank1337 thanks for help, program works well, now i can begin
But first only one question, now i can extract files, but can i pack them using same tool ?
Click to expand...
Click to collapse
I don't know much about S2 but can't you just use 7zip to make it an archive and flash it through rrecovery?
"Anger and intolerance are the enemies of correct understanding." -Mahatma Gandhi
Nihiliu said:
How can i extract this system.img ?
Click to expand...
Click to collapse
Hi. You can use dsixda's Android Kitchen for that.
Nihiliu said:
Everythink was in system folder in gingerbread, in this system folder i have only app folder with su.apk and bin folder with su file.
So files i need are in system.img
@broodplank1337 thanks for help, program works well, now i can begin
But first only one question, now i can extract files, but can i pack them using same tool ?
Click to expand...
Click to collapse
You can pack them with the android kitchen, install the zip, then you do this in terminal emulator to make the system.img file:
Code:
su
cat proc/mounts
now look up the system partition, in my case it's mmcblk0p14
Code:
dd if=/dev/block/mmcblk0p14 of=/sdcard/system.img BS=4096
This will dump the system partition to system.img (for example when making an odin image)

[TOOLS][script] ROM Tools v2 (Kernel Extractor)(BML15 IMG backup)

ROM Tools v2 ​
Version 2 BETA
v2b (Officially v2)
Linux Script
by iamareebjamal
Automated Android script for extracting boot.img and bml15 partition​
My PC has issues so I can't use it to build mods and scripts, also, I have a very slow internet connection. That's why I don't upload my ROMs. Provided, I build EACH and EVERY one of my mod on my mobile, including those long scripts with repeating commands and making it easy for other guys to use, I could've just created a script with two commands which rendered error if used incorrectly, but I make it noob proof in every way possible so that there are minimum errors from your side and if something gets wrong, you know what it is. Even uploading 5 mb of mod makes it very difficult as I have to reupload if it fails. Writing scripts on mobile is not easy, you'll know if you have done it, it takes hours. Also, these colorful and easy guides are also made on mobile by writing BB codes ONE BY ONE by hand.
I am telling you because a person day before yesterday posted my Amazing Sounds Mod in another forum without my permission. However, he has removed it now. My work is fully open sourced for you to learn and make your own mods. But taking part of my work and posting as yours is not appreciated.
The MOST you can give me is love, prayers and Thanks
Click to expand...
Click to collapse
Out of the time I was absent from XDA(13 hours ) , I was searching for a method of extracting the kernel from your ROM
Imagine, you want to extract boot.img from your ROM but don't know what to do, you don't have internet to download the stock or custom kernel or simply want to extract it?
I did not find anything except the solution of Android Kitchen but what if you want to do it on your android?
As a bi product of this search, I got a lot of knowledge about the partitions used by Android system and the blocks that define them.
I also got basic knowledge about Linux Scripting.
So, I created this script that backs up your boot.img and bml15.img partitions.​
​ boot.img - kernel of your device
bootextractorv2.sh - Backs up your kernel
bml15.img - IMEI partition
bml15extractorv2.sh - Backs up your IMEI partition
Note:- SGY Toolbox also backs up and restores bml15_EFS.img. And that also with a nice user interface, I just created this mod, because I wanted to but I recommend newbies to use SGY Toolbox for backing up IMEI
However, I found no tool able to backup the kernel, so it may be very useful for some members
ChangeLog
Code:
*More Interactive
*More Intelligent
*Added Option to create Odin Flashable Tar package for kernel
*More Convinient
Requirements :​
Root Acess
Busybox
Android device
Hands
Terminal Emulator or Script Manager
(Script Manager recommended)​
Instructions​
Script Manager Method (Easy):-
1. Download Script Manager.
2.Download desired script and place it on sdcard.
3. Open Script Manager and enable browse as root.
4. Go to the downloaded script and click on the green android icon(root) in the pop up window.
5. Click on Run. Follow Instructions and enjoy
Terminal Emulator Method (Hard):
1. Download Terminal Emulator.
2. Download desired script and place it in the root of the sdcard.
(You can place it anywhere else but the directory should not have spaces and you will have to change the commands accordingly)
3. Open Terminal Emulator and type (After every command you have to press enter)
Code:
su
And Grant Root Access
Then, type
Code:
sh /sdcard/bootextractorv2.sh
or
Code:
sh /sdcard/bml15extractorv2.sh
according to the the script you want to run
4. Now, follow the instructions on screen and enjoy
Download bootextractorv2.sh
Download bml15extractorv2.sh​
Credits :
Miscellaneous Google search posts showing how to write Linux Script
Me for writing the script
Rafael.Baugis for source
Ryuinferno for guide
Reserved
I'll test on S5830 and report asap
edit: Script wouldn't run on S5830 with script manager. With terminal emulator it dumps an empty boot.img
daxanh said:
I'll test on S5830 and report asap
edit: Script wouldn't run on S5830 with script manager. With terminal emulator it dumps an empty boot.img
Click to expand...
Click to collapse
kernel partition of s5830 is different
Give me the Partition
And I will make the mod
V2 completed
Uploading ASAP
OP Updated
v2 released
nice work man...thaks a lot
Sent from my GT-S5830i using xda app-developers app
He didn't really mean the love and prayers.
Nabs Zains said:
He didn't really mean the love and prayers.
Click to expand...
Click to collapse
lol
ROFL
You disclosed my secret Nabs
:good: simple & important... all ace_i owner should get this before 'cooking' ur device...
nice tool for kernel backup... :good:
Doesn't work for me, S5830i stock firmware. If I use script manager method, a lot of "not found" messages, and finally the boot folder is empty. I give script manager root permission. And if I use a terminal emulator, the same error messages, finally there is a 5MB boot.img file, but "untouchable". I can not copy in any other folder. If I connect to PC, boot.img is missing. Appears again in the mobile when I disconnet the USB. I can not change file permissions with root explorer....
Also when the script ask if I want to create a zip file for recovery, I select 1 and I get "bad integer, run again"
Thank you
puntillero said:
Doesn't work for me, S5830i stock firmware. If I use script manager method, a lot of "not found" messages, and finally the boot folder is empty. I give script manager root permission. And if I use a terminal emulator, the same error messages, finally there is a 5MB boot.img file, but "untouchable". I can not copy in any other folder. If I connect to PC, boot.img is missing. Appears again in the mobile when I disconnet the USB. I can not change file permissions with root explorer....
Also when the script ask if I want to create a zip file for recovery, I select 1 and I get "bad integer, run again"
Thank you
Click to expand...
Click to collapse
You have busybox?
If no,
You can't run it
Yes, and the script founds it (it says). Finally I zipped boot.img with root explorer and that zip file could be copied to the PC. Guess the file is ok. Thanks.
puntillero said:
Yes, and the script founds it (it says). Finally I zipped boot.img with root explorer and that zip file could be copied to the PC. Guess the file is ok. Thanks.
Click to expand...
Click to collapse
Why you zipped it?
English is not my language. I explained that boot.img was untouchable. I tried to copy to computer and I always got writing errors. Rebooting wasn't useful. Permissions couldn't be changed with root explorer.. The file was there, but couldn't do anything with It. Tried to zip it and it worked, and I copied the zip to my computer..
puntillero said:
English is not my language. I explained that boot.img was untouchable. I tried to copy to computer and I always got writing errors. Rebooting wasn't useful. Permissions couldn't be changed with root explorer.. The file was there, but couldn't do anything with It. Tried to zip it and it worked, and I copied the zip to my computer..
Click to expand...
Click to collapse
Sure that there is problem in busybox applet sync
I don't know why script couldn't detect it
I don't know what the problem was. I installed, not without many problems, the last busybox available, and everything worked ok. Out of curiosity, I compared boot.img file extracted with "problems" and the boot.img extracted now cleanly, and are identical.
Regards
[Q] IMEI backup work on GT-S5570 Galaxy Mini???
Sent from East Borneo Isand use Honey Bear's Phone
S5570 has another partition table
So no
Sent from my GT-I9100 using muffin premium

[Guide] Make own flashable ROM zip

Here's a quick guide on how I make my ROM's once I have everything I want in my setup.
Step 1: Backup system.img and boot.img.
Code:
adb shell
su
dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/sdcard/system.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/sdcard/boot.img
reboot
If system.img gets around 3.4gb or higher it needs to under 2.1gb zipped to be flashable. If its not your going to have to zero out the free space so it will compress under 2.1gb's. If this is the case to go step 2.
Step 2: Zerofree the image by installing zerofree. Unzip the file attached here in Ubuntu 14+ and install it.
I created a folder on my desktop and called it zerofree and put the system.img inside it. Run this code:
cd Desktop
cd zerofree
zerofree -v system.img
Click to expand...
Click to collapse
It will zero out the system.img. Though its still might be the same size, don't worry as when you put it back in the zip it will compress way down.
Step 3: Add to ROM. Now add the system.img and boot.img to ROM-Flash.zip attached and your ready to go!
MicroMod777 said:
Here's a quick guide on how I make my ROM's once I have everything I want in my setup.
Step 1: Backup system.img and boot.img.
Code:
adb shell
su
dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/sdcard/system.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/sdcard/boot.img
reboot
System.img will be around 3.4gb and once its put in a zip to flash needs to be under 2.1gb. If its not your going to have to zero out the free space so it will compress under 2.1gb's. If this is the case to go step 2.
Step 2: Zerofree the image by installing zerofree. Unzip the file attached here in Ubuntu 14+ and install it.
I created a folder on my desktop and called it zerofree and put the system.img inside it. Run this code:
It will zero out the system.img. Though its still might be the same size, don't worry as when you put it back in the zip it will compress way down.
Step 3: Add to ROM. Now add the system.img and boot.img to ROM-Flash.zip attached and your ready to go!
Click to expand...
Click to collapse
I think I already know the answer to this, but I want to be sure. Does this method make a flashable copy of just the ROM, not any personal stuff or apps you install from the store? I'd like to do this to flash my copy of a crdroid on another LG G2, but I don't want my personal stuff on it. I would just like it to be setup the way I have it now because I have removed a lot of things I don't need and made some changes to a few of the stock apps. It would be nice to be able to port those changes to another phone quickly and easily.
flyinjoe13 said:
I think I already know the answer to this, but I want to be sure. Does this method make a flashable copy of just the ROM, not any personal stuff or apps you install from the store? I'd like to do this to flash my copy of a crdroid on another LG G2, but I don't want my personal stuff on it. I would just like it to be setup the way I have it now because I have removed a lot of things I don't need and made some changes to a few of the stock apps. It would be nice to be able to port those changes to another phone quickly and easily.
Click to expand...
Click to collapse
This basically only saves whatever changes you make the system. For example, lets say you debloat a rom using Titanium backup removing system apps. Those changes will be made to the system.img.
MicroMod777 said:
This basically only saves whatever changes you make the system. For example, lets say you debloat a rom using Titanium backup removing system apps. Those changes will be made to the system.img.
Click to expand...
Click to collapse
That's what I thought and that's what I want. Thanks. Going to give this a shot right now.
Where does it place the two .img files when it's done? I can't find them on my sdcard or my computer. Nevermind. I tried this on another phone first just so I didn't screw up my daily phone in case I did something wrong. They were put on the internal storage instead of the sdcard.

How to convert zip updates to mofo or fastboot flashable images

Does such a thing exist? if not i'd be willing to donate to the cause for a tutorial
wrecklesswun said:
Does such a thing exist? if not i'd be willing to donate to the cause for a tutorial
Click to expand...
Click to collapse
It can be done manually, but it's kinda labor intensive.
You mount the old (latest full image without the update) image in Linux, then unzip the update.zip then copy and replace everything in the .zip file to the mounted image.
Just have to make sure you do it for every file and directory and possibly you have to set the file permissions and file owners again...
i am a windows guy so kinda confusing - i start with an img file which i mount using? once mounted, i get the place everything in the zip in the mount commit and unmount. is thi ssimply it? if so what could i use the mount the img? vmware? virtualbox?
wrecklesswun said:
i am a windows guy so kinda confusing - i start with an img file which i mount using? once mounted, i get the place everything in the zip in the mount commit and unmount. is thi ssimply it? if so what could i use the mount the img? vmware? virtualbox?
Click to expand...
Click to collapse
I have both Ubuntu and Windows here at work, and I've been trying to modify Android .img files without much success using Windows.
The problem is that those .img files are in EXT4 filesystem, which Windows doesn't support natively.
There some EXT4 utilities for Windows, but I haven't really had the time to try them yet.
If you have VMWare or Hyper-V on your Windows machine, you could just set a VM with Ubuntu, or you could just use a computer to boot Ubuntu from USB flash drive, without the need to actually install it.
However, because you are not familiar with Linux, it's going to be hard for you...
It basically involves mounting an old .img file, then unziping the .zip and replace everything in the .zip file to the mounted image.
However, you need to pay attention to file permissions and file owenship, when replacing the files.
It's really a lot of work... I'm using my own modified .img files based on ComputerFreek's images but I've never attempted to "patch" an .img with an update.zip... it's just not worth my time..
Here is the link to if you want to learn how to modify an .img file: http://forum.xda-developers.com/droid-turbo/general/tutorial-how-to-modify-turbo-images-t3064595
It's probably easier to just wait for the full .img
how about conveerting a zip to a img?

Categories

Resources