yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] mark-1978:
3.7GB flashable zip file through cmw

This is a zip file which makes the partition size 3.7GB. It is made from the files from the earlier patch, which still needed a pc to work.

Thx go to this page.

After the patch flash your CM12.1 rom. It does format system, data and cache partition, so ready for a clean install.

Repartition Fix Installation Steps :

Run repartition fix in recovery

Format data , type yes

Format Phone storage

Install The FULL ROM.
[Miscellaneous Android Development] mark-1978:
Some more recovery images

deleted post.
[Miscellaneous Android Development] mark-1978:
Working recoveries

These recovery images should be bugless, so you can install the kitkat and lollipop firmwares without errors.

*edit: faced a mount error, got the battery and sd card out and reinserted them and recovery worked fine. Maybe just unmount and remount external sd card will also work.
[Miscellaneous Android Development] duckynawal:
Could you please make a flashable zip file for the fix for the wifi bug? I'm reaching my monthly data allowance.

Is this safe to flash over an existing ROM?

UPDATE: Phone freezes when I make a call. When the entire screen is covered in green, the name, photo etc doesn't come up. The screen just stays green and I have to remove the battery to turn it off and on again.

---------- Post added at 08:33 PM ---------- Previous post was at 08:04 PM ----------

@mark-1978 sorry for this but which ROM ported so far would be the most stable and reliable? RR is one of the best ROMs I've used but the Redmi port's phone and wifi bug are huge problems.
[Miscellaneous Android Development] mark-1978:
The partition 3.7GB fix will format all partitions, so your data is lost. Further there's this patch i made for video problems and wifi and youtube update. Try it.

BTW it isn't difficult to make the RR version with the newest updates working.
[Miscellaneous Android Development] duckynawal:
Would you mind showing me how to? I'd be able to help out and have a stable build of RR on my own phone.
[Miscellaneous Android Development] mark-1978:
Non-emulated storage patch for mlais m9 CM12.1

NonEmulated: for settings internal sd card as default app storage

SD_Default: for settings external micro sd card as default app storage

CM12.1
[Miscellaneous Android Development] mark-1978:
Have you tried the patch i made? It has the video lib files in it.

*BTW do you have the Plus version? And this is the RR version with the newest patches, it should work, haven't tested it yet.
[Miscellaneous Android Development] duckynawal:
I flashed the patch and wifi works after first reboot. Will update after a few reboots.

I'm using the standard version but mine (from everbuying) differs from gearbest's pictures. My charger's USB port is at the end instead of on the side (gearbest) and the speaker is covered by some cloth? instead of the steel shown in gearbest's pictures.

Add. info:A friend of mine bought the same phone 2 months before me and both phones are identical.

---------- Post added at 09:07 AM ---------- Previous post was at 09:03 AM ----------

Using the first RR port from the Redmi Note 3G and the phone bug still persists. I can't get pass the green screen and I have to remove and put back my battery to get the phone responding again. Any fixes for this? Will the new updated RR ROM fix the bug?
[Miscellaneous Android Development] mark-1978:
Probably it will. So you flashed the patch for wifi and the green screen still occuring. Strange bug, only saw that while using the camera. The screen would go green where it shows camera visuals. Coud have something to do with the bin directory. Strange though.

Thought under the cloth of the speaker is the metal surface you mean, so the cloth was added later on.
[Miscellaneous Android Development] duckynawal:
By green I mean the green animation that covers the screen then shows the call info.

---------- Post added at 09:26 AM ---------- Previous post was at 09:23 AM ----------

Also, can I dirty flash the updated RR ROM you posted a few posts back? Over the old RR ROM ported from the same phone.
[Miscellaneous Android Development] mark-1978:
Green screen could be a dialer bug, try installing another dialor from google appstore. Don't think the rom will work if you just overinstall it.
[Miscellaneous Android Development] mark-1978:
TWRP 3.0.0.4

Thanks to this site a new TWRP.

Still not as compatible as Philz touch recovery. It's more for coming Marshmellow filesystem flashing, so bug is screen flashing a bit sometimes, but when in rom it works good again. Further reboot after flash bug.

TWRP version shows real 3.0.0-4 version

thl version is 3.0.0-4, not shown, further better compatible with fat partition and partition patch.
[Miscellaneous Android Development] duckynawal:
I use custom lockscreen shortcuts to make quick calls. Even through there I the green screen comes up.
[Miscellaneous Android Development] mark-1978:
Have you tried the updated RR rom? Or the patch i made?
[Miscellaneous Android Development] duckynawal:
Tried the wifi + youtube buffer fix. Wifi fixed but not the phone.

Flashing new RR ROM now using TWRP 3.0 from an older post in this thread. Which recovery other than PhilZ would be best? I don't want philZ because nandroid backups don't work with it on my m9
[Miscellaneous Android Development] mark-1978:
Lollipop roms should work with TWRP 3, just unmount system and data before flashing.
[Miscellaneous Android Development] duckynawal:
I've been using this recovery since it was posted on this thread and I've never unmounted anything? Everything seems to flash fine without unmounting system and data.

---------- Post added at 08:56 PM ---------- Previous post was at 08:50 PM ----------

Resulted in TWRP's inability to mount /data.
[Miscellaneous Android Development] duckynawal:
No effect whatsoever
[Miscellaneous Android Development] mark-1978:
Maybe reboot into recovery or wipe data manually.

Repartition Fix Installation Steps :

Run repartition fix in recovery

Format data , type yes

Format Phone storage

Install The FULL ROM.
[Miscellaneous Android Development] mark-1978:
The sdcard fix should work however, for automatically installing apps to external sd card.
[Miscellaneous Android Development] duckynawal:
Tested ROM all day and it works perfectly. No bugs experienced so far, WiFi and cellular are flawless. Good job, this is spectacular.
[Miscellaneous Android Development] mark-1978:
Glad to hear everything is working.
[Miscellaneous Android Development] mark-1978:
SD card formatter Windows

Tool for making sure the external SD card capacity is fully used.

If surfing goes slowly, install add blocker for your browser.
[Miscellaneous Android Development] duckynawal:
Battery life tweak: Go into privacy guard, click on the 3-dot menu, check built-in apps, go to Google play services and google services framework and turn off wake up, keep awake, and auto start. They might crash twice or thrice usually after boot but after that everything's good.
[Miscellaneous Android Development] mark-1978:
Tweak for the resurrection rom.
[Miscellaneous Android Development] duckynawal:
For any CM based ROM and any other ROM that has CM's privacy guard
[Miscellaneous Android Development] mark-1978:
TWRP 3.0.0-4 fixed mount points

Unmount of system and data before a new flash is needed, other ways you get symlink errors or error status 7. After a successfull flash, unmount all drives before rebooting the rom.

*fixed fat/emmc partition set format to vfat so filesystem detection is working. Further you probably can connect ntfs formatted sd-cards and usb sticks.

Download
[Miscellaneous Android Development] duckynawal:
Mind explaining what you mean? I'm confused as I've never had problems with flashing and I haven't unmounted system etc
[Miscellaneous Android Development] mark-1978:
TWRP has bad mount management, meaning if you let the partitions mounted while installing a new rom and the script of the rom says to mount again, it will give an error (7).
[Miscellaneous Android Development] mark-1978:
Change path to internal sd card CM12.1

You can change the path to /data to /sdcard to get more app space. You need exposed installed for this. So you should be able to set internal storage to the 4.1 GB fat partition@ /dev/block/mmcblk0p9 or /emmc. Haven't got it working yet though, also cause of the mixed up terms for internal storage from Temasek 18.9 rom. Might be better of using Daddy79's patch or maybe the zip file installation a few posts back The zip file has to be extracted and contains 2 apk files to be installed in the rom with an explorer.
[Miscellaneous Android Development] mark-1978:
Something for the gps to work:

This GPS fix worked in my F5. It comes from DOOGEE support.

