Android OS Forum banner
1 - 11 of 11 Posts

·
Average Android
Joined
·
76 Posts
I wrote this for the Droid X running any version of MIUI... But I'm pretty sure it will work on any phone using MIUI. Either way if you try it, it can't break anything.

Disclaimer: This is my first ever venture into any sort of android scripting so please go easy on me. This is amateur at best but I find this script very useful and I thought others might as well so I decided to share.

That said, here is what this script does:
If you are like me, you love MIUI. More specifically the big beautiful icons of the MIUI launcher. But you also miss all the features of a third party launcher such as GoLauncher or LauncherPro. So you start to investigate ways you can get the best of both worlds and you find desktop visualizer. Then to your dismay, you realize that desktop visualizer does not use MIUI's themed icons... Well, this script solves that problem. Unfortunatly not in a very elegant way but it gets the job done.

This script was written in python completely on my phone =)

I'm not going to lie to you, the innitial setup process is a HUGE pain, but once you have everything up and running, it's as easy as a few clicks to apply your MIUI themed icons to your desktop visualizer widgets whenever you change your theme! If your a nerd, you might actually get some strange sense of enjoyment out of getting this working lol

PLEASE NOTE THAT THIS SCRIPT ONLY WORKS WITH THEMES THAT DO NOT HAVE CHINESE CHARACTERS IN THEIR NAMES

Setup (Part 1)
Part one of the setup will setup everything you need to run the script on your phone.

1. First you'll need the script located here: http://db.tt/2O345zOV
--Once downloaded, place the script somewhere convenient on your sd card
2. Next you'll need the SL4A app (Scripting Language for Android) to be able to run the script
--Located Here: http://code.google.com/p/android-scripting/
3. Once you have SL4A downloaded and installed, you'll need to add python as an interpreter
--Open SL4A, press the menu hard key, select view, then interpreters, press menu again, select add, and lastely python
--This will open your browser and start the download of the python apk
--Once downloaded, install python and it should now show as an interpreter in SL4A
4. Ok now place my script in; sdcard/sl4a/scripts
5. Add a shortcut to your desktop and select scripts then MIUI_TI-2-TV.py. (I use a transparent icon for the shortcut)

Setup (Part 2)
Part 2 of the setup is exactly what the script does for you. You just have to manually perform the operation one time.

1. Alright so in case you haven't already done this, you will need to decide what apps you want on your desktop.
2. Create a new directory on your sdcard called "MIUI_TI-2-DV" The directory name must match exactly
3. Open up root explorer and navigate to data/system/customized_icons_1
4. Here you will select all the app icons you want to use with your desktop visualizer widgets and copy them
5. Paste them into the sdcard/MIUI_TI-2-DV directory. Do not change the names of the files.
6. Not sure if you noticed in the last step, but not all the system app icons are in the customized_icons_1 directory. The ones that are not there are a bit trickier to get unfortunately...
7. Navigate to sdcard/miui/themes and locate the mtz file for the icon theme you currently have applied and copy it
8. Paste the mtz file somewhere it will be easy to work with. (I use sdcard/extracted)
9. Change the extension on the file from mtz to zip by long pressing on it and clicking rename
10. Long press on the file again and extract it
10. Inside the extracted file you will find a file named "icons" Rename that file to icons.zip and extract it.
11. You can now copy the rest of the icons you need to the sdcard/MIUI_TI-2-DV directory. Once that's done, feel free to delete all the extra files you have laying around from extracting the icons from the mtz file.
12. Alright we're almost done... Next you will want to create all your desktop visualizer widgets and link the icons for each widget to the icons you copied into the TI-2-DV directory
--Create a new widget
--Click select icon, image file, and select the icon in your MIUI_TI-2-DV directory
----NOTE: You CAN use icons from other apps on shortcuts or apps that are not for that icon. For instance, I pair the stock music launcher icon with the player pro app. Icon pairings will be persistent. In other words the next time you change your theme and run the script, player pro will still be using the new themes stock music player icon not the player pro icon.
--Click select action and select the shortcut or app you wish to launch

So... After 10 hours of setup time, you are ready to actually use the script lol

Daily Use
1. Apply icon theme in theme manager
2. Navigate to sdcard/miui/theme, find the mtz file for the icon theme you applied and copy the entire name of the file (including the mtz extension)
3. Tap the shortcut you created on your desktop
4. My script will start to run and it will ask you for the mtz file name in a popup box. Simply paste and click ok
5. The script will now replace all the icons in the sdcard/MIUI_TI-2-DV directory with the new theme's icons
6. After the script is done running, all you need to do is refresh your widgets by opening desktop visualizer, pressing the hard menu key, and clicking refresh widgets.

To add more widgets later on, all you need to do is extract the icon you wish to use, throw it in the MIUI_TI-2-DV directory, and link a widget to it

it's a pain in the ass I know, maybe 1 day I'll get around to Updating it lol

HAVE FUN!!
 

·
Average Android
Joined
·
76 Posts
Discussion Starter · #5 ·
antintyty said:
ha, looks cool...but man, that looks like a lot of work too...LoL
Yes it is a bit of a pain to setup. But easy to use one the one-time setup is complete

Sent from my Droid X running MIUI 1.9.23
 

·
Android Beginner
Joined
·
4 Posts
I'll give it a spin! lol it looks like you put a lot of work into this and it'd be a shame if it all went to waste. I was actually just thinking about this a couple weeks ago and it's a great solution to a pretty common problem.
 

·
Themer
Joined
·
20 Posts
Do you just want your icon pack turned into an APK you can use with DVR and Folder Organizer? I can do that for you with very little effort.
Let me know!
 

·
Android Beginner
Joined
·
4 Posts
docsparks said:
Do you just want your icon pack turned into an APK you can use with DVR and Folder Organizer? I can do that for you with very little effort.
Let me know!
do you think you could show me how? I've always wanted a simpler way to make icons i wanted into icon packs.
 

·
Themer
Joined
·
20 Posts
As much as I wish I could say "Yeah, its easy" , its sorta not.

-Ive spent the past 9 months, every waking hour, 20-40 hours a a time, working and learning Android stuff, and the requirements of each "theme" from adw, pandahome, etc etc.
-truth is, there are a lot of details and notes to be kept, even just for an adw theme.

on top of that, ive been trying to "contract myself" out to other developers that I can see could use my assistance. [Mariux, Jairomero, kovdev, thephlash, more+]
because, I am/was a Windows developer, and have developed my own 'suite' of programs used to make themes, and lots of other little things that usually take time.

So with that, I already have all my own tools to take what you have, and turn it into an APK rather fast.

---but let me mention this: The icon pack APK I was referring to, Would only work as an icon pack for DVR, CircleLauncher, FolderOrganizer, GO Launcher, ADW/ADWEX/VTL, and possibly CrazyHome.
---and those are the programs it would be limited to.

If your still interested in doing it on your own, I will say, that when i did start up in March, all I used with anderwebs ADW template. Eventually golauncher came out with themefactory (yuck!) and, well the rest is gold from there.
So there are the tools, you decide how to use them ;)

really, let me know though if you need help, im cool about that stuff.
otherwise, msg me or mail me icons, and i can spit out an APK for ya nice n quick :)
 

·
Average Android
Joined
·
76 Posts
Discussion Starter · #10 ·
Wow sorry I haven't been checking this thread. Glad to see there is at least some activity on it lol. There is actually an easier way to run my script if you still want to give it a spin. You don't need task bomb or sl4a launcher from the market. After you install sl4a and python, you can just put my script in sdcard/sl4a/scripts then long press on your desktop and select shortcut/scripts/MIUI_TI-2-DV.py. I then replaced the icon with a transparent.png so it's invisible. If you do it this way then all u have to do is click the shortcut to run my script. I'm going to update the OP with this method

Sent from my Droid X running MIUI 1.10.7
 

·
Android Beginner
Joined
·
4 Posts
docsparks said:
As much as I wish I could say "Yeah, its easy" , its sorta not.

-Ive spent the past 9 months, every waking hour, 20-40 hours a a time, working and learning Android stuff, and the requirements of each "theme" from adw, pandahome, etc etc.
-truth is, there are a lot of details and notes to be kept, even just for an adw theme.

on top of that, ive been trying to "contract myself" out to other developers that I can see could use my assistance. [Mariux, Jairomero, kovdev, thephlash, more+]
because, I am/was a Windows developer, and have developed my own 'suite' of programs used to make themes, and lots of other little things that usually take time.

So with that, I already have all my own tools to take what you have, and turn it into an APK rather fast.

---but let me mention this: The icon pack APK I was referring to, Would only work as an icon pack for DVR, CircleLauncher, FolderOrganizer, GO Launcher, ADW/ADWEX/VTL, and possibly CrazyHome.
---and those are the programs it would be limited to.

If your still interested in doing it on your own, I will say, that when i did start up in March, all I used with anderwebs ADW template. Eventually golauncher came out with themefactory (yuck!) and, well the rest is gold from there.
So there are the tools, you decide how to use them ;)

really, let me know though if you need help, im cool about that stuff.
otherwise, msg me or mail me icons, and i can spit out an APK for ya nice n quick :)
What about the stock miui launcher? I see all these awesome icon packs that would be perfect for it but i don't have the time to go through them and change all the .png names to package names. I'm not asking you to do it for me just is there an easier way? Or would desktop visualizer be my best bet?
-thanks!
 
1 - 11 of 11 Posts
Top