yashsingh1/xdaforums huggingface dataset:
[Huawei Ascend Mate 2] :
Good news is that I figured out how to get the system partition to work as f2fs, but unfortunately these updates are built as block based zips and not the old way. Block based zips come with a compressed system.new.dat image which is ext4 so even if you format it to f2fs the block image automatically reverts it back to ext4. Only way I can get around this is by making a change in the CM source at core/makefile and build the ROM on my end. Then it would allow me to have a f2fs system partition along with the data, internal SD, and cache.

---------- Post added at 12:14 PM ---------- Previous post was at 12:10 PM ----------

And it currently isn't possible to decompress the system.new.dat image and convert it to f2fs upon recompressing it.

---------- Post added at 12:16 PM ---------- Previous post was at 12:14 PM ----------

I'm currently setting up my environment to make a CM build now. [MENTION=5530607]Moody66[/MENTION], as promised, I will let you know how long the build takes on my system lol.
[Huawei Ascend Mate 2] u-ra:
To what end, pray tell?
[Huawei Ascend Mate 2] :
http://review.cyanogenmod.org/#/c/78849/1/core/Makefile

TDM pushed this change for review but for whatever the reason may be it never got merged. I can include this modification under the 12.1 branch and make a build so when I format the partition to f2fs and flash it won't overwrite it back to ext4 thus allowing a clean system install to boot up properly on a f2fs formatted system partition. Once I let it boot up and run its configurations I can go back to TWRP and change my data and cache backups from *.ext4.win to *.f2fs.win. I would first format data then restore both cache and data. The extension name change will tell TWRP to format as f2fs before restoring the tarball. Simple enough.
[Huawei Ascend Mate 2] Alucai Vivorvel:
OK, haven't been on here in a while but I AM using official CM builds, clean installed from B322 stock. Also using the TWRP linked in the OP here. Both cmupdater and CyanDelta are downloading to the internal memory, and TWRP won't let me flash them until I move the update files to the external microSD card. Neither one has an option to change the download location as far as I can tell.
[Huawei Ascend Mate 2] MT2-User:
Both CM Dowloader and CyanDelta can install the update if you allow them to do the job. Root required.
[Huawei Ascend Mate 2] :
That doesn't sound right at all..... There should be no issues from your internal SD when updating. You must have modified something that borked an operation on your device.. Otherwise, it should work fine. My guess is user error in my humble opinion.
[Huawei Ascend Mate 2] Alucai Vivorvel:
No, they can't. You're not understanding. I click "Install ZIP" in CyanDelta, it reboots to TWRP, and TWRP throws an error. If I move the downloaded .zip beforehand to the external SD card, it successfully flashes without any issue, just like a regular manual update.

---------- Post added at 10:56 AM ---------- Previous post was at 10:55 AM ----------

I have flashed literally hundreds of ROMs (that's including updates, of course) (okay, probably closer to 100, but still). Unless I did something really stupid this time around, no way it was something I did. I'll try the CM recovery later I guess, but I'd like to keep TWRP if possible.
[Huawei Ascend Mate 2] :
Do me a favor and try again from the internal sdcard. When it fails I want you to go to the advance settings in TWRP and save the recovery log to your phone. Upload the recovery log on here so I can look at it please.
[Huawei Ascend Mate 2] MT2-User:
I tried both and only gave my permission to let them install, it reboot into twrp and automatically update for me, and even automatically reboot system.
[Huawei Ascend Mate 2] Alucai Vivorvel:
Will do, just as soon as I get back from school.
[Huawei Ascend Mate 2] TheGeekRedneck:
Thought you guys might appreciate this:
[Huawei Ascend Mate 2] Alucai Vivorvel:
Alright, here's the recovery.log. After saving it, I then tried to move the file with TWRP to the SD card, but it threw an error for that as well. Forgot to retrieve an updated log though, sorry.

Might I need to Fix permissions?
[Huawei Ascend Mate 2] :
There is your problem... It does this for both storage locations.
[Huawei Ascend Mate 2] Alucai Vivorvel:
So... what, just a factory reset should fix it? Because all of the builds I've been flashing are from the official repository, downloaded with cmupdater to start then CyanDelta. How come it doesn't throw the error when I move the .zip to the external SD using CM's File Manager or my computer via MTP? (Side note, UMS doesn't seem to do anything; can only use MTP and PTP, though that might me more of a driver issue.)

