yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] Mysteryagr:
TWRP 3.1.1-0 recovery port​

Disclaimer

/*
* Your warranty is void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/

Hello Motorola Moto C owners,

I have ported a twrp recovery for Moto c - namath - xt1754

from Doogee x5 pro, credits for snowcat4pda

Another one from Moto E4 (See second post).

Instructions:

The only way to install a recovery on a device with a locked bootloader is to unlock the bootloader first, so you can unlock it and simply flash the recovery.

Or...

I'm going to show you step by step instructions to flash the recovery WITHOUT unlocking the bootloader or lose any data.

1. Download and extract my ported recovery from here --> DOWNLOAD.

2. Open SP flash tool and load download agent "DA_SWSEC_6737m_98736_71604.bin" - from the previous zip.

3. Load the scatter-file found in the recovery you previously extracted and select preloader only, but don't flash it.

4. Click Alt + Ctrl + V to activate advanced mode in sp flash tool.

5. Click on "window" up there and select "write mode"

6. Change the address to "0x2d80000" and click on "file path" and choose the recovery.img

7. Click on "write Memeory", then Power off your device and wait until it vibrates and connect it to your pc.. wait until it finishes and now your recovery is ready, you can root your device or do whatever you want.

Just remember! Your are doing this at your own risk, I take no responsibility for bricked devices, have fun. :P

Credits:

- Me for porting the recovery.

- Snowcat4pda for building it.

- This guide on youtube that I used as a base for mine.
[Miscellaneous Android Development] Mysteryagr:
I noticed that SD card formated as internal (Adoptable storage), doesn't work on TWRP ported from Doogee x5 pro, it is the only bug btw.

So I ported another TWRP from Moto E4 by Zormax to Moto C

- Download from here: https://drive.google.com/file/d/1gBgi6BgQMipqshYTd3qXrDyKk5Hk-l4t/view?usp=drivesdk

- Bugs : Screen splashes several times in white while the recovery is booting.

Another one ported from Moto E4 plus also by Zormax

- Download from here: https://androidfilehost.com/?fid=962021903579491710

- No bugs at all
[Miscellaneous Android Development] Mysteryagr:
Screenshots
[Miscellaneous Android Development] iykeDROID™:
Welldone at last.

keep rocking
[Miscellaneous Android Development] rudi021:
Moto c Plus

Mysteryagr.excelent job.finally my dreams come true.Bravo bro. one question can i use on plus or need to port? one again bravo...:good::good::good::good::D:o:o:o
[Miscellaneous Android Development] Mysteryagr:
Thank you Nana :good: :fingers-crossed:
[Miscellaneous Android Development] Mysteryagr:
You need to port the recovery and search your scatter file for the address of the recovery.img
[Miscellaneous Android Development] AndroidCUT:
getting error

Keep getting the error "load pre-loader or DSP _BL" whenever I press "write memory, what should i do? :confused:

EDIT: Nevermind got it! :)
[Miscellaneous Android Development] Mysteryagr:
Tutorial updated with pictures
[Miscellaneous Android Development] jagannv:
Does this work for Moto C XT 1755?

I have a Moto C XT 1755. Does this work for 1755 too?
[Miscellaneous Android Development] Mysteryagr:
It is namath, then yes ;)
[Miscellaneous Android Development] jagannv:
How do I unlock Moto C. I tried the following steps

adb reboot bootloader

fastboot oem get_unlock_data

but i get failed unknown command

FAILED (remote: unknown command)
[Miscellaneous Android Development] Mysteryagr:
Go to Motorola website and get your unlock code, you can't just unlock the bootloader like this!
[Miscellaneous Android Development] Mysteryagr:
Did you change the address mentioned in step 6? You have to change it with the right address from your scatter file.
[Miscellaneous Android Development] Mysteryagr:
Then I don't know why it is not working for you, sorry.

If your phone is not working, reflash stock firmware.

For the recovery, try another way; unlock the bootloader and flash recovery using SP flashtool normally.
[Miscellaneous Android Development] Mysteryagr:
Maybe [MENTION=6187725]rudi021[/MENTION] can help you, he owns Moto C plus and had a case which may be like yours.
[Miscellaneous Android Development] Mysteryagr:
He already did, he ported my roms too.
[Miscellaneous Android Development] jagannv:
I tried following your steps, but stuck on step 7. I click on write and then switch off the phone and connect to usb. But nothing happens. SPFlash Tool does not seem to detect the phone.

I tried connecting from a Windows VirtualBox on my Mac and also from a dedicted Windows machine. Both of them failed detecting the switched off phone during the write step.

What am I doing wrong?
[Miscellaneous Android Development] Mysteryagr:
You need to install proper drivers
[Miscellaneous Android Development] hanz747:
Hi, do the same instructions apply to the 4g dual sim variant (xt1758)?? Thanks
[Miscellaneous Android Development] Mysteryagr:
If it is namath then yes, but firstly check your scatter file to make sure recovery.img has the same address.
[Miscellaneous Android Development] HB72K:
tnx

NO WORKING MOTO C XT1756

SP_Flash_Tool_exe_Linux_v5.1520.00.100

1 dowload https://mega.nz/#!CplBWAqK!XwbdQ92EkxvCSOuUmuf1phR2vBcAHpimLEiNOHWaW9k :good:

2.- extrac

3 install dependencies

sudo apt-get update && sudo apt install libusb-dev unrar libqtwebkit4 gedit

4 follow the instructions in this guide

https://xdaforums.com/general/rooting-roms/tutorial-how-to-setup-spflashtoollinux-t3160802

cd flashtool

sudo su

chmod +x flash_tool.sh

./flashtool

working fine 7u7r

https://mega.nz/#!CplBWAqK!XwbdQ92EkxvCSOuUmuf1phR2vBcAHpimLEiNOHWaW9k
[Miscellaneous Android Development] :
how did you manage to extract the stock files? I need to extract some files for backup in my model moto c plus XT1726

---------- Post added at 03:05 AM ---------- Previous post was at 03:04 AM ----------

if Motorola launches any new update knows.. ._.
[Miscellaneous Android Development] :
the boot and recovery files that you put are the same as my stock ROM, what is your model? mine is xt1726 ?
[Miscellaneous Android Development] :
vlw bro but your model is not the same as mine, my model is the mot c plus xt1726 1GB of RAM, 4G dual sim and 8GB of memory, I think it would not work with my model kk but vlw to try
[Miscellaneous Android Development] Esukho:
I used a guide to root my engine, but unfortunately it does not work anymore from memory write. Is the problem because my SD is formatted as internal?

Here the guide

androidcut.com/2017/12/01/root-install-twrp-moto-c-xt1754/
[Miscellaneous Android Development] macapa1994:
works on XT1757? (dual sim LTE, 8Gb, 1Gb ram)
[Miscellaneous Android Development] @kitokit:
Reserved
[Miscellaneous Android Development] amgdnwo:
I tires with xt1758 (namath) but got the following error message:

Does it mean cannot be done with this device?
[Miscellaneous Android Development] sagargjasani264:
Hello sir... I am trying to flash twrp on one another device mt6750.. But i dont have scatter file... So can u explain how u got that address to flash i mean that 0x2d900000
[Miscellaneous Android Development] campinoxd:
Hi. Does it work for xt1756?

Do I need any specific file to do it?

Thanks
[Miscellaneous Android Development] Mysteryagr:
Read the previous comments
[Miscellaneous Android Development] Mysteryagr:
Download your stock rom and get the scatter file, the other choice is to read back the firmware (Requires box, so not easy for you).
[Miscellaneous Android Development] AdwayPratap:
Which driver are you talking about?
[Miscellaneous Android Development] Mysteryagr:
It is obvious that when you want to flash any phone, you need its drivers for the falsh tool to detect and flash it.

Install proper SP flash tool drivers; VCOM and preloader drivers for MTK.
[Miscellaneous Android Development] Jeronimo713:
Question

Hi. Does it work for xt1757?

Thanks.
[Miscellaneous Android Development] Mysteryagr:
If it is namath, then yes ;)
[Miscellaneous Android Development] amgdnwo:
Thanks a lot, this works great !!! :good:
[Miscellaneous Android Development] enjoy10:
Would this version of TWRP work for Moto C XT1750 as well ?
[Miscellaneous Android Development] chop_tomatoe:
after i click "write memory" and connent moto C via USB cable, message pops up: "chip type not match, target chip type is: MT6580, load scatter chip type is: MT6737M

my phone is moto C namath, XT1750, 1GB ram, 8GB flash, 3G

confused, is there more versions of namath?
[Miscellaneous Android Development] chalofito:
[MENTION=4796617]Mysteryagr[/MENTION] Hi mate.

What options do you recommend to select for the backup? :confused:There are too many options, in advance thank you.
[Miscellaneous Android Development] Zero57:
select all the options so you have a copy of all your android :D/ selecciona todas las opciones para que tengas una copia de todo tu android :D
[Miscellaneous Android Development] chalofito:
will you know how to add the Spanish language?
[Miscellaneous Android Development] Palugula uday:
I too have this problem

Keep getting the error "load pre-loader or DSP _BL" whenever I press "write memory, what should i do? :confused::confused::confused: plz help me
[Miscellaneous Android Development] :
Derp, should have read the instruction about using DA_SWSEC_6737m_98736_71604.bin instead of the All in One preloader. I used WwR_MTK_2.40_Eng to create a scatter and then after producing a full backup [Tutorial] How to use Wwr_MTK + SP Flash tool to backup Mediatek rom
[Miscellaneous Android Development] Virgo Sun:
will it work for moto c 4g?
[Miscellaneous Android Development] LinuxPanda:
It should work. Else try the following.

https://xdaforums.com/android/development/recovery-twrp-3-1-1-0-themed-moto-c-t3713279
[Miscellaneous Android Development] penyihir20:
Thanks Bro... works perfectly fine on my Moto C XT1755...

Have problem at first, PC cannot recognize Moto C after turn off... :eek:

then it got me thinking again, it could be Driver.. :confused:

Yes, it is.. I have to install driver first.. I use VCOM Driver mt65xx... and Viola... :victory:

Thanks :angel:

P.S.: In case it doesn't recognize after turned off, try turn it off while pluged usb in...
[Miscellaneous Android Development] Virgo Sun:
possible to reverse back to Stock ?
[Miscellaneous Android Development] LinuxPanda:
I think, you have to flash stock ROM using sp flash tool. I'm not sure though since I don't use stock.
[Miscellaneous Android Development] Virgo Sun:
How to get rid of "your device has failed verification"

Or how to return to stock recovery ?
[Miscellaneous Android Development] Virgo Sun:
Hello

Is it a bug

Can not enable USB Debugging any more "Because an app is obscuring"

Have tried all method to no avaiable

Turn off all "draw over other app"

Turn off all "accessibility"

Any thing else?
[Miscellaneous Android Development] kingArshan:
hey man quick question the preloader currently on my moto c xt1755 is wt98736b32_aa1 and the preloader you have is wt98736b32_ba1 (the difference in aa1 and ba1) if i flash this and write memory of the recovery you provided (twrp 3.1.1 for moto c) will it work. or will the new preloader **** up my device??
[Miscellaneous Android Development] kingArshan:
hey man i have a question. i have a moto c xt1755 with preloader wt98736b32_aa1 currently. the scatter files you gave were with preloader wt98736b32_ba1. should i still write the data (the image i mean which you gave, i.e twrp 3.1 for moto c) and will it work? or will the different preloaders **** the device up.

update: i tried doing it. but the download bar dosent progress. nothing happens. i tried numerous different ways. with battery on and off in download mode. nothings happening. HELP! :(
[Miscellaneous Android Development] TheGame455:
Make sure you have the MTK Preloader drivers installer, turn off your phone and remove the battery for 5 seconds and then put it back again, now press "Download" on SP Flash Tools and connect your phone to your computer (make sure you're using the right Download Agent). If it says something about the device being a "secure base-band chip", press CRTL+Alt+S and where it says "Authentication file" load this file https://drive.google.com/open?id=1x62gIPVsGaJ_ONMF78NL2mhBNzBCevum.
[Miscellaneous Android Development] chalofito:
Is there any way to install TWRP, then root, and return to recovery stock again?
[Miscellaneous Android Development] TheGame455:
Flash the TWRP recovery and keep the stock "recovery.img" in an SDCard, enter TWRP and root using your favorite method, then go to "Install image" at the bottom of the install section and select the stock "recovery.img" mentioned before and flash it, after restarting you should have the stock recovery back with the phone rooted.
[Miscellaneous Android Development] awesomehmnt?:
how to fix this
[Miscellaneous Android Development] TheGame455:
Go to the "Download" tab and tick the "preloader" partition, then try to Write Memory again.
[Miscellaneous Android Development] Zero57:
s

investigare un poco sobre el tema y vere si consigo agregarlo
[Miscellaneous Android Development] WoltzBR:
Hi, I have a moto c xt1754. I would like to know if it is necessary to unlock his bootloader to do root or install roms, because in the website of motorola says that the moto c need not unlock. Taking advantage ... wanted to know if there is a way to do root in it without needing a pc.

Sorry bad english. By Google Translator xD
[Miscellaneous Android Development] TheGame455:
Because if you flash the recovery you need to boot it after the flash and not boot the system first, if you do that, the system will overwrite the TWRP recovery with the stock one.
[Miscellaneous Android Development] carlosalvatore:
You were right, I powered on my phone pressing: Vol down + Power, to enter recovery/fastboot menu; there I selected recovery. Thus, TWRP was available.

Thank you.

Now I will try to install SuperSU using TWRP. from mi sdcard.
[Miscellaneous Android Development] carlosalvatore:
Update: Everything is working Ok now.

Thank you.

I rooted my phone using TWRP to flash SuperSU. I ran into some troubles with random crashes of Chrome and other apps after wiping dalvik/cache partitions. I solved it by uninstalling updates of Google apps (Chrome, Calendar), specially Google Play Services and Google Play Store. Once they restarted and were reinstalled everything worked very good.
[Miscellaneous Android Development] TheGame455:
You should use Magisk, since SuperSU isn't supported or updated anymore.
[Miscellaneous Android Development] carlosalvatore:
I didn't know that even existed! Thank you again.
[Miscellaneous Android Development] carlosalvatore:
[Solved]

Any suggestions for replacing SuperSu with magisk in a safe manner?

I cannot use my bank app since rooting.

When I tried to flash magisk from TWRP it gave me an error message and stops.

Thanks in advance.

EDIT: I managed to install Super SU system-less and then suhide. The app is working again.
[Miscellaneous Android Development] Elizeu7771:
Hi, guys , help me, I need to change the rom of my cell phone tomorrow for a custom rom, but I'm not finding it at all for the Moto C xt1750, Android Nougat version, I found here only one such MOJ O, but not I know if it is the model of this device, please help me!
[Miscellaneous Android Development] Some_user:
I need help.

Im getting error witch says i need authentication file!Can you help me?:confused:
[Miscellaneous Android Development] carlosalvatore:
Sometimes that happens, click OK and try again, it won't ask for it.
[Miscellaneous Android Development] renansoria:
My phone it's in bootloop

I was getting an error on Google play services

Went to setup an click on recovery

And get stuck on a boot loop

I even try to install a custom rom using twrp

But keep restarting on twr

Tried the console command

if gg=/dev/Zero of=etc

But didn't do anything helpful

Can I reinstall stock rom with spflashtool

It's there a way to install stock recovery again
[Miscellaneous Android Development] TheGame455:
Authentication files!

For anyone who needs the authentication files for flashing the Moto C 4G/C Plus through SP Flash Tools here they are!

I've attached a zip file that contains two .auth files (one for the Moto C 4G and the other for the Moto C Plus), but here's an external download link in case attachments don't work correctly for you.

https://yadi.sk/d/m6-ui6_93YyKxU

Many thanks to Zormax and mishadulev on 4pda for providing these!
[Miscellaneous Android Development] albar64:
trwp

hello will serve for the xt1750:good:
[Miscellaneous Android Development] ac97_4pda:
Hi guys. After update to NRD90M.062(GPS Fix). SP Flash Tool doesn't connect to phone. Brom error 0x1.
[Miscellaneous Android Development] Some_user:
You arent the only one.

Hi buddy,Im having the same error:rolleyes:.Im working hard to find a fix.

Please infor me if you find anything.

GOOD LUCK

---------- Post added at 07:08 PM ---------- Previous post was at 07:00 PM ----------

Its possible to flash TWRP onto Moto C(after update)

I installed twrp and flashed magisk(I found few errors,when i tried to factory reset,i got stuck in twrp loop[twrp booting instead of os])

So yeah,be prepared to face those errors.

#ps:

Make sure you remove battery before plugging in phone(If you want to risk).
[Miscellaneous Android Development] Some_user:
Mod,please delete this post.

IDK how to delete this post:D:D:D:D
[Miscellaneous Android Development] Some_user:
Twrp loop fixed

You should just flash firmware update. It's that simple.
[Miscellaneous Android Development] LuisFernando1:
Load preloader or DSP_BL

I'm getting same error when trying to root a Motorola C xt1750

Is preloader_wt98737.bin missing in download package?
[Miscellaneous Android Development] Pichu Pichu:
Hello!

My Motorola Moto C phone won't boot into System OS. Whatever I do (turn it off, take out the battery, put back the battery again) it will only boot to TWRP.

What happened? Well I must have made one awful mistake: I tried to restore to factory (stock) from the System menu like every other ordinary non-rooted non-flashed phone.

And so I thought why not use TWRP to install a new OS so I tried LineageOS, followed the instructions and everything, but even after I'm done I still end up booting into TWRP!

Last I tried installing TWRP again, followed the instructions literally, but still can't boot into any OS.

I also tried several "dd if=/dev/zero something" commands or something like that to no avail.

Any help would appreciated.

Thanks in advance.
[Miscellaneous Android Development] Some_user:
Fix

Hello Pichu Pichu,

I've had the same problem a few months ago. The fix for this issue is simply flashing the firmware. If you need any further help, feel free to contact me.
[Miscellaneous Android Development] Pichu Pichu:
Hi, Some_user! Thank you for your prompt reply.

I tried flashing the stock firmware I got from androidfilehost and selecting the file DA_SWSEC_NAM.Moto-XT1754_XT1755_XT1756.bin I got from kurdishfirmware.

First I went to the Format tab and ticked the validation box and format whole flash except bootloader. Format Ok.

Then I wen to the Download tab and using Download Only I selected the Scatter-loading File included in the stock files. Everything but preloader selected. Download Ok.

When I tried to turn on my phone, it didn't. So I was like "hmmm maybe I should redo the steps again. I carelessly did the format thing again without ticking the validation box and leaving Format whole flash ticked!

Now whenever I wanna do any operation the following message pops up lS_AUTH_HANDLE_IS_NOT_REASY(5000) This is a secure Base-band Chip! Please select the authentication file first.

So apparently I screwed up.

Is there anything left to do other than resign myself to the loss of this phone?

SOLUTION

Apparently the Download-Agent didn't match the Authentication File.

What to do?

Well, I downloaded SP Flash Tool version 5.1628.00.

I opened the tool (as administrator) and in Download-Agent I selected MTK_AllInOne_DA_6737m_98736_71604.bin (the file was included in the tool foolder).

I pressed "CTRL + ALT + S" and Auth File button became visible.

I clicked it and selected auth_sv5_LenovoNamath.auth (which was included in the tool folder).

But, before I forgot, where's the Scatter-loading File?

Oh, yes. I chose MT6737M_Android_scatter.txt which is included in NAMATH_56_NRD90M.046_subsidy-UNLOCKED_CFC.zip that I got from androidfilehost.

I left all the boxes checked and also Download Only.

To my surprise, it worked!

After the Download Ok prompt, I disconnected the device from the PC, put the battery back on and turned it on.

To quote Back To The Future, IT'S ALIVE :laugh:!

NEW PROBLEM

My IMEI is now 0000000000000.

I've been looking about, but so far none of the posted solutions here worked.

So if somebody else got around this issue, please let me know.

Thank you so much for reading this. I hope it's of use to anyone.

Cheers!
[Miscellaneous Android Development] Some_user:
Hello, Pichu Pichu

I'm glad that you've fixed the problem. Anyways, could you provide steps you've taken to fix the IMEI (if you haven't fixed the issue yet)?

ps: Sorry for the delay, I've been having a few problems recently.
[Miscellaneous Android Development] dankcuddlybear:
I still can't get this to work, despite trying different versions of SP Flash Tool, installing drivers from Motorola's official website, reinstalling Windows and trying other tutorials.

First problem I had was that SP Flash Tool refused to use DA_SWSEC_6737m_98736_71604.bin (I don't remember the exact error message) but I found an option in the settings to disable checking the file. Then when I tried again, I got this error:

ERROR : S_AUTH_HANDLE_IS_NOT_READY (5000) [User] This is a secure Base-band Chip! Please select the authentication file first.

So I downloaded auth_sv5.auth from this thread and tried again, but now I get this error:

ERROR : S_SECURITY_SEND_AUTH_FAIL (6029) , MSP ERROE CODE : 0x00

This time there's no information. I looked up the error and this site said it's because the files can't be authenticated.

Can anyone help me with this? Also [MENTION=4796617]Mysteryagr[/MENTION] (OP) if you see this can you tell me what exact version of SP flash tool you were using for this tutorial? Thanks

EDIT: I noticed the screenshots are from Windows 7, but I have Windows 10 installed. I still have a Windows 7 license. Should I try? Only as a last resort though because it will take forever to install and will probably mess up my existing Windows installation.

EDIT 2: My bootloader is still locked (probably). I enabled "Allow bootloader unlocking" in developer settings, but I haven't even been able to get an unlock key yet because fastboot doesn't work. On Windows it gets stuck on "Waiting for devices" and on Arch Linux the command fastboot oem get_unlock_data returns FAILED (remote: 'unknown command')
[Miscellaneous Android Development] TheGame455:
You can't unlock the bootloader on this device, it isn't like other Motorola devices. I suggest you try the DA with the MTK_AllInOne_6737m prefix as that's what I used to do when the DA_SWSEC one wouldn't let me flash anything.

Also the Windows version shouldn't make any difference at all, it either works or it doesn't. Sometimes connecting while keeping the vol down button pressed also works.

The one time this happened to me I solved it by reflashing the stock firmware but your case may be different.
[Miscellaneous Android Development] Shahariar Sabbir:
Followed all steps but when I boot into recovery i didn't see TWRP . It was not installed??
[Miscellaneous Android Development] BrayH:
Can you port another DA file because on my PC it says the LIB DA does not match
[Miscellaneous Android Development] faksziti:
This instruction is a peace of cr....p . Screenshots don't match to the files. These dayes there should be a movie with allsteps shown on video.