Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

AutoMod [Modding Tool] [Script] [Linux/OSX]

OP MAD Industries

12th August 2012, 01:52 AM   |  #1  
MAD Industries's Avatar
OP Senior Member
Flag Los Angeles
Thanks Meter: 231
 
119 posts
Join Date:Joined: Oct 2010
Donate to Me
More
AutoMod BETA 1.6 by MAD Industries
-----------------------------------------------------------------------------------------------------------------------------------

First off, this is not another APK Manager, this is also not Auto APK Tool. These two tools focus on the decompiling and recompiling of APK and jar files. AutoMod intends to bring a new paradigm to modding. That is, there are mods and there are roms. AutoMod makes them friendly with eachother. APKs are handled internally by the script.

I wrote this tool because as a developer who was using APK Manager, I ran into several obstacles along the way. One of them was that I liked to be able to take requests from users and personalize the mod to their tastes. Unless I was impeccable with my folder organization, it very quickly got out of hand with people asking for personalizations based on other personalizations. I would find myself decompiling a version I made the day before so I could remember what was in it and create yet another version on top of it. All this back and forth and I would end up with a mess of recompiled, decompiled, original, custom, extracted, etc files all over the place taking unnecessary HD space. On top of that, every step of the way required user input in the form of a yes/no prompt or selected a menu option for decompiling/recompiling/keep folders/signing/etc. And then I would manually create a flashable zip file for each version. AutoMod solves many of this issues in it's current BETA state. When it is finished, it will have solved all of them.

Features for End-Users:
  • Mods are dynamically applied to your ROM (this allows mods to stay up-to-date with the ROM without original developer support)
  • Mods often work across multiple similar ROMs (easy porting)
  • Mods are stored in what I call "opensource" format which means it is very easy to dig into the Mod package and change things to your personal preferences with very little knowledge modding
  • Only the modified files within the apk are stored in a mod package. This greatly reduces filesize
  • AutoMod encourages backups at every major step in the process
  • Backups are dynamic, meaning it will only backup the files which are modified
  • Backups are automatically saved as a flashable zip file so you can have it ready if a mod does not successfully integrate
  • AutoMod always keeps itself up-to-date with the latest features
  • Distribution of AutoMod requires only the script itself
  • AutoMod has the ability to accept a ROM Install file or an actual device as a base for creating a flashable zip file out of any mod package
  • Supported devices can have mods applied instantly and automatically over adb

Features for Developers
  • Since mod packages only contain changed files, you no longer have to hunt through hundreds of files to find a single png (such as when creating five different colored versions of a theme)
  • Easy packaging of mods for redistribution for this tool as well as update.zip format
  • AutoMod can "install" multiple ROMs into it's system so you can make a mod once, and then distrubute it for several ROMs at the same time
  • If you run nightly builds of your own ROM, AutoMod will soon include a scriptable feature which will allow you to release nightly themes, mods, etc with no extra effort
  • Much of the developer features are yet to come (such as quick prototyping of mods and parallel device/ROM support)

---------------------------------------------------------------------------------------------------------------------------------------
Tutorial written by mybook4 on post #16 (be sure to thank him)
---------------------------------------------------------------------------------------------------------------------------------------
1) Download automod.sh script and place it into an appropriate directory (I used one called AutoModTest)
2) Download the ROM Install zips you would like
3) Create your mod package (see below)
4) Run automod by typing “bash automod.sh” in a terminal
5) Select option 5 (Install a new ROM file into AutoMod), and follow the script's directions (copying your ROM zip, to the directory, not moving it or it will be overridden)
6) Select option 4 (Install a new mod package into Automod), and follow the script's directions (copying your mod zip, to the directory, not moving it or it will be overridden)
7) Select option 3 (Use a ROM Install zip + mod to create a flashable zip for another ROM/device), choosing the appropriate ROM and mod package.
8) Out came the zip! This makes things soooooooooooo much easier and more manageable!

Notes about automod mod packages:
1) A mod file is structured as a zip file with the extension .zip replaced with .mod (so as to separate it from flashable zips with the same name)
2) In the mod file is a directory with the name of the mod.
3) In the directory with the name of the mod is a directory tree leading to the files within the specific apk you would like to modify. For example, in the ICSBlueFull.mod file, the directory tree is as follows: ICSBlueFull, system, app, SystemUI (the apk being modified), res, directories with modified files (images, xml files, etc).
4) Just to be safe (and to match the ICSBlueFull mod supplied), I set permissions on all folders in my mod to 755 and all files to 644 (if these numbers don't mean much to you, open a terminal and type “man chmod”)
5) There is a command to package mods you have made into .mod files. This can be found in the developer menu. (option 11)
6) Spaces in file name are currently not handled very well. Try and name your mods accordingly.

