Xiaomi, please stop obfuscating apps!


Daehan Kim

Members
Jul 20, 2011
24
23
Edit: Sorry I've created thread in wrong section, please move this thread.

I have little problem on AntiSpam application.

When I adds blacklist/whitelist item, It adds country code (00 when there is no country code in input number) to list.

For example, when I add 01012345678 to blacklist, AntiSpam converts to (00)01012345678 automatically.

When I send message or call by long-click from blocking logs or blacklist item, It's not possible to reach because of country code.

Blocking call and messages is working so It's annoying but not really big deal. I can avoid problem by copying numbers to plain dialer.

But wonder why they have forced AntiSpam to add country codes when adding lists...

Anyway I've tried to fix this problem myself by modding apk and result is here:
https://dl.dropbox.com/u/15672421/AntiSpam.apk

--------------

Real problem is Xiaomi is obfuscating their apks for MIUI v4.

Obfuscation makes methods and variable names to hard to read like this:

Code:
.method public static getNumber(Landroid/database/Cursor;)Ljava/lang/String;
    .locals 1
    .parameter "cursor"
 
    .prologue
    .line 144
    const/4 v0, 0x1
 
    invoke-interface {p0, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
 
    move-result-object v0
 
    invoke-static {v0}, Landroid/telephony/PhoneNumberUtils$PhoneNumber;->getDialableNumber(Ljava/lang/String;)Ljava/lang/String;
 
    move-result-object v0
 
    return-object v0
.end method
to
Code:
.method public static b(Landroid/database/Cursor;)Ljava/lang/String;
    .locals 1
    .parameter
 
    .prologue
    .line 155
    const/4 v0, 0x0
 
    invoke-interface {p0, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
 
    move-result-object v0
 
    invoke-static {v0}, Lmiui/telephony/PhoneNumberUtils$PhoneNumber;->getDialableNumber(Ljava/lang/String;)Ljava/lang/String;
 
    move-result-object v0
 
    return-object v0
.end method

This is easy case because I can see unobfuscated codes by decompiling old GB MIUI(hence their code is almost same), and method uses a lot of internal APIs(which is unable to obfuscate) so I was able to find same method by comparing codes.

This will make modders hard to mod apks and automation will break every time if name of methods and variables changes per every update.

So please Xiaomi, stop obfuscating apps.
 
I don't think this will change. This is how Xiaomi works. Thats why instead of us spending hours in smali trying to fix things our best bet is to bug Xiaomi until they fix stuff.