[Live Wallpaper] Asus MyWater Reworked w/ tutorial (no root required)

Search This thread

jschmier

Senior Member
May 8, 2011
264
436
As I mentioned in another thread, I was intrigued by Ruvort's modifications to the Asus MyWater live wallpaper over at xoomforums.com and some of the work from similar xda developers threads here and here.

The most common issue with using these modified live wallpapers is that they simply replace the default Asus MyWater live wallpaper, which limits you to having one at a time and causes additional difficulties for Transformer owners since the Asus MyWater live wallpaper is a system application. I have been in contact with Ruvort and plan on working with him to re-release his live wallpapers with the necessary adjustments so that they can all coexist and multiple flavors can be installed at the same time; even on non-rooted tablets.

These reworked MyWater live wallpapers are my initial step into the arena of editing APK files. They can be installed and uninstalled like any other application, however allowing installation of non-Market applications is required. I should note that in order to prove out some edits I made to the smali disassembly files, I adapted Ruvort's excellent work for the beer w/ lime wallpaper and I hijacked his idea for the ducky wallpaper.

Update: On a whim, I decided to check the alignment of the APK files using zipalign. I found that the resources in the wallpapers needed adjustment, so I have corrected the alignment for all the attached wallpapers. If you downloaded and installed any wallpaper from this post prior to June 24th 2011, I recommend replacing with an optimized version.

Update 2: It has been discovered that these live wallpapers have issues when running on ICS. I am aware of the issues and have been working toward a solution (one recent attempt here). While workarounds have been reported, I have not tried any of them myself and prefer to address the problem at its source. Once I am confident that I have things working correctly, I intend on starting a new thread to feature the updated, ICS-friendly designs. Stay tuned...

Beer w/ Lime
BBr8T.png


Jolly Roger
7deYU.png


Rubber Duckie (original v1.0)
Y9oS5.png


Rubber Duckie (updated to v1.1 14th June 2011 - original still available)
PZkFX.png


Loch Ness Monster (added 12th June 2011)
hprKG.png


Honeycomb (added 14th June 2011)
sIutN.png


Tux (added 20th June 2011)
X7vxR.png


Note: There are additional wallpapers attached to subsequent thread posts.
 

Attachments

  • BeerWithLime.apk
    3.6 MB · Views: 14,367
  • JollyRoger.apk
    1.2 MB · Views: 7,977
  • RubberDuckie.apk
    2.9 MB · Views: 4,915
  • RubberDuckie_v1.1.apk
    5.2 MB · Views: 9,964
  • Nessie.apk
    2.2 MB · Views: 6,632
  • Honeycomb.apk
    2.6 MB · Views: 5,847
  • Tux.apk
    2.1 MB · Views: 9,686
Last edited:

jschmier

Senior Member
May 8, 2011
264
436
Creating the Reworked MyWater Wallpapers

The following is an overview of the process I followed in creating the live wallpapers found in the first post. These instructions are intended to serve as a guide to those interested in creating their own modifications.

Prerequisites
  • Asus MyWater APK (you can grab a copy here)
  • android-apktool - tool for reengineering Android apk files (here)
  • roptipng - modification to OptiPNG PNG optimizer (here)
  • SignApk.jar - (Google search)
  • zipalign - archive alignment tool (included in Android SDK)

Step 1 - Decoding the APK
Using apktool, decode the APK to retrieve the resources into nearly original form. In this example, the decoded files are placed in a directory called MyWaterDir.
Code:
apktool decode MyWater.apk MyWaterDir

Step 2 - Modifying the package name
The package name is a unique identifier used by Android to manage the installed applications. The easiest package name modification simply involves changing all instances of asus to another unique identifier.

Using your favorite editor (I like gVim), modify the package name found in MyWaterDir/AndroidManifest.xml (com.asus.livewallpaper) and MyWaterDir/res/xml/glwallpaper.xml (com.asus.livewallpaper.gl.MyWaterSettings). There are only 2 instances of the package name in the XML files.

