# MasturMods [BETA-20131027-1539]



## Mastur Mynd

-- Boring Intro/Background --

When I first started rooting and hacking with Android I was informed of a website called UOT theme kitchen. I was amazed at all of the things I could do from within UOT to customize my device after installing (at the time) CM7. UOT had a great feel to it and was easy to navigate, but I felt it often took too long (up to a hour) to receive my finished package.

From that moment on I had decided to find a way to create a UOT-like application to allow a local build rather than having to wait for a server to build all of the packages before mine.

It was honestly a very long journey, first learning the basics of how Android works and then early last year, when I received a new, RootzWiki branded Galaxy Nexus, I began learning the language of Java. Even learning Java wasn't going to be the end of it, I needed help to learn more about the Android infrastructure. JRummy16 (developer of many root required applications) was very willing to help teach me and even provided the building blocks for what is now my installation system.

Fast forward to now. MasturMods is no longer a theory or a dream, it has become a reality. There aren't nearly as many options as UOT, but every day MasturMods gets closer.

-- What This Application Does --

MasturMods can install new battery, signal cluster and navigation icons to your SystemUI.apk or currently installed Theme Chooser theme as well as installing any *COMPATIBLE *ZipThemer theme without the need to reboot (in most cases), or boot into recovery (Theme Chooser support has been removed due to incompatibility for the moment).

'Premium users' can change icon colors from within the app


Battery - based on percent (with up to 5 adjustable sliders to allow even more end user customization)
Signal cluster - based on whether the device is fully connected or not
Navigation buttons - with a background (primary color) and foreground (Accent Color)
Overlays - before install and independent between overlays

'Premium users' can change battery types If the icon set contains battery icons (ie. stat_sys_battery, stat_sys_battery_gear, etc.)

'Premium users' can add or remove overlays

-- Requirements --


Android 4.0 - 4.3 (Currently 4.4 is unsupported due to new structure of system files)
AOSP based ROM
Root Access 

-- Downloads --

BETA COMMUNITY (Google+)


Base - BETA (Direct Link)
Base - MARKET (Removed until current beta session is complete)
Premium Key - MARKET

Both beta and market bases should react to having the premium key installed

*- NOTE -*
You must have the free version of MasturMods installed along side of the premium key unless you only want a few wallpapers

*-- CHANGE LOG --*

-- 20131027-1539 --


Added ZipThemer support
Moved to cloud based loading to:
 Eliminate as much of a footprint on the sdcard as possible
Allow for easier updating of themes

Added "restart applications" back to the finalize dialog

-- 20131014-2227 --


Added color preferences for the following:
Data indicator
Data arrows

Fixed the issue with checking the server at start up

*-- 20131010-2023 --*


Clean and build to fix application force closing on start up

*-- 20131010-0402 --*


Updated entire installation process 
Added icons for notifications
Remapped/reformatted all icon packs
Added preview screen and overlays
UI touch ups
Leak prevention
Removed 'Restart Applications' option (causing too many crashes)
Cleaning
*THIS BEGINS A THOROUGH TESTING CYCLE! EVERYTHING WILL BE WIPED WITH EACH UPDATE FROM NOW ON*

*-- 20130914-0947 --*


Added support for high res icon packs.
To update your icon packs you must manually delete them until I add system to check for icon pack updates

*-- 20130913-1929 --*


New hybrid java/shell installation confirmed working on nearly every Android version
Updated UI for new Installation
Minor touch ups to get rid of memory leaks

*-- 20130905-2306 --*


Initial beta release
Seems that theme chooser installation support slipped through. Gonna make it a part of the base (ie. free)


----------



## Mastur Mynd

*-- Creating Your Own Icon Pack --*

One of the issues I've always had is the lack of variety when it comes to icon packs. During the early days of the application I had a special section set aside in my server to hold user created icon packs, but never had a comprehensive tutorial on how to go about making one until now.

*ONLY USE CUSOM ICON PACKS POST BETA-20131010*

*BUGS ARE STILL BEING WORKED OUT*

-- Step 1 --
Create a Folder to contain your Icon Pack

-- Step 2 Packages --
Right now, the only application that MasturMods will modify is the *SystemUI.apk*.