---------------------------------------------------
How To Create A Mod

click to enlarge

---------------------------------------------------

Download the script here: http://cl.ly/code/463B1C3B123i
Note: Proper syntax is 'bash automod.sh'

Download an example mod here (for stock GS3 touchwiz based ROMs) [Fixed!]: https://github.com/downloads/MADindu...CSBlueFull.mod
Original thread for this mod can be found here: http://forum.xda-developers.com/show....php?t=1775235

View the source/branch it here: https://github.com/MADindustries/automod (check this to see if using a 'forceupdate' would add features/functions)
Last edited by MAD Industries; 8th September 2012 at 07:07 AM.
The Following 27 Users Say Thank You to MAD Industries For This Useful Post: [ View ]
12th August 2012, 02:01 AM   |  #3  
MAD Industries's Avatar
OP Senior Member
Flag Los Angeles
Thanks Meter: 231
 
119 posts
Join Date:Joined: Oct 2010
Donate to Me
More
Quote:
Originally Posted by invisiblek

awesome work dude!

Thanks. Btw you are in the credits on the script itself. (even if it was a couple binaries haha)
The Following User Says Thank You to MAD Industries For This Useful Post: [ View ]
12th August 2012, 02:16 AM   |  #4  
alquimista's Avatar
Senior Member
Flag Los Angeles
Thanks Meter: 111
 
206 posts
Join Date:Joined: Mar 2008
Donate to Me
More
Wow. Great work. Can't wait to see more!

Ta very much indeed.
ALQI

Sent from my SCH-I535 using xda app-developers app
12th August 2012, 02:48 AM   |  #5  
incubus26jc's Avatar
Recognized Developer
Flag Illinois
Thanks Meter: 3,574
 
4,088 posts
Join Date:Joined: Feb 2009
Donate to Me
More
Nice job buddy..No Windows support?
12th August 2012, 02:58 AM   |  #6  
Member
Thanks Meter: 18
 
91 posts
Join Date:Joined: Jun 2012
More
This is amazing. +100000000000

Sent from my SCH-I535 using xda app-developers app
12th August 2012, 03:38 AM   |  #7  
MAD Industries's Avatar
OP Senior Member
Flag Los Angeles
Thanks Meter: 231
 
119 posts
Join Date:Joined: Oct 2010
Donate to Me
More
Quote:
Originally Posted by incubus26jc

Nice job buddy..No Windows support?

Not just yet. I'm on Mac personally which makes it not too difficult to see some Linux support as well. But Windows would be a completely new write from what i can tell. It will likely happen after this is out of beta unless a Windows dev feels like working with me on it. Obviously everything is open source and i would love to see a port pop up before i get around to it.

Sent from my Galaxy Nexus using Tapatalk 2
The Following User Says Thank You to MAD Industries For This Useful Post: [ View ]
12th August 2012, 04:10 AM   |  #8  
myn's Avatar
Senior Recognized Developer
Thanks Meter: 4,002
 
2,658 posts
Join Date:Joined: Nov 2007
Donate to Me
Very cool indeed.

Tried to download the example mod but appears it's down/not available.

Definitely want to give this a try.

Thanks for sharing
12th August 2012, 08:48 AM   |  #9  
alquimista's Avatar
Senior Member
Flag Los Angeles
Thanks Meter: 111
 
206 posts
Join Date:Joined: Mar 2008
Donate to Me
More
Quote:
Originally Posted by MAD Industries

Not just yet. I'm on Mac personally which makes it not too difficult to see some Linux support as well. But Windows would be a completely new write from what i can tell. It will likely happen after this is out of beta unless a Windows dev feels like working with me on it. Obviously everything is open source and i would love to see a port pop up before i get around to it.

Sent from my Galaxy Nexus using Tapatalk 2

It might work on windows with the right install of cygwin. I'd have to create a windows VM to test it out and I'm not all that familiar with cygwin anymore, any windows devs out there good with cygwin?

Sent from my SCH-I535 using xda app-developers app
12th August 2012, 08:52 AM   |  #10  
MAD Industries's Avatar
OP Senior Member
Flag Los Angeles
Thanks Meter: 231
 
119 posts
Join Date:Joined: Oct 2010
Donate to Me
More
Quote:
Originally Posted by alquimista

It might work on windows with the right install of cygwin. I'd have to create a windows VM to test it out and I'm not all that familiar with cygwin anymore, any windows devs out there good with cygwin?

Sent from my SCH-I535 using xda app-developers app

Oh yeah! I totally forgot about cygwin. Yeah that should do it. It has all dependencies packaged with it except java and wget/curl. And only java is really necessary if you kinda know your way around.

The Following User Says Thank You to MAD Industries For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes