[MOD][WSM] MIUI5 remove text from dock icons (updated 2013-11-16)


Zirias

Members
Nov 4, 2013
54
18
Finally a dock without stupid captions :)



Installation:
(1) Install WSM Tools
(2) Install HideDockIconsText.apk
(3) Activate "Hide Dockicons Text" in WSM Tools and reboot

Source:
wsm_miui5_hide_dockicons_text
This is based on the original "Hide Icon Text" WSM module, adding a method to select only dock icons.

Download:
HideDockIconsText.apk (md5: 3a00322d44fef2221ac122e3612ae620)

History:
1.1:
- Changed API level from 17 to 16 (4.1.2) for compatibility with all MIUI5 devices

1.0:
- Initial Release
 
Last edited:
Wonderful news....
But if download apk file, it says error to install(wrong download?)

Inviato dal mio Xiaomi Mi-5f (f sta per fun,non per fan)...con tapatalk 26°
 
First of all, I only have MIUI on my Mi3 right now, so this is the only tested device. This SHOULD be device independent, please give feedback, thanks ;)

But if download apk file, it says error to install
Some basic stuff you probably already checked:
  • In Security&Privacy settings allow unknown sources
  • Install WSM tools first, check some WSM modules from official repo
Otherwise, what exactly goes wrong (Message of the installer)? A logcat snippet during the moment of failure could maybe help ...

(wrong download?)
981d585172ba910f761098ea931a9131 *HideDockIconsText.apk
 
Cannot install on my mi2 with miui 3.11.15 and wsm tool installed and working.
It says packet error, md5sum is right
 
Cannot install on my mi2 with miui 3.11.15 and wsm tool installed and working.
It says packet error, md5sum is right
Ok, I just downloaded it myself from here, installs fine (MIUI multilang 3.11.15 on Mi3).
Could you maybe get the exact error message from logcat? thanks!

edit: I really don't get it -- just tried on my old HTC Sensation with AOSP 4.2.2 -- installs just fine.
 
Last edited:
Cannot install on my mi2 with miui 3.11.15 and wsm tool installed and working.
It says packet error, md5sum is right
Also for me!!!

What's the right apk size?

Inviato dal mio Xiaomi Mi-5f (f sta per fun,non per fan)...con tapatalk 26°
 
First of all, I only have MIUI on my Mi3 right now, so this is the only tested device. This SHOULD be device independent, please give feedback, thanks ;)


Some basic stuff you probably already checked:
  • In Security&Privacy settings allow unknown sources
  • Install WSM tools first, check some WSM modules from official repo
Ehm...of course!
I have them enabled!
I can't install apk!



Inviato dal mio Xiaomi Mi-5f (f sta per fun,non per fan)...con tapatalk 26°
 
I'm really sorry it doesn't work for you and would like to make it work. But as I'm unable to reproduce the problem on one of my devices, I need your help! Could you please e.g.
- provide a logcat during installation attempt
- If you have the time, build apk yourself from source and see if that works
 
I have added hide hotseats icons labels option to MiTools 1.4

Отправлено с моего MI 2S при помощи Tapatalk
 
  • Like
Reactions: xeGox
I have added hide hotseats icons labels option to MiTools 1.4

Отправлено с моего MI 2S при помощи Tapatalk
Uhm...there isn't 1.4 mitools version...

Inviato dal mio Xiaomi Mi-5f (f sta per fun,non per fan)...con tapatalk 26°
 
Uhm...there isn't 1.4 mitools version...

Inviato dal mio Xiaomi Mi-5f (f sta per fun,non per fan)...con tapatalk 26°
I am working on this version yet.

Отправлено с моего MI 2S при помощи Tapatalk
 
  • Like
Reactions: xeGox
I am working on this version yet.

Отправлено с моего MI 2S при помощи Tapatalk
Oh....sorry :D

(OT for you...is it possible to implement t9 app search dialpad like one in MiHome 2.16.0?)

Inviato dal mio Xiaomi Mi-5f (f sta per fun,non per fan)...con tapatalk 26°
 
Oh....sorry :D

(OT for you...is it possible to implement t9 app search dialpad like one in MiHome 2.16.0?)

Inviato dal mio Xiaomi Mi-5f (f sta per fun,non per fan)...con tapatalk 26°
What do u mean "t9 app search dialpad"?

Отправлено с моего MI 2S при помощи Tapatalk
 
y8uhygyb.jpg

u5equsyt.jpg


Sent from my MI 2S using Tapatalk
 
  • Like
Reactions: Swos and xeGox
Hi BurgerZ .. first congrats on your tools, even if it was "just" modifying xposed, I guess it was a lot of work, and it's very helpful!

I have added hide hotseats icons labels option to MiTools 1.4
Just a question here: Did you use my (kind of hacky) method of detecting dock icons? If so, a tiny attribution in Release Notes would be nice, sbasiwa. It's only a few lines of code, but it took several hours to figure out...