Within the first folder we need to create a folder for each application we wish to modify. To do this, we need the package name. To get the package name we can either decompile the application and look at the *androidmanifest.xml* and get it, or use RootExplorer or something similar that will allow you to peek inside the application.

As of right now, just add a folder named *"com.android.systemui".*

-- Step 3 Adding Supported Features --
Each icon pack has these default directories that *MUST *be there to be able to install anything:

*"background"*
*"foreground"*

Within the constant folders, the "background" icons must contain *ONLY* the following names:

*-- BATTERY--*


*"charge.png"*
*"normal.png"*

*-- SIGNAL CLUSTER --*


*"arrow.png"*
*"data.png"*
*"signal.png"*
*"wifi.png"*

"data.png" and "arrow.png" should both be a blank canvas with the same dimensions as the foreground images you intend to use.

*-- NAVIGATION BUTTON --*


*"back.png"*
*"home.png"*
*"menu.png"*
*"recent.png"*

These are, of course, only the basic icons. You may add additional icons as you see fit as long as they are a part of the navigation bar (starting with *"ic_sysbar"*)

Within the constant folders, the "foreground" icons contain all images to overlay the background

*-- BATTERY--*


*"[0-100].png"*

*-- SIGNAL CLUSTER --*


*"signal_[0-4].png"*
*"signal_null.png"*
*"wifi_[0-4].png"*
*"wifi_null.png"*

*-- NAVIGATION BUTTON --*

Navigation foreground images must match the name of their intended background. For example if I have an image named "search.png" in the backgrounds folder, I will need to have an image named "search.png" in the foreground folder.

Other than the two default folders, there are also dynamic folders for each type of icon pack:

*-- BATTERY--*


*"charge"*
*"number"*

The charge folder will contain any charge indicators that the user will be able to select from upon installing and the number folder will contain an image file for the percent number from 0-100 that the user will have the option to have overlay the battery icon.

*-- SIGNAL CLUSTER --*

(No special overlays have been considered as of yet, if you have any ideas, please feel free to speak your mind)

*-- NAVIGATION BUTTON --*


*"glow"*

The "glow" folder should contain a custom glow animation to be installed along with the navigation buttons as an option to the user.

-- STATIC OVERLAY --

Each icon set has the option of a static overlay. To add a static overlay create a folder named *"overlay"*. Depending on the type of icons is how you'll need to name these overlay icons.


*Battery*
"charge_[percentNumber].png
"normal_[percentNumber].png

 *SIGNAL*
* "signal_[strengthNumber].png*
*"wifi_[strengthNumber].png*

* NAVIGATION BUTTON* 
Navigation overlays must match the name of the foreground and background image. Please refer to the description for the navigation button foreground folder.


*-- Keep in mind that **ALL **of these** DYNAMIC **folders **ARE OPTIONAL **--*

-- Step 4 Creating Icons --

In order to maintain a high resolution image throughout all of the various devices in android we need to make sure we're making a large enough image that it wont become blurred, however; we also don't want to create an image so large that it will take too much time to load, let alone be turned into a new icon. For this reason I have set the original Icon height to *144*. The width of the icon is dynamic, but the foreground and overlay images must be *EXACT *the same size as the background images.

*-- "background' --*

Here are some examples of background Images
























The background image *MUST* be the entire image. If alpha effects help with your icons, please add overlays to accommodate.

-- Step 5 Putting It All Together --
Once you've finished all of the icons for your pack just turn the root (base) folder into a zip. Please be sure that the first set of folders displayed within the zip are the package names.

-- Step 6 Test It Out --
Your icon pack is ready to go! Load it onto your sdcard and put it in 'masturmods/(pack type [battery/signal/navigation]). Then launch MasturMods, install your work and enjoy the fruits of your labor.

-- Step 7 Sharing Is What Its All About (OPTIONAL) --
If you'd like to allow other users to enjoy the fruits of your labor as much as you do, send me a pm with a direct link to the icon pack so I can personally add it to the lineup.

*If you are having trouble with your icon pack, feel lost or feel that I may have left something out, feel free to pm me or use MasturMods to email me and I will do everything I can to make sure your icon pack works!*


