Wednesday, July 6, 2016

SOLUTION! Moto XT1085 Fails to Install Cyanogenmod 12/13 [DRAFT QUALITY!]

WARNING: DRAFT QUALITY SOLUTION - I'M WORKING ON TRANSLATION OF SOME PARTS FROM CHINESE AND THE STEP-BY-STEP SOLUTION.

There are some hardware differences between the XT1085 (China), the XT1092(Europe), and the XT1097(USA) variants of the Moto X 2nd generation, 2014 edition also known as “victara”.  The three different versions of the phone are identical with the exception of two things:  [1] they have different regional networking standards (radio frequencies) and [2] they have different partition configurations.


Q: Can I install Cyanogenmod (or a variant of it) on the XT1085?
A: Yes you can, but not “as-is” from the main download page.


Q: Why would I want to install Cyanogenmod on my Moto X? The Motorola stock ROM is already very minimal compared to other vendors.
The main reason that you would want to install Cyanogenmod over the exiting version of Android on the XT1085 is to remove the special Chinese security software that’s installed...and which makes the phone suspicious to monitoring and tampering.  The other reason you would want to install CM is to get Marshmallow on a phone that would otherwise be stuck on Lollipop (5.1).


Q: Why does the Cyanogenmod packages for Victara fail to install on the XT1085?
A: It is because of the second reason mentioned in the introduction: the different partition sizes for the SYSTEM partition.


The sizes of the partitions are:
  1. XT1092/XT1097 = 2902458368 bytes (or 2.9G)
  2. XT1085 = 2046820352 byte (or 2.0G)


When you try to install the Cyanogenmod package directly on to the XT1085 you will corrupt the SYSTEM partition and the phone will become unusable. (Note: To recover from a phone that has been corrupted by overwriting the Cyanogenmod package, you should go to this article (will write it soon) for a solution...don’t worry - it’s easy to fix when you know how!)


Q: How can I install Cyanogenmod on my Chinese edition of the Moto X?
UPDATE: I've already performed these steps on the cm-12.1-20151117-SNAPSHOT image of Cyanogenmod 12 (Stable) and verified that it works on my phone...no issues!  You can download it and install it (at your own risk of course) from my Google Drive file share here: Download XT1085 Mod | I'll edit a 13.0 nightly soon and post it as well.

cm-12.1-20151117-SNAPSHOT-YOG7DAO1KI-victara-XT1085mod.zip
MD5: 3b274ed11214c4dd79f1373da1548242

UPDATE 2: I've rebuilt the image file for LineageOS 14.1.  Please see my other post to direct-download the image from Google Drive. [New Post]


METHOD 1

The main method is to mount the Cyanogenmod system.new.dat file in Linux (I use Ubuntu) and repackage the file to reflect the smaller partition size.

This method was written by XPIRT on the XDA forums here: XDA - [DEV] Lollipop/Marshmallow DAT files | Compression and Decompression


Another way is to use the correct parameters and repackage the system.new.dat, replace zip package system.new.dat and system.transfer.list, methods here:


METHOD 2


Background information: In Android 5.x and newer update packages are created when the system.img file and the system.new.dat files are combined and generate a new system.img file.  The command to do this is:

make_ext4fs -T 0 -S file_contexts -l 2046820352 -a system system_new.img
Note: Download the make_ext4fs android tool for Windows from XDA developers.
The -l option is normally the size of the system partition image, which cannot be larger than the actual size of the system partition. The default Cyanogenmod package is created with 2.9GB -l option; designed for the European and American versions of the Moto X.
“mokee” compilation works  because “mokee” rolls back the CM12/13 package to the “OTA” format which was used in versions of Android before 5.0.

So, we can unpack system.new.dat, modify compile script, to install like it did before the Android 5.0.

Saturday, October 17, 2015

Windows Update Tips - Clearing Windows Update History or...Everthing

At time Windows Update can become stuck or unstable.  Here's s few tips on troubleshooting Windows Update (I'm using Windows 7 as my reference).

Clearing Download Cache
Stop Service:
   net stop wuauserv
Delete only the %windir%\Software Distribution\Download folder

Resetting Windows Update History
Stop service:
   net stop wuauserv
Delete Entire %windir%\Software Distribution Folder

Resetting all Windows Update Components (The Nuclear Option)
Stop all Windows Update related services:
   net stop bits
   net stop wuauserv
   net stop appidsvc
   net stop cryptsvc

Some References on Windows Updates
Microsoft.com: How do I reset Windows Update components?

[SOLVED] Lenovo A6000 Update Error: "Your phone has not switched carriers an cannot be upgraded" (status 101)

     My Lenovo A6000 has been stuck on Android 4.4.4 ever since I bought it...I was so happy when the system updater notified me that an upgrade was available!  After downloading the 1GB update though it failed to install.  So I tried it again...and the installation failed again.  So what is a self-respecting Android user supposed to do but go find the OTA and download it from XDA-Developers.  I downloaded this ROM here:



I made a backup of this ZIP here, but I make no warranty about it's safety or legitimacy:


     (Note: Later I found this link too...for what it's worth. Lenovo a6000 plus Lolipop 5.0.2 official OTA zip file(Google drive)

     To install it, I saved the file to my SD Card and then powered off the phone.  The instructions for going into Recovery mode are (source: How to Enter Recovery Mode on A6000):


  • Power off your device.
  • Boot in recovery mode by pressing and holding Volume Up and Power Button at the same time.
  • Release all buttons when the Lenovo A6000 screen flickers and in a few seconds the Recovery screen will appear.
  • When the Android image appears press Power shortly

     After installing the ZIP file from the SD Card (one of the options in recovery mode) I got an error that the installation did not finish...but on rebooting the phone the OS was at version 5.0.2! What?!  Almost immediately after that  it prompted me to install another update, version S056, a 156MB update. Downloaded, rebooted, and then got this error:
LENOVO A6000 System Update Kraft-A6000_S054_150915 - lenovoError details..Stock recovery says, "Your phone does not switch carrier, cannot upgrade"E: Error in /data/data/com.Lenovo.its/ap_its packages/(long hash numbers)-Lenovo ota.zip
Status(101)Installation aborted
     Man...what is the deal with Lenovo's ROMs?! After searching the Internet it becomes very obvious that the Lollipop upgrade for Lenovo phones is NOT GOING WELL. (Example: Lenovo Forum).  After some searching and finding many solutions that involve downgrading, using ADB, and other advanced method I found two off-the-cuff remarks that the "Carrier" ZIP files are bundled in the original "Kraft-A6000_S052_150825_WCCA.zip" file. So the solution I found to work for me was:
  1. Extract Kraft-A6000_S052_150825_WCCA.zip on a desktop computer (I used Windows)
  2. Locate the correct country .zip file in the extracted files. For me the file I needed was HongKong.ota.zip
  3. Connect the phone the computer via USB and copy that file to the root of the SD Card (I used MTP mode).
  4. When I tried to boot the phone into Recovery mode using the original instructions above the phone was unresponsive at the touch menu (so many bugs!)...so the only way I found to easily force the phone into recovery mode is to allow the System Update Utility to download and attempt to install the 156MB update...and then FAIL which leaves you in Recovery mode thankfully.  Select install update from SD Card and then choose your country's specific OTA.ZIP file.  This succeded and automatically rebooted the phone.

     I made a backup of the ZIPs here, but I make no warranty about it's safety or legitimacy:


     After this procedure the System Update worked for me successfully after re-downloading the 156MB package again.

Monday, May 4, 2015

HOW TO: Create a bootable USB flash drive in Windows from an ISO (Manually)

Summary:
A bootable USB flash drive can be used as an alternative to booting from CD or PXE on a enterprise network.

Prerequisites:
  • ISO file that you want to boot from (Linux, Windows, etc.).  In the example below I will make a bootable Windows 8 Installation CD USB drive.
  • USB Flash Drive: Verify that it is large enough to hold the entire contents of the ISO file
  • 7-Zip: Used to extract the .ISO file to the USB Flash Drive. [DOWNLOAD]

Preparing the bootable USB Flash Drive:
1. Insert a USB Flash Drive into a Windows 7 or Windows 8 client.
2. As an Administrator launch the Command Prompt. (Windows Logo + R, type: cmd.exe, Enter)
3. In the Command Prompt type:


ATTENTION: Replace '#' with the DISK number of the USB Flash Drive.

diskpart
list disk
select disk #

clean
create par primary
select par 1
active
format fs=fat32 label="Win8ProInstall" quick
assign
exit


Diskpart in Command Prompt


4. It may be necessary to remove the USB Flash Drive and re-insert it.
5. Locate the file windows8pro.iso on you local computer (or whatever the ISO you have is called)
6. Right-click on the file windows8pro.iso and locate the 7-Zip context menu option.
7. From the 7-Zip context menu select the option "Extract files...".
8. In the "Extract" dialog enter the drive letter of the USB Flash Drive and click "OK" to begin extracting the files.
9. Once the extract process completes, eject the USB Flash Drive. Test the drive to ensure that it is ready for production use.

Alternate Instructions - Especially for Linux based ISO's:
Although I've had less success with creating Windows bootable USB drives with another tool called UnetbootIn - it can create bootable USB drives without the need for entering data in a command prompt.  Personally I've found this tool to work much more reliably with Linux bootable drives.

UnetbootIn Project Homepage

Wednesday, September 10, 2014

SETTINGS: Gmail IMAP and SMTP Settings - Google Mail

When using IMAP and SMTP for Gmail Mailboxes in Outlook 2010, you will need to manually set the "Incoming server (IMAP)" port and the Outgoing server (SMTP) server settings for sending mail through Gmail from any email program are:

Incoming Server (IMAP)
--Gmail IMAP Address: imap.gmail.com
--Gmail IMAP Port: 993
--GMail Encrypted Connection: SSL

Outgoing server (SMTP)
--Gmail SMTP address:  smtp.gmail.com
--Gmail SMTP port:  587
--Gmail Encrypted Connection: TLS

Gmail User name and password Information
--Gmail IMAP and SMTP user name:  The full Gmail address (e.g. myemailaddress@gmail.com)
--Gmail IMAP and SMTP password:  Your Gmail password


Tuesday, September 9, 2014

[SOLUTION] Android Error - Trusted Credential Store Password

   While installing an encryption certificate from my email provider on Android, my phone suddenly asked me to "Type the password for credential storage".  I have never set a "credential storage" password or installed a certificate before, so this seemed very strange.  I tried my lockscreen password, 0000, 1111, 1234, etc...but nothing worked.


    With a little persistence, I decided to clear my lockscreen password to nothing and then try to install the certificate again.  My device prompted me to set a 'new' lockscreen password, which I did and then the email certificate installed successfully.

Bingo!

P.S. - My email provider uses Exchange ActiveSync as their backend...if that matters.

Monday, August 4, 2014

[SOLUTION] "Out of Memory' (Error 1416) When Saving Visio 2010 Drawings with Embedded PDF's

PROBLEM: After creating a Visio 2010 drawing and embedded PDF's, you receive an error: "Out of Memory' when saving the drawing.  The exact message reads:

An error (1416) occurred during the action Save.
There is not enough memory to complete the requested action.



SOLUTION: There is a bug in the way Visio 2010 handles PDF's and automatically "groups" them.

  1. Select the PDF(s) in your Visio drawing
  2. Click the Group menu item
  3. Select Ungroup


You should now be able to successfully save the file.

UPDATE: If this does not fix your particular problem, as it does for me, you can also try the following work-around that involves creating a picture file from your PDF and inserting that instead: