[Script] LowFatYoghurt - Choose your topping - G1 Android Development

Hi,
as I have seen some complaints in the CM forums about what apps should be in the CM6 release (bla bla bloatware bla bla...) and I already use a CM6 nightly with a lot of the apps removed. I thought a script that automagically creates a slimmed down version of a CM6-update.zip according to your personal choice might help some people.
How it works:
You need a linux box with working java6 binaries
Unzip the attached .zip
Optional: Read the release notes in slim.sh. (In fact, better read the whole file and understand what it will do...)
Copy testsign.jar from here in the extracted directory
Copy the gapps into the directory (must be named gapps-mdpi-FRF91-3-signed.zip)
Copy some CM6-update.zip into the directory
Decide what you want to keep/delete:
This is the interesting part. There are 3 Files ending with .bl in the extracted directory. Just edit them with your favourite text editor. Files with a # in front of the filename will be kept, without it it will be deleted.
Optional: Put some stuff you want in the adds folder, but use the directory structure of the update.zip (e.g. you want launcherpro: copy LauncherPRO.apk to adds/system/app/LauncherPRO.apk)
Run the script: "sh slim.sh NameOfCM6Update.zip"
Flash LowFatYoghurt-CM6-signed.zip and hope that you did not remove something essential [as always, flash on your own risk]
The .bl files in their current state are what I am trying at the moment, so EDIT THEM YOURSELF, I can not promise that everything runs smooth with this settings.
Have fun with this, learn something, improve and share it.
Thanks go out to cyanogen and his team for this awesome build and to everyone else contributing to the android community. The updater-script somewhere deep in adds is kanged from cyanogen and just slightly modified (thanks again).
mblaster
€: Some more automation for the lazy ones...
The new scriptfile GetFreshLFY.sh can be extracted from GetFreshLFY2.zip into the same directory as LowFatYoghurt. To run just type "sh GetFreshLFY.sh" to automatically download and slim the newest nightly for d/s using your current .bl files and adds.
€€: Fast update. Changed GetFreshLFY.sh to make it not download the newest nightly if it already is present.

This is cool. very well-implemented.

jcarrz1 said:
This is cool. very well-implemented.
Click to expand...
Click to collapse
Thanks. I just thought if it is useful for me it might as well be usefull for anyone else

Nice idea, but I always just run a gscript I made to remove them for me. I guess this would take a few mb off of the rom before hand thereby making the flashing process a bit faster.

mejorguille said:
Nice idea, but I always just run a gscript I made to remove them for me. I guess this would take a few mb off of the rom before hand thereby making the flashing process a bit faster.
Click to expand...
Click to collapse
Not only that. If you dare to remove enough, CM6 might eventually fit stock spl (got it down to about 70mb, so quite close). Additionally you can use firerats mtd patch to use the saved /system space for /data.
€: Someone should really make a bootanimation out of your sig

Added another script to OP.

Nice work. And great idea. Thanks.

I liked the idea here but changed it up a bit. I made it so the script runs after the rom installs.
PHP:
"Usage $SCRIPT_NAME [-l] [-s]"
""
"options:"
" -l | --list Creates a list of your apps and media"
" -s | --slim Removes unwanted specified files"
" -h | --help This help"
""
"To remove files run $SCRIPT_NAME -l to create a list of files"
"Open $SLIM_APK and $SLIM_MEDIA"
"Remove the '#' infront of each file you want to delete."
"Run $SCRIPT_NAME -s to remove all the unwanted files."

Related

Apk Manager 4.9 - Makes Modifying Ur Apk A Breeze (Windows/Linux)

