[ROM][non-GSI] Unofficial Pixel Experience P

Search This thread

ritchie888

Member
Sep 23, 2010
21
7
Vienna
After spending many hours flashing and reflashing my global Mi Mix 3 I believe I've got it in a state where the memory leak is gone. Flashing any Chinese dev or stable MIUI ROM (I tried perseus_images_9.3.28_20190328.0000.00_9.0_cn and perseus_images_V10.3.1.0.PEECNXM_20190330.0000.00_9.0_cn) would boot to that ROM, but flashing Pixel Experience over the top always resulted in a boot loop. I'm sure many other global Mix 3 owners will attest that 9 out of 10 methods of flashing PE posted here don't work unless you have the Chinese version of the phone.

The steps I used are below, however, I can't say with any certainty if the numerous flashes before my working method had any any effect on the working solution. My solution assumes you already have an unlocked bootloader and have TWRP recovery flashed. The TLDR of it all is that flashing the global ROM using the Xiaomi flash tool, as opposed to TWRP, I am assuming was the key solution (again, I cannot be sure) as everything else is very similar to @homer.ali method (which did work for me, however, resulted in the memory leak issue). I am going heavy on the detail so if anyone wants to try my method with exactly the same versions of software you can. All software can be found by Googling the version numbers I provide.

1) Clear everything in TWRP. Under 'wipe', swipe to factory reset, then go to 'advanced wipe', tick every box and swipe to wipe, then go to format data, type 'yes' and swipe to wipe. Many, if not most of these steps, are probably unnecessary, but I wanted to be certain that I have a clean slate.
2) Go to 'reboot' and reboot to recovery. This should rebuild the file system into a state ready for flashing after we deleted everything in step 1.
3) Go to 'reboot' and reboot to bootloader. This will put the phone in the state ready for flashing.
4) On your computer, connect the phone via USB and open Xiaomi Mi Flash tool (I used version Miflash_20185280)
5) Your phone should appear in the list of devices, if it doesn't make sure you're in bootloader and click refresh. Also make sure you have the appropriate drivers, if you don't you should be able to install them by going to 'driver' in the file menu then clicking install. Might need to reboot your computer and/or phone and reopen the Miflash software.
6) Download the Xiaomi base ROM to your computer and load it by clicking 'select' and navigate to the folder. It must contain 'flash_*.bat' files. I used perseus_global_images_V10.2.2.0.PEEMIXM_20190228.0000.00_9.0_global. I have attempted to use numerous other ROMs from an assortment of sources, but never had the same result as using this ROM.
7) IMPORTANT, at the bottom of the flashing tool, click 'clean all' instead of 'clean all and lock'. If you don't do this you'll relock the bootloader and will have to unlock it again (not really an issue, you can do it really fast and with minimal effort, but worth avoiding if you can!)
8) Flash the ROM by clicking 'flash'. It'll take somewhere around 180-200something seconds to complete. Once it completes it'll reboot and load into the ROM, leave it to do it's thing until it's done.
9) If I am remembering correctly, it'll overwrite the recovery software to the default Xiaomi recovery. Overwrite this with TWRP again by restarting the phone into bootloader (power and volume down), and using fastboot to flash TWRP. I used twrp-3.2.3-0-perseus but I don't think it matters what version. If TWRP is already installed post-Xiaomi ROM flash you can ignore this step.
10) With TWRP installed, reboot into recovery by holding power and volume up. In some scenarios the Xiaomi ROM can overwrite TWRP with it's own recovery. If it does this just follow step 9 again.
11) Flash pixel experience (I used version PixelExperience_perseus-9.0-20190216-0408-UNOFFICIAL). Go to 'install' select the ROM and install.
12) Clear cache/davlik once it finishes.
13) Flash Magisk (I used version Magisk-v19.0, although I believe version 17.3 should also work).
14) Clear cache/davlik.
15) Reboot to system and wait until PE appears.

