yashsingh1/xdaforums huggingface dataset:
[Huawei Ascend Mate 2] iammudd:
Can you (or anyone else who was successful) try using the program AGAIN to see if you can STILL obtain the unlock code? I've used it a few days ago and it worked. Today, the program complains about "wrong type" when I key in the same information. I've also tried keying in the program code, trying usb auto-detect. and typing in MT2-L03, etc. into the dropdown box.

I have a feeling that the program is simply a front-end which accesses the web page mentioned... and Huawei MAY have stopped the loophole (of bypassing the MT2-L03 selection).
[Huawei Ascend Mate 2] gierso:
it now says type error..

[IMG="error message"]http://dl-1.va.us.xda-developers.com/2/9/3/4/4/2/0/error.png?key=sk0Gp3uC7pVvhcS-r22SSw&ts=1410536157[/IMG]
[Huawei Ascend Mate 2] D33PTHAWTE:
I've had the same problem. No matter how many times I tried, I received an error every time.

Modding, hopefully the solution you find will work for me as well.

It's strange that only a few devices would have this problem.
[Huawei Ascend Mate 2] xordos:
oh, no. I will confirm when I back from work tonight.

But on 9/10 night, first I tried modding.mymind IMEI failed, then I tried my IMEI , it still works.

yes, it probably is just a frontend, those input field same as online webpage, also the gotcha code.

EDIT: Confirmed, 2 days ago, I can retrieve my unlocked code successfully, but today, it failed with "type_error".
[Huawei Ascend Mate 2] xordos:
another thought, if they do closed the loophole. and they dont want support this in email. as last resort, Whats the risk if you flash my unlocked bootloader image, include other related partition if needed. Of course, hopefully my IMEI is not flashed over.
[Huawei Ascend Mate 2] :
Messing with the bootloader is pretty dangerous. One slip up can cause a hard brick.
[Huawei Ascend Mate 2] xordos:
yeah, agree. Still remember those old days disassembling pc BIOS, MBR booting... everything is pretty plain and clear. now all these crap.. sigh
[Huawei Ascend Mate 2] :
Haha, know how you feel. By the way, adb works fine on my end. Even when using, adb reboot recovery.
[Huawei Ascend Mate 2] :
Gonna be sending the device back for a swap. The device is confirmed to be a sample phone so it's info isn't in the database which is why I am not able to unlock the bootloader. Figure another week or so with this swap.
[Huawei Ascend Mate 2] D33PTHAWTE:
Uhhhh, that sounds like a problem for me. I've had mine since June. Sucks.
[Huawei Ascend Mate 2] :
Got an email back from Huawei.

Because my device is a Sample device they can't help.

Here is what their email said:

Dear Customer,

Thank you for contacting Huawei device.

Sorry that after checking, we can’t find any releasing record for this item.

So we can’t provide the relevant WIDEWINE KEY according.

Once again thank you for contacting Huawei device.

Best Regards.

Huawei Device Customer Care Team.
[Huawei Ascend Mate 2] ScoobSTi:
What does "sample device" mean?
[Huawei Ascend Mate 2] :
Best way I can explain it....?

Ever go to a store and mess with a phone on display? Think of that phone on display as a sample phone. A phone that hasn't been released, probably won't be released, and therefore is not accounted for in it's database with regards to distribution.
[Huawei Ascend Mate 2] ScoobSTi:
Ohhhh right. Wait, why would they sell that to you?
[Huawei Ascend Mate 2] joe.stone:
This is the standard answer from them, when I ask for bootloader unlock code for my mate1 they send me the same answer.

You can use the attached tools , to unpack and repack the boot.img (you will need mkbootimg binary , and python installed) . The umkbootimg will tell you the exact parameters needed to repack the correct boot.img . The repack-mate.pl needs modifications according to your device (base address) , if Mate2 is using the same OFF_RAMDISK_ADDR is 0x01400000 as Mate 1 I can upload the modified mkbootimg binary.
[Huawei Ascend Mate 2] :
I already modified my binaries from source.

https://github.com/ModdingMyMind/boot_manipulation
[Huawei Ascend Mate 2] Shaky156:
Edit: removed
[Huawei Ascend Mate 2] Shaky156:
I can get this to work, have successfully compiled TWRP for this device, but it boot until i get kernel source code for this device
[Huawei Ascend Mate 2] :
Don't need the kernel source for now. Grab the prebuilt kernel by unpacking the stock recovery.img. ;)

There is also the dt.img you have to deal with as well. Typically you should build the dt.img from scratch but it's also typically only required if you build a new kernel. Otherwise, grabbing the prebuilt kernel and dt.img would suffice.
[Huawei Ascend Mate 2] xordos:
Hi, I have tested a few recovery images shaky156 built, all the images flashed same as others, it won't boot into recovery. Thanks a lot Shaky156 for put such effort on our device.

During the testing, we did notice following error related to dt.img(dtb) if I run "fastboot boot twrp.img":

D:\ADB>fastboot boot twrp.img
downloading 'boot.img'...
OKAY [ 0.448s]
booting...
[COLOR="Red"]FAILED (remote: dtb not found)[/COLOR]
finished. total time: 0.577s

And Modding.MyMind, I have tried your recovery image as well, it throw same error.

And if I use the stock recovery image, it will boot into recovery successfully.

D:\ADB>fastboot boot recovery_mmcblk0p19.img
downloading 'boot.img'...
OKAY [ 0.537s]
booting...
OKAY [ 0.329s]
finished. total time: 0.870s

Any ideas?
[Huawei Ascend Mate 2] foltz61:
Delete
[Huawei Ascend Mate 2] :
Grrr, I wish you had mentioned that error to me earlier haha. Without the dt.img it won't boot. Will look in to it.
[Huawei Ascend Mate 2] :
[MENTION=3266877]xordos[/MENTION], you can confirm that the build I sent you actually says that the dtb cannot be found? I just unpacked the build image and it provided me with the kernel binary, device tree binary and the ramdisk.

Edit: if you do confirm it then I will have to look at the source and verify the values and offsets to make sure nothing is off which would interfere with the twrp build.
[Huawei Ascend Mate 2] xordos:
yes, I confirmed that... so far all the customized image we built has the same error:

D:\ADB>fastboot.exe boot HAM2TWRPRECOVERY.img

downloading 'boot.img'...

OKAY [ 0.458s]

booting...

FAILED (remote: dtb not found)

finished. total time: 0.545s

md5sum:

8323f4d855c6a62609682e0b5bb0eb44 HAM2TWRPRECOVERY.img
[Huawei Ascend Mate 2] :
Alright, gonna look at the partition sizes, and flash block size. Also will verify the kernel base, and mkbootimg args. Something "value wise" is not right or else it would find the dtb inside the twrp build.
[Huawei Ascend Mate 2] xordos:
[MENTION=5537766]Modding.MyMind[/MENTION], Thank you and feel free to PM me any image you feel worth to try. as long as it is less than 16MB. :D
[Huawei Ascend Mate 2] :
[MENTION=3266877]xordos[/MENTION], if you have busybox installed on your device then I need you to use the following command and share it either on here using the hide tags or in a txt file.

fdisk -l /dev/block/mmcblk0

"-l" <--- lowercase L.

fdisk is a command utility which is part of busybox. If using fdisk doesn't work then type busybox prior to fdisk.
[Huawei Ascend Mate 2] xordos:
fdisk -l /dev/block/mmcblk0

Disk /dev/block/mmcblk0: 15.6 GB, 15634268160 bytes
256 heads, 63 sectors/track, 1893 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes

Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 266306 2147483647+ ee EFI GPT

EDIT: Looks like fdisk doesn't support GPT, so I have downloaded parted tool, and get following info:

root@hwMT2L03:/ # /data/tmp/parted /dev/block/mmcblk0
/data/tmp/parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit B
unit B
unit B
(parted) print
print
print
Model: MMC MAG2GC (sd/mmc)
Disk /dev/block/mmcblk0: 15634268160B
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 17408B 541695B 524288B sbl1
2 541696B 574463B 32768B sdi
3 4194304B 4227071B 32768B DDR
4 8388608B 8900607B 512000B rpm
5 8900608B 9412607B 512000B tz
6 9412608B 15138815B 5726208B aboot
7 15138816B 16187391B 1048576B pad
8 16187392B 83296255B 67108864B oeminfo
9 83296256B 87490559B 4194304B modemst1
10 87490560B 91684863B 4194304B modemst2
11 92274688B 192937983B 100663296B fat16 modem
12 192937984B 197132287B 4194304B fsg
13 197132288B 197133311B 1024B fsc
14 197133312B 197141503B 8192B ssd
15 197141504B 230695935B 33554432B ext4 log
16 234881024B 301989887B 67108864B bkbootup
17 301989888B 310378495B 8388608B ext4 persist
18 310378496B 322961407B 12582912B boot
19 322961408B 339738623B 16777216B recovery
20 339738624B 608174079B 268435456B ext4 cust
21 608174080B 809500671B 201326592B ext4 cache
22 809500672B 813694975B 4194304B misc
23 813694976B 1887436799B 1073741824B ext4 system
24 1887436800B 8329887743B 6442450944B ext4 userdata
25 8329887744B 15634251263B 7304363520B fat32 grow
[Huawei Ascend Mate 2] gierso:
Mine is a sample mate2 but i got it to unlock bootloader as soon it was Out.. But i couldnt get a Code.for. your sample data and serial... I think the app broke big time but i cant get mine either anymore.. Same type_error

Enviado desde mi MT2-L03 HAM2 ... i'm lovin' it
[Huawei Ascend Mate 2] xordos:
pls check a few page back in another thread, write email to request unlock code, they reply in just a few hours

http://xdaforums.com/showthread.php?p=55481759
[Huawei Ascend Mate 2] xordos:
[MENTION=5537766]Modding.MyMind[/MENTION], finally we got some progress !!!

Probably you already know it, I google dtb and found this tool to extract the recovery image info:

http://xdaforums.com/showpost.php?p=45216474&postcount=2

In your image, I got following info:

Page size: 2048 (0x00000800)

Kernel tags address: 31457280 (0x01e00000)

Kernel size: 6127776 (0x005d80a0)

Kernel address: 32768 (0x00008000)

Ramdisk size: 4161333 (0x003f7f35)

Ramdisk address: 33554432 (0x02000000)

Second size: 0 (0x00000000)

Second address: 15728640 (0x00f00000)

dtb size: 4364288 (0x00429800)

dtb address: 0 (0x00000000)

Then I did following calculation:

start content size --> round up size

000000 header 800

000800 kernel 5d80a0 -> 5d8800

5d9000 ramd 3f7f35 -> 3f8000

//9D1800 wrong?

9D1000 dtb 429800 -> 429800

DFA800 end

I notice the dtb is started at 9D1800 incorrectly, it should be 9D1000.

So, I have deleted 0x800 bytes from 9D1000, so it now start with "QCDT" at 0x9D1000.

Then at the end, I noticed it missed 0x800 bytes, ",power_level.fm.....", so I copied that over.

So, the filesize is still same, but you know what, the dtb error is gone!!!

file size: 14657536 bytes

8323f4d855c6a62609682e0b5bb0eb44 HAM2TWRPRECOVERY.img

55f09b3f382cb0fc69072a5b45cb7c51 HAM2TWRPRECOVERY_fixDTB.img

But, now when it boots to recovery, the screen is messed up, please see attachment for screen shot.

I can see the messed up image changed a little bit at beginning, then I press vol +/-, didn't see any image move. Anyway, I hold power 10 seconds, and it reboot to OS ok.

Could you please take a look? I think we are very close now.

PS. I uploaded the new image here:

https://drive.google.com/file/d/0B-nJFDpWA4MdOHR2OTU2TFdUZjA/edit?usp=sharing
[Huawei Ascend Mate 2] Shaky156:
Hi I done that few days ago and noticed the incorrect offsets which is why i said request for source code, its much better with source code imo
[Huawei Ascend Mate 2] xordos:
Still I am not sure why all the images we built has the same problem, maybe its bug of the build tool? I think maybe because of my lack of this build knowledge, and lucky, play around these offset and it finally works. :)
[Huawei Ascend Mate 2] :
Yea, already looking at the offsets. I had already noticed the values are wrong. Good find and I agree with him that having the kernel source would be better but they haven't released it for some reason which they are obligated to do so.