So i have written a simple script to ease the process of editing apks. Got a lot of downloads so thought its in demand
Whether you're doing basic image editing or editing the smali or xml files, on average u have to use (Brut.all or JF's smali/baksmali) awesome tool to extract the apk, edit it, then sign the apk and then adb push/install it. This process is quite tiresome if you are testing a method that needs fine tweaking.
This script should make the process a LOT smoother.
Theres an option of compiling/signing/installing all in one step
Thanks:
Goes to Brut.all for his awesome tool.
Goes to JF for ofcourse, smali/baksmali
Goes to farmatito for porting this script to linux
Features:
- Extract, Zip apk's.
- Optimize pngs (ignores .9.pngs)
- Zipalign apks
- Sign apks
- Push to specific location on phone
- Incorporates brut.all's apktool
- Pull apk from phone into modding environment.
- Batch optimize apk (Zipalign,optipng,or both)
- Quick sign an apk (Batch mode supported)
- Batch Ogg optimization
- Compression level selector (monitor status above menu)
- Batch install apk from script (option 16)
- Logging on/off has been removed. Instead a log.txt is created which logs the activities of the script organized using time/date headers
- User can change the max java heap size (only use if certain large apks get stuck when decompiling/compiling apks) (Option 19)
- Improved syntax of questions/answers
- Error detection. Checks if error occured anytime u perform a task, and reports it
- Read log (Option 20)
- U can now set this script as ur default application for apks. When u do, if u double click any apk it will install it for u.
- Supports batch installation, so if u drag multiple apks into the script (not while its running) it will install them all for u. U can ofcourse drag a single apk as well
- Added framework dependent decompiling (For non propietary rom apks). (Option 10). Checks whether the dependee apk u selected is correct.
- Allows multiple projects to be modified, switch to and from.
- Allows to modify system apk's using apktool but ensures maximum compatibility in terms of signature / manifest.xml
- Stuff i forgot i guess
Instructions (Windows):
- Place apk in appropriate folder (Any filename will work, if running for first time folders will not be there, you must run and then the folders will be created)
- Run script
- Minimize the script
- Edit files inside the project folder
- Maximize the script
Instructions (Linux):
- Place apk in appropriate folder (Any filename will work, if running for first time folders will not be there, you must run and then the folders will be created)
- Open terminal and change-directory to apkmanager (Easiest way is to type "cd ")
- Chmod 755 Script.sh
- Chmod 755 all files apps inside other folder (thanks for the tip bkmo )
- Run script by typing ./Script.sh
- Minimize the script
- Edit files inside the out folder
- Maximize the script
Requirements:
Java
Adb
Future Improvements:
- Manage multiple simultaneous apk edits (choose which apk to extract/build)
- Option to optimize the apks
- Option to adb push to user defined location
- Other stuff i dont know yet
Got problems ?
1. Make sure your path has no spaces
2. Your filename has no wierd characters
3. Java/adb are in your path
4. It's not a proprietary rom's apk (aka Sense,Motorola,Samsung) (If u are, then use option 11 and drag the required framework, eg com.htc.resources, twframework-res...etc)
5. It's not a themed apk (if it is, expect .9 png errors, use as close to stock as possible)
6. Look at the log to know whats happening
7. If all else fails, post as much info as possible and we will try to assist you.
MOD EDIT:
New DL link from this post
http://apkmultitool.com
Nice
As you probably know, I want to add signing and installing functionality to apktool. But I don't plan to make any kind of GUI for it, so such wrapper is a very good thing for many users, thanks
What is "Option to optimize the apks"?
I was thinking of incorporating the script "apkopt" it was basically using optipng to optimize the png's and then used zip align on the apks. Thanks btw, this tool wudnt exist without ur awesome script
I just did this so ppl would stop asking questions like "How do i change this/that in an app"
Here this is wht im talking about Link
Very nice
Thanks dude...
once again you manage to make modding easier with your scripts!
Does your apkopt avoid .9.png files? Because those have been a pain in the behind.
Re: Apk Manager 1.0 - Makes Modifying Ur Apk A Breeze
my script currently does not optimize apks. it will be in the upcoming updates and yea prolly when ill implement itll avoid .9.pngs lol
I have already incorporated "adb push" into the script.
Aside from adding an option to optimize the apks, is there anything else you guys think would make this script easier to use ?
Im really targetting those ppl who overcomplicate the simple process of editing apks. Any tips would be appreciated.
I posted a video attached to the main post.
New version out, features added are
Zipalign apks
Optimize pngs, ignores .9.pngs
allows to adb push to phone through script.
Great script man, it works flawlessly. You may just wanna edit your post #1 rather than continuously bumping with new posts for every update. I'm sure a mod won't be too pleased with that
I'm getting the
'java' is not recognized as an internal or external command, operable program or batch file​message when I attempt to sign an apk. I tried switching the PATH in Environment Variables so that it's pointing to my Java bin folder, but then I just end up with
java.io.FileNotFoundException: ..\place-apk-here\repackaged-unsigned.apk <The system cannot find the file specified>
at java.util.zip.ZipFile.open<Native Method>
at java.util.zip.ZipFile.<init><Unknown Source>
at java.util.zip.ZipFile.<init><Unknown Source>
at java.util.zip.ZipFile.<init><Unknown Source>
at com.android.signapk.SignApk.main<SignApk.java:320>
Could Not Find C:\ApkManager2.0\place-apk-here\../place-apk-here/repackaged-unsigned.apk​Help? :]
What app are you trying to edit ? also are you editing pngs only or code editing ?
Hop on Here im helping someone out so ill help u 2
There's a lot of things in /system that benefit from the optimized .pngs. Vending.apk, for instance, shrunk to half the size and runs a bit quicker and smoother now. Even framework-res.apk enjoyed the optimization. Paid apps, on the other hand, don't seem to fare so well; perhaps they check the md5sum of the app or something.
Yea png optimization works for almost all apks, zipalign on the other hand as i recall doesnt work on certain system apks such as settings.apk. Im prolly gonna incorporate apkopt's script into this which would allow to optimize a folder full of apks. As for paid apps not being optimized, a lot of dev already do their part on making the apk as small as possible, so perhaps thats the case.
hmm, after trying a couple of unpaid apps, it seems that perhaps the testkeys aren't compatible with my build. For any signed app, I get an error "Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]"
Yes when u modify a non system apk, they need to be resigned, and you cannot resign it with same key as dev cuz u dont know it hence anytime u modify an app, u must uninstall it, install the modded version, and from then on any change u make u dont have to uninstall as the keys will match
ahhh thanks. My mistake was just removing the package rather than uninstalling it.
Getting this on a zipalign. The file is there but it is repackaged-unsigned.apk and throws this error:
Please make your decision: 5
Unable to open 'E:\ApkManager\place-apk-here\repackaged-signed.apk' as zip archi
ve
Could Not Find E:\ApkManager\place-apk-here\repackaged-signed.apk
The system cannot find the file specified.
Nevermind....looks like it is by design that it tries both signed and unsigned and throws the error on the file that does not exist. It's just I did not see any zipalign output
having an issue that when I go to resign an apk the file deletes after running the script.. am I missing something here?

[Proof of Concept] Controlling your Rom installation with file_getprop