Upon trying this method I no longer have a memory leak after 24 hours. As mentioned in a previous post of mine, I discovered that the phone lock was the cause of the leak. I tried the phone for 24 hours without any lock, with zero leak. Then 24 hours with just the pattern lock, no leak. Now I'm going on 50+ hours with a pattern lock and finger print registered with (as far as I can tell) also no leak. At the absolute maximum the RAM usage has gotten as low as 1.9 GB free (out of 5.5 which can be used). Also in a previous post of mine you'll see I had issues with national roaming, meaning I had to apply a fix so that data would work in my country. This (for reasons I haven't worked out) is also not a problem anymore, as data worked immediately once following the method above, with no need to apply my fix.

Happy to answer any questions anyone may have.
 

homer.ali

Senior Member
Jan 17, 2011
59
28
OnePlus 7 Pro
After spending many hours flashing and reflashing my global Mi Mix 3 I believe I've got it in a state where the memory leak is gone. Flashing any Chinese dev or stable MIUI ROM (I tried perseus_images_9.3.28_20190328.0000.00_9.0_cn and perseus_images_V10.3.1.0.PEECNXM_20190330.0000.00_9.0_cn) would boot to that ROM, but flashing Pixel Experience over the top always resulted in a boot loop. I'm sure many other global Mix 3 owners will attest that 9 out of 10 methods of flashing PE posted here don't work unless you have the Chinese version of the phone.

The steps I used are below, however, I can't say with any certainty if the numerous flashes before my working method had any any effect on the working solution. My solution assumes you already have an unlocked bootloader and have TWRP recovery flashed. The TLDR of it all is that flashing the global ROM using the Xiaomi flash tool, as opposed to TWRP, I am assuming was the key solution (again, I cannot be sure) as everything else is very similar to @homer.ali method (which did work for me, however, resulted in the memory leak issue). I am going heavy on the detail so if anyone wants to try my method with exactly the same versions of software you can. All software can be found by Googling the version numbers I provide.

1) Clear everything in TWRP. Under 'wipe', swipe to factory reset, then go to 'advanced wipe', tick every box and swipe to wipe, then go to format data, type 'yes' and swipe to wipe. Many, if not most of these steps, are probably unnecessary, but I wanted to be certain that I have a clean slate.
2) Go to 'reboot' and reboot to recovery. This should rebuild the file system into a state ready for flashing after we deleted everything in step 1.
3) Go to 'reboot' and reboot to bootloader. This will put the phone in the state ready for flashing.
4) On your computer, connect the phone via USB and open Xiaomi Mi Flash tool (I used version Miflash_20185280)
5) Your phone should appear in the list of devices, if it doesn't make sure you're in bootloader and click refresh. Also make sure you have the appropriate drivers, if you don't you should be able to install them by going to 'driver' in the file menu then clicking install. Might need to reboot your computer and/or phone and reopen the Miflash software.
6) Download the Xiaomi base ROM to your computer and load it by clicking 'select' and navigate to the folder. It must contain 'flash_*.bat' files. I used perseus_global_images_V10.2.2.0.PEEMIXM_20190228.0000.00_9.0_global. I have attempted to use numerous other ROMs from an assortment of sources, but never had the same result as using this ROM.
7) IMPORTANT, at the bottom of the flashing tool, click 'clean all' instead of 'clean all and lock'. If you don't do this you'll relock the bootloader and will have to unlock it again (not really an issue, you can do it really fast and with minimal effort, but worth avoiding if you can!)
8) Flash the ROM by clicking 'flash'. It'll take somewhere around 180-200something seconds to complete. Once it completes it'll reboot and load into the ROM, leave it to do it's thing until it's done.
9) If I am remembering correctly, it'll overwrite the recovery software to the default Xiaomi recovery. Overwrite this with TWRP again by restarting the phone into bootloader (power and volume down), and using fastboot to flash TWRP. I used twrp-3.2.3-0-perseus but I don't think it matters what version. If TWRP is already installed post-Xiaomi ROM flash you can ignore this step.
10) With TWRP installed, reboot into recovery by holding power and volume up. In some scenarios the Xiaomi ROM can overwrite TWRP with it's own recovery. If it does this just follow step 9 again.
11) Flash pixel experience (I used version PixelExperience_perseus-9.0-20190216-0408-UNOFFICIAL). Go to 'install' select the ROM and install.
12) Clear cache/davlik once it finishes.
13) Flash Magisk (I used version Magisk-v19.0, although I believe version 17.3 should also work).
14) Clear cache/davlik.
15) Reboot to system and wait until PE appears.