The package name is also embedded in the smali disassembly files (MyWaterDir/smali/com/asus/livewallpaper/gl/*.smali). In all, there are 1791 instances of the package name in the smali files that must be updated. My recommendation is to find an editor that makes it easy to perform a global search and replace.

The package name must also match the folder hierarchy under the smali folder (MyWaterDir/smali/com/asus/livewallpaper/gl/). Change the name of the asus folder to match the new unique identifier selected for the application.

Step 3 - Update the application name and settings text
Using your favorite editor, modify the text found in MyWaterDir/res/values/strings.xml. Rather than worry about translations for my updated text, I chose to remove all but the default by deleting the MyWaterDir/res/values-XX folders (keep values-large).

Step 4 - Update the image resources
The image resources are found in MyWaterDir/res/drawable-mdpi. You can modify these images or use your own. For the purpose of this tutorial there is a requirement that they maintain the original file naming scheme. It is also important to note that if you provide an image with different dimensions, it will be scaled to match the dimensions of the original image. Modifications to the smali disassembly files are required to overcome this limitation.

As an optional step, you can optimize the PNG image resources to reduce their size.
Code:
roptipng -o7 MyWaterDir/res/drawable-mdpi/*.png

Step 5 - Build the APK
Now that the desired modifications have been made, build the APK using apktool.
Code:
apktool build MyWaterDir MyWaterModified_unsigned.apk

Step 6 - Sign the APK
The Android system requires that all installed applications be digitally signed with a certificate whose private key is held by the application's developer. I followed the instructions found here or here for generating my keys and using them to sign the APK. It should also be possible to sign the APK using the approach recommended at developer.android.com.
Code:
java -jar signapk.jar certificate.pem key.pk8 MyWaterModified_unsigned.apk MyWaterModified_signed.apk

Step 7 - Zipalign the APK
Zipalign the APK to optimize the way it is packaged in order to enable the Android operating system to interact with the application more efficiently. The benefit of this step is a reduction in the amount of RAM consumed when running the application.
Code:
zipalign -f -v 4 MyWaterModified_signed.apk MyWaterModified.apk
________________________

The truly adventurous can take a stab at modifying the smali disassembly prior to building the APK. The syntax is a bit difficult to follow at first, but with proper modifications you can adjust the image dimensions, rendering locations, and much more. I found it useful to pull the classes.dex file from the APK, convert it from .dex to .class format using dex2jar, and then browse the reconstructed source using JD-GUI. It is important to remember that the reconstructed source is not a 100% match to the original source code. However, it is useful for comparing against and understanding the corresponding smali source.
________________________

I hope some of you find this information useful. If so, be sure to say thanks via the button below.
 
Last edited:

jschmier

Senior Member
May 8, 2011
264
436
I appreciate the praise I've received for this work. I took a couple hours this evening to throw together another version containing one of my favorite lake monsters. Nessie is definitely one of the biggest "ice cubes" I've used for these wallpapers.

It might be worth pointing out that in order to render "ice cube" images larger than the original 324 x 226 ice cube, the GLIceItem constructor should be edited to specify the desired dimensions.
 

alexk1781

Member
Dec 4, 2007
25
8
Florence
I spent a little while playing around with this this evening, and came up with a rough version of one of my own. It needs some refining, and I'll work on it some more when I get a little time. You need to turn off the rotate with screen setting for it to work properly with the background. I'd like to figure out a way to make the background rotate and move with the water, but that will take some time. :)

I've attached a screen shot. I don't think I can attach a file from tapatalk, so I'll try to attach the apk later.

Edit: Apk is attached.
Let me know what you guys think. If anyone has any suggestions, especially regarding having the background rotate, please let me know. Thanks.

Sent from my Transformer TF101 using Tapatalk



EDIT: The lighthouse/landscape is now part of the floating element, so it floats and rotates with the buoy. It has a noticeably different effect, almost as if you are moving with the water instead of the other way around. Anyway, take a look at it and let me know what you think.
 

Attachments

  • LighthouseLW.jpg
    LighthouseLW.jpg
    13.3 KB · Views: 2,857
  • LighthouseBuoyLW.apk
    801.5 KB · Views: 849
Last edited:
  • Like
Reactions: sheureka

alexk1781

Member
Dec 4, 2007
25
8
Florence
Here's my second attempt. This one rotates just fine. :)
 

Attachments

  • FishingLW.jpg
    FishingLW.jpg
    12.1 KB · Views: 2,387
  • FishingLW.apk
    1.7 MB · Views: 724
Last edited:

jschmier

Senior Member
May 8, 2011
264
436
There are a lot of possibilities for these wallpapers.

While I prefer to distance myself from using copyrighted images, the Jaws and Winnie the Pooh movie posters could provide some inspiration.
 

leonpr

Senior Member
Feb 1, 2011
243
17
Hertford
Good job guys, this is awesome. Look forward to see what else people come up with. It will be much better to have them co-exisiting but its hardly the end of the world to install small packages when you want to change :)
 

dhamma110

Senior Member
Feb 16, 2008
57
1
keep it coming guys. I love those wallpapers and I hope we see some more in the future. I would like to see the duck with a different background.....Thanks for sharing.:)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 80
    As I mentioned in another thread, I was intrigued by Ruvort's modifications to the Asus MyWater live wallpaper over at xoomforums.com and some of the work from similar xda developers threads here and here.

    The most common issue with using these modified live wallpapers is that they simply replace the default Asus MyWater live wallpaper, which limits you to having one at a time and causes additional difficulties for Transformer owners since the Asus MyWater live wallpaper is a system application. I have been in contact with Ruvort and plan on working with him to re-release his live wallpapers with the necessary adjustments so that they can all coexist and multiple flavors can be installed at the same time; even on non-rooted tablets.

    These reworked MyWater live wallpapers are my initial step into the arena of editing APK files. They can be installed and uninstalled like any other application, however allowing installation of non-Market applications is required. I should note that in order to prove out some edits I made to the smali disassembly files, I adapted Ruvort's excellent work for the beer w/ lime wallpaper and I hijacked his idea for the ducky wallpaper.

    Update: On a whim, I decided to check the alignment of the APK files using zipalign. I found that the resources in the wallpapers needed adjustment, so I have corrected the alignment for all the attached wallpapers. If you downloaded and installed any wallpaper from this post prior to June 24th 2011, I recommend replacing with an optimized version.

    Update 2: It has been discovered that these live wallpapers have issues when running on ICS. I am aware of the issues and have been working toward a solution (one recent attempt here). While workarounds have been reported, I have not tried any of them myself and prefer to address the problem at its source. Once I am confident that I have things working correctly, I intend on starting a new thread to feature the updated, ICS-friendly designs. Stay tuned...

    Beer w/ Lime
    BBr8T.png


    Jolly Roger
    7deYU.png


    Rubber Duckie (original v1.0)
    Y9oS5.png


    Rubber Duckie (updated to v1.1 14th June 2011 - original still available)
    PZkFX.png


    Loch Ness Monster (added 12th June 2011)
    hprKG.png


    Honeycomb (added 14th June 2011)
    sIutN.png


    Tux (added 20th June 2011)
    X7vxR.png


    Note: There are additional wallpapers attached to subsequent thread posts.
    36
    Creating the Reworked MyWater Wallpapers

    The following is an overview of the process I followed in creating the live wallpapers found in the first post. These instructions are intended to serve as a guide to those interested in creating their own modifications.

    Prerequisites
    • Asus MyWater APK (you can grab a copy here)
    • android-apktool - tool for reengineering Android apk files (here)
    • roptipng - modification to OptiPNG PNG optimizer (here)
    • SignApk.jar - (Google search)
    • zipalign - archive alignment tool (included in Android SDK)

    Step 1 - Decoding the APK
    Using apktool, decode the APK to retrieve the resources into nearly original form. In this example, the decoded files are placed in a directory called MyWaterDir.
    Code:
    apktool decode MyWater.apk MyWaterDir

    Step 2 - Modifying the package name
    The package name is a unique identifier used by Android to manage the installed applications. The easiest package name modification simply involves changing all instances of asus to another unique identifier.

    Using your favorite editor (I like gVim), modify the package name found in MyWaterDir/AndroidManifest.xml (com.asus.livewallpaper) and MyWaterDir/res/xml/glwallpaper.xml (com.asus.livewallpaper.gl.MyWaterSettings). There are only 2 instances of the package name in the XML files.

    The package name is also embedded in the smali disassembly files (MyWaterDir/smali/com/asus/livewallpaper/gl/*.smali). In all, there are 1791 instances of the package name in the smali files that must be updated. My recommendation is to find an editor that makes it easy to perform a global search and replace.

    The package name must also match the folder hierarchy under the smali folder (MyWaterDir/smali/com/asus/livewallpaper/gl/). Change the name of the asus folder to match the new unique identifier selected for the application.

    Step 3 - Update the application name and settings text
    Using your favorite editor, modify the text found in MyWaterDir/res/values/strings.xml. Rather than worry about translations for my updated text, I chose to remove all but the default by deleting the MyWaterDir/res/values-XX folders (keep values-large).

    Step 4 - Update the image resources
    The image resources are found in MyWaterDir/res/drawable-mdpi. You can modify these images or use your own. For the purpose of this tutorial there is a requirement that they maintain the original file naming scheme. It is also important to note that if you provide an image with different dimensions, it will be scaled to match the dimensions of the original image. Modifications to the smali disassembly files are required to overcome this limitation.

    As an optional step, you can optimize the PNG image resources to reduce their size.
    Code:
    roptipng -o7 MyWaterDir/res/drawable-mdpi/*.png

    Step 5 - Build the APK
    Now that the desired modifications have been made, build the APK using apktool.
    Code:
    apktool build MyWaterDir MyWaterModified_unsigned.apk

    Step 6 - Sign the APK
    The Android system requires that all installed applications be digitally signed with a certificate whose private key is held by the application's developer. I followed the instructions found here or here for generating my keys and using them to sign the APK. It should also be possible to sign the APK using the approach recommended at developer.android.com.
    Code:
    java -jar signapk.jar certificate.pem key.pk8 MyWaterModified_unsigned.apk MyWaterModified_signed.apk

    Step 7 - Zipalign the APK
    Zipalign the APK to optimize the way it is packaged in order to enable the Android operating system to interact with the application more efficiently. The benefit of this step is a reduction in the amount of RAM consumed when running the application.
    Code:
    zipalign -f -v 4 MyWaterModified_signed.apk MyWaterModified.apk
    ________________________

    The truly adventurous can take a stab at modifying the smali disassembly prior to building the APK. The syntax is a bit difficult to follow at first, but with proper modifications you can adjust the image dimensions, rendering locations, and much more. I found it useful to pull the classes.dex file from the APK, convert it from .dex to .class format using dex2jar, and then browse the reconstructed source using JD-GUI. It is important to remember that the reconstructed source is not a 100% match to the original source code. However, it is useful for comparing against and understanding the corresponding smali source.
    ________________________

    I hope some of you find this information useful. If so, be sure to say thanks via the button below.
    24
    1024x600 Wallpapers

    After several requests, I adjusted a few of the wallpapers to work better on 1024x600 displays. I have not actually tested these on a device with a 1024x600 display, so please report any issues.

    These are basically the 480x800 phone versions I had created with a larger 1024x1024 background image. I based these on the phone reworks on the premise that devices with that particular display resolution typically have less memory available and the phone reworks have resources that are more reduced and optimized than their 1280x800 counterparts.

    I don't have as much time these days to dedicate to these efforts, so I can't say when any additional works may be available. I hope some of you find these useful. If so, be sure to say thanks via the button below.
    8
    ICS-friendly

    I have completed another attempt at getting a wallpaper working 100% correctly for ICS devices; including the Galaxy Nexus. It is the B&W dark wallpaper again because it took the least effort to modify from my previous attempt.

    I still intend on starting a new thread for the ICS-friendly reworked wallpapers, but I wanted to have at least 2 verified designs done and confirmed to be working correctly first. Since the 'Beer With Lime' variant is one of the more popular designs, I reworked it as the second design and attached it to this post.

    I tested both on my TF101 w/ ICS (stock rooted) and didn't see any immediate issues.
    7
    I've made a few black and white versions of the original Asus My Water wallpaper that I thought I'd share.