What's interesting is that TitaniumBackup crashes when trying to load my pre-existing backup folder, which made setting up all of my apps again a pain. I wonder if I can get it working again should a factory reset be necessary...
[Huawei Ascend Mate 2] :
When you set up cyandelta did you select the rom.zip on your device that you are currently using at this moment? If you selected a different one then that is why you are having issues.
[Huawei Ascend Mate 2] Alucai Vivorvel:
I don't recall, but I've been having this issue before I started using CyanDelta. I only tried CyanDelta because it was suggested here after my initial post about this.
[Huawei Ascend Mate 2] :
Ok, well, lets just get straight to the point then. Download the latest nightly. No delta this time. You need to download the full zip. Boot up twrp and select to format your data. Type yes and enter to format. Wipe your system, cache, and dalvik. Now go to the home screen on twrp and select to install. Find the full cm zip and flash it. You need to flash gapps also. When the system boots up then open up cyandelta and point it to that same cm zip. From there on out you will be good to go. You made a mistake somewhere along the line. Above instructions will get you back on your feet. Make sure the CM zip is on your external sd or you will lose it when you format data.
[Huawei Ascend Mate 2] Alucai Vivorvel:
Thanks for the advice, hope that works. Hope I can get TitaniumBackup working again before I do this. I will report back after I've completed your steps (which probably won't be for a few hours).
[Huawei Ascend Mate 2] :
Follow my instructions precisely or you will run into more problems.

When you are done following my instructions then feel free to boot up twrp again to restore your data backup.
[Huawei Ascend Mate 2] Alucai Vivorvel:
Oh, right, forgot I could just use TWRP to backup data... lol. No need for Titanium Backup. :P
[Huawei Ascend Mate 2] Alucai Vivorvel:
Okay, new problem. I followed everything you said to the letter [MENTION=6367467]SHM[/MENTION], though immediately after the reflash of the latest, full zip update, I can no longer access my microSD card. Neither the system nor TWRP can read the contents, and CM doesn't even recognise that one is inserted.
[Huawei Ascend Mate 2] Moody66:
Saw that as well. Reflash back to the twrp from u-ra. Fixed my issue. New twrp from this Nigel didn't like it so well.
[Huawei Ascend Mate 2] Alucai Vivorvel:
Pretty sure this IS the TWRP from u-ra, I never downloaded another one. But I'll try reflashing the recovery.
[Huawei Ascend Mate 2] Moody66:
Hmmmm. Something weird going on then. I put mine into my PC and it would read it. Tried in another phone. Reported as damaged. Formatted and reinstalled into mate2. Still no go. Flashed u-ra twrp and copied files to internal SD. Installed cm and micro is working again in both twrp and droid.
[Huawei Ascend Mate 2] Alucai Vivorvel:
Well, poop. Seems now BOTH internal AND external are invisible to TWRP and my PC. The phone still works - I can still turn it on and use it, and Storage reports the proper total and used space - but otherwise, everything's borked. And all I did this time around was flash the TWRP in the OP of this thread (twrp-2.8.7.0-mt2L.img).

EDIT: Okay, I confirmed the microSD card itself is not damaged. I removed it from the phone and put it in a USB card reader, I can see everything just fine. So, that's a relief, at least (the thing's 64 GB and I do not have money to replace it).

EDIT 1: I have also confirmed that the CyanogenMod recovery is just as useless as stock recovery. And TWRP, apparently, as it, too, cannot see my microSD. What on earth is up with this phone...?

EDIT 2: Umm. Huh. I wonder if that's part of the issue. TWRP's file browser shows no /storage folder. There's /sdcard and /external_sd, but no /storage, which I'm pretty sure is supposed to be there.