----------



## justen7723

Galaxy nexus (toro)
PAC ROM

I tried nav keys and signal cluster, both hung on installing part. I let them both sit on installing for probably 5 minutes each.

Sent from my Galaxy Nexus using Xparent Skyblue Tapatalk 2


----------



## Rinkle McBally

Hung on installing battery on free edition

Done like dinner


----------



## Mastur Mynd

I'll look into it. Thanks for the reports Sent from my SCH-I545 using RootzWiki mobile app

EDIT - Having trouble replicating the issue. Is there any way you could link me to the PAC rom you're currently running on your toro? Everything works fine on the build I downloaded.

Just curious, do you have (your SU app of choice) set to always remember MasturMods?


----------



## justen7723

Mastur Mynd said:


> I'll look into it. Thanks for the reports Sent from my SCH-I545 using RootzWiki mobile app
> 
> EDIT - Having trouble replicating the issue. Is there any way you could link me to the PAC rom you're currently running on your toro? Everything works fine on the build I downloaded.
> 
> Just curious, do you have (your SU app of choice) set to always remember MasturMods?


Sent from my Galaxy Nexus using Xparent Skyblue Tapatalk 2

SU is set to always remember.
Here's a link to PAC ROM http://forum.xda-developers.com/showthread.php?p=42108302
[ROM] Official PACman Toro


----------



## Rinkle McBally

If it matters any I am on the PAC ROM too. I have a sammy galaxy s3 on vzw


----------



## justen7723

Installed my backup of carbon ROM 9/5 nightly and it is still hanging on installing, eventually mastyrmods force closed.

Sent from my Galaxy Nexus using Xparent Skyblue Tapatalk 2


----------



## Mastur Mynd

The issue seems to be only with 4.3. I'll have to do some tests over the next couple days. It may take time since I have to work a lot over the next few days but I'll figure something out.

EDIT - I believe I've replicated the issue. I'll be digging through code and running logs to find the issue which is causing the hang


----------



## skynet11

Looking forward to Theme Chooser support - thanks


----------



## Mastur Mynd

Theme chooser support works 100% on 4.0-4.2.2 and once I've found the issue with 4.3 it'll be working in 4.0+

On a side note I was able to get nav buttons installed on PAC 4.3. Still no signal or battery. Will report some time tomorrow hopefully


----------



## skynet11

I'm experiencing force closes every time I try to install signal or navbar mods on my 4.2.2 build of AOKP on my Droid DNA. Is it because the DNA is xxhdpi?


----------



## Mastur Mynd

Its very possible that I forgot to include xxhdpi values. Could you get a logcat and message it to me


----------



## Mastur Mynd

I have identified both issues.

XXHDPI - the installation was checking for a directory that wasn't there 100% of the time. Easily resolved.

HANGING - it seems to be an issue of memory management. It hasn't been 100% resolved but it has also worked several times. I'll be taking a closer look at it to see if there is a more memory efficient way to handle this issue.

Please be patient. I'm working very long hours over the next few days as well as moving some furniture


----------



## skynet11

No rush at all - I can wait indefinitely. Try to be safe when moving that furniture - it's way too easy to get hurt.


----------



## Rinkle McBally

@master I hope you don't mind I tweeted your app out and told my rom team about you


----------



## Mastur Mynd

I don't mind at all man. Actually I owe you a bug thanks. Really hoping word spreads a bit more about this. Its something I've hoped would succeed for a really long time


----------



## Mastur Mynd

Time for a status update. I'm pretty sure I've solved the memory issue by taking out the installation script and doing the vast majority of it through java. Everything still works the same, the only difference with this way is that you HAVE to reboot your device to finish the installation. Simply restarting the applications will cause indefinite force closing

EDIT - Also identified the issue as an out of date asset. Digging through my options now to see if completely changing the installation script is the road I need to be taking


----------



## b16

Would you like Dev status instead of themer?


----------



## Mastur Mynd

Up to you boss man. Hell I'm honestly content with still being allowed to post here after shit hit the fan with my old team and my absence after winning a device from you guys. Truly sorry for not being more active on the forums, but rest assured this app and my drive to learn development came from everyone here at Rootz in the same package that Gnex came in


