New MIUI Home apps ordering problem


tkarika

Members
Sep 6, 2012
33
30
Hi,

About a month ago, after installing the current weekly update, I found out, that the icons are reordered after each restart. Only the system and internal memory apps stay in place, the others (moved and linked to SD) were placed after them, each time in a random order.
I use Link2SD to link some apps (where I need widgets), and move the others with Titanum Backup to SD.
Before this update everything were fine, this problem never occured.
I tried to enable Link2SD to autostart, but it didn't solve the problem.

What can I do? Thanks!
 
I also have this bug on latest MIUI on my Xiaocai X9! Don't know what to do?!

I do not use link2sd at all.
 
I used titanium to move all my apps to internal memory and now they stay after a reboot. An Ok fix if you can actually fit everything on internal.

Sent from my X9 using Tapatalk 4
 
I moved/linked my apps to SD because I don't have enough space on the device. 420 MB is just not enough..
 
No its definitely not enough but I'm not sure what the real solution would be to be honest? Just need a fix for the apps moving I guess have a lock home screen option or something?

There is someone else with a similar problem and topic on here we all need to shout together to be heard hopefully Mark can feed back the issues.

Sent from my X9 using Tapatalk 4
 
I also had this problem a few times.

It's annoying to move the icons again. For a temporary bypass: is there a way to backup the location of the icons? Anybody knows which file or database to backup, and where it is located?
 
Well i've sorted a temporary fix for now for my Xiaocai X9.

I've edited the vold.fstab to swap my external sdcard to be mounted as internal. Then disabled the external sdcard. Now apps stay in place after installing and after moving to sdcard.

I think there is a problem with how MIUI unmounts the sdcard maybe. Still not a fix and this topic doesn't seem to be gathering much attention.
 
Well someone found the issue but don't think it will ever be included as a fix. The launcher has an issue and someone found a way of fixing it in smali.

Code:
--- com/miui/home/launcher/ScreenUtils.smali        Fri Sep 13 13:52:53 2013
+++ com/miui/home/launcher/ScreenUtils.smali        Tue Sep 17 03:01:24 2013
@@ -1656,75 +1656,80 @@

     return-object v3
.end method

.method static isPackageStopped(Landroid/content/Context;Ljava/lang/String;)Z
-    .registers 6
+    .registers 7
     .parameter "context"
     .parameter "packageName"

     .prologue
-    const/4 v1, 0x0
+    const/4 v1, 0x1
+
+    const/4 v2, 0x0

     .line 98
     :try_start_1
-    invoke-virtual {v4}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
+    invoke-virtual {v5}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

-    move-result-object v2
+    move-result-object v3

-    const/16 v3, 0x2000
+    const/16 v4, 0x100

-    invoke-virtual {v2, v5, v3}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
+    invoke-virtual {v3, v6, v4}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;

     move-result-object v0

     .line 99
     .local v0, pi:Landroid/content/pm/PackageInfo;
-    if-nez v0, :cond_e
+    if-eqz v0, :cond_x12
+
+    iget-object v3, v0, Landroid/content/pm/PackageInfo;->gids:[I
+
+    if-nez v3, :cond_x14
+
+    :cond_x12
+    move v1, v2

     .line 105
     .end local v0           #pi:Landroid/content/pm/PackageInfo;
-    :cond_d
-    :goto_d
+    :cond_x13
+    :goto_x13
     return v1

     .line 102
     .restart local v0       #pi:Landroid/content/pm/PackageInfo;
-    :cond_e
-    iget-object v2, v0, Landroid/content/pm/PackageInfo;->applicationInfo:Landroid/content/pm/ApplicationInfo;
-
-    iget v2, v2, Landroid/content/pm/ApplicationInfo;->flags:I
-
-    const/high16 v3, 0x20
+    :cond_x14
+    iget-object v3, v0, Landroid/content/pm/PackageInfo;->gids:[I

-    and-int/2addr v2, v3
+    array-length v3, v3

-    if-nez v2, :cond_20
+    if-eqz v3, :cond_x22

-    iget-object v2, v0, Landroid/content/pm/PackageInfo;->applicationInfo:Landroid/content/pm/ApplicationInfo;
+    iget-object v3, v0, Landroid/content/pm/PackageInfo;->applicationInfo:Landroid/content/pm/ApplicationInfo;

-    iget v2, v2, Landroid/content/pm/ApplicationInfo;->flags:I
+    iget v3, v3, Landroid/content/pm/ApplicationInfo;->flags:I
     :try_end_1b
     .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_1 .. :try_end_1b} :catch_22

-    const/high16 v3, 0x4
+    const/high16 v4, 0x20

-    and-int/2addr v2, v3
+    and-int/2addr v3, v4

-    if-eqz v2, :cond_d
+    if-nez v3, :cond_x13

-    :cond_20
-    const/4 v1, 0x1
+    :cond_x22
+    move v1, v2

-    goto :goto_d
+    goto :goto_x13

     .line 103
     .end local v0           #pi:Landroid/content/pm/PackageInfo;
     :catch_22
     move-exception v2

-    goto :goto_d
+    goto :goto_x13
.end method

.method static loadScreens(Landroid/database/sqlite/SQLiteDatabase;)Ljava/util/ArrayList;
     .registers 11
     .parameter "db"
@@ -2192,11 +2197,13 @@
     .line 77
     invoke-static {v12, v15}, Lcom/miui/home/launcher/ScreenUtils;->isPackageStopped(Landroid/content/Context;Ljava/lang/String;)Z

     move-result v0

-    if-nez v0, :cond_6
+    if-eqz v0, :cond_97
+
+    if-nez v16, :cond_6

     .line 81
     :cond_97
     if-nez v16, :cond_6

sta-s2z said:
So i tested it harder and can definitely say - IT WORKS
this bug happens when launcher is started before sd card mount finished, same issue happens with any xperia launcher btw :)
now laucher starting, icons of sd-card moved apps are disappear, but after a few seconds they appear exactly they were before :)