[Alcatel Idol X Guides, News, & Discussion] Incineroar:
Installing ROMs on the Alcatel OT 6040A (Single-SIM):

Installing ROMs on this phone is a simple process, but it can be made extremely difficult. The reasons behind this are because there are differences between each of the Idol X models that make it hard for you to simply install a ROM and go, mostly relating to SIM Card usage and the fact that the international models are dual-SIM while the 6040A is single-SIM, as well as the bands not being properly compatible between each of the devices. This will attempt to rectify these issues and allow you to break free of the chains (And pains) of the stock ROM.

To be aware of the steps ahead, read this first before attempting to proceed. Being aware of all steps in this process will ensure you know what to do ahead of time and what not to do. As well, remember that when doing the following, your device is void of warranty (Although it's easy to make it look unmodified), and I am not responsible for any damages that may occur to your device, up to and including bricking. Proceed at your own risk.

You'll need the following:

- Mobileuncle Toolbox APK

- Carliv Touch Recovery + Aroma File Manager and CWM Recovery (With custpack support)

OR

Philz Touch Recovery (I haven't tested Philz Touch yet, but I've been told that it works and serves the purposes that the two other recoveries cover each of)

- Your ROM of choice (See the Idol X thread or the Idol X Kitkat thread for ROMs)

- Mobile Upgrade S from Alcatel (In the event that something goes wrong, you can restore back to stock and try again)

- Gapps 4.4 package (Optional)

- 800MB System Partition resize patch (Only if your ROM needs it)

Before We Begin:

1. Ensure you have a MicroSD card. 8GB is the minimum you should use (As the internal memory of the device is that large), but if you don't have much stored on your phone, 8GB should easily hold your ROM and any other needed data.

2. Ensure you have backed up all necessary data (Such as contacts, text messages, or application data). You will be performing a full system wipe before installing your ROM, and any data will be lost. If you have just wiped or just got the device or just reinstalled from Mobile Upgrade S, this will not matter to you.

3. Ensure you have a USB cable. If performing the backup to be mentioned later, it may take some time to do. As well, you'll want to transfer this backup to a non-volatile source of memory, such as a computer's hard drive in the event that something goes wrong.

4. Ensure that you are rooted. This will be mandatory to make the process much easier.

4a. After rooting, ensure Mobileuncle Toolbox is installed. This will allow us to hotswap recovery images.

4b. Ensure that you have the two recovery images on your MicroSD card. For ease and convenience, name them recovery-CWM.img and recovery-Carliv.img (Or recovery-Philz.img) so MobileuncleToolbox can find them.

4c. As well, ensure you have a file browser on your system (ES File Explorer on the Google Play Store can do this) that can access the /custpack/ directory on your phone. You will need root for this.

Getting Started:

1. After having your ROM of choice on your SD card, we'll first back up the most critical file in this process: The phone's modem file. 6040As are not compatible with modems from over the sea (They use a different band than where the 6040A is sold, so you will never be able to connect to a cell tower here under your provider), and will cause you havoc when trying to set up your device. In your file browser, go to /custpack/modem/ and copy the modem.img to a folder on your SD card. This modem file is exclusive to your phone (They can be swapped, but be careful of this), and will allow your device to connect to the mobile network via your SIM card. If you skip this step, you will more than likely have to use Mobile Upgrade S to revert to stock and repeat the entire process over again. This step can also be performed later on when Carliv Touch is installed, but we'll do it now to get it out of the way.

2. Now, we'll back up our device in the event something goes wrong. If you're coming fresh off stock to upgrade, then this step is not necessary, although doing it is not a bad idea. If you decide to not back up, skip to step 5. Open Mobileuncle Toolbox, and select "Recovery Update". (If the application asks you to update, just say no) Then, install the CWM recovery. DO NOT install Carliv Touch. The reason for this is that Carliv Touch DOES NOT back up the /custpack/ directory. Without this directory, the phone will simply bootloop if you restore your backup from Carliv. After CWM installs, press Yes to boot into recovery.

3. We'll now back up the device. Select "Backup and Restore" on the CWM main menu (Volume Up/Down moves the cursor, the Power button selects). Then, select Backup. At this point, it is wise that you plug in the device, as backing up the device will take a while. Losing power while backing up will BRICK your device. As long as it has a steady source of power, your phone is essentially brickproof. Once it's done, reboot into Android.

4. To ensure your backup is safe, copy it to your PC in a safe location. If you do not do this, it will be lost upon upgrade because CWM saves your backups to the internal memory and not the SD card (As it has no SD card access) and most ROM installers will wipe this area of memory. Depending on your PC, USB cable, and device, this process may also take some time.

5. After you've copied your backup (You can delete it from internal memory at this point if you wish), we'll now go back to Mobileuncle Toolbox and install Carliv Touch. Then, reboot into recovery again. This time, we're in Carliv Touch recovery (The control scheme is the same as CWM), but there's a key difference: Carlic supports SD access, so we can install from there. If you did not back up your modem file, do it now, or you will lose it and will have to do an upgrade using Mobile Upgrade S and start again. Then, perform a factory reset (Which will wipe the /data/ and /cache/ partitions), and if necessary install the system repartition patch, then install your choice ROM from your SD card. This process should not take more than five to ten minutes. If you have a Gapps package on your SD card, install it as well.

What about the modem file?

At this point, you've installed your ROM, however, there's one important thing we have not yet done: Reinstalling our modem file. There are two ways to do this: Through Carliv Touch recovery (Using an included application called Aroma File Manager), or through a file browser in the OS (If you do it this way, you will not have cell service until you install your previous modem file and reboot!). It doesn't matter where it's done, but it'll probably be much easier to do it from Carliv Touch. Here are the basic steps to reinstall your modem image:

1. From the root directory, browse to your SD card and copy the modem file.

2a. IF YOU DO NOT HAVE A CUSTPACK DIRECTORY (IE: NOT A STOCK-BASED ROM) - Browse to /system/etc/firmware/. The modem will be called either "modem.img" or "modem_1_3g_n.img" or something similar. Replace that specific file (Ensure the name is the same, or else it'll cause problems) and correct its permissions to 644 (rw-r--r--). Exit and reboot.

2b. IF YOU HAVE A CUSTPACK DIRECTORY (IE: A STOCK-BASED ROM) - Browse to /custpack/modem/ and replace the "modem.img" file there. Correct its permissions to 644 (rw-r--r--), exit, and reboot.

3. To be safe, wipe all caches before going back to the OS if you've copied the modem file using a file browser from within your ROM. If you used Aroma File Manager after installing your ROM via recovery, there shouldn't be anything to worry about. Just exit recovery and reboot.

At this point, you should be able to boot into your ROM and the SIM card should function normally. If you go into Settings and SIM Management is greyed out, that means your modem image has incorrect permissions (That is, if you haven't bootlooped), the name on the modem image is incorrect, or it's missing/corrupt. If the file is corrupt or damaged, you will have to use Mobile Tool S and revert to stock and repeat this process (Except for the backing up, just root and install Carliv Touch and try installing the ROM and modem file again). Otherwise, if it works properly for you, enjoy your upgraded phone! (Yay no more stock!)

Q&A:

Q: Why two recoveries?

A: Unless you use Philz (Which is untested at this time, mind you), CWM does the backing up, although we decide to not install from it because the ROM will be lost when we wipe because CWM only can access the internal memory, it doesn't have SD access. We then use Carliv to flash, but not back up because it doesn't back up a critical part of the OS.

Q: What's a custpack?

A: It contains some of the essential applications that Alcatel's modified Android builds use, as well as firmware files and some boot files. If they're missing, Android will not be able to start.

Q: Are there any issues to using a dual-SIM rom on a single-SIM device?

A: Not as far as I'm aware. It may produce unintended side effects, but I have yet to encounter any.