---------- Post added at 08:40 AM ---------- Previous post was at 08:36 AM ----------

I don't have my computer on me right now, but will tackle this over the weekend.
[Huawei Ascend Mate 2] xordos:
A little bit more info about the non-working recovery in my phone.

Today I start to read TWRP recovery ( I use cwm before), and realized it has full touch screen control.

So I reboot into recovery again, it still shows those messed up lines, then if I touch the screen, the graphics changes. It is like basically the recovery is working, just the display (like mis-configured framebuffer) issue.

So, maybe it just the screen resolution, the phone is 720x1280, but do we need any special config since the phone only has soft button?
[Huawei Ascend Mate 2] 4L0M:
Hi xordos. TWRP doesn't need any hardware buttons. The whole of TWRP can be controlled through your phones touch screen.

For graphics Issue try flag :

DEVICE_RESOLUTION := 720x1280

Possible flags to help Graphics corruption :

TARGET_RECOVERY_PIXEL_FORMAT := "BGRA_8888"

TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"

TARGET_RECOVERY_PIXEL_FORMAT := "RGB_565"

Good Luck !

I've used a lot of Custom recoveries on various devices and TWRP is my favourite ( and seems to be the most reliable ! )
[Huawei Ascend Mate 2] :
[MENTION=4235172]4L0M[/MENTION] is correct. Thanks for the response by the way lol. Was at work. There is another flag as well that helps it if using the proper pixel format still doesn't solve the problem. I don't have my computer on me but I will double check the pixel format I chose for the build. I am pretty confident I used the correct one, and if so, then I will add in an additional flag to help support it some more. [MENTION=3266877]xordos[/MENTION], you should be getting another test build from me again this weekend in a PM so stay tune :).
[Huawei Ascend Mate 2] xordos:
Thanks all. can't wait....and I think we will finally make it.

something off topic, the stock rom actually has some nice goodies, like the battery heavy usage monitor, and data/wifi per app firewall.
[Huawei Ascend Mate 2] xordos:
can't help to show you guys what we achieved! pls press the thanks button under our devs in early pages, modding.mymind, and shaky156, and others. let's give them more time to double check and finalize all the configurations. This weekend will be a good weekend.
[Huawei Ascend Mate 2] ScoobSTi:
You guys are simply amazing. :good:

Makes me want to learn how to port a ROM! If only I had the time and experience.
[Huawei Ascend Mate 2] JJ2525:
So I'm definitely a novice in the modding area, but I'm assuming CWM/TWRP is the first step to custom roms on the AM2? If so, that's awesome.

Great work!
[Huawei Ascend Mate 2] oncouch1:
Thank you to all who are working on this project!

I can't wait for completion, I got delete happy and corrupted a few things. Hopefully someone will post a system image.

Now I just need to find a good phone provider.

On a side note I am sure you saw this post

http://xdaforums.com/ascend-mate2/help/mt2-l03-emui-3-0-update-t2882863

it has a link to kernel source for those that know what to do with it. That is if it truly is for our model.

All credit should go to mwohowm who found it! I just transfered info.

I once again Thank you xordos as I grabbed the files, what a great community.
[Huawei Ascend Mate 2] xordos:
Wah, Thanks for the info! yeah, it is kinds of weird they post kernel source in that place...If indeed it is L03 kernel source then it will be a big help.

I monitored their official location http://consumer.huawei.com/en/support/downloads/ for a while, but MT2-L03 always return empty page.

P.S., regarding the System partition, I do have a system file uploaded, it is taken after it is rooted, it is file level zip, not dd image:

https://drive.google.com/file/d/0B-nJFDpWA4MdSE9vN0Z2YXFhMkk/edit?usp=sharing

