[TOOL][LINUX]ROMzilla - Batch ROM Decompile/Deodex/Build .apk and .jars! (8/1/12)

Search This thread

digitalhigh

Inactive Recognized Developer
Dec 28, 2010
3,624
11,928
Milwaukee, WI
www.facebook.com
Here is ROMzilla Version 0.2.

http://d-h.st/pkp

First and foremost, I have fixed the issue with it not rebuilding files properly. Everything should go exactly where it's supposed to now.

The other modifications are numerous and subtle.

It will now deodex any odexed .zip you throw at it.

Included checking in numerous places for nonexistent files, folders, etc.

Merged routines for .jars and .apks.

You're now presented with one of three extraction options. Full, Custom, or Boot. Full will scan for all files in /app and /framework folders, and gut them into their respective folders in /edits.

Custom will extract anything you list in /scripts/custommod.txt. Be sure to include the full path from /system/. Ex: /system/app/FooApp.apk

Boot won't do anything for now. The line is commented out. I have the extraction down, but rebuilding needs some love yet.


For compiling, if existing /modded folder exists from previous compile, you will be prompted to backup. Files will be overwritten otherwise.

You will then be asked if you want to compile Full, Custom, or Boot.

Full will rebuild all folders found inside edits/system/framework and edits/system/app.

Custom will rebuild all folders specified in /scripts/custommod.txt.

Boot won't do squat right now. ;)


Changes:

Added checking for existing /edits and/or /modded folders. Presents option to back up and then remove folders for clean extractions/rebuilds.

Added checking for existing working dir - skips .zip extraction if working dir found.

Created /in folder as location to look for .zip files to extract.

Renamed primary output folder to /extracted.

That's it for now.

http://d-h.st/pkp



Usage:

./ROMzilla.sh -d ROMNAME.zip
./ROMzilla.sh -d ROMFOLDERNAME

-Decompile ROM


./ROMzilla.sh -b ROMFOLDERNAME

-Compile files in -b
 
Last edited:

stenka85

Senior Member
Jan 2, 2010
86
13
Tested, works good, except for building and add folder res, resources.asrc into final apk, the script inject the entire folder into apk (/home/blabla/edits/rom/xxx.apk/res)
 

digitalhigh

Inactive Recognized Developer
Dec 28, 2010
3,624
11,928
Milwaukee, WI
www.facebook.com
Hey guys, sorry, yes, I realized yesterday that the rebuild function was inserting full folders into the target files. I'm working on updating my device's root OTA file today, but when I get a chance, I will update the script. If someone else would like to do so in the meantime, you're more than welcome to. ;)
 
  • Like
Reactions: monitorstudioworker

stenka85

Senior Member
Jan 2, 2010
86
13
In the new version, folder tools not included. Add tools folder from first version and works great, in 0.2 add resources works like a charm, thanks for your work.
 
Last edited:

chshrm

Senior Member
May 10, 2008
110
5

thank you sir,
i am new to odex, when i execute this command in terminal, i have the following erros, it just can not handle the apks in /app, can you point me out to the right direction?

ROMzilla.sh -d miui_NS_2.8.10 (miui_NS_2.8.10 is my ROM.zip file)

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Cannot find file or directory "out"
at org.jf.smali.main.main(main.java:184)
mv: 无法获取"out.dex" 的文件状态(stat): 没有那个文件或目录
rm: 无法删除"out": 没有那个文件或目录
rm: 无法删除"classes.dex": 没有那个文件或目录
##################################
Decompiling XiaomiServiceFramework.odex...
##################################
Can't find the file XiaomiServiceFramework.odex
rm: 无法删除"XiaomiServiceFramework.odex": 没有那个文件或目录
Recompiling.

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Cannot find file or directory "out"
at org.jf.smali.main.main(main.java:184)
mv: 无法获取"out.dex" 的文件状态(stat): 没有那个文件或目录
rm: 无法删除"out": 没有那个文件或目录
rm: 无法删除"classes.dex": 没有那个文件或目录
What would you like to extract?