OK, so I've been playing around a lot lately with some edify scripting and looking through the Clockwork Mod source code.
I found some built-in commands that do not appear to be widely known.
I'll probably be creating some sort of "Everything I know about edify scripting" post eventually, but for now, I wanted to share this.
The Concept::
Having control of the zip installation using a config file placed onto the SD card.​
A Fictional Example::
For instance, lets say we have a Rom, we'll call it NubeRom (pronounced Nuber-Om). ;]
OK, so let's say that NubeRom does not install any Stock Samsung Widgets by default.
But NubeRom comes with a file named "options.cfg" that is to be placed onto the root of the SD card.
Inside the "options.cfg" file looks like this:
Code:
install.samsung.widgets=no
That would be the default setting of NOT installing the Samsung Widgets.
Lets say that we wanted to install the Samsung Widgets. We could simply change the file to look like:
Code:
install.samsung.widgets=yes
And then NubeRom's install script would install the Stock Samsung Widgets.​
What the script would look like::
Here is an example of what the install script for the fictional "NubeRom" would look like:
Code:
# mount sdcard so it can be read from
run_program("/sbin/mount/", "/sdcard");
# beginning of ifelse
ifelse(
# read the "install.samsung.widgets" value from the file and compare to "yes"
file_getprop("/sdcard/options.cfg", "install.samsung.widgets") == "yes,
(
# the value was "yes", install stock samsung widgets
ui_print("Installing Stock Samsung Widgets");
# code would go here to install the widgets....
),
(
# the value was not "yes", do not install stock samsung widgets
ui_print("Skipping Stock Samsung Widgets");
)
);
# unmount sdcard
unmount("/sdcard");
The code above is, of course, only the configurable stock widgets portion of the fictional script.​
Testing::
This was tested on an Epic 4G using Clockwork Mod recovery v3.0.0.6.
I have not fully tested what happens when the config file is not in the correct place (in this case the correct place is "/sdcard/options.cfg").
I believe you will get a file not found error or something.
Count that as, this still needs a bit more testing.​
Usage::
Place the "options.cfg" file onto the root of your SD card ("/sdcard").
Flash the "file_getprop_test.zip" file with Clockwork Mod recovery.
Watch the output change based on the config file's setting.​
Other notes::
While looking at the script in the attached test file, some people might notice the use of the concat() and sleep() functions.
Syntax for those is as follows:
Code:
concat("string1", "string2");
sleep(frac);
Example usage:
Code:
concat("Product Device : ", getprop("ro.product.device"));
outputs "Product Device: ~Value~"
Code:
sleep(2.5);
pauses the script for 2.5 seconds.​
Share it::
Link this thread to your favorite Rom dev/packer.
They might find it useful, and maybe some people will do something with this info.​
I've attached two Proof of concept files.
The Clockwork Mod flash-able zip: "file_getprop_test.zip".
The options config file (in a zip): "options.zip".
The forum made me zip the config file. so just extract it first.
=]
I know if we used the options script,this would make for some pretty big ROMs in the future if we included a lot of options that could be installed. Nice find though.
Sent from my SPH-D700 using XDA Premium App
I totally agree about the file size, it could grow exponentially.
It comes down to what the Rom maker chooses to do.
Maybe they choose make a stock base Rom and have a configurable add-on package.
There's also a decent example of using the ifelse() built-in in there.
=]
We could conceivably make some server side web scripts that can put together the config script dynamically and create the appropriate zip file on the fly for a user...
My thought....
Your_Rom_Name.zip
Your_Rom_Name_Install_Options.cfg
You could have a single ROM download and offer a stripped base rom or a full sized rom, all installed from the same ROM zip file. There would only be one ROM file to upload and maintain, but you could have multiple install packages based on it...much like an install shield type wizard would give options like minimum, standard, full.
Good find.
Have implemented these ideas with some additions to my own updater-script and posted info about how to do it here: http://forum.xda-developers.com/showthread.php?p=19962544#post19962544
Thanks so much! I linked back to this thread.
However, while this could result in singly large roms, it has a huge silver lining. The fact of the matter is that I post my roms with a standard and a lite version. For testing's sake, I keep both of them on my SD card, which results in up to 150 MB more memory usage than I need. Plus, I have to ensure that I update TWO packages identically, while this setup would allow me to focus on one.
I have been scouring the web for features like this, but for how widely used it is, resources on edify scripts are scant. This is a great find and I believe I will be implementing it in my future releases. The only thing that could be better would be active prompts and selections while running the installer... ah if only!
Boy I can't believe I never saw this thread before...
Thanks!
Kinda reminds me of Sashimi when I had my Touch Pro 2 (WinMo).
Awesome find ! I totaly agree with random king it is a pain in. The arse to maintain seperate roms... I will be implementing this, once again awesome work as usual.
Sent from my SPH-D700 using XDA Premium App
earthbound[iap] said:
Awesome find ! I totaly agree with random king it is a pain in. The arse to maintain seperate roms... I will be implementing this, once again awesome work as usual.
Sent from my SPH-D700 using XDA Premium App
Click to expand...
Click to collapse
It seems to work great. earthbound, I sent you a pm about an idea I have for this.

[SCRIPT] Repack multiple APKs with proper compression settings (and other stuff!)