----------



## justen7723

Mastur Mynd said:


> Time for a status update. I'm pretty sure I've solved the memory issue by taking out the installation script and doing the vast majority of it through java. Everything still works the same, the only difference with this way is that you HAVE to reboot your device to finish the installation. Simply restarting the applications will cause indefinite force closing
> 
> EDIT - Also identified the issue as an out of date asset. Digging through my options now to see if completely changing the installation script is the road I need to be taking


Would it be possible for the app to perform the reboot at the appropriate time. In your progress box of what's happening it could just go from installing to rebooting and then finish it all up for us pretty much.

This reminds me of what sourcery toolbox did with some of there mods. If your unfamiliar with the ROM I could post a link to it. (The toolbox is built into the ROM). Not sure if it would help you at all but thought I'd share the info with you just in case.

Sent from my Galaxy Nexus using Xparent Skyblue Tapatalk 2


----------



## Mastur Mynd

The idea behind it was to let the user reboot when ready, immediately or at a later time. But now I'm fairly certain I can amend the installation to just be able to just need to restart the applications.

Sent from my SCH-I545 using RootzWiki mobile app


----------



## Mastur Mynd

I think its time for a status update. I've come to the conclusion that the method I had in mind to keep rebooting as an option will not work.

The new method will make it so that a reboot is 100% required for installation to complete. Restarting the applications will cause indefinite force closes.

I should have a new beta up some time soon. Its been a very long week but I should be able to get some work done tomorrow

EDIT - Looks like I was wrong about the reboot being required, finalization can be a reboot or to simply restart the applications


----------



## phippski

installed this on my nexus 4 today after a link was posted on carbon rom google+. Love the idea but it refuses to work. Always gets stuck on installing then eventually it stops working. Running carbon 4.3 nightly 09142013. Really hope you can iron out the bugs as this will be a really good app if it works


----------



## Mastur Mynd

in the app go to Settings>About and make sure you're on BETA-20130914-0947. The first build started crashing on select 4.2.2 and 4.3 particularly. If you're on this version, please pm me and we'll set up some logging tests since I don't have a n4 to test with


----------



## silverblade

Interesting idea, I'll give it a shot and see how it works.


----------



## Mastur Mynd

Development has been down for a bit since my HDD crashed. I'll be working on a fresh build all week. Hopefully I can get another beta out this weekend

Sent from my SCH-I545 using RootzWiki mobile app


----------



## Mastur Mynd

Ok, new beta fresh up

*THIS BETA AND ALL FOLLOWING IT WILL WIPE EVERYTHING FOR THIS APP FROM YOUR DEVICE*
*This is to ensure a semi perfect test environment and to remove all unusable information and files.*
*This will result in an overall lighter footprint on your sdcard*

This wipe is only on the first run after a fresh update.

Please report any errors either here or email me directly from within the app =)

Currently there are only 5 icon packs for this new version. But a few of these have extras (overlays) if you are a premium user. More icon packs will be added as time allows which should be pretty quick as long as no major errors arise


----------



## justen7723

Installed I got masturmods has stopped. Deleted the app, deleted maturmods folder from SD, reinstalled the app and got the same thing.









ROM: Carbon nightly 10/9/13
KERNEL: fancy r43-ext

Sent from my Galaxy Nexus using Xparent Skyblue Tapatalk 2


----------



## Mastur Mynd

Can you get me a logcat?

Sent from my SCH-I545 using RootzWiki mobile app


----------



## JRJ442

@Mastur Mynd I'm getting an instant force close too when opening the newest beta. I'm running Rootbox 4.2 on a d2vzw. Here's the logcat https://db.tt/GdguOdAx


----------



## Mastur Mynd

Thank you all for reporting the error. It was an easy fix. Clean and Build. Eclipse did this to me the last time I was on a fresh install. Hopefully everything is working now =)


----------



## Mastur Mynd

Updated to add ZipThemer support and remove the need for files on the sdcard =D

If you know of anyone that works with themes like this (ZipThemer or Metamorph) send them my way. I'd like to get as many themes onto the servers as possible


----------