so what is the problem? thanks in advanced?
 

af974

Retired Recognized Developer / Retired Forum Mod
Jan 22, 2008
4,968
1,702
thank you sir,
i am new to odex, when i execute this command in terminal, i have the following erros, it just can not handle the apks in /app, can you point me out to the right direction?

ROMzilla.sh -d miui_NS_2.8.10 (miui_NS_2.8.10 is my ROM.zip file)

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Cannot find file or directory "out"
at org.jf.smali.main.main(main.java:184)
mv: 无法获取"out.dex" 的文件状态(stat): 没有那个文件或目录
rm: 无法删除"out": 没有那个文件或目录
rm: 无法删除"classes.dex": 没有那个文件或目录
##################################
Decompiling XiaomiServiceFramework.odex...
##################################
Can't find the file XiaomiServiceFramework.odex
rm: 无法删除"XiaomiServiceFramework.odex": 没有那个文件或目录
Recompiling.

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Cannot find file or directory "out"
at org.jf.smali.main.main(main.java:184)
mv: 无法获取"out.dex" 的文件状态(stat): 没有那个文件或目录
rm: 无法删除"out": 没有那个文件或目录
rm: 无法删除"classes.dex": 没有那个文件或目录
What would you like to extract?

so what is the problem? thanks in advanced?

Well i'm not this app developer but i'll try to help you:

Your Rom_Name.zip must be in the folder named "in"

from terminal :

Code:
./ROMzilla.sh -d Rom_Name.zip

You need a Linux distro though or Cygwin under Windows.
 

chshrm

Senior Member
May 10, 2008
110
5
thanks a lot for your quick reply, sir. yes i did use this tool in linux system, and i did put the rom in the folder "in", btw, my rom is base on ICS 4.0.4.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 35
    Here is ROMzilla Version 0.2.

    http://d-h.st/pkp

    First and foremost, I have fixed the issue with it not rebuilding files properly. Everything should go exactly where it's supposed to now.

    The other modifications are numerous and subtle.

    It will now deodex any odexed .zip you throw at it.

    Included checking in numerous places for nonexistent files, folders, etc.

    Merged routines for .jars and .apks.

    You're now presented with one of three extraction options. Full, Custom, or Boot. Full will scan for all files in /app and /framework folders, and gut them into their respective folders in /edits.

    Custom will extract anything you list in /scripts/custommod.txt. Be sure to include the full path from /system/. Ex: /system/app/FooApp.apk

    Boot won't do anything for now. The line is commented out. I have the extraction down, but rebuilding needs some love yet.


    For compiling, if existing /modded folder exists from previous compile, you will be prompted to backup. Files will be overwritten otherwise.

    You will then be asked if you want to compile Full, Custom, or Boot.

    Full will rebuild all folders found inside edits/system/framework and edits/system/app.

    Custom will rebuild all folders specified in /scripts/custommod.txt.

    Boot won't do squat right now. ;)


    Changes:

    Added checking for existing /edits and/or /modded folders. Presents option to back up and then remove folders for clean extractions/rebuilds.

    Added checking for existing working dir - skips .zip extraction if working dir found.

    Created /in folder as location to look for .zip files to extract.

    Renamed primary output folder to /extracted.

    That's it for now.

    http://d-h.st/pkp



    Usage:

    ./ROMzilla.sh -d ROMNAME.zip
    ./ROMzilla.sh -d ROMFOLDERNAME

    -Decompile ROM


    ./ROMzilla.sh -b ROMFOLDERNAME

    -Compile files in -b
    3
    Here is the tools folder.

    tools.zip
    2
    My corrected script.
    1
    Hey guys, sorry, yes, I realized yesterday that the rebuild function was inserting full folders into the target files. I'm working on updating my device's root OTA file today, but when I get a chance, I will update the script. If someone else would like to do so in the meantime, you're more than welcome to. ;)