I wonder if I should just try going back to stock, then go from there? HiSuite still recognises the device... when it's in CyanogenMod, not the bootloader, apparently. :/
[Huawei Ascend Mate 2] antinerd:
Odd, I also lost access to my 128GB SD card as soon as I flashed the newest nightly this afternoon. Reflashed the previous nightly, and all was well.
[Huawei Ascend Mate 2] Alucai Vivorvel:
I'm pretty much at my wit's end at this point, and I forgot that HiSuite doesn't actually allow you to flash a specific file, so I'll try that and report back (I don't really feel like hunting down the steps on how to revert back to stock). So help me if it was that simple...

Edit: Of course, I forgot that I can't access my SD card... whelp, guess I'll just try to put the file on the internal storage-! (Can you flash a zip like TWRP does via adb or fastboot?)

Edit 1: Well, it SEEMS to have flashed correctly... *fingers crossed*

EDIT 2: Go figure, that was it. build 2015-09-17 works, build 2015-09-18 breaks everything. GG. What's the best way of informing the devs?
[Huawei Ascend Mate 2] Moody66:
Did you change the file system to start with?

---------- Post added at 03:13 AM ---------- Previous post was at 03:08 AM ----------

Wow. Loads of changes.

https://github.com/CyanogenMod/android_kernel_huawei_msm8928/commits/cm-12.1
[Huawei Ascend Mate 2] Alucai Vivorvel:
No, I didn't do anything out of the ordinary like that. Just your regular old dirty flash from TWRP. I let Tom know about it on Google+. He hasn't outright responded but he "+1'd" it.
[Huawei Ascend Mate 2] Moody66:
They posted a new version of CM recovery. Its possible it is NEEDED for this ROM. Don't know for sure. Speculation...

http://code.nwwn.com/roms/android/cm-12.1/

Notice the change in size compared to all the other releases.
[Huawei Ascend Mate 2] xordos:
Try another sdcard? Or you can save the recovery log and upload again so we can take a look
[Huawei Ascend Mate 2] :
[MENTION=4289162]Alucai Vivorvel[/MENTION], in this TWRP build there is no /storage directory. Yes, there is /sdcard and /external_sd. I would suggest posting a recovery log when you experience issues. They help to pin point issues a good majority of the time. When using the file manager in TWRP you select /external_sd to view its contents on your external sd card. The same goes with /sdcard for your internal sd however with /sdcard you must make sure you do not unmount /data because your internal sd contents are located on the data partition.

---------- Post added at 12:27 PM ---------- Previous post was at 11:56 AM ----------

I'm running nightly 09182015 with no issues with TWRP.

---------- Post added at 12:28 PM ---------- Previous post was at 12:27 PM ----------

In fact, I have not had one issue with TWRP yet other than a small bug that prevents me from moving a file to my external sd, but copying is fine.
[Huawei Ascend Mate 2] MT2-User:
I've been running nightlies without any twrp issues, with CyanDelta/CM Downloader. I haven't tried build-in CM updater yet.
[Huawei Ascend Mate 2] :
Same other than mentioned bug in my previous comment. Maybe you can test and see if it does the same on your end. Use the file manager and go to internal sd then select a random file and try to move it (not copy) over to your external sd and see if it reports an error. If it does the file will be created on your external but at 0 bytes. Would be curious to know your results.

---------- Post added at 01:26 PM ---------- Previous post was at 01:15 PM ----------

I also do not like how this TWRP will automatically show the internal sd and external sd on your PC the moment you plug it up when you haven't even selected to mount your storage. Concerns me when I go to unmount it from the PC but cannot verify if its properly unmounted from within TWRP. If not properly unmounted then this could corrupt the card over time.
[Huawei Ascend Mate 2] MT2-User:
Tried to use build-in File Manager to move file between internal sd card and external sd card, and there is no issue for me. I usually use ES File Explorer.
[Huawei Ascend Mate 2] :
I meant within TWRP lol
[Huawei Ascend Mate 2] xordos:
I can confirm that 0918 build missed the external sdcard mounting, looks like it is trying the f2fs :)

See screenshot for the /fstab.qcom file.

Testing the 0919 nightly now.
[Huawei Ascend Mate 2] MT2-User:
Will try it. CyanDelta is updating latest nightly now.

Update: No problem within TWRP.
[Huawei Ascend Mate 2] :
That was there a couple of builds back. You will still be on ext4 for data and cache after the install. The changes in the fstab regarding f2fs are simply there so should you decide to format your data and cache partitions to f2fs then the fstab can properly handle it since the kernel has f2fs support.
[Huawei Ascend Mate 2] MT2-User:
Tasker (app) still behaves weird, e.g. my Alarm stopped immediately after it started.
[Huawei Ascend Mate 2] u-ra:
What's the SD card manufacturer and model?
[Huawei Ascend Mate 2] xordos:
Ok, and while i am trying to flash 0919 (btw, same issue), in twrp, sdcard indeed can not be mounted.

Twrp fstab is separate with main OS, right? They are share some configs now?

Attached log and pics.

Sorry, the screenshot is probably not useful, as I forgot twrp fstab is under /etc.
[Huawei Ascend Mate 2] u-ra:
1. No it will not corrupt your SD card

2. There's a setting in TWRP to turn MTP off
[Huawei Ascend Mate 2] xordos:
OK...something really interesting...

1) So, In TWRP, sdcard can not be mounted (also not working in Main OS 0919)

2) Then I double wiped, and flashed back the CM 0917 ZIP.

3) Reboot back to TWRP again, sdcard still can not be mounted.

4) Reboot to CM (0917), wait cache rebuilt, sdcard is working now.

5) Reboot to TWRP, sdcard is working too.

So, definitely the CM booting process is updating some config that is used by TWRP?

Edit:

Confirmed the recovery partition image has no change.

Only difference is the twrp /etc/mtab file, looks like it didn't get generated properly while CM 0919 is installed, /external_sd line is missing in this file.

Attached screen shot, one is TWRP after 0919, one is TWRP after 0917.

BTW, just noticed adb not working in this twrp from OP?
[Huawei Ascend Mate 2] :
Yea, understood. Still familiarizing myself with mtp since this device is the first I have own that implements it. Use to mass storage and it's old functionality.
[Huawei Ascend Mate 2] Alucai Vivorvel:
I flashed 0919, same issue. Only 0917 allows me to use my SD card. Can't even access my TWRP backup, have to wipe and reflash 0917 first.
[Huawei Ascend Mate 2] Alucai Vivorvel:
Verbatim 64 GB microSDXC, class 10. It's worked flawlessly until these last two builds, and the only other custom ROM I've tried (PAC) has been fine with it, too. I didn't know SD cards even had model numbers, so not sure what to tell you. There are two numbers on the back: E464G1440, and TP2KE4A049A06. At least I think that's what they say, since the text is so tiny.
[Huawei Ascend Mate 2] antinerd:
SanDisk Ultra 128GB Micro SD XC I
[Huawei Ascend Mate 2] iammudd:
It may be worthwhile stating how the cards were originally formatted. Wasn't there a requirement at one point with TWRP that 64GB+ cards had to be formatted as FAT32? (Ok, I found a cache of the old link: https://web.archive.org/web/20141103154326/http://teamw.in/exFAT) Perhaps the restriction has been removed since I don't see it on the TWRP FAQ anymore.