Upon trying this method I no longer have a memory leak after 24 hours. As mentioned in a previous post of mine, I discovered that the phone lock was the cause of the leak. I tried the phone for 24 hours without any lock, with zero leak. Then 24 hours with just the pattern lock, no leak. Now I'm going on 50+ hours with a pattern lock and finger print registered with (as far as I can tell) also no leak. At the absolute maximum the RAM usage has gotten as low as 1.9 GB free (out of 5.5 which can be used). Also in a previous post of mine you'll see I had issues with national roaming, meaning I had to apply a fix so that data would work in my country. This (for reasons I haven't worked out) is also not a problem anymore, as data worked immediately once following the method above, with no need to apply my fix.

Happy to answer any questions anyone may have.


Neat
Can you go into settings>security>advanced and tell me what it says under "encryption and credentials"?
 

jonny908

Senior Member
Feb 24, 2015
296
95
Warsaw
Also in a previous post of mine you'll see I had issues with national roaming, meaning I had to apply a fix so that data would work in my country. This (for reasons I haven't worked out) is also not a problem anymore, as data worked immediately once following the method above, with no need to apply my fix. .

I'm having same issues with my carrier (cannot receive sms messages though the data is turned on). Can you share the fix?
 

ritchie888

Member
Sep 23, 2010
21
7
Vienna
I'm having same issues with my carrier (cannot receive sms messages though the data is turned on). Can you share the fix?

Of course! If anything is unclear drop me a PM.

This should work providing you're on Android Pie (9) and rooted. All software should be easily found by Googling the version numbers.

1) Install Magisk if you don't already have it, I used v19.
2) Install Magisk modues. In Magisk go to Modules then install from zip: magisk-riru-core (magisk-riru-core-v17.1) and magisk-edxposed (magisk-EdXposed-v0.3.1.7_beta-release), in that order.
3) Install EdXposed (EdXposedInstaller_v2.2.4-release). You can do this by using any file navigation software, locating the apk, and clicking to install. Android will complain and you will need to allow third party apps to be installed. I believe on earlier versions of Android you can use Xposed and install it a more official route, but I don't think there is an official Xposed version for Pie yet.
4) Reboot. Both the Magisk modules and EdXposed need this.
5) Open EdXposed and check you have a green tick indicating everything is installed and working.
6) In EdXposed, go to Downloads and search for 'Roaming Control'. Install the latest version. At the time I used 1.53, but as I mentioned I don't need it anymore so don't have it installed currently.
7) Under EdXposed > Modules, click the tick to enable 'Roaming Control'.
8) Reboot
9) Open Roaming Control, either using the app icon or by clicking it through EdXposed. Click to turn on National Roaming for whatever SIM you have in that needs it. You may need to play with saved networks/countries but for me all I had to do was turn on national roaming. It should start working immediately, but if it doesn't toggle the airplane mode.

The developer of Roaming Control, @CazeW, is really helpful. Consider donating to him if this helped you. His post is the last link below.

Here are some links I saved which I obtained all this info from:
https://forum.xda-developers.com/xposed/android-9-0-xposed-solutions-t3889513
https://www.xda-developers.com/xposed-framework-unofficial-port-android-pie/
https://forum.xda-developers.com/xposed/modules/app-roaming-control-v1-0-t3267154
 
  • Like
Reactions: jonny908

bursuk2007

Senior Member
Oct 24, 2016
77
24
Hey guys, i just flashed PE Gsi and everything is alright, the only problem is that ambient display cannot be triggered as always-on-display.

I flashed the system image and then magisk 19.

