[SERIES 1]How to Get Stock ROM/Firmware Cherry Mobile Flare 2x and others to Porting/Custom ROM

×

    🚩 Report

    [SERIES 1]How to Get Stock ROM/Firmware Cherry Mobile Flare 2x and others to Porting/Custom ROM

    This is just my first series of Doing a Custom Rom for Qualcomm and Mediatek Phones this is so far the most requested Tutorial on pinoyscreencast so without further ado I will be sharing the techniques and tools that you will need to start doing Custom or Porting Roms. For this Tutorial we will start first with a Qualcomm device which is the Cherry Mobile Flare 2x this technique will also work on other devices but you will just need to change some settings as well. REQUIREMENTS:

    • Common Sense , Yeah! this is required for some troubleshooting 😀
    • Rooted Device
    • Android ADT Bundle
    • Java Installer
    • Notepad++ or Sublime 2 or 3
    • Basic Command Line Knowledge
    • Cygwin
    • Kitchen

    I will try to make this tutorial as easy to understand for newbie or noobs but then again I will not fully spoon feed every detail of this tutorial and that’s where your common sense comes in 😀 I might miss some points in any part of this tutorial but just please bare with me as I put this in full detail 😀 sharing this tutorial,comment on this post will be much appreciated for helping other to gain more experience and knowledge on the things we are going to learn here. I will be using Windows 8 in this tutorial so there might be some things that I might mention which are technically just for Windows 8 but then again feel free to try it on other platforms but then I will not be putting some troubleshooting on how you can do it on other versions of windows so just Google my friend 😀 This Tutorial will not make you a {Developer} Please note that! for this specific tutorial I will focus first more in the Window Base Operating System I will also do a Linux tutorial on my next series. First Download the ADT Bundle for Windows

    once you have downloaded it extract it on your c:/ Drive you can rename the folder of the adt-bundle-windows-x86_64 that will be just ok to lessen the word you type.

    next is you need to install the Java Installer

    once Installed just you can reboot your PC. Next is we need to download the Cygwin and Kitchen for later use QUICK TIP! if you have scroll button on your mouse simply click that to open link in a new window here the specific tutorial on how to install it

    so in case you are having trouble in download the online java installer you can try the offline installer simply click the image to link to the download page once download again reboot your PC. take note that it depends on your PC on what is appropriate to you like mine I downloaded the 64bit because I am running on a 64bit operating system to know on what operating system you have simple press WINDOWS BUTTON + PAUSE BREAK

    ok so lets proceed installing the cygwin simply visit http://www.cygwin.com/ and download the right version for your pc

    like on my end I choosed setup-x86_64.exe I have attach here the tutorial on how to install the Cygwin and the Kitchen it’s pretty simple to follow just read it carefully

    INSTALLING CYGWIN first double-click the setup-x86_64.exe that you have downloaded or the x86 if you have choosen that

    we are now ready to install the dsixda kitchen at Github

    upon writing this tutorial my version is 0.224 so just be sure to download the latest version to avoid some issues and bugs. once download extract it inside the cygwin folder

    Now open Cygwin bash on your windows

    if you are on Windows 8 type wmic then enter and click the maximize button to fullscreen your command prompt then type exit for you to go back to the bash terminal

    cd c: will jump you too your root c: drive then if you are running on the 64bit of cygwin and followed my instruction above you will have the same filename as mine, cd cygwin64 will go inside the cygwin64 folder and look for the Android Kitchen that you have extracted on my end the name is Android-Kitchen-0.224 you can rename it to a simpler filename like “k” without quotes and last type in ./menu to start android kitchen.

    this is the main interface of the Android kitchen. close this for now we will use it later 😀

    HOW TO GET THE INFO OF YOUR DEVICE {QUALCOMM}

    since Qualcomm does not have a tool for now to get the whole rom like the Mediatek phones which uses MTK Droid Root and tools we will do it manually for now the first thing you need to do is root your phone. the fastest rooting technique in some cases is the framaroot I have created a tutorial on how to use it.

    http://www.youtube.com/watch?v=u2SlL7K16bk

    but in case the framaroot didn’t work you need to find it at your own because there are tons of rooting tutorials out there depending on the type of phones you are using. Again Google is your Best friend.

    ok! once you have successfully rooted your phone you need to enable the USB Debugging of your Phone by simply going to the Settings > Developer options and tick USB Debugging. developers option on jellybean 4.2 to activate press build number on about phone several times to enable developer options Now plug USB to your phone in our case the Cherry Mobile Flare 2x. now open the command line or the command prompt and run it as an administrator for windows 8 press window + x

    or if you want to be specific look for the location of the android adb and press shift + right-click on mouse and open command window here.

    LET THE GAME BEGIN

    In some cases drivers is plug and play for android but in case it didn’t detect the driver when you plugged it on your PC/Laptop you will need to add the OEM USB Driver its very easy to use simply follow the instruction here 😀 Tutorial 1, Tutorial 2

    now lets proceed with the ADB terminal commands open the ADB terminal by going to C:\..\..\sdk\platform-tools and open comand promt as administrator from there 😀

    first type “adb devices” and you must see your devices must be detected in case you encounter this error ??????? no permission follow my quick tip here.

    next is adb shell then type su to have root access

    so here you will see the mounts of your device is using and you will see here on what block is the mount is using. and the last command we need to check is the recovery log buy typing this command to access it first is cd /dev/block/ and then

    cat /cache/recovery/last_log

    now the result may not fit on the screen so what you need to do is save it on a text file and open it on notepad++ for you to have a better view. once you are on the /dev/block/ directory type this command

    cat /cache/recovery/last_log > /mnt/sdcard/last_log_recovery.txt

    this means it will save all the text that’s in the last_log_recovery.txt which we saved it on the sdcard you can choose other location by changing the /mnt/sdcard/ the important part that we need in the last_log_recovery.txt is this part

    as you can see it will have all the location and blocks of the filesystem table that we need to backup 🙂 ex.data,recovery,boot,system,cache.

    so for example we will backup or get the recovery and boot files so what you need to type on the command line is dd if=/dev/block/mmcblk0p16 of=/sdcard/boot.img but before you can do that you need to mount first the system file because you will have this error

    just type this command to to make it writable mount -o remount rw /system

    now the system is already mounted, take note also you must not mount your sd card to your phone make your phone as charging only as you will see after the if= sign you need to put the location of the block of the boot file which is on our example is mmcblk0p16 and we got that on the last_log awhile ago and for the recovery just again check the last_log and follow the template. here is the commands that you need for the flare2x

    • dd if=/dev/block/mmcblk0p17 of=/sdcard/system.img
    • dd if=/dev/block/mmcblk0p21 of=/sdcard/data.img
    • dd if=/dev/block/mmcblk0p16 of=/sdcard/boot.img

    and so on 😀

    if you successfully dd the file this is the sample output you will get

    so now that we have already backup the files that we need we can now proceed on decompiling the .img files , you will notice on the boot and recovery it is over 13mb which is not right don’t worry we will fix that later 😀

    so now open kitchen again and copy the boot.img and system.img in the original_update folder inside the kitchen. HOW TO MAKE A FLASHABLE ROM ok this is now the real cooking begins, in the main menu of the kitchen choose number 1 by typing 1

    this will create our working folder for our custom rom

    as you will notice it detected the system.img and boot.img just follow the instruction , if you have been working on kitchen for multiple roms you will see lots of choices there but for our example because our flare2x is our first ROM to build it is the only one there right now 😀

    next is it will prompt you to rename your folder which is highly recommended so you can easily find the right folder in the future 🙂

    the next screen will be the unpack script so first you need to choose the number 2 — Run Ext2Explore (EXT/EXT4) and wait for it to load

    once it loaded read the instructions carefully and do not click enter yet just wait for Ext2Explore to pop in, once the ext2explore opened just click file and select open disk image and look for the location of the system.img that we pasted awhile ago which is located in the original_update folder.

    and next it will load the file that you have selected which is the system.img now on the right pane right click on your mouse and select save.

    and now just wait for it to extract all the files on that folder once down just close application and it is required to be closed or else you will end up an error, and you need to start all over again

    it will load some information on the screen and here it will prompt you would you like to view this ROM’s info this optional actually if you want to know more about your device

    here is the sample output of the info

    next is to type 0 to goto the advance options menu

    now what we are going to do is add an init.d script support on our custom stock rom you can choose or add other tweaks as long as you like but for this demo we will just do a quick add on the features.

    now you will notice after it added the init.d support it also recompiled the boot.img which is what I am saying a while ago that we need to fix as you will see from 13mb it is now 5mb which is that is the real filesize now of the boot.img.

    now usually after I add basic tweak I just dry run it and build my custom rom to check if it will have error on recompiling the zip file so here we need to type number 99 so that it will build our rom

    ok now focus on the Device name in the kitchen as you will notice the name is msm8625 if you notice on the device info a while ago we saw this so usually before we compile we need to add this on the edify folder in order for it to work properly or else you will end up a brick phone. typically you will not know if the rom is working or not until you have flashed it so with this number one that you need to check is the device name or variant so it will compile properly

    so here is the things you need to do in order for it to compile properly , you need to goto the edify folder in the tools folder of the android kitchen and then choose any template on that folder and create a copy of it so for this example I have used the ace template to get started with. this is where the info’s that we gather in the ADB terminal that we saved a while ago. in the recovery log you will notice we copied the blkd number to reflect on the edify template. so just look at the image and follow what I did

    so now once we have saved that we can now recompile again and check if the log output is now accurate, what you need to check here is the format and mount points it must not be like the first one which is MTD it needs to be the right dev/block code in order to work properly. There you go guys that is the SERIES 1 Tutorial so if you have further clarification feel free to comment on this post and we will be glad to give help.

    REMEMBER THIS WILL VOID YOUR WARRANTY AND WE WILL NOT BE HELD LIABLE IN CASE OF ANY DAMAGE ON YOUR PHONE MAY OCCUR

    I will still be working on this post in the next upcoming days so stay tune for more

    We will be happy to hear your thoughts

        Leave a reply

        Pinoyscreencast
        Logo
        Compare items
        • Total (0)
        Compare
        0