(I should add for the sake of completeness that I had problems transferring large volumes of data between Win7 and PAC 20150909 over USB. File transfer would stall after, say 1 or 2 GB, and then I would have had to disconnect the USB cable. I didn't experience this issue with B148.)
[Huawei Ascend Mate 2] Alucai Vivorvel:
I don't know what it was originally formatted as, but it's FAT32 now and has been for as long as I can remember.
[Huawei Ascend Mate 2] :
Yea, wish I could assist in some way but I literally am not experiencing what you guys are experiencing and nor can I duplicate this problem on my end. I have access to external and internal within TWRP and it has been this way for me since the first release.

---------- Post added at 05:23 AM ---------- Previous post was at 05:12 AM ----------

External and internal SD storage shows up just fine for me as seen in the screenshots below...

---------- Post added at 05:28 AM ---------- Previous post was at 05:23 AM ----------

As for adb not working [MENTION=3266877]xordos[/MENTION], make sure you are using the latest adb binary. I also tested this and it works fine for me. Adb sideload even works great.
[Huawei Ascend Mate 2] Moody66:
So how long did your build take. Sorry I haven't posted much. Got the damn cold the wife and kid had..... Still wanna add V and such into CM. Everyone will be out tomorrow... Well today since its after 12..... So I will get mine finished and just let it go. Sadly its dual boot so Linux is on the latter half of the drive. HD will be what holds me back I am sure due to that. I need to break down and get an ssd in it. Would compile in no time then. Lol.
[Huawei Ascend Mate 2] xordos:
[MENTION=3282752]u-ra[/MENTION]

I have captured dmesg output in both cases, and noticed the sdcard init error when boot into CM nightly build 0919.

I have flashed cm0919 and cm0917 back and forth about 2-3 times, it is 100% reproducible in my phone that CM0919 cannot see the sdcard, and CM0917 can see the sdcard.

(and BTW, after flash CM0919, Reboot from CM0919 to twrp, twrp can not see sdcard either. But if I turn off the phone completely, then boot directly to twrp, then sdcard is detected fine in twrp, then boot back to CM 0919 again, sdcard still can not be detected)

My sdcard is a 128 GB Patriot LX Series Class 10 UHS-1 microSDXC Flash Card (PSF128GMCSDHXC10)

By grep "mmc" in the dmesg output, CM0917 dmesg shows

<6>[ 1.285708] mmc0: no vmmc regulator found

<7>[ 1.286827] Registered led device: mmc0::

<6>[ 1.287951] mmc0: SDHCI controller on msm_sdcc.1 [msm_sdcc.1] using ADMA

<6>[ 1.290989] mmc1: no vmmc regulator found

<7>[ 1.292109] Registered led device: mmc1::

<6>[ 1.293207] mmc1: SDHCI controller on msm_sdcc.2 [msm_sdcc.2] using ADMA

<6>[ 1.389426] mmc0: BKOPS_EN bit = 0

<6>[ 1.402002] mmc0: new DDR MMC card at address 0001

<6>[ 1.517332] mmc1: new high speed SDXC card at address 0007

<4>[ 2.075968] mmc0: Starting deferred resume

<4>[ 2.138776] mmc0: Deferred resume completed

<6>[ 216.574023] mmc0: Starting deferred resume

<6>[ 216.636904] mmc0: Deferred resume completed

<6>[ 369.643611] mmc0: Starting deferred resume

<6>[ 369.702999] mmc0: Deferred resume completed

<6>[ 398.692198] mmc0: Starting deferred resume

<6>[ 398.752535] mmc0: Deferred resume completed

<6>[ 465.459229] mmc0: Starting deferred resume

<6>[ 465.523926] mmc0: Deferred resume completed

<6>[ 604.701722] mmc1: Starting deferred resume

<6>[ 604.768942] mmc1: Deferred resume completed

<6>[ 656.542561] mmc1: Starting deferred resume

<6>[ 656.598206] mmc1: Deferred resume completed

And CM0919 dmesg shows sdcard init failure:

<6>[ 1.291326] mmc0: no vmmc regulator found

<7>[ 1.292447] Registered led device: mmc0::

<6>[ 1.293563] mmc0: SDHCI controller on msm_sdcc.1 [msm_sdcc.1] using ADMA

<6>[ 1.296610] mmc1: no vmmc regulator found

<7>[ 1.297728] Registered led device: mmc1::

<6>[ 1.298820] mmc1: SDHCI controller on msm_sdcc.2 [msm_sdcc.2] using ADMA

<6>[ 1.395057] mmc0: BKOPS_EN bit = 0

<6>[ 1.407600] mmc0: new DDR MMC card at address 0001

<3>[ 1.830691] mmc1: mmc_sd_init_card() failure (err = -84)

<3>[ 1.830767] mmc1: error -84 whilst initialising SD card: rescan: 0

<4>[ 2.091830] mmc0: Starting deferred resume

<4>[ 2.144963] mmc0: Deferred resume completed

<6>[ 196.066578] mmc0: Starting deferred resume

<6>[ 196.124378] mmc0: Deferred resume completed

<6>[ 278.724314] mmc0: Starting deferred resume

<6>[ 278.778956] mmc0: Deferred resume completed

<6>[ 476.506580] mmc0: Starting deferred resume

<6>[ 476.562322] mmc0: Deferred resume completed

Please see attachment for the complete dmesg output.

And pls let me know if you want to me to try anything else.

Thanks.
[Huawei Ascend Mate 2] Moody66:
That should be very helpful. Thanks for taking the time to post that Xordos!
[Huawei Ascend Mate 2] robertbarber:
Some of us are having similar problems when we flashed the newest PAC build about it not wanting to see the external SdCard.
[Huawei Ascend Mate 2] Moody66:
PAC is using the same source. It's just CM with PACs extras included.
[Huawei Ascend Mate 2] MT2-User:
I have no issue within twrp with CM/PAC, including 0919 builds. I reboot into twrp using Quick Boot (Rebbot) though, and my external SD Card is Samsung Evo 64 GB (Class 10).
[Huawei Ascend Mate 2] :
Nightly 20150919 is missing platform.xml from /system/etc. Tried taking a screenshot and it doesn't have permissions to read or write to it lol. That's when I checked for the file and noticed it doesn't even exist. Anyone else seeing the same thing on their device? I can fix it easily but just curious. - Brain fart on my part. Ignore this.
[Huawei Ascend Mate 2] MT2-User:
Updating to Nightly-20150920. Will check the file soon.

---------- Post added at 12:49 PM ---------- Previous post was at 12:39 PM ----------

Found it in subdirectory:

/system/etc/permissions/
[Huawei Ascend Mate 2] :
Yea, found it there also. Gonna modify it now and see what happens.

---------- Post added at 01:38 PM ---------- Previous post was at 01:04 PM ----------

That didn't help lol. For some reason screenshots can't be saved to my internal SD. Says the system won't allow it. This is new to me :-p. Time to fiddle around.
[Huawei Ascend Mate 2] antinerd:
My SanDisk Ultra 128GB is also formatted fat32, and has been since I started to use it, and I observed the same issue where 917 was great but as of 918 I had no access to my SD card. So I'm holding on 917 for now.
[Huawei Ascend Mate 2] antinerd:
Just to see what would happen, I backed up my 917, then flashed 920, and my SanDisk Ultra 128GB formatted fat32 is still not recognized. Still on 920, i popped in my old Lexar high speed 32GB formatted fat32, and it comes up just fine. Wondering if the issue is specific to the large size of my card, or is it the brand/model. Is anyone successfully running a SanDisk Ultra 128GB on a nightly of 918 or newer?
[Huawei Ascend Mate 2] :
Well for what it may be worth guys I decided to go back to stock B322 and my external SD could not be read after coming from CM 12.1. Had to format it and lose all my contents. Working now. Haven't really looked into what the cause was but seems the nightly ROM did something abnormal.
[Huawei Ascend Mate 2] MT2-User:
That's worrisome.
[Huawei Ascend Mate 2] :
I agree. I kept backups on my PC though so it wasn't a big deal for me in the end but I was upset to see it come to that. Currently looking for the B322 kernel source. I want to run f2fs on stock lol.
[Huawei Ascend Mate 2] USHAM2:
B322 kernel source.

http://consumer.huawei.com/en/support/downloads/detail/index.htm?id=52545
[Huawei Ascend Mate 2] :
Already got it and already added f2fs support. Just need to make a build.
[Huawei Ascend Mate 2] u-ra:
Found the problem. Thank you for testing.
[Huawei Ascend Mate 2] Moody66:
+	/*remove UHS-I mode of SD 3.0 because hardware do not support it.*/

+#ifdef CONFIG_HUAWEI_MMC

+	host->caps &= ~(MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 |

+	MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_SDR104 | MMC_CAP_UHS_DDR50);

+#endif

?? That did it?