Any ideas why it doesn't show me the option?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 25
    I built non-GSI Unofficial Pixel Experience P;)

    Download:
    https://drive.google.com/open?id=17lDJ-aOInCXdHQf8KXtoksEhZJgz7gS6

    Changelog is too big for xda, so it's included in download folder.

    If you are using Global /China Stable or third party rom (Xiaomi.eu), please download China Developer from here (search for "小米MIX3最新 开发版 线刷Fastboot完整包点击下载") and flash it, then flash PE system.img.
    It seems current stable rom has some bugs in vendor or firmware (e.g. Google Camera is laggy).

    Please note this rom is not maintained as my daily driver is FlokoROM GSI.

    Working:
    Camera (including 4K video)
    Wi-Fi
    Bluetooth (audio, in-call audio)
    GPS
    NFC
    Dual SIM, Dual 4G standby
    VoLTE
    Fingerprint
    USB PD
    Wireless Charge
    Sensors including proximity
    AOD

    Not working:
    Slider (actually it's working, but no app to handle)
    OK Google detection in any screen
    Bluetooth call for some users/devices
    Android Auto (display flickering)

    Google Pay should work if you use MagiskHide Props Config, but I can't test since my country (Japan) uses hardware level security (exclusive for Japanese models) for payment via Google Pay.

    Installation:
    Currently generating ZIP is broken, so you have to install images one by one.
    1. Flash the latest *Official* China Developer ROM (xiaomi.eu rom is not supported)
    (If you are using other roms before, please wipe data)
    2. Download and flash system.img
    3. Download vbmeta.img and flash it with this command:
    fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
    4. Flash Magisk

    Credit:
    Pixel Experience team and other developers

    Source:
    https://github.com/PixelExperience
    https://github.com/AndroPlus-org/device_xiaomi_sdm845-common
    https://github.com/AndroPlus-org/device_xiaomi_perseus
    https://github.com/AndroPlus-org/vendor_xiaomi
    https://github.com/AndroPlus-org/android_kernel_xiaomi_sdm845

    I'm also building custom kernel for Mi MIX 3.
    Download


    To enable tap to wake, flash kernel and open display settings.
    7
    You can use this magisk module to replace AI button to camera key, then use Button Mapper to remap.
    I contacted flar2 to support remapping AI key but it's not possible because of Google Assistant's behavior...
    https://drive.google.com/open?id=15sR2OGRv0N6e585xrmptH4P2XLMw6d3S
    7
    I'm planning to switch to Pixel Dust since it has a lot of features.
    If there is no big issues, I'll continue to build Pixel Dust and stop build for Pixel Experience.

    The test build is here:
    https://drive.google.com/open?id=1TgIpvHxPGC1TbyXkgFJAGuzNAoWdOewt
    You don't need to wipe data (if some crash happens, wipe data)
    6
    Hey guys had a lot of trouble with these ROMs so just wanted share my experience for those who are also running into trouble.

    Coming from global phone running xiaomi.eu weekly the only steps that allowed me to get to boot are as follows:

    In twrp: factory reset then format data (hit yes to accept).
    Reboot phone and reenter twrp.
    Connect to computer and transfer xiaomi.eu rom onto root of device (I suspect any would work but I happen to have used 10.2.2.0.PEECNXM_v10-9 which is believe was xiaomi.eu stable release), pixel experience ROM zip and magisk-v17.3mod4mimix3

    Flash the xiaomi.eu rom first then without rebooting or any formatting or factory resetting immediately flash the PE ROM zip and then magisk 17.3.

    Once those three files are flashed via twrp go to wipe and the factory reset then format data again.

    This last part is very counter intuitive to me but believe it or not, it was what finally got me out of bootloop.


    Now of note, with this process I do have the memory leak issue. I understand that some users have stated that I may not if I used a different base ROM first instead of the one I used. However, doing this same process with cn ROMs always led to a boot loop on my device, no matter how I flashed them or which ones.

    That being said, I'd like to be able to get to the root cause of the memory leak if it's at all possible.


    Boost+ by htc doesn't appear to help but actually demonstrates the problem.

    Going to sleep last night the phone had 59% memory usage according to boost +. This morning the phone now shows 79% and climbing. A reboot resets the memory usage back down to 55%.

    Furthermore there has definitely been a noticable slowing for me within about 12 hours of reboot regardless of usage. Within 24 hours the phone becomes virtually unusable without a reboot.

    Now does anyone know what tool I can use to potentially diagnose this memory leak issue? Most usage analysis tools out there only show that system is using up X amount of ram without any further granularity as to what process or system app is using how much ram.
    4
    I uploaded 190103 build and now BT in-call audio, mobile data icon and VoLTE is all working!:good:
    https://drive.google.com/open?id=17lDJ-aOInCXdHQf8KXtoksEhZJgz7gS6