[10 JAN][SCRIPT]IMG2CWM Converter 1.2.2 - HD2 Android NAND Development

birkoffsjunk's HD2 IMG2CWM Converter​
A simple windows batch script to convert DAF builds to Clockwork Recovery ZIPs.
Originally designed for MDJ's Gingerbread NAND and posted here. Results may vary!
Instructions​
Download DAF based NAND ROM
Download & Extract this script
Place Boot.img & System.img into the 'in' folder
Double click 'RunMe.cmd' (not as admin)
Manually make any changes you wish (when prompted)
Once done, update.zip will be in the same location as 'RunMe.cmd'
META-INF Info​How to: Create Clockwork Recovery flash files
How to Create Android Update Zip Package
An updated updater-script (META-INF\com\google\android\updater-script) is required for various other Builds.
Downloads​v1 >>> here <<<
v1.1 attached (7z changed to 9.20 (ghostkid2010) & renamed out folder to temp)
v1.2 attached (Added error checking & support for system.img only)
v1.2.1 attached (Specified xcopy path & removed old 7z.exe)
v1.2.2 >>> here <<< (arif-ali's linux bash script)
Addons​arif-ali's NexusHD2-Gingerbread_V2.0 updater-script
TODO​
Add error checking
Add support for system.img only
META-INF Information
Most importantly keep it simple
License​BSD License for the script not the tools
7zip is GNU LGPL
unyaffs is GNU GPL v2

same post from MDJ
Your script works great extracting the .img file. But it's not able to create zip file. Let me edit your script with the missing file/info.
Download this file and put in folder tools;
http://downloads.sourceforge.net/sevenzip/7za920.zip
change this line;
"%LOC%\tools\7z.exe" a "%LOC%\update.zip" "%LOC%\out\*"
to;
"%LOC%\tools\7za.exe" a "%LOC%\update.zip" "%LOC%\out\*"
and it should work. it will create a zip file.
Enjoy

how it works?

How does it use? What things do I have to put in the folder "IN"?

sathara said:
how it works?
Click to expand...
Click to collapse
let you extract system.img and boot.img from android build, once you extracted all the fill, it will put all the file into a zip file so you can load via CWM

VuNhatVan said:
How does it use? What things do I have to put in the folder "IN"?
Click to expand...
Click to collapse
boot.img & system.img

It has a function to edit apk. But how do you use that function and where do you add your own apk?

10507 said:
It has a function to edit apk. But how do you use that function and where do you add your own apk?
Click to expand...
Click to collapse
it does not have a function to edit apk (correct me if i'm wrong). once you extracted all the files, go into app and add your apk there.

ghostkid2010 said:
let you extract system.img and boot.img from android build, once you extracted all the fill, it will put all the file into a zip file so you can load via CWM
Click to expand...
Click to collapse
In the Build MDJ_FroYo_Revolution_v._2.2_NAND, there is only system.img, no boot.img. How could I have boot.img?

what a usefull tool, thank you!!

VuNhatVan said:
In the Build MDJ_FroYo_Revolution_v._2.2_NAND, there is only system.img, no boot.img. How could I have boot.img?
Click to expand...
Click to collapse
If there's no boot.img, it should still work. all the boot file is already in the system.img
Let me download that build and I can tell you for sure on how to do it.. I smell that a new version of this script will be out..

Yeah it's very much a work in progress, please feel free to attach updated versions... I'll add them to the first post with accreditation

ghostkid2010 said:
If there's no boot.img, it should still work. all the boot file is already in the system.img
Let me download that build and I can tell you for sure on how to do it.. I smell that a new version of this script will be out..
Click to expand...
Click to collapse
Is it work if there is only system.img?

drizztzou said:
Is it work if there is only system.img?
Click to expand...
Click to collapse
with a little bit of editing yes

ghostkid2010 said:
same post from MDJ
Your script works great extracting the .img file. But it's not able to create zip file. Let me edit your script with the missing file/info.
Download this file and put in folder tools;
http://downloads.sourceforge.net/sevenzip/7za920.zip
change this line;
"%LOC%\tools\7z.exe" a "%LOC%\update.zip" "%LOC%\out\*"
to;
"%LOC%\tools\7za.exe" a "%LOC%\update.zip" "%LOC%\out\*"
and it should work. it will create a zip file.
Enjoy
Click to expand...
Click to collapse
can u more detail about "change this line" location ? u mean u have done it already or i have to do it myself ? which file should i edit ?

ikkon said:
what a usefull tool, thank you!!
Click to expand...
Click to collapse
YEAH! Your not kidding man...i was stoked while playing with it...Id also like to know from here...Is there a similar script for SD->NAND bc my favbe ROM has always been CORECells builds of EVO/HD based...Gave me the best batttery of all SD except for the now current NAND builds. So i figure maybe itll be even better on NAND! TAHNKS again so much for your pos t BIRKOFF! ANYone know of the SD->NAND question?

psuser said:
can u more detail about "change this line" location ? u mean u have done it already or i have to do it myself ? which file should i edit ?
Click to expand...
Click to collapse
YOU have to add an "a" after the z in 7z WITHIN the RUNME script...you have to right click it and open with NOTEPAD on PC and add the "a"

psuser said:
can u more detail about "change this line" location ? u mean u have done it already or i have to do it myself ? which file should i edit ?
Click to expand...
Click to collapse
download the new version on page 1, its fixed

Really cool idea!! I gave it a shot, it just reboots after the MAGLDR screen showing the HTC logo over and over until you boot back into recovery. It flashed fine but just wouldn't boot.

VuNhatVan said:
In the Build MDJ_FroYo_Revolution_v._2.2_NAND, there is only system.img, no boot.img. How could I have boot.img?
Click to expand...
Click to collapse
Use the following "RunMetest.bat"
http://hotfile.com/dl/95408413/0c085bd/RunMetest.rar.html
I tested with different build, system.img only, both boot.img and system.img, it was able to create a zip with all the file.
I'm not uploading the whole folder since this was started by birkoffsjunk, I'm just helping
Test it out

Related

edit framework-res.apk no boot!

i have all frameworks and apps deodexed
i made some changes on a framework-res.apk then i have repacked it, signed, flash on my rom.
but it no boot, stay ever on "HERO" screen!
i try to modify com.htc.resource.apk , flashing it, and all ok!!
anyone can help me?
M
You can't sign the framework file with a test key! Same applies to Rosie - don't try to re-sign it, or it'll just bootloop.
Just edit the files directly in the zip using 7-zip or something like that
Woops ^^, sounds like your implementing Manup456 SenseHero theme...
Stickman89 said:
Woops ^^, sounds like your implementing Manup456 SenseHero theme...
Click to expand...
Click to collapse
yes but with some changes to color map.. and maybe to components
M
nprussell said:
You can't sign the framework file with a test key! Same applies to Rosie - don't try to re-sign it, or it'll just bootloop.
Just edit the files directly in the zip using 7-zip or something like that
Click to expand...
Click to collapse
yayyyy haha i don't like working on a theme
M
i am on a mac.. i have 7zip ecc ecc but i can't edit without unrar the archive!
help!
just repack the framework-res.apk,dont sign it and it will flash fine
it wont work if you repack framework-res.apk as the classes.dex cannot be compressed, youll notice if you extract a 3mb framework-res, recompressing it makes it 1.5mb
ok so:
1- rename framework-res.apk to framework-res.zip
2- unarchive it
3- do changes
4- recompress all? file into a .zip
5- mv ./framework-res.zip ./framework-res.apk
6- push into the /system/framework directory
right?
mr.bang said:
ok so:
1- rename framework-res.apk to framework-res.zip
2- unarchive it
3- do changes
4- recompress all? file into a .zip
5- mv ./framework-res.zip ./framework-res.apk
6- push into the /system/framework directory
right?
Click to expand...
Click to collapse
Yes, but you must choose to pack in a zip without compression
after renaming to .zip and doing the work just rename to .apk no need to repack that
eriously, im getting pretty tierd of this....
I`ve followed your tutorial (slaved) and it seems to be working awsome, BUT I did it with my own ROM and called it Update.zip and I did everything you said, even let the 9. files alone, but when I'm restarting the system, the boot window is there constantly/for ever, what is wrong?
mr.bang said:
i am on a mac.. i have 7zip ecc ecc but i can't edit without unrar the archive!
help!
Click to expand...
Click to collapse
Make sure you have zip (the package) installed.
You should also install a MAC port of the midnight commander.
Browse to your framework apk and just enter it via mc. It should recognize the magic bytes as ZIP and enter VFS mode, allowing you to enter the apk just as if you were entering a folder.
After you make all your changes (I guess simply overwriting some pngs), just exit from the folder through ".." till you see the apk itself.
There. Done.
I do my cooking on a linux workstation, and this is one way of doing it.

[KERNEL] Any Kernel Updater (Moded for eMMC)

I have just edited the AnyKernel updater script by koush to work with eMMC devices :-D
hope ppl can make use of this
its very simple
1) grab the .tar.gz file
2) extract
3) add the zImage to the /kernel/ directory
4) add .ko modules to /system/lib/modules/ directory
5) **optional** change the boot partition location in the updater-script (not normaly needed)
6) zip up the file
7) its ready to flash in CWM
Credits
Koush for the original boot unpack / repack bin's and scripts
IEF for the stand alone dd binary
what does it do?? sorry
does it make so you can update thru your network?
Thank you! This will be useful to me.
Nice, this is exactly what we needed.
Sent from my HTC Vision
Thanks!! I can finally make an Update.zip for my kernel!
nice work.
Now any kernel devs. can easy make a update.zip
G1_enthusiast said:
what does it do?? sorry
does it make so you can update thru your network?
Click to expand...
Click to collapse
Classic...lol
Why do ppl who have no clue even post stuff like that?
Thanks Apache this will come in handy.
Sent from my HTC Vision using XDA App
any chance to rip bootimg.cfg through the zip file?
since somehow I tried to get the cfg file from the boot.img but seems the boot.img and zImage in some kernel are the same.

[Q] How to edit system.img

I downloaded factory image from code.google.com,and I extracted a file who name is system.img,but I don't know how can I unpack it.
I don't know unpack it with what software,Is not always able to unpack the file when I
tried some softwares.(yaffs2img,winimage,winRAR and something else)
what is a right way to extract and edit it?
Thank you!
you don't extract .img files.... you flash the img file through fastboot.
google on how to use fastboot for more details.
You can extract them just fine. I used dsixda's kitchen to extract system.img so that I could pull the gapps.
zephiK said:
you don't extract .img files.... you flash the img file through fastboot.
google on how to use fastboot for more details.
Click to expand...
Click to collapse
I just want make it into zip file and flash it with recovery,facilitate I edit a rom.
zephiK said:
you don't extract .img files.... you flash the img file through fastboot.
google on how to use fastboot for more details.
Click to expand...
Click to collapse
mwalt2 said:
You can extract them just fine. I used dsixda's kitchen to extract system.img so that I could pull the gapps.
Click to expand...
Click to collapse
Dsixda's kitchen? Can it unpack the system.img? Actually,I want delete some gapps and edit this rom.
8723045587230455 said:
Dsixda's kitchen? Can it unpack the system.img? Actually,I want delete some gapps and edit this rom.
Click to expand...
Click to collapse
Yes, it works ok. Just put the system.img in the original update and choose to make a rom from that file. It will guide you through extracting the system.img. You might be able to get it to build the entire rom if you just zip all of the .img's together and choose that for the input file.
Thank you so much and I'll try. ^^
You can use http://forum.xda-developers.com/showpost.php?p=15333542& postcount=135 to convert the image to an .ext4.img and then use http://www.diskinternals.com/linux-reader/ to mount (if you are using Windows).
Sent from my Galaxy Nexus using Tapatalk
efrant said:
You can use http://forum.xda-developers.com/showpost.php?p=15333542& postcount=135 to convert the image to an .ext4.img and then use http://www.diskinternals.com/linux-reader/ to mount (if you are using Windows).
Sent from my Galaxy Nexus using Tapatalk
Click to expand...
Click to collapse
I'm glad i found your post on here. Greatly appreciate it! :victory:

kernel from latest 4.04 update

is there a way to extract the kernel from the latest update,or does someone already have it,thanks or will someone extract it for me,thankyou
nutpn said:
is there a way to extract the kernel from the latest update,or does someone already have it,thanks or will someone extract it for me,thankyou
Click to expand...
Click to collapse
You can extract it using 'adb shell dd' command. You need to know the mount point and there is more syntax to the command. I've attached it for you though.
kernel
Can I flash this zip
nutpn said:
Can I flash this zip
Click to expand...
Click to collapse
The simple thing to do is open the .zip and see if it looks like a flashable one (ie is there a META-INF folder)...and no it's not flashable. It's simply boot.img (zImage + RAMDISK).

[TUTORIAL] Install ROM via sideload

I know most of you already know this, but it may help others because this is very usefull for installing kitkat.
It's a pain to copy an 1,2 GB ROM to internal storage, so sideloading (installing from PC) it's lot easier and faster.
So here's the trick.
Copy the zip you want to install in "adb" folder (archiev attached)
Reboot phone in recovery mode
Optional - do your wipes
If you have CMW
Go to install zip -> install zip from sideload
If you have TWRP
Go to advanced -> ADB sideload
connect the USB cable and run START.cmd
type "adb devices" to check if your phone is recognized and connected (skip if you know everything it's ok)
type "adb sideload kitkat.zip" (replace kitkat with zip's name)
Notes:
Ofc you need USB drivers
Ive tried that a couple times but always i get a "cannot read kitkat.zip" thing, any idea why?
Sent from my LG-E975 using XDA Premium 4 mobile app
mastor10 said:
Ive tried that a couple times but always i get a "cannot read kitkat.zip" thing, any idea why?
Click to expand...
Click to collapse
Umm... Did you replace "kitkat.zip" with the actual name of your zip file (or rename your zip to "kitkat.zip")? I know it might be a very stupid question, but I can only read your post, not your mind...
kt-Froggy said:
Umm... Did you replace "kitkat.zip" with the actual name of your zip file (or rename your zip to "kitkat.zip")? I know it might be a very stupid question, but I can only read your post, not your mind...
Click to expand...
Click to collapse
Of course man, all of the roms ive flashed was through sideload
mastor10 said:
Of course man, all of the roms ive flashed was through sideload
Click to expand...
Click to collapse
Make a screenshot of what you're doing and error you get, this way will be easier for both.
roscatel said:
Make a screenshot of what you're doing and error you get, this way will be easier for both.
Click to expand...
Click to collapse
there you go
i changed the name to zip but norhing happens
mastor10 said:
there you go
i changed the name to zip but norhing happens
Click to expand...
Click to collapse
First, there is no way for a rom to use ".rar" extension. After, error means that the file couldn't be read (missing or corrupted). Also you may try my method which doesn't need android SDK, so there is no complications with wrong paths or such.
roscatel said:
First, there is no way for a rom to use ".rar" extension. After, error means that the file couldn't be read (missing or corrupted). Also you may try my method which doesn't need android SDK, so there is no complications with wrong paths or such.
Click to expand...
Click to collapse
yes i know, but in there the rom is in rar http://forum.xda-developers.com/showthread.php?t=2762171
so i changed the rar to zip, also i downloaded the file 3 times and the same happens, ill try with your adb and see
also the others zips i flash through sideload from sdk works just fine, only in this rom i get the error
edit, nope the same happens
mastor10 said:
yes i know, but in there the rom is in rar http://forum.xda-developers.com/showthread.php?t=2762171
so i changed the rar to zip, also i downloaded the file 3 times and the same happens, ill try with your adb and see
also the others zips i flash through sideload from sdk works just fine, only in this rom i get the error
edit, nope the same happens
Click to expand...
Click to collapse
Look at the screen I've attached. Are you sure your zip it's not the same have you checked it? I've highlighted the rom itself.
roscatel said:
Look at the screen I've attached. Are you sure your zip it's not the same have you checked it? I've highlighted the rom itself.
Click to expand...
Click to collapse
this is what i download
https://drive.google.com/uc?id=0BxtwB2oE42pDNFJsaGJ3ODNkWGM&export=download
from the topic i mention above, its the same, i rename it to a smaller name though
mastor10 said:
this is what i download
https://drive.google.com/uc?id=0BxtwB2oE42pDNFJsaGJ3ODNkWGM&export=download
from the topic i mention above, its the same, i rename it to a smaller name though
Click to expand...
Click to collapse
Ok then simply extract "VDT-V20..." from that archieve. That's the zip you have to install via sideload!
roscatel said:
Ok then simply extract "VDT-V20..." from that archieve. That's the zip you have to install via sideload!
Click to expand...
Click to collapse
this is whats inside the zip i download
mastor10 said:
this is whats inside the zip i download
Click to expand...
Click to collapse
It looks to me that your screenshot is showing contents of a ZIP inside a RAR. What @roscatel means, you should extract the ZIP from the RAR that you downloaded -- it's actually an archive packed inside another archive. After that, flash the ZIP you just extracted using any method (sideload, or from recovery as usual). Do NOT rename RAR to ZIP -- it doesn't make sense, and will most definitely NOT work.
kt-Froggy said:
It looks to me that your screenshot is showing contents of a ZIP inside a RAR. What @roscatel means, you should extract the ZIP from the RAR that you downloaded -- it's actually an archive packed inside another archive. After that, flash the ZIP you just extracted using any method (sideload, or from recovery as usual). Do NOT rename RAR to ZIP -- it doesn't make sense, and will most definitely NOT work.
Click to expand...
Click to collapse
hi my pc known my device but when i write adb sideload ...zip foul (stand) 0% and i watting 15 minuts for process but nothing happening . plz help me . my device is xperia tx.. plzzzzzzzzzzzzz
install the last TWRP (flash it via bootloader), same process by opening commande window in the folder (shift+right click: then open command) and tiping command: fastboot flash recovery (name of the file).img (like that: exemple: fastboot flash recovery lastTWRP.img)
it autorize MTP transfer, so you cas access your internal storage and copy the zip file
or retrieve backups from your phone
I'm using and side load on my lge
LM-x210MA an I keep getting these different errors do I need to flash more than a twrp.imf what about sys.img root.img root-boot.img this is all a lot to take in as a first timer go easy I'm not trolling just trying to learn

Categories

Resources