Welcome to Unofficial International LeEco Phone Support

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Sign in to follow this  
Followers 0
zhoushiyi213

[Tutorial]EUI Moder Revived for EUI 5.8+

Posted (edited)

After hourse of research and trying I finally work out a workaround for eui moder to work on EUI 5.8+ (tested working flawlessly on my Coolpad Cool1 running stock EUI 5.9.026S)!

Since I'm not a developer nor do I know any thing about Android programming (including xposed), it has to be done in the hard way for now (if you don't understand each step do not proceed). Hope someone can update the EUI Moder module for easier modificaion!

Here comes the steps:

 

1. Install the latest apktool.

2. Check if your ROM is odexed. If so, first deodex your ROM (no need to flash; just need the apk files); if not, grab the apk files (/system/framework/framework-res.apk and /system/priv-app/SystemUI/SystemUI.apk) and install the framework:

apktool if framework-res.apk

apktool if SystemUI.apk

3. Decompile SystemUI.apk:

apktool d SystemUI.apk

4. Here comes the important part. Open SystemUI/smali/com/android/systemui/statusbar/policy/MobileSignalController.smali with a text editor. Locate the following paragraph (There can be multiple .line comments. Neglect those.):

....iput v1, p0, Lcom/android/systemui/statusbar/policy/MobileSignalController;->mImsRegState:I
    sget-boolean v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->LEUI_ENABLE:Z

    if-eqz v1, :cond_0
    sput-object p1, Lcom/android/systemui/statusbar/policy/MobileSignalController;->mContext:Landroid/content/Context;
    invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/policy/MobileSignalController;->initSystemFeature(Landroid/content/Context;)V
    sget-object v1, Lcom/android/systemui/statusbar/policy/MobileSignalController;->mContext:Landroid/content/Context;

    invoke-static {v1}, Lcom/android/keyguard/KeyguardUpdateMonitor;->getInstance(Landroid/content/Context;)Lcom/android/keyguard/KeyguardUpdateMonitor;

    move-result-object v1

    iput-object v1, p0, Lcom/android/systemui/statusbar/policy/MobileSignalController;->mKeyguardUpdateMonitor:Lcom/android/keyguard/KeyguardUpdateMonitor;
    :cond_0
    new-instance v1, Landroid/util/SparseArray;

    invoke-direct {v1}, Landroid/util/SparseArray;-><init>()V

    iput-object v1, p0, Lcom/android/systemui/statusbar/policy/MobileSignalController;->mNetworkToIconLookup:Landroid/util/SparseArray;    ....

Delete the bolded/stroke lines. In java it meas to skip EUI_enable check to run a few functions that is also required when AOSP feature is enabled (mainly wifi calling associated functions); here's the corresponding decompiled piece:


....if (PhoneStatusBar.LEUI_ENABLE) {
        mContext = context;
        initSystemFeature(context);
        this.mKeyguardUpdateMonitor = KeyguardUpdateMonitor.getInstance(mContext);
    }
    this.mNetworkToIconLookup = new SparseArray(); ....

Don't know if disabling EUI features will introduce some other bugs that needs to be fixed. Hopefully not.

5. Now re-compile SystemUI.apk:

apktool b SystemUI

6. Open the original, unmodified SystemUI.apk with 7-zip and copy META-INF and AndroidManifest.xml into the newly compiled SystemUI/dist/SystemUI.apk. Now the newly compiled SystemUI/dist/SystemUI.apk is ready for use.

7. Replace the SystemUI.apk in your phone with the new SystemUI.apk (make backup!), set correct permission (I always use Magisk for ROM modification -- recommended), but don't reboot immediately!

8. Connect the phone to your computer. Run adb on your computer, make sure your adb is trusted in the pop-up window (i.e. no confirmation dialogue is required for the adb connection).

9. Reboot your phone and wait for it to boot up. If SystemUI crashes, don't panic. Use adb to grant the new SystemUI proper permission:

pm grant "com.android.systemui" "android.permission.READ_CONTACTS"

10. Now you can turn on the first option in EUI Moder settings and enjoy AOSP feature!

 

Seems to me the mod is not a very big change and should be easy to be compiled into an updated version of EUI moder. Somebody who know android programming and XPOSED language, please do help us :-)

EUI5.9.026S+EUImoder+GravityBox.png

Edited by zhoushiyi213
Added working proof

Share this post


Link to post
Share on other sites

If anyone happen to use the Coolpad Cool1 with EUI 5.9.026S (ZAXCNFN5902606201S), you can download the attached modified SystemUI.apk and use EUI moder with it. Note that it is mostly likely not working for any other EUI version or any other phone hardware.

Also the atrached file has a quick toggle panel mod in expanded status bar with EUI mode (i.e. even without EUI moder :-). If you succeed with any ROM/phone other than Cool1 with 5.9.026S, please share your success~

Also anyone can make an updated version of EUI moder (original source is available on github), please please do share your work! Thanks in advance!

SystemUI.apk

1 person likes this

Share this post


Link to post
Share on other sites

Good work, thanks, but I have a question I do not have toggle switches, any ideas?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Member Statistics

    14,007
    Total Members
    1,004
    Most Online
    scandal
    Newest Member
    scandal
    Joined