And a more general suggestion: how about making all the modules opensource? I know, no one can be obliged to do so, it's just a suggestion because I think it could help a lot in order to create more useful mods :) If you like the idea, maybe we could even start general discussion of methods how to analyze (miui) system apps somewhere else!
 
Hi, Zirias. Thanks.
If you don't mind I'd like to use you code ;-) because my way is much more complicated. Also I've managed out that my method works good until you change the system language. Look:
Code:
private static void hideHotSeatsLabels() {
        try {
            Class.forName("com.miui.home.launcher.Launcher", false, mClassLoader);
            XposedHelpers.findAndHookMethod("com.miui.home.launcher.Launcher", mClassLoader,
                    "onCreate", Bundle.class, new XC_MethodHook() {
                        @Override
                        protected void afterHookedMethod(MethodHookParam param) throws Throwable {
                            Class<?> launcher = Class.forName("com.miui.home.launcher.Launcher", false, mClassLoader);
                            Class<?> hotseats = Class.forName("com.miui.home.launcher.HotSeats", false, mClassLoader);
                            Field[] ff = XposedHelpers.findFieldsByExactType(launcher, hotseats);
                            for (Field f : ff) {
                                View vg = (View) XposedHelpers.getObjectField(param.thisObject, f.getName());
                                //if (vg instanceof TextView) vg.setAlpha(0.1f);
                             
                                String[] COLUMNS = { "_id", "intent", "title", "iconType", "icon", "iconPackage", "iconResource", "container", "itemType", "appWidgetId", "screen", "cellX", "cellY", "spanX", "spanY", "uri", "displayMode", "launchCount", "sortMode", "itemFlags" };
                                ContentResolver cr = vg.getContext().getContentResolver();
                                Uri localUri = Uri.parse("content://com.miui.home.launcher.settings/favorites");
                                String[] arrayOfString1 = COLUMNS;
                                String[] arrayOfString2 = new String[1];
                                arrayOfString2[0] = "-101";
                                Cursor cursor = cr.query(localUri, arrayOfString1, "container=?", arrayOfString2, null);
                                while (cursor.moveToNext()) {
                                    final String title = cursor.getString(cursor.getColumnIndex("title"));
                                    Class<?> itemIcon = Class.forName("com.miui.home.launcher.ShortcutIcon", false, mClassLoader).getSuperclass();
                                    XposedHelpers.findAndHookMethod(itemIcon,
                                            "setTitle", CharSequence.class, new XC_MethodHook() {
                                                @Override
                                                protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                                                    CharSequence title_ = (CharSequence) param.args[0];
                                                    if (title_.toString().equals(title))
                                                        param.args[0] = "";
                                                    return;
                                                }
                                    });
                                }
                                cursor.close();
                            }
                        }
            });
        } catch (ClassNotFoundException ignored) {
            Utils.log("[HotSeats] Class not found! Skipping...");
        } catch (NoSuchMethodError ignored) {
            Utils.log("[HotSeats] Method \""+ignored.getMessage()+"\" not found! Skipping...");
        }
    }
I could open source my modules, but....
I can share with you any sources if it could help in modifying miui.
 
Last edited:
Hi, Zirias. Thanks.
If you don't mind I'd like to use you code ;-) because my way is much more complicated. Also I've managed out that my method works good until you change the system language. Look:
Thanks for the snippet, so I guess you had the same idea at the same time :) Even if this code is less robust, it's much more educating; seems like you already have a good grip at the inner workings of MiHome. Of course I don't mind, I'm happy when it's working. I just asked for a small (one-time) reference in relnotes, so interested people will find how it's done on github. You see, just like I got the general idea from your repo, as stated in the OP :)

Oh, and there's an optimization I didn't use so far: replace
Code:
if (lp.invoke(v).toString().startsWith("android.view.ViewGroup$LayoutParams")) {
with
Code:
if (lp.invoke(v).getClass().getName().equals("android.view.ViewGroup$LayoutParams")) {
will save a few cycles for appending the instance address that isn't used anyways.

BTW, about robustness: My method will break at the slightest change in layout implementation -- but that's always an issue with mods ;)

I could open source my modules, but.... there are one man living on the planet... who steal all my mods and say that all of them are his work (KDG with his eXtension).
Ok, that's really antisocial... theoretically, GPL would help here, but I understand it's not worth the hassle (AND I don't like the restrictiveness of GPL anyways).
I can share with you any sources if it could help in modifying miui.
Thanks for the offer, I'll contact you in private as soon as I have time for some modding attempts again. Really hated the obfuscated MiuiHome code...
 
Last edited:
What do u mean "t9 app search dialpad"?

Отправлено с моего MI 2S при помощи Tapatalk
Pm for you

Inviato dal mio Xiaomi Mi-5f (f sta per fun,non per fan)...con tapatalk 26°
 
heyyy all ... how to enable or add new dock for miui v5 ?? i was download .mtz file for dock and import them on theme store.. but still nothing happend ... can anyone can tell me step by step how to add custom dock ??

sorry for my bad english