Enter Engineering menu (Mobileuncle Tools or *#*#3646633#*#*)

Select Engineering mode for MTK

Select YGPS -> Information -> and tap on 'AGPS restart' (press once and you will see nothing)

Exit YGPS and select LocationBasedService.

Select AGPS -> Enable A-GPS

Select GPS

Select FULL

Tap on Ref Position and see if some location datas are present: enter your current position (Lat,Long) if it's empty. Select ok.

Let the GPS start by tapping on GPS (OFF). It will become 'ON' and will procede with fixing the position

Tap on GPS (ON), it will become OFF (Leave it ON at least for three minutes then OFF)

Select HOT instead of FULL

Enter Ref Position and tap 'Apply Last Position'. (It will apply your current position)

Reboot

Install GPS Status & Toolbox and see if it fixes satellites easily

I hope it works for you
[Miscellaneous Android Development] mark-1978:
Philz touch recovery 6.47.7

Ported from februari 2016
[Miscellaneous Android Development] mark-1978:
CM12.1 for Mlais M9 from 24 februari 2016 by fire855, armenian ... Included are optimizing patches downloadable to install later on.

There's also a nightly build, with not working external sd card from 11 of march 2016. Wifi, bluetooth and camera are working though. Maybe the patch a few posts back will fix the external sd card issue. Home button still not working in the new version.
[Miscellaneous Android Development] duckynawal:
Great job, keep it up

---------- Post added at 10:09 AM ---------- Previous post was at 10:08 AM ----------

Updates:

RR ROM 5.9 ported from the redmi note 3G is stable. NO bugs encountered and its been somewhat around a week. Most stable ROM I've tested so far.
[Miscellaneous Android Development] mark-1978:
Could make all CM12.1 roms as stable as the RR 5.59 one.
[Miscellaneous Android Development] duckynawal:
I don't understand. Explain please?
[Miscellaneous Android Development] mark-1978:
There is a port guide, where you take the basics of CM12.1 and only change the way the rom looks. So Actually roms are like 4.4.2 or 5.0 or 5.1.1 or 6.0 and that kinda makes all the difference in speed and stability. Must say when having like 4.4.2 and adding a lot of tweaks, it could be you can make it as fast as the nowadays 5.1.1 versions. So what i mean, the Resurrection rom is in fact the same as the newest ( 10 february 2016) CM12.1 rom, making it just as stable. There is something, the apps installed differ making one roms user experience better then another.

Now there are 2 versions of lollipop that are new, one the one from Kingzone K1 from februari with the added youtube buffer reload after 5 seconds and two, the russians programming rom from 11 march 2016., with the home button bug.

Some new recoveries! Unmount data/sytem/cache before installation of new rom.

Android Marshmallow wifi working now, has bugs like not working bluetooth and camera, which supposed to not being fixable yet by copying files from older roms to it. Fire855 is the one to fix that. Think he has personal items he's busy with, cause there isn't much activity on his page.
[Miscellaneous Android Development] mark-1978:
Lollicraft new version
[Miscellaneous Android Development] hassed:
GSmart Classic Pro, MTK6592M kernel 3.10.72 Android 5.1, with can be ported firmware for Mlais M9?
[Miscellaneous Android Development] mark-1978:
For gps working in lollipop? Tried to port it, not working rom.
[Miscellaneous Android Development] duckynawal:
RR ROM ported from redmi note 3g experiencing same problem as the xfinix ported RR rom. IO scheduler options disappear from SetCPU and the phone screen is stuck when I make a call
[Miscellaneous Android Development] jaykerry:
wake gestures

how can i enable double tap to wake?
[Miscellaneous Android Development] mark-1978:
- Try a different dialer from google appstore.

- Guess installing an app from google appstore with wake on tap or something cando that for you.
[Miscellaneous Android Development] duckynawal:
I mean the inbuilt app for speakerphone/terminating calls etc. It stops at the green splash.

Anyway, had made a backup with TWRP the day before so restored it and everything's fine now.

Thanks for all your help. Without you, this phone wouldn't have gotten the support it needed.
[Miscellaneous Android Development] mark-1978:
Maybe some kind of update in meanwhile, or try to format the Dalvik cache and/or cache with twrp recovery.
[Miscellaneous Android Development] duckynawal:
Bug found: Mobile data isn't working on RR ROM ported from Redmi Note 3G
[Miscellaneous Android Development] mark-1978:
This RR version should work with 3g.
[Miscellaneous Android Development] mark-1978:
Having a problem with the new Recoveries. The size of the recovery exceeds the 10MB, so also exceeding the size of the recovery partition on the phone. Now all firmwares already work to install on the phone with the former recoveries, just when f.i. the new system.img.dat files are to install that's not yet possible. There you would need the new recovery, which is larger, for. Btw porting of the new recoveries is easy, you just need the two init files and replace them with the ported one. It's kinda like an executable from your personal computer, ow yes and you need the sbin, holding the command files. Replacing them makes the recovery to large for the partition. Have tried to edit the scatter file for a bigger recovery partitionsize, but then there are a lot of errors and if you manage to install the bigger recovery it just won't boot up. Must say the kitkat rom from Huawei is really fast and it's got a lot of options because of the system.apk i took from another mysticos rom. Still in games lollipop lies ahead in speed. Happy eastern!
[Miscellaneous Android Development] mark-1978:
Some CM12.1 roms for Mlais M9.
[Miscellaneous Android Development] jaykerry:
Try a few apps but they all didn't work. Gone back to stock KK since it has the dt2w feature which I need. In the process discovered that actually KK is much faster and not so laggy.
[Miscellaneous Android Development] duckynawal:
[MENTION=6767868]mark-1978[/MENTION] can you reply with the latest TWRP recovery for the standard M9 please?

---------- Post added at 11:15 PM ---------- Previous post was at 11:04 PM ----------

- Airon with premium key can help you.

- RR ROM from Redmi Note 3G is flawless and some init.d tweaks from L speed really help.
[Miscellaneous Android Development] duckynawal:
Works like a charm! Thanks.

---------- Post added at 01:08 AM ---------- Previous post was at 12:30 AM ----------

Created a separate thread for performance improvement. Used for a couple of days, works brilliantly.

http://xdaforums.com/android/development/mod-performance-improvement-mlais-m9-t3352756
[Miscellaneous Android Development] mark-1978:
Mlais M9 TWRP 3.0.1

new twrp recovery
[Miscellaneous Android Development] duckynawal:
Any bugs? Is this the best TWRP recovery for the m9?
[Miscellaneous Android Development] mark-1978:
Still have to unmount system partition before flashing new software. Maybe it can handle system.img.dat files.

Here's the change log:

TWRP 3.0.1-0 is out now for all currently supported devices.

What’s new in 3.0.1-0:

support new CM 13.0 pattern encryption (sultanqasim)

fix slow flashing issue due to modprobe (present on only some devices) (#twrp)

libtar updated to latest upstream and fixes (jcadduono)

fixes for loading custom themes (_that)

TWRP will now detect and install TWRP themes automatically through the normal zip install process (Dees_Troy)

translation updates – added Italian, Czech and Polish and significant updates to Dutch

progress bar improvements – progress bar updates during image flashing and better tracks progress during file system backups (tar) (Dees_Troy)

fix input box text display (Dees_Troy)

reboot option after zip install complete (bigbiff)

other mostly invisible bug fixes and improvements
[Miscellaneous Android Development] duckynawal:
Failed to flash
[Miscellaneous Android Development] mark-1978:
extract and flash through spflashtool.
[Miscellaneous Android Development] duckynawal:
PMT changed for the ROM. Failed to flash again.
[Miscellaneous Android Development] mark-1978:
use stock Scatter file.
[Miscellaneous Android Development] mark-1978:
Do you guys also have audio problems with these roms? Can't really figure out where the problem lies. Replaced libaudioprimarydefault and still no sound.
[Miscellaneous Android Development] duckynawal:
Always had audio problems with using external audio equipment with custom roms. Viper4AndroidFX fixed the problem but now it gives busy box errors when installing the driver so there's not really a fix.

Contacted mlais support and they said it was a motherboard issue.
[Miscellaneous Android Development] mark-1978:
What external audio equipment you mean? Bluetooth headset? Fixed the standard loudspeaker issue with custom roms CM12.1 btw.
[Miscellaneous Android Development] duckynawal:
Wired headphones, earphones, and 2.1 speakers
[Miscellaneous Android Development] mark-1978:
With what custom rom doesn't the viperandroid work anymore? Maybe there are other audioenhancers which work without the busy box.
[Miscellaneous Android Development] duckynawal:
Every custom ROM. Will look for others and update
[Miscellaneous Android Development] mark-1978:
The kitkat versions with everything working shouldn't have that too. Yes, lollipop versions have lesser audioquality for wired headphones. You can optimize the soundquality by using apps.
[Miscellaneous Android Development] duckynawal:
ElementX Kernel

Is it possible for the ElementX Kernel to be developed? If so, how can it be done? If someone here can develop it, I'd be more than willing to test and provide feedback.
[Miscellaneous Android Development] mark-1978:
TWRP 3.0.1-2

Mlais twrp 3.0.2-1
[Miscellaneous Android Development] Andryaka:
Which recovery should i use for marshmellow roms?
[Miscellaneous Android Development] mark-1978:
the same ones you use for kitkat and lollipop roms. The marshmallow roms aren't yet using the new images, like system.img.dat. Instead they use a non encrypted image, only zipped. So you can use the standard recoveries.
[Miscellaneous Android Development] duckynawal:
Successful

Successfully flashed via flash tools
[Miscellaneous Android Development] Andryaka:
Which lolipop rom is the best at the moment?
[Miscellaneous Android Development] duckynawal:
"Mlais M9 - CM12.1_Resurrection_Remix_HM NOTE 1Wupdatedtomarch2016" is personally my favourite.
[Miscellaneous Android Development] mark-1978:
CM12.1 roms
[Miscellaneous Android Development] Andryaka:
Bootloop after install.Philz recovery
[Miscellaneous Android Development] duckynawal:
Boot into recovery

Wipe and format options

Clean to install a new ROM

Yes

Return to home

Install zip

Install zip from /sdcard or /sdcard 1

Yes

If you're still facing problems, use this recovery:
[Miscellaneous Android Development] mark-1978:
Was a bug in the rom. Reuploaded the older one, but maybe you can't access all drives with it.
[Miscellaneous Android Development] Andryaka:
I know how to flash roms.Its not my first or second android.I will try TWRP.Is it still need unmounting something before flahsing?

---------- Post added at 02:04 PM ---------- Previous post was at 01:59 PM ----------

Last rom from G4s still have a home button bug?

---------- Post added at 02:22 PM ---------- Previous post was at 02:04 PM ----------

Wifi dont work in reaploaded RR,camera dont work too.
[Miscellaneous Android Development] mark-1978:
The unmounting part with twrp, it's for when the zip file you try to install doesn't first unmount the drive. If it just mounts the drive which is already mounted, it will exit the installation process.

G4s roms, are from russia and yes they still have the home button bug.

Wifi should work, does work on my mlais non plus version. The camera, you, if you have the plus version of the mlais m9, have to install the camera patch.
[Miscellaneous Android Development] duckynawal:
The latest TWRP .img that Mark posted doesn't require unmounting anything.

Restore your NVRAM backup from MTKDroidTools or from TWRP.

If you don't have a backup, remove SD card, boot into TWRP, wipe everything, format data. Plug in the SD card, boot into TWRP, flash ROM + Gapps = Profit
[Miscellaneous Android Development] mark-1978:
G4S rom with home button bug fixed version 3.0.
[Miscellaneous Android Development] mark-1978:
It appears that the storage bug we faced with lollipop is quite simple to solve. Came onto this when working on a recovery image. I was helping someone with his recovery on his phone and while doing, it showed that in the fstab file in the boot.img there is a path to the internal sd card. Now it standard points to the data partition, which is not formatted in fat. Now when changing that mountpoint to the internal fat partition, the storage shows 4.12 GB, just like in kitkat versions of the rom. So now all of the former lollipop roms can be changed to also work with the full 4.12 GB internal storage. It's a bit work though going through all the past lollipop roms.

* the newest g4s lollipop roms have full storage. Still can't get the older resurrection remix rom to the 4.12GB.
[Miscellaneous Android Development] mark-1978:
Ok, changed the resurrection rom a bit. Now it has full 4.12GB internal storage. When installing a new app, it is put under the 2.1GB section. By using the 'move app to sd card'option under settings/storage/apps, you can move it to the 4.12GB internal sd card. So you now have 4.12GB of apps storage in android lollipop. Here's the resurrection rom.
[Miscellaneous Android Development] mark-1978:
Tried the twrp 3.0.2-1 recovery, but it still needs the system partition to be unmounted sometimes. Philz touch recovery doesn't have this bug.
[Miscellaneous Android Development] mark-1978:
Some CM12.1 roms with 4.12GB of internal storage.
[Miscellaneous Android Development] Andryaka:
No signal after restoring imei.
[Miscellaneous Android Development] duckynawal:
That's a bit strange. I've tried the first TWRP 3.0.0 and the latest TWRP 3.0.2-1 recovery you posted in this thread and have had no problems whatsoever. I assume this must be a fault in either one of our devices. I'll have my hands on another M9 shortly and will test to see if the problem is present on the other device.

---------- Post added at 05:24 AM ---------- Previous post was at 05:18 AM ----------

I suggest that you simply refer those to the flashable storage fix for those ROMs already ported and to add your discovery to your future projects.

---------- Post added at 05:30 AM ---------- Previous post was at 05:24 AM ----------

What method did you use to restore IMEI?
[Miscellaneous Android Development] mark-1978:
Same problem. Signal is present, but can't connect to webpage. It stays a russian firmware, expect some trouble. Maybe you should try another firmware, one of the 4.12GB lollipop roms.
[Miscellaneous Android Development] mark-1978:
- did you get 3g to work on the 4gs 3.0 rom yet?
[Miscellaneous Android Development] duckynawal:
I don't know what that is actually.

Update on RR ROM: Mobile data doesn't work.
[Miscellaneous Android Development] mark-1978:
3g data fix

It is a setting in APN in 'sim cards/sim 1 settings/accesspoint names'. Delete 'proxy' and 'port', then save, wait a bit and 3g works again : ). Thank god!