Hi Guys,
I was speaking to baadnwz a couple of weeks ago and i asked him which script he used to properly pack all the APKs in his ROM. He told me he used no script, just repacked the APKs he thought were most relevant.
I figured it couldn't be too hard to write something that took an APK, extracted it somewhere, then repacked it with the proper compression, so i wrote one. baadnwz then challenged me to make it work for multiple APKs, so he can just run it against a folder full of them like a lazy asshole. i went one better, and made a script that you could run against a ROM folder structure, it will search out all APKs, repack them, and copy them back into place. HOT!
because this uses recursion and functions to make it easier to write (and because i'm generally comfortable in it), i have written it in VBScript. So this means it won't work on linux as far as i know, sorry. Feel free to convert it or whatevs
WHAT DOES IT DO??????//
1. finds an APK
2. unpacks it in a folder
3. optimises the PNGs (if you want it to)
4. repacks all files as deflate except a blacklist of filetypes*
5. repacks the blacklisted filetypes* as STORE
6. zipaligns the new APK
7. copies it back to the original location, overwriting the original APK
8. finds the next APK, and repeat from step 2
* the blacklisted file types are easily editable. just find the STOREFileNames variable. by default the filetypes are:
"*.arsc", "*.m10", "*.png", "*.wav", "*.ogg", "*.mp4", "*.jpl", "*.jpeg", "*.gif","*.mp2", "*.mp3", _
"*.aac","*.mpg", "*.mpeg", "*.mid", "*.midi", "*.smf", "*.jet","*.rtttl", "*.imy", "*.xmf", _
"*.m4a","*.m4v", "*.3gp", "*.3gpp", "*.3g2", "*.3gpp2", "*.amr", "*.awb", "*.wma", "*.wmv", _
"*.so", "*.dat", "*.bin"
WHY DO YOU WANT THIS??
If certain filetypes in the APK are compressed as STORE (which means they aren't compressed at all), then Android can use them directly. If they are stored as DEFLATE (like all other file types should be), then Android must first decompress the APK somewhere. This means slower apps, more cache, and it's just not how things are supposed to be done. This script makes sure that all files inside all APKs are stored as they should be, and it will optimise PNG files and zipalign the final APK as it goes.
This script is really meant for ROM chefs to run against their ROMs before releasing them, but if you (a mere user) have a ROM that your chef hasn't run this script on, then you can extract the ROM, run the script on it, then recompress the ROM and flash it.
HOW DOES IT DO IT?????///////
It uses the command line version of 7-Zip. Download it from here:
http://7-zip.org/download.html
It uses zipalign.exe from the android SDK. if you don't know where this comes from.. maybe you shouldn't be using this script
It uses a cool OptiPNG utility to optimise the PNGs if you want it to. This slows the processing down a lot.. but it's up to you if you wanna do it. You'll need to download the utility from here:
http://optipng.sourceforge.net/
WHAT DO I HAVE TO DO TO MAKE IT WORK//////?
Grab the script, put it in the same folder as the root of your ROM (the script will repack all APKs in the subfolders from where it's sitting, including the APKs in the folder the script is in).
open up the script, there are 5 variables you MUST verify, most likely you will have to change them.. unless you put things on a D and E drive and your name is Nick..
tempAPKextract = "E:\Temp\tempAPKExtract"
tempAPKBuild = "E:\Temp\tempAPKBuild"
sevenZipLoc = """D:\nick\android\7za\7za.exe"""
zipAlignLoc = """D:\nick\android\android-sdk-windows\tools\zipalign.exe"""
optiPNGLoc = """D:\android\7-zipA\ROM\optipng.exe"""
the first two temp ones can be anywhere.. just make sure at least the sub folders up to "tempAPK..." exist (eg in this case the E:\Temp folder must already be there)
the next three are the locations of the tools required for the script to work, edit to please!
Run the script. If you have set verboseOutput to true (it's false by default), then I would highly recommend you run the script from the commandline with the command:
cscript fixAllAPKs.vbs
anyways, hope it's useful to you.
DOWNLOAD
CHANGELOG????/
v1.5.1 - cleaned up some code, added in verboseOutput so you can watch the progress as it's fixing (must run as cscript!)
v1.5 - added OptiPNG to the script, enabled by default. Quite slow. Added some more file types.
v1.4.3 - added more file types to STORE, thanks gtg465x
v1.4.1 - minor code clean up, fixed some comments.
v1.4 - fixed the problem where the script wouldn't fix any APKs in the root folder that the script was in
v1.3 - almost doubled the speed of the script. fixed some naughty bugs
edit: nevermind
not from what i've been told. if it's not compressed, the android system doesn't have to explicitly decompress it somewhere when it wants to use it, it can just pick it straight out of the APK.
omniwolf said:
not from what i've been told. if it's not compressed, the android system doesn't have to explicitly decompress it somewhere when it wants to use it, it can just pick it straight out of the APK.
Click to expand...
Click to collapse
Good man. Here are all of the files blacklisted by the default Android Asset Packaging Tool (aapt) if you want to include them.
{
".jpg", ".jpeg", ".png", ".gif",
".wav", ".mp2", ".mp3", ".ogg", ".aac",
".mpg", ".mpeg", ".mid", ".midi", ".smf", ".jet",
".rtttl", ".imy", ".xmf", ".mp4", ".m4a",
".m4v", ".3gp", ".3gpp", ".3g2", ".3gpp2",
".amr", ".awb", ".wma", ".wmv"
};
cool, thanks for the info. i've added the missing ones in and uploaded a new version.
cheers!
Nice work.
Suggestion or maybe a challenge for Ver 2:
Given a definition of what languages the user defines, can you repack including only those languages. This would include both drawables and layout language folders.
Removing languages not only speeds up the rom but reduces the apk size which for Sense 3.0 is becoming challenging for many older (> 1 year) devices.
Thanks for your contributions to XDA.
Also need to add .so to the blacklist. Ran into a problem with that the other day.
Here's mine.
It synchronizes with our SVN repository and builds the rom. Any commits which were made are automatically turned into a new ClockWorkMod flashable package.
Code:
#! /bin/sh
#This is the repository Directory, change to match your setup
Repo="~/TeamKomin/trunk"
#This is the Final folder, this is where the file will end up
Output="~/Desktop"
#synchronize SVN repository
svn update "$Repo"
#remove temp folder if exist
test -e "$Output/tmp/" && rm -Rf "$Output/tmp/"
#make new temp folder
mkdir "$Output/tmp/"
#copy repository to temp folder
cp -rf "$Repo/data" "$Output/tmp/"
cp -rf "$Repo/META-INF" "$Output/tmp/"
cp -rf "$Repo/system" "$Output/tmp/"
cp -rf "$Repo/updates" "$Output/tmp/"
#clear SVN folders to reduce size
find "$Output/tmp/" -name ".svn" -type d -exec rm -rf {} \;
cd "$Output/tmp"
#remove old files if there
test -e "$Output/AndromedaRepo.zip" && rm -f "$Output/AndromedaRepo.zip"
#zip up a new Andromeda3 version
zip -r "$Output"/AndromedaRepo.zip ./*
#done
I've also got a version which uses the Expect command to log into our SFTP server and update the files.teamkomin.com website... I'm not posting that here though as it contains security sensitive information.
Using this method, all members work on the ROM as though it were on the phone... This script packages it. No need to package or unpackage the entire thing.
myn said:
Nice work.
Suggestion or maybe a challenge for Ver 2:
Given a definition of what languages the user defines, can you repack including only those languages. This would include both drawables and layout language folders.
Removing languages not only speeds up the rom but reduces the apk size which for Sense 3.0 is becoming challenging for many older (> 1 year) devices.
Click to expand...
Click to collapse
ok, sounds like a good idea. i'm not actually a ROM developer, so i don't know the ins and outs of the various files. any hints on which files i exclude for various languages? just having a vague look around i see in framework-res.apk there's some raw-ar, raw-cs, raw-en-GB folders, are these the ones you're saying i can strip out?
this will obviously be a lot easier if i can do it programmatically, do you know the rules?
Also need to add .so to the blacklist. Ran into a problem with that the other day.
Click to expand...
Click to collapse
ok cool, added it in and uploaded 1.4.3. thanks dude.
Here's mine.
It synchronizes with our SVN repository and builds the rom. Any commits which were made are automatically turned into a new ClockWorkMod flashable package.
I've also got a version which uses the Expect command to log into our SFTP server and update the files.teamkomin.com website... I'm not posting that here though as it contains security sensitive information.
Using this method, all members work on the ROM as though it were on the phone... This script packages it. No need to package or unpackage the entire thing.
Click to expand...
Click to collapse
ok cool. does this actually repack and zip align the APKs though? this looks like it just takes care of the overall ROM zip structure, not the APKs within..? maybe your script could call mine.. if there was a vbs parser for linux
omniwolf said:
ok, sounds like a good idea. i'm not actually a ROM developer, so i don't know the ins and outs of the various files. any hints on which files i exclude for various languages? just having a vague look around i see in framework-res.apk there's some raw-ar, raw-cs, raw-en-GB folders, are these the ones you're saying i can strip out?
this will obviously be a lot easier if i can do it programmatically, do you know the rules?
ok cool, added it in and uploaded 1.4.3. thanks dude.
ok cool. does this actually repack and zip align the APKs though? this looks like it just takes care of the overall ROM zip structure, not the APKs within..? maybe your script could call mine.. if there was a vbs parser for linux
Click to expand...
Click to collapse
We keep the APKs on the server for ease of use. It makes it easier to reference a single file for testing that way.
http://www.jsware.net/jsware/vblinux.php5
vbscript on linux with wine!
Got error on line 118 - WshShell.Run
Anything else shall I edit apart of 4 paths? I have 64-bit OS if that matters.
I just realized how much easier this would be on linux...
Code:
#! /bin/bash
OutDir=~/Desktop/newRom
InDir=~/Desktop/myRom
zipAlign=/home/adam/code/android-sdk-linux_x86/tools/zipalign
TempDIr=~/Desktop/TempDir
FIFO=~/Desktop/temp1234
realign="apk dll whatever files"
#set things up
rm -Rf "$OutDir"
mkdir "$OutDir"
rm "$FIFO"
mkfifo "$FIFO"
#Move to dir and start script
cd InDir
#Spawn another process to write to the fifo object
find `pwd`>"$FIFO" &
#read each line in the fifo
while read line
do
#get each object extension in $realign variable
for x in $realign
do
#test if the extension matches the realignment
if [ $x = ${line#*.} ]; then
#make the path in case it does not exist, could be optimized
touch "$line"
#meh... this would be the command ish...
"$zipAlign" "$line" "$temp/$line"
else
mv "$line" "$temp/$line"
fi
done
done <$FIFO
#this just removes the redundant filesystem created...
#/home/adam/desktop/out/home/adam/desktop/myrom
rm -Rf "$OutDir"
mkdir "$OutDir"
mv "$/TempDIr/$InDIr" "$OutDir"
Untested, should work with some realignment of the variables at the top.
mike1986. said:
Got error on line 118 - WshShell.Run
Anything else shall I edit apart of 4 paths? I have 64-bit OS if that matters.
Click to expand...
Click to collapse
i'd say it's a problem with your
sevenZipLoc
variable, it's the first place it gets used. my OS is 64bit too, so that shouldn't be a problem. what does your sevenZipLoc variable look like?
omniwolf said:
i'd say it's a problem with your
sevenZipLoc
variable, it's the first place it gets used. my OS is 64bit too, so that shouldn't be a problem. what does your sevenZipLoc variable look like?
Click to expand...
Click to collapse
sevenZipLoc = """C:\Program Files\7-Zip\7z.exe"""
EDIT:
It seems that I forgot to download "command version"...
Any way to add optimizing PNGs to this script as well?
williamfold said:
Any way to add optimizing PNGs to this script as well?
Click to expand...
Click to collapse
show me how to do this and i might be able to add it in..
Heres the link to the opensource OptiPNG program to optimize a PNG
http://optipng.sourceforge.net/
I hope it perfectly work
wow thanks bro, that's way i need to learn about it

A way to Optimizing APK & Framework files

For optimizing apks, aside from fixAllAPKs by omniwolf, I found another one.
Note: I have no responsibility for breaking your ROM, so backup first.
Rights: No rights reserved, you can do whatever you like.
The classes.dex files have significant amount of debug infos in it, striping out those can reduce file size and increase some performance. I test it with all /system/app/ and /system/framework/ files, the ROM runs snapier, especially when you launching apps. Stripe out those debug info doesn't hurt anything, they are usefull only for original developer and one who wants to mod it, but you can always keep a copy of the original one for modding and debugging purpose.
Note that this does not boost performance like increase CPU freq, but the theory is, since the file size is reduced, dex and dalvik-cache became smaller in size, occupies memories smaller, thus processing is faster, and saves a little battery life, you can think it as something like optipng does.
Note also, you don't need to specify 0 compression, dex will be decompressed to /data/dalvik-cache, just use fixAllAPKs for fixing files inside APK that should not be compressed, and 0 compression for file type like xml isn't really a good idea.
Don't use this for ICS Framework files yet, there are specific files will causes surprising bugs when recompiled, but I'm lazy to find it out why and what, so just don't do it.
For FixAllAPKs, original thread here, http://forum.xda-developers.com/showthread.php?t=1123463
or post #36 by carl1961 http://forum.xda-developers.com/showpost.php?p=21458549&postcount=36
==========================================================================================================
RemoveDebuggingInfo_v2.2:
API Level must be specified to get 100% compatibility, it seems not forward nor backward compatible.
Froyo = 8, GB = 10, ICS4.0 ~ 4.0.2 = 14, ICS 4.0.3 = 15
Added API Level chooser, default 15 (ICS 4.0.3)
Added more descriptions.
Correct typos.
==========================================================================================================
depricated...
RemoveDebuggingInfo_v2.1:
First, Thanks to all who corrects me.
fix typo for menu selection 6
fix path for pulling for adb to work without setting PATH env variable
fix pushing framework to wrong directory
update smali/baksmali to v1.3.2
update script to compile/decompile using api level 15
added menu selection of fixAllAPKs
Instructions: Important
The default config is for ICS 4.03 base ROM, if you are gonna use it for Gingerbread Base ROM, need to edit the file RemoveDebuggingInfo.bat, and change the -a 15 to -a 10 for API level 10, then just double click start.bat and follow the on screen instruction.
java -jar baksmali-1.3.2.jar -b -a 10 -o .\classes .\classes.dex
java -jar smali-1.3.2.jar -a 10 .\classes -o .\classes.dex
Click to expand...
Click to collapse
Using API level 10 for ICS and API level 15 for GB will not work, you phone will just hang or endless reboots.
Pushing framework will reset all your settings, so if you choose to push framework, do a factory reset instead and just re-install your user apps.
After pushing /system/app, you must reboot to recovery and wipe dalvik and cache, another way of pushing is boot to recovery, mount /system then push.
I have only tested on Gingerbread 2.08.401.1 base, have no idea for ICS, but it should work, as the latest smali/baksmali supports ICS.
If you experience glitches, do it from the beginning by using un-modified apk and jar.
How it works: it is just baksmali (decompile dex to smali code WITHOUT debugging info) and then smali (compile back to dex)
Requirements: java and htc sync usb driver.
==========================================================================================================
Depricated - too much error.
RemoveDebuggingInfo_v2:
Added another script for simpler operations, instead of dragging hundreds of APKs, it is self descriptive, can pull and push /system/app, /system/framework, optimizing all files for app and framework, and reboot to recovery.
Tested on v2.08.401.1 ROM, on all files /system/app, /system/framework, should work on other device and ROM too, but not sure, test it yourself!
==========================================================================================================
For /data/app/ user application files, modify it may not installed at all, re-sign it also not help, so just do it manually to test.
But for now, here is a way to do it manually, since /system partition will not grow and many spaces left, you can simply put some APP on this partition, and following are working on my ROM, some should have naming as com.a.b.c... whatever is the name installed on /data/app/ stripe out the -1 at the end. Just besure the APP is uninstalled before pushing to /system/app/
Below are what I tested.
AdobePhotoshopExpress.apk
BarcodeScanner.apk
com.evernote.skitch.apk
ESFileExplorer.apk
GoogleDocs.apk
GoogleGoggles.apk
GoogleTranslate.apk
GPSTest.apk
org.hermit.audalyzer.apk
For APKs that has lib folder, you can just extract it and put it on /system/lib/ then del the lib folder inside the apk archive, e.g. flashplayer, adobereader.
adb should be start only once after booting your PC, if you get issues, like adb always shows restarting and out of date, it is because the included adb.exe in htc sync is out of date, and you had installed android sdk with environmental variable set, to fix it, both must have same version, or simply delete one of them, and if you have path variable set, you can del the included adb.exe as well.
Thanks for this, I will be sure to use it
Sent from my HTC Sensation XE with Beats Audio Z715e using xda premium
I have 189 Apps in system/app .... is there a way to make it with all files!?
Jonny said:
Thanks for this, I will be sure to use it
Just out of interest, what program do you use for getting the smali code?
Click to expand...
Click to collapse
It is the one and only, baksmali.jar and smali.jar http://code.google.com/p/smali/
xtcislove said:
I have 189 Apps in system/app .... is there a way to make it with all files!?
Click to expand...
Click to collapse
Yes I know it is so much, but need to write a sohphisticated code, maybe if I have time, I'll try to make it more easier, a vbscript or cmd script, or a shell script in linux. And don't forget the framework files too.
mudhi said:
I test it with all /system/app/ and /system/framework/ files, the ROM runs snapier, especially when you launching apps.
Click to expand...
Click to collapse
It is really so. I have checked it up.
mudhi said:
It is the one and only, baksmali.jar and smali.jar http://code.google.com/p/smali/
Click to expand...
Click to collapse
Thank you mudhi
a little off topic here, Is there a way to change smali files into a readable code (let's say i want to use it with eclipse !!)
i have tried searching and i came across Dex2Jar and jd-gui !!
my question here is: is there a way to use smali files into Eclipse ??
Alfaifi said:
Thank you mudhi
a little off topic here, Is there a way to change smali files into a readable code (let's say i want to use it with eclipse !!)
i have tried searching and i came across Dex2Jar and jd-gui !!
my question here is: is there a way to use smali files into Eclipse ??
Click to expand...
Click to collapse
Yes, use dex2jar to jar archive file, then jd-gui to view the source, you can also use DJ-decompiler (commercial) to view and change code, but that's not really readable, and compile back is too hard, and also jbe, ce etc... but I came to a conclusion.
Use dex2jar to decompile dex and use jd-gui to view the source for understand logic, method etc... and just reference it to smali code, and if you get use to it, hacking app will be easier, perhaps more easier than viewing the source code, because hackiing involviing mostly on 0 to 1, true to false, jump to where ... and that is only adding or changing a single code in smali, e.g. logic if a == b then c, if you want to make it always c, then just if 0 == 0 then c, or just a simple jump etc...
@mudhi new smali/baksmali 1.3.2 is out
And is also possible to remove debugging info from jar files that are present in framework folder?
texture said:
And is also possible to remove debugging info from jar files that are present in framework folder?
Click to expand...
Click to collapse
I think you can just rename them to .apk and then back to .jar.
mike1986. said:
I think you can just rename them to .apk and then back to .jar.
Click to expand...
Click to collapse
No you dont need to, just put(or pull) all framework files (both apks and jars) and it will process them all automatically.
Btw i just ran this on InsertCoin 4.1.1 for all APPS and Framework except i changed a script a bit (added -mx0) so it compresses APKS with 0 compression.
And can tell you that phone definitively feels faster, boots faster, apps open faster, and there a bit more free RAM available now.
Thank you mudhi allot for this!
mike1986. said:
@mudhi new smali/baksmali 1.3.2 is out
Click to expand...
Click to collapse
ah... hehe thank you, supposed ICS 4.0.3 is supported. Thank you!
Need a little clarification ..
java -version
if errorlevel 1 goto javaerr
---------------------
C:\>java -version
'java' is not recognized as an internal or external command,
operable program or batch file.
---------------------
I installed java however still get an error ..
What is needed > to install ? Link Maybe ?
Also ... I found a small ops in the bat file ..
:javaerr
cls
echo Java is not found, please install java and rerun the script.
echo Hit anykey to quit
PAUSE
goto end < forgot this ?
Thanks ..
WarlockW said:
Need a little clarification ..
java -version
if errorlevel 1 goto javaerr
---------------------
C:\>java -version
'java' is not recognized as an internal or external command,
operable program or batch file.
---------------------
I installed java however still get an error ..
What is needed > to install ? Link Maybe ?
Also ... I found a small ops in the bat file ..
:javaerr
cls
echo Java is not found, please install java and rerun the script.
echo Hit anykey to quit
PAUSE
goto end < forgot this ?
Thanks ..
Click to expand...
Click to collapse
You need to set java variable, here's how-to:
http://java.com/en/download/help/path.xml
mudhi, You've got few errors in start.bat file. If you want to pull the apps to "app" folder, use this command "adb pull /system/app/ app". If you do cd app, It won't find the adb in the app folder and won't do nothing.
ivicask said:
No you dont need to, just put(or pull) all framework files (both apks and jars) and it will process them all automatically.
Btw i just ran this on InsertCoin 4.1.1 for all APPS and Framework except i changed a script a bit (added -mx0) so it compresses APKS with 0 compression.
And can tell you that phone definitively feels faster, boots faster, apps open faster, and there a bit more free RAM available now.
Thank you mudhi allot for this!
Click to expand...
Click to collapse
Before optimizing with this script, my apks are all fixed with the vbscript by omniwolf, it only compress files that should be compressed, the script fixAllAPKs.vbs can be used before or after this. Anyway, I'll add a decision to run the script.
mudhi said:
Before optimizing with this script, my apks are all fixed with the vbscript by omniwolf, it only compress files that should be compressed, the script fixAllAPKs.vbs can be used before or after this. Anyway, I'll add a decision to run the script.
Click to expand...
Click to collapse
Is there any problem with doing 0 compression on all files? I dont have space problems, and doesnt that make phone run faster as it doesnt need to decompress any data? Saves both CPU and RAM?
drms12 said:
mudhi, You've got few errors in start.bat file. If you want to pull the apps to "app" folder, use this command "adb pull /system/app/ app". If you do cd app, It won't find the adb in the app folder and won't do nothing.
Click to expand...
Click to collapse
Oh yes, I know where's the error, because I have android sdk installed and environmental PATH variable are set, you can fix it by just set the PATH variable with where the adb.exe exist.
Or just change the script with this
ullapp
cd app
../adb pull /system/app/
or
ullapp
adb pull /system/app/ app
same as pullframe
mudhi said:
Oh yes, I know where's the error, because I have android sdk installed and environmental PATH variable are set, you can fix it by just set the PATH variable with where the adb.exe exist.
Or just change the script with this
ullapp
cd app
../adb pull /system/app/
or
ullapp
adb pull /system/app/ app
same as pullframe
Click to expand...
Click to collapse
Yes
I think you forgot to update the download, It still ver2.
There is an error in script - the push command to upload files to framework uploads them to /system/app
ICS 4.0.3 - got bootloop just after lockscreen shows. Had to restore system.

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

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/MADindustries/automod/ICSBlueFull.mod
Original thread for this mod can be found here: http://forum.xda-developers.com/showthread.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)
awesome work dude!
invisiblek said:
awesome work dude!
Click to expand...
Click to collapse
Thanks. Btw you are in the credits on the script itself. (even if it was a couple binaries haha)
Wow. Great work. Can't wait to see more!
Ta very much indeed.
ALQI
Sent from my SCH-I535 using xda app-developers app
Nice job buddy..No Windows support?
This is amazing. +100000000000
Sent from my SCH-I535 using xda app-developers app
incubus26jc said:
Nice job buddy..No Windows support?
Click to expand...
Click to collapse
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
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
MAD Industries said:
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
Click to expand...
Click to collapse
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
alquimista said:
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
Click to expand...
Click to collapse
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.
Nice! Another great tool for the community!
Just what ive been waiting for
---------- Post added at 08:40 PM ---------- Previous post was at 08:32 PM ----------
Looks like running with cygwin gives unknown operating system. Can't proceed after that.
clark44 said:
Just what ive been waiting for
---------- Post added at 08:40 PM ---------- Previous post was at 08:32 PM ----------
Looks like running with cygwin gives unknown operating system. Can't proceed after that.
Click to expand...
Click to collapse
Oh yeah, that will have to be changed. run the command 'echo $(uname)' in a cygwin terminal and let me know what it outputs. I'm guessing just cygwin. Then i'll update the script to support it.
Any chance anyone has the example mod posted in the first post available on another hosting provider? It's been down for 2 days
myn said:
Any chance anyone has the example mod posted in the first post available on another hosting provider? It's been down for 2 days
Click to expand...
Click to collapse
Fixed it! Sorry about that. I don't know what happened with cloud.
Automod works great! Thanks so much! Here are the steps I took to create a quick little test mod to enable a 40x38px navigation bar and have only the wifi, bluetooth, gps, rotation, sync status bar toggles for Beans R8. I'm on Beans R3.1, so I didn't get a chance to test the zip in CWM.
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 ROM 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 appears to be structured as a zip file with the extension .zip replaced with .mod
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”)
The 5StatusBarNavBar mod package for Beans R8
The CWM zip for the above mod package
MAD Industries said:
Oh yeah, that will have to be changed. run the command 'echo $(uname)' in a cygwin terminal and let me know what it outputs. I'm guessing just cygwin. Then i'll update the script to support it.
Click to expand...
Click to collapse
CYGWIN_NT-6.1-WOW64 (edit: uname -o will just return Cygwin)
Took a quick look at your script and I don't think it will too much of effort to offer cygwin support. Package manager by default will install bash, and curl/wget is available as well. You would need to install java naively on OS (it is accessible via your bash shell). Also to note don't think it will be required for your script based on my quick look, but you could always use the built in 'cygpath' command to convert windows<->unix paths if necessary.
Unfortunately only have a Windows box at work so can't spend to much time on but if no one gets to it I will take a stab later this week time permitting.
incubus26jc said:
Nice job buddy..No Windows support?
Click to expand...
Click to collapse
Linux is free and easy to dual boot. Nothing stopping you.
Or just run Linux from a VM. You can even forward the USB ports with Vitualbox.
mybook4 said:
Automod works great! Thanks so much! Here are the steps I took to create a quick little test mod to enable a 40x38px navigation bar and have only the wifi, bluetooth, gps, rotation, sync status bar toggles for Beans R8. I'm on Beans R3.1, so I didn't get a chance to test the zip in CWM.
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 ROM 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 appears to be structured as a zip file with the extension .zip replaced with .mod
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”)
The 5StatusBarNavBar mod package for Beans R8
The CWM zip for the above mod package
Click to expand...
Click to collapse
Thank you so much for writing this! I am adding it to the OP. (let me know if you want me to take it down for some reason though)
Quick note, I think step 6 was supposed to be copy mod file to install directory? Also, a .mod file is exactly that; a zip file renamed to .mod. I did this to differentiate it from flashable zip files because the two would likely have the same name and it would cause confusion yet I still wanted to keep the .mod format easily modifiable/not proprietary. And one last thing, there is a hidden command called "packagemod" which can be used after you create your own mod to zip it up properly for distribution. It is entered at the main menu in place of choosing an option. Syntax: 'packagemod ICSBlueFull'.
lowg said:
CYGWIN_NT-6.1-WOW64 (edit: uname -o will just return Cygwin)
Took a quick look at your script and I don't think it will too much of effort to offer cygwin support. Package manager by default will install bash, and curl/wget is available as well. You would need to install java naively on OS (it is accessible via your bash shell). Also to note don't think it will be required for your script based on my quick look, but you could always use the built in 'cygpath' command to convert windows<->unix paths if necessary.
Unfortunately only have a Windows box at work so can't spend to much time on but if no one gets to it I will take a stab later this week time permitting.
Click to expand...
Click to collapse
Thanks for the tips. I have next to no experience with cygwin so this information is very helpful. I'll look into adding support to the next release.

Categories

Resources