[MENTION=5537766]Modding.MyMind[/MENTION], [MENTION=4802595]Shaky156[/MENTION]
[Huawei Ascend Mate 2] :
That is the kernel source I have been looking for. Thanks.
[Huawei Ascend Mate 2] :
Got my laptop back in my possession. Working on TWRP again :).
[Huawei Ascend Mate 2] :
[MENTION=3266877]xordos[/MENTION], check your inbox.
[Huawei Ascend Mate 2] :
TWRP should be released tonight :). Stay tuned!
[Huawei Ascend Mate 2] ecvision:
Thank you for your time and efforts
[Huawei Ascend Mate 2] oncouch1:
You people are AWESOME!!! Keep up the good work.
[Huawei Ascend Mate 2] good_apollo:
so i am new to this. i deleted the live wallpaper system app that came with the mt2-l03. any idea on getting a new one?
[Huawei Ascend Mate 2] Kid_Ding:
You will need a root browser that can modify permissions. I suggest ROM toolbox

https://play.google.com/store/apps/details?id=com.jrummy.liberty.toolbox

Copy the missing apk and odex file to system/app

https://docs.google.com/file/d/0B4DMhed-iRMVTmtFUFdMQVlQRGs/edit?usp=docslist_api

System app permissions as followed
[Huawei Ascend Mate 2] good_apollo:
i have rom toolbox. i see the files i need to download, but i'm not sure what you mean copy them to system/app.

also, what is that picture system app permisions?

if that is rom toolbox, i have no idea how to get there.

sorry, like i said, i'm new to this.
[Huawei Ascend Mate 2] superbass311:
Is this also going to unlock the bootloader? or will they still need to email mobile@huawei.com to get the unlock code?
[Huawei Ascend Mate 2] :
No, the bootloader will still required to be unlocked.
[Huawei Ascend Mate 2] superbass311:
Can you please answer this for me. I already am rooted and loving it. After getting my unlock code all i did was install towelroot and click root then install SuperSU from the play store. What is the difference with what is going on here? Basically you guys are creating a special recovery (TWRP) so you can install other roms? Forgive me if my question is stupid. Just trying to clarify.
[Huawei Ascend Mate 2] :
TWRP stands for TeamWin Recovery Project. It is a custom recovery built from open source with use of either CM or OmniRom. I am currently using OmniRom 4.4.4 to build TWRP. It allows you to backup your device, restore your device, modify your device, and so forth. What your stock recovery cannot do, TWRP in short, can.
[Huawei Ascend Mate 2] :
Sorry for the delay fellas. My computer is being slow on building TWRP for it's final confirmation. Once it is done and I send it up for confirmation with positive feedback then it will be released immediately. Just waiting on my computer right now...
[Huawei Ascend Mate 2] :
Have at it. It's been released.

http://xdaforums.com/showthread.php?t=2885144
[Huawei Ascend Mate 2] xordos:
Thanks Modding.MyMind for all the hard work, really appreciate it!!!

Finally our beloved MT2-L03 have recovery...
[Huawei Ascend Mate 2] :
My friend, thank you. You have been a great deal of help since I couldn't get proper access to the device. You were my eyes and ears in that regard. Many thanks bro.
[Huawei Ascend Mate 2] pucherto123:
ok, I cant seem to be able to install TWRP, I boot into bootloader type in the command and it tells me "devices not found" whats up with that?
[Huawei Ascend Mate 2] xordos:
whats your phone model, and is the bootloader unlocked or not?

if the bootloader is unlocked by running fastboot command. then you should be able to run the same command. maybe check you usb connection.
[Huawei Ascend Mate 2] pucherto123:
Never mind like I said b4 I'm a noob, was expecting to see an actual app for TWRP sorry
[Huawei Ascend Mate 2] pucherto123:
Does anyone else have problems using the USB cable that came with the phone?when I plug mine it will charge but will not give me an option to mount as storage, I have 2 mate 2 and both do the same. (US version BTW) I have 2 computers and the same on both. To do the rooting and installing twrp I had to use an old HTC USB cable I had
[Huawei Ascend Mate 2] xordos:
No problem with mine. Actually I prefer this one when I do all the mat 2 flashing. It is a little bit tight so need a little force, but it is higher quality compare to my others cable.
[Huawei Ascend Mate 2] superbass311:
Same thing with me. It's a little snug but works on Windows 8.1

