yashsingh1/xdaforums huggingface dataset:
[Motorola Atrix HD] Gorrillasnot:
I can get into the phone and all functions work except making calls. When I put in a sim I get an error message saying subsidy locked. contact service provider. Only emergency calls can be made. and there's a button that says dismiss, but there is no where to put in a code.

When I flashed the stock firmware the only 2 lines I removed were the 2 "getvar" lines because rsd lite will not flash with those lines left in, so I am assuming that everything got flashed including the NON-HLOS.bin, but just to make sure I flashed just the NON-HLOS.bin as sugested by audit13 and it still says the subsidy lock message.

I have searched the web for several days now and it appears this is some kind of permanent lock. Older Atrix, Atrix 2 phones I read you could flash Brazil radios and it would work but I have found no mention of any success on the Atrix HD.

For a somewhat aging, but still very useful phone you would think there would be some kind of work around for this by now. ugh! :(

thanks
[Miscellaneous Android Development] Deleted member 5186178:
1. Root the phone.

For this step I choose to use Framaroot.apk, first because I don't like to install unnecessary software on my computer, and second because it supports a very large number of MTK phones. So, go to alephzain's thread and download the apk, then connect your phone to PC with USB debugging enabled, turn on USB Mass storage and copy Framaroot.apk to your sdcard root, or in internal storage if you don't have a sdcard in your phone. Eject phone's USB storages from PC, and turn off USB Mass storage from phone.

Go to apps drawer, find File Manager, open it, navigate to location where you placed Framaroot.apk touch on it and install it. After that go back in apps drawer and open the newly appeared Framaroot. In that window you have to specify which exploit to use for getting root access. If you don't know it's not a problem, you can try each one until you see the Success message (for me was Barahir). If none of them works, then you have to find a different method to root. After success patching, reboot the phone and then you will see SuperSU.apk in your apps drawer. Now you have root access!

2. Install a Root Explorer.

I prefer ESFileManager, but you can choose what you like. This can be installed free from Playstore, or if you have it downloaded in your PC, use same steps as in Framaroot case, and install it.

Then open the app and let's activate the Root Explorer in it.

But, here you can choose a different view style instead of default big icons - I like Medium Icon view.

Touch on Globe symbol from upper left corner to open Advanced Tools menu, and select Tools (last one). In the list that opens, scroll down until you see Root Explorer entry and touch "OFF" button to activate it. You will be prompted to Grant Superuser access - Grant it! Then, touch on "Root Explorer" text and in the popup window select Read/Write, and in next window select all radios from RW column.

That's it, ESFileManager is now a powerfull Root Explorer.
[Miscellaneous Android Development] Deleted member 5186178:
3. Make a backup.

This means actually make two backups, one for nvram and one for the whole stock ROM. Why to make a backup for nvram? Because it is very easy in MTK phones to mess up with it, and you may loose IMEI, mac address or to have other connectivity issues. This backup will be your insurance.

For this you need MTKDroidTools. Download it from rua1's thread (link in OP) and unzip it in a folder named "MTKDroidTools" on your primary (system) partition - this is important, and in other locations you may experience errors and malfunction.

Connect your phone in usb debugging mode to PC, then start MTKDroidTools as administrator and wait untill you see that MTKDroidTools recognize it and loads its data. The following pictures will show you how to check if you have usb debugging activated, and how MTKDroidTools looks with loaded phone data. In most of the phones, adb gets root access immediately, but in some "branded" ones that has to be achieved by click on the "ROOT" button next to "Adb Terminal" - Notice that if you don't see that ROOT button, that means you have already "root in shell". Also, if you have chainfire's SuperSU you will be prompted in the phone to grant root access to adbd, but if you have koush's Superuser, adbd gets root access by default.

Now, as I said first thing is to do a nvram backup. Click on "IMEI/NVRAM" button and next select both methods (bin and zip folder) and click on "Backup".

After that, it's time to do a stock ROM backup. This is important if you are going to try different custom ROMs and modds. This will assure you that you always have a way to start from the beginning in a clean state. Also makes easy to unbrick your phone if you have the misfortune to brick it.

Click on "root,backup,recovery" tab, and click on "Backup" button, then wait to finish. Be patient, this will take a while, and you can see progress logs in side window. At the end, a popup will prompt you to pack the backup. Now you know it is finished. I don't pack these backups, but you do what you think.

In this stage first thing I do is to generate a scatter file. You have one in that backup made before, or you can get one from stock firmware archive if the phone's manufacturer provide that, but let's see how to do it as it is, to understand the process, or to learn how to get one if we loose it or we are unsure if the one we have is good for our phone (this is important, because using a wrong scatter file it may damage your phone).

So, return to "Phone Informations" tab and click on "Blocks Map" button. A window opens with your phone partition structure. Click on "Create Scatter File" button and save it somewhere in your computer.

Mission complete for backup; you are assured now.
[Miscellaneous Android Development] Deleted member 5186178:
4. Generate a custom recovery.

This is mandatory if you want to use an easy way to backup, restore, flash or wipe ROMs and modds. Fortunately, rua1 has included in his tool all you need to generate one for your phone. This method is successfull for almost every MTK phone, but not for all. There isn't an universal method for anything.

So, enter again in "root, backup, recovery", select the radio "To choose the boot.img file" - by default is selected "Install already prepared files" - and click on "Recovery and Boot" button.

When prompted, select the boot.img from previous backup folder and click Yes to make CWM recovery automatically. First you will be prompted to flash a patched boot.img in your phone - click Yes to get an unsecured boot, then next message will ask you to install the new created recovery in your phone. Click Yes and Yes to reload the phone in recovery mode.

The phone will shut down and reboot in recovery. Now you can see your custom recovery in place.

GOOD TO KNOW: you can't generate a recovery everytime you want to flash one, to use MTKDroidTools for flashing, and the adb method may not work for many MTK phones.

The most known method to flash a new recovery is by using SPFlashTools or MTKFlashTools, and an alternative method is with MobileUncle application from phone, but I will show detailed the FlashTools method. One thing though: if you want to use MobileUncle application, you have to use it from /system/app folder, not from /data/app. Many users say that the MobileUncle doesn't work to flash recovery: it show success, but rebooting to recovery reveal the old one. The reason? They installed MobileUncle from market, and that place the app in /data/app as a user app. In custom ROMs where the app is placed in system by ROM developer, the problem won't manifest. So, if you want to use MobileUncle, make it a system app not user app.

In order to do that, grab a copy of any of these tools from DR_MOOSAVI's thread (link in OP), unzip it in a folder "MTK_Flash_tool" in your primary(system) partition (C in my case), and notice the name have to not contain any spaces or special characters. In that folder create a new folder "Resources" or ROM or whatever name you want, also without spaces or special characters, and place in it your scatter file and recovery img you want to flash. Open Flash_Tool executable as administrator.

IMPORTANT: Your phone is not connected to the PC now. Swtich it off and wait, you will connect it later.

Continue in next post.
[Miscellaneous Android Development] Deleted member 5186178:
In Flash_Tools program window click on load scatter file, navigate to that folder you created and select your scatter. Now you can see your phone's partition structure. If the recovery you want to flash is named "recovery.img" it will be selected automatically, if not you have to click on recovery row in Location column and select your recovery from that folder.

Then click on "Download" button.

Now connect your phone to PC, just like that in power off. Some models enter automatically in download mode and the flashing process begins, but others don't. For some it is necessary to connect them without battery (battery removed), other need to press briefly Power and Vol Down button at same time and release them immediately. That you have to find for your phone from forums, other users, or by trying. When the phone enter in download mode you will see a red bar down in Flash_Tool window, followed by a yellow or other color one (that means the flashing process is taking place).

At the end a popup with a green circle or green checkmark will let you know that the flash was a success. Deconnect the cable and reboot the phone, or reboot it in recovery to see if the wanted recovery is installed. The most common method to boot in recovery from power off is to press Power and Vol UP at same time, and keep them pressed untill you see the logo, then release Power but keep pressing Vol Up untill the recovery UI appears. If Power and Vol Up doesn't work for you, start the phone normaly and connect the phone to PC, then open a command prompt window, and type " adb reboot recovery", then hit Enter during bootanimation. The phone will stop loading and will boot in recovery.
[Miscellaneous Android Development] Deleted member 5186178:
5. How to port a custom recovery.

Check my new guide.
[Miscellaneous Android Development] Deleted member 5186178:
Check my new guide.
[Miscellaneous Android Development] Gauraav:
Awesome Tutorial!!! U did it again....

Thanks!!!
[Miscellaneous Android Development] Napst3r88:
Thank you sir I will try to port cwm to my mtk mobile

Sent From MTK-MT6572

---------- Post added at 03:31 PM ---------- Previous post was at 03:01 PM ----------

Sir now my mobile with ext4

Now in your thread about porting carliv cwm.. there is only custpack and ubifs ...!! Where is for ext4

Sent From MTK-MT6572
[Miscellaneous Android Development] m@nish123:
carliv grt work hope u add this post too http://xdaforums.com/showthread.php?p=49081376
[Miscellaneous Android Development] Deleted member 5186178:
Thanks, but that is not something for begginers. Maybe meteos method with his app will be, but I'm not sure. Though, if someone want to procede to do that, you can edit your post and give more details, for people to know what is about, and to follow your link if they are interested.
[Miscellaneous Android Development] iZLeeP:
Great guide [MENTION=5186178]carliv[/MENTION].

Just a bit confused, as I usually flash custom recovery first before rooting my MTK phones (same goes for all my android devices). So, maybe, rooting and flashing custom recovery is interchangeable as the first step for MTK phones depending on their availability.
[Miscellaneous Android Development] Deleted member 5186178:
Yeah, well the next step in my guide is "do a stock ROM backup", and if you flash a custom recovery, that will not be a complete stock backup. With my method, any time, after flashing the stock backup, unroot and you will be in stock initial state.

I hope it's more clear now.
[Miscellaneous Android Development] iZLeeP:
Got it. So this is more suited for those who do not have the original firmware for restoring their devices in case something goes wrong which is so like MTK phones. In any case, your guide is spot on. Hope the moderators would give this a sticky, if possible, since MTK phones are scattered all over xda.
[Miscellaneous Android Development] rnovino:
How to Port to Device that have recovery-from-boot.p

Hello Everyone, and hello to [MENTION=5186178]carliv[/MENTION],

Thanks to this Tutorial I have Manage to port in on a MT6582 and MT6572 Device with ext4 partition, but I just want to share some tips when porting the latest build of the carliv the tutorial here is complete except for one thing just in case you are ending up on a custom recovery not booting up and when you use the MTK Droid Root and Tools you will see this

-->Connect Device<--

there is a file blah blah - recovery-from-boot.p <----

Now that mess up the things but before we dig into that let me first share on how I got my Carliv Custom Recovery to Bootup

on the Tutorial there is a section that you need to use the MTK Unpacked tool right now once you have done that do all the other things that is written in the tutorial it will guide you on the whole process but on my end even though I followed the tutorial and all are correct I still end up on a Bootloop well I discovered that you need to copy the init file from the RUA1 CWMR that you got from the MTK Droid Root and Tools and overwrite the one on the Carliv Recovery after that once you have finish until on the Overwriting of the Kernel and Kernel header pack your Carliv Recovery using the MTK pack tool and now Flash it on your Device it will now boot :highfive:

BUT WAIT!! yes! it will boot but it will boot on the STOCK RECOVERY and that is because like what I said the recovery-from-boot.p is the culprit of the issue now you need to root your device which is on my end I used framaroot and then download the ES file manager and also follow the instruction of carliv on how to have the full ROOT R/W access and on your device, once your have done that got to this folders and delete this 3 files.

Be sure you have the R/W access or else this files will not be deleted :(

/system/recovery-from-boot.p

/system/etc/recovery-install.sh

/system/etc/recovery-resources.bin <--- I am not just sure if this is the right filename but it is almost the same will check it once again once I got to stock rom again :fingers-crossed:

and now once you have rebooted your smartphone to recovery mode it will now boot to the Carliv Custom Recovery.

But also take note that if you don't have that 3 files on your device your just good to go and it will boot to Carliv Custom Recovery without any issues.

it's just that 3 files makes the custom recovery always boot to stock recovery even though you do something else

hope this tip helps for some people having issue on a bootloop carliv custom recovery on doing the manual porting ;)

and don't forget to hit the thanks button if this helps :victory:
[Miscellaneous Android Development] iZLeeP:
Removing recovery-from-boot.p is enough, I think. Besides, CTR asks if you want to disable recovery-install.sh. That prevents the ROM from flashing stock recovery.
[Miscellaneous Android Development] rnovino:
it depends on the unit, I just deleted the recovery-from-boot.p and still it boots up on the stock recovery that's why I needed to trace other files that still makes it boot on stock recovery, but then again not all units will have the same issues as mine ;)
[Miscellaneous Android Development] MasTacK_Fr:
Thanks for your help, it works with my Huawei Honor 3X (mtk6592) ! :D
[Miscellaneous Android Development] didarnext:
Thanks Man! :D
[Miscellaneous Android Development] alifarrukhsss:
Error

Please help me in porting recovery.I am getting error "the syntax of the command is incorrect " in all four files. :(

View attachment 2654168

View attachment 2654169

View attachment 2654172

View attachment 2654177
[Miscellaneous Android Development] kuldeepraj:
I have ported ctr 2.2 to micromax A114 it is booting fine but touchscreen not working. Though I can scroll & select by vol & pwr buttons. Backup restore flashing all working fine. Any help for touch screen.
[Miscellaneous Android Development] :
Update your unpacking tool.

Take a look here and here and here.

Also, if you use Windows 8, that might be a problem, but for all these unpacking repacking problems report to michfood's thread.
[Miscellaneous Android Development] arnabgharay:
Sir can you see why i get this error

sir when i try to unpack the file i get this , how to solve this
[Miscellaneous Android Development] :
The post above yours is a replay for same question. Why don't you read first and only if you don't find an answer then write.
[Miscellaneous Android Development] Indiant:
Solution Couldn't compute FAST_CWD

Solution: Couldn't compute FAST_CWD

Unzip and throw in the /bin folder of the program. (replace)
[Miscellaneous Android Development] m0han:
i'm on windows 8 pro x64. sadly, the new cygwin1.dll doesn't work for me. :(

i still get that "syntax is incorrect" error while extracting ram_disk. :crying:

[mention=1237442]Indiant[/mention], [MENTION=2117836]michfood[/MENTION], [MENTION=5186178]carliv[/MENTION], can you help? thanks.
[Miscellaneous Android Development] :
Ok, I hope michfood won't mind if I will post here his last version. Try the one attached, maybe it will work on windows 8.

This tool is not my work, it is michfood's original and very good work. I only posted it here because he didn't had time to update in his thread. As soon as it will be posted in original thread, I will remove it from here.
[Miscellaneous Android Development] m0han:
looks ok, i think. now, to move forward. :good:

will seek help, if required. thanks a lot. :fingers-crossed:
[Miscellaneous Android Development] m0han:
mtk_pack gives error

did everything as in the quoted post.

but, mtk_pack gives error.

i'm on windows 8 pro x64 and using v3 of the repack utility posted by you here. please advise.
[Miscellaneous Android Development] :
Sorry man, as I stated before that tool is not my work and I can't help you with those errors... I thought you understood that.

From what I see, the windows 8 won't let you to repack the image, cutting you from accessing those files from temp. It's a problem with windows 8, an OS which give many problems to android various tools.

My advice: if you plan to work more with android resources, get rid of that windows 8 and use a windows 7. If you need it only for this thing, use someone else PC with windows 7 (UAC must be turned off, also firewall, defender and antivirus - you don't need to stay connected to internet during this if that's a concern). As you can see in screenshots from the post you quoted, in windows 7 everything works ok.

And to quote myself from my first post, in Prerequisites:
[Miscellaneous Android Development] m0han:
i did. but, since you devised a workaround for mtk_unpack errors, i figured you might be able to help. thanks, anyway.
[Miscellaneous Android Development] michfood:
I`ve tried to repack my boot on win8 with my scripts v2 from utility`s thread - and it made it succesfully.

there were a lot of error about cmd_forward_pointer, but it fully unpack boot, create ramdisk folder & etc... and pack it back and I got new_boot.img the same size as source image.

so I guess it works fine on win8 and do not need any updates or changes :p

and carliv is right - UAC should be turned off, and maybe You should place working folder on desktop - win8 has a lot of permissions restrictions, so it`s very uncomfortable for android devs
[Miscellaneous Android Development] m0han:
so i got on a machine that runs

win7 ultimate sp1 x86

and 'made it', somehow.

unfortunately, my newly created carliv-recovery fails to get my device into recovery.

this is as far as my limited knowledge can take me, i guess.

if interested, you can read about my experience.
[Miscellaneous Android Development] :
I'm sorry, I don't understand what means "my newly created carliv-recovery fails to get my device into recovery". Please be specific: doesn't boot at all - just logo and then reboot to system = wrong kernel and kernel header;

- boot to a black screen and nothing = recovery exceeds the recovery partition size (this happen when the prebuilt kernel is bigger than 5 Mb - I saw that in some phones); This is very dangerous, it could corrupt nvram partition.

- some other symptom...

You don't give much info and that is not helpfull, but if I have to guess I'd say it's abot size. You can reduce it a bit, by replacing icon_clockwork.png with a dummy 1x1 pixel transparent png and stitch.png with a 1x1 pixel balck png, but make sure they are in rgb mode not indexed. Also don't touch buttons images, they have to remain in rgb format too. If any of these are in indexed mode (the result of optipng crush or other online compressing software), the recovery will also stay blocked at a black screen and will not enter in.
[Miscellaneous Android Development] m0han:
original logo is white. in this case, the logo turned deep purple and faded off slowly. the screen remained faded; didn't switch off.

when i pressed the power button (i don't remember whether it was long-press), the process repeated.

phone rebooted normally when i switched on after a battery-pull. i then installed my working rua1-cwm-v5.5.0.4 recovery.

if you'd like me to upload some files, just let me know.
[Miscellaneous Android Development] :
Ok, post here your phone resolution, boot and recovery images from stock, and the result of "adb shell cat /proc/dumchar_info", and also your ported version. I will take a look.

LaterEDIT: But I can see there are already a bunch of recoveries for your phone, including the version 2.4 of my recovery: http://xdaforums.com/showpost.php?p=53344130&postcount=16. Did you tried that? I assume if [MENTION=4790877]avi3230[/MENTION] posted those that means he checked them.
[Miscellaneous Android Development] midi_1996:
Hey there, I followed the thread, and installed CWM successfully but after several reboots to it, I can't reboot to the OS, I get a CWM bootloop, I flashed the update.zip from the official site, but still get bootloop.

My device :

Piranha Aristo 9.7

MTK6577 OR MTK8377 (I see MT65xx preloader in Device Manager, and I get in Device Info : MT8877 :confused: )

1GB ram

16GB ROM

it's a Turkish tablet, and since I'm new to MTK (I'm a Samsung user ==> Exynos and QC) I didn't know that I had to save my "scratter" and therefore I can't flash boot.img (in the update.zip) of restore recovery.img from the original device's rom (not found in the update.zip) :(

Sadly, the "unbrick" thread is closed by the PO :/ I need someone to help me if possible (I know that I'm posting in the wrong topic, well I think you may consider my situation). :)
[Miscellaneous Android Development] hanuma:
Take scatter from another MT6577 they fit
[Miscellaneous Android Development] midi_1996:
Thanks for the reply, I just don't wont to Brick the tablet anymore, Would flashing the boot.img fix it (theoretically) ?
[Miscellaneous Android Development] hanuma:
If there is an official firmware only SP Flash Tool

Latest SP Flash Tool http://xdaforums.com/showpost.php?p=53745389&postcount=69

Easy Magic TWRP Installer for MediaTek Devices ONLY, Tool/Utility for all devices (see above for details) http://xdaforums.com/showthread.php?t=2798257

[PORT] [TOOL] Carliv Touch Recovery for MediaTek devices http://xdaforums.com/showthread.php?t=1825722
[Miscellaneous Android Development] midi_1996:
Well, didn't work I still get recovery loop :(
[Miscellaneous Android Development] Milandas01:
recovery loop :(
[Miscellaneous Android Development] dragonhart6505:
anyone have a flashable backup zip for blu studio 5.0 ii
[Miscellaneous Android Development] lols21.10:
[MENTION=5186178]carliv[/MENTION]

what if i use http://builder.clockworkmod.com/ to build recovery for mtk device
[Miscellaneous Android Development] Dn.Thanujaya91:
MTK 6589 Recovery Success

Many thanks to Carliv for creating this Valuable thread..

Successfully ported Recovery Mode for MTK 6589 Galaxy Note 8 Clone device..

Thanks Again Man..