---------- Post added at 04:26 PM ---------- Previous post was at 04:25 PM ----------

Take a screenshot of your USB drivers under device manager for me
[Huawei Ascend Mate 2] good_apollo:
Hello all.

I have a large problem. After using ultimate navbar

My ham2 will not boot. It goes to the fist HUAWEI screen that has their logo and says powered by android. After that it just goes Black. If I press the power button, it vibrates. I tried factory data reset, but it didn't help.

Any ideas?
[Huawei Ascend Mate 2] Kid_Ding:
Backup your current ROM with twrp. Then follow [MENTION=3266877]xordos[/MENTION] thread on restoring. Actually first use twrp to clear cache and dalvik cache. Reboot, see if that works first.

http://xdaforums.com/showthread.php?t=2886630
[Huawei Ascend Mate 2] superbass311:
Grab one of the restores a few threads up and restore using adb
[Huawei Ascend Mate 2] good_apollo:
unfortunately, the instructions to install twrp do not make sense to me. sorry, never had a problem like this before and i have never used twrp. am i supposed to install it on my pc or my phone?
[Huawei Ascend Mate 2] Kid_Ding:
So can you get to settings? Or nothing is accessible? Did you factory reset via the stock recovery?
[Huawei Ascend Mate 2] good_apollo:
i used the factory reset. i can boot into android system recovery.
[Huawei Ascend Mate 2] Kid_Ding:
Then it sounds like your best option is to study the thread on restoring the backup made by xordos. Your system has failed to boot up properly. Did you install anything else aside from dynamic nav bar? Or uninstall any system apps?
[Huawei Ascend Mate 2] good_apollo:
good news. i took the phone back to frys and played dumb. got a new one. i have learned my lesson of not making a backup. time to experiment on my samsung before i continue with this process.

i appreciate the help.
[Huawei Ascend Mate 2] :
You may want to learn more about TWRP or custom recoveries in general for future reference. ;)
[Huawei Ascend Mate 2] Kid_Ding:
You got lucky! But like [MENTION=5537766]Modding.MyMind[/MENTION] said, its good to know. You will need to in order to make a proper backup for restoring.
[Huawei Ascend Mate 2] good_apollo:
Yeah, im trying to figure that out right now.
[Huawei Ascend Mate 2] superbass311:
re-root

disregard. fixed...
[Huawei Ascend Mate 2] foltz61:
I tried to install some app backups in TWRP from a Titanium Backup update.zip. It runs like it is successful but sits at "rebooting in 5 seconds". After forcing the reboot, the apps weren't installed.
[Huawei Ascend Mate 2] superbass311:
which app backups are you trying to install?
[Huawei Ascend Mate 2] foltz61:
I tested with some apps I backed up before switching to the Mate 2. They are text edit and note me.
[Huawei Ascend Mate 2] superbass311:
unfortunately I never heard of both. (lol). If you don't mind. How did you back them up originally? When I backup using Titanium Backup I backup from the app itself not TWRP. how come your not restoring that way? It may be a stupid question but i'm curious. Also what recovery did you have on your last phone? I just want to fill in the blanks. You can of course send me the file and i will be more then happy to try and restore it.
[Huawei Ascend Mate 2] Kid_Ding:
If they are backups from a different device, use the same app to backup and restore, device to device.
[Huawei Ascend Mate 2] foltz61:
They were backed up with Tiatanium Backup on my GS2. Titanium isn't working correctly for restores and backups on the Mate 2. I decided to give the update.zip method from TiBu a shot. It always worked on my GS2 with TWRP. If you have the paid version of TiBu, you should be able to create a zip and try it. If not, I'll make one for you.

---------- Post added at 03:03 PM ---------- Previous post was at 03:00 PM ----------

I've always been able to cross restore user apps from my devices.
[Huawei Ascend Mate 2] Kid_Ding:
try helium

https://play.google.com/store/apps/details?id=com.koushikdutta.backup
[Huawei Ascend Mate 2] foltz61:
Thx for the suggestion but, I have things from my old phone that were backed up with TiBu that I need. I'll just have to hope this gets fixed. I don't have the old phone to do a helium backup on.