Moto X - xt1058 - Trying get it fully Resurrected...
Phone: Moto X – 2013, xt1058, US- ATT, unlocked
Initial Version: 4.4.2 (I think), rooted, TWRP installed and functioning.
What I did:
1. Successfully installed cyanogennMod 12.1 via this file: “cm-12.1-20160127-SNAPSHOT-YOG7DAO3J1-ghost.zip”. I did not install the corresponding recovery. This was working fine. TWRP was also working.
2. Installed “XT1058_5.1_ATT_Debloated.zip” from this link:
http://forum.xda-developers.com/moto-x/development/xt1053-retail-stock-lollipop-flashable-t3155843
3. This worked for the most part, however the phone will not turn off and boot loops into system instead. The only way to get to recovery is to hold down the power & vol down buttons at just the right time during the boot loop.
4. I THINK I attempted to reinstall “cm-12.1-20160127-SNAPSHOT-YOG7DAO3J1-ghost.zip” but it was a few days ago and a lot has happened since. In any case , the phone bricked. Hard Brick. No fastboot, no recovery, no nothing.
5. I unbricked the phone by following a combination of
THIS POST and
this one using the Motorola programing cable (battery eliminator). Using a normal USB cable I can access fastboot and TWRP Recovery, v.2.8.7.0. “Fastboot devices” returns the device and serial number, so I know that is functional. From fastboot the bootloader is 30.BE. Attempting to boot normally or to shut down results in the phone going to recovery. According to TWRP, the battery is fully charged (I charged it overnight).
6. Installed root from
this link. Phone was left in the same condition as before this process.
7. Flashed modem update from
this link.
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot flash partition gpt.bin
Resulted in:
getvar has-slot : partition
getvar partition-type : partition
getvar max-download-size
downloading 32760 bytes
done
downgraded security version
update gpt_main version failed
preflash validation failed for GPT
I stopped here.
8. Now the phone is not recognized on USB when in TWRP recovery, (in device manager, update driver software results in “Windows was unable to install your Android; Windows could not find driver software for your device”). USB only works in fastboot, and I checked it on another computer where it was working earlier today with the same results, so it appears this a phone problem and not a driver problem on the computer. The phone will not boot into system at all now. Consequently I can't push the ROM or IMG or anything to it to try to re-install, including the 5.1.
Question: ANY help getting this thing fully functional is greatly appreciated. Yes, I know I screwed it up. I would like to go back to CM but realize that’s not likely at this point. Even going back to fully stock 5.1 or higher is fine as long as it works and is reliable.
Thanks guys…
Update:
From fastboot, entered "fastboot -w"
Results:
wiping userdata...
(bootloader) Variable not supported!
Erase successful, but not automatically formatting.
Can't determine partition type.
FAILED (remote failure)
(bootloader) Variable not supported!
erasing 'userdata'...
OKAY [ 12.260s]
finished. total time: 12.260s
So it appears I've got messed up partitions. How would I fix that, gpt.bin? Isn't that part of the zip for 5.1?
Update 2:
Ran
"fastboot update XT1058_5.1_ATT_Debloated.zip"
Results:
archive does not contain 'android-info.txt'
error: update package 'XT1058_5.1_ATT_Debloated.zip' has no android-info.txt
Same result for "XT1058_5.1_ATT_Untouched.zip"
Update 3:
On a whim, booted into recovery and the device was now recognized in Windows and drivers correctly assigned! I hadn't rebooted the computer or anything....
adb pushed over "XT1058_5.1_ATT_Debloated.zip" and "XT1058_5.1_ATT_Untouched.zip" and attempted to install both with the same result:
E:Unable to mount '/data'
E:Unable to recreate /data/media folder.
Updating partition details . . .
E:Unable to mount '/data'
. . . done
E:Unable to mount storage.
E:Unable to mount /data/media during GUI startup.
Full SELinux support is present.
etc, etc, etc.
Sooo I guess I've got partitioning problems. I'm thinking I should go back to the methods that first resurrected the phone and start over but I also don't want to do any more damage.
Update 4:
from recovery:
repair file system: data: successful
repair file system: System:
Repairing System using e2fsck . . .
E : /sbin/e2fsk –fp /dev/block/mmcblk0p38 process ended with ERROR=4
E :Unable to repair ‘/system’.
E :Error repairing file system.
Reformatted /system to same file system it had before: ext4: successful
Repair file system: cache: successful
Repair file system: Dalvik Cache: Invalid partition selection
Wiping Dalvik cache appeared successful
Repair file system: Dalvik cache: Invalid partition selection
adb pushed over "XT1058_5.1_ATT_Debloated.zip" and "XT1058_5.1_ATT_Untouched.zip" and installed debloated successfully.
Update 5 – ALMOST THERE! (I think)…
Attempting to boot normally results in it going directly to fastboot with the message: “fastboot reason: flash failure”
So on the menu I tried “BP tools” and it booted normally, AND immediately found my network and retrieved my voice and text messages! Speaker phone working, everything appears good. Power off is functional, but power on goes directly back to fastboot with the same message as above. Selecting “BP tools” again results in an otherwise perfect bootup.
From research it appears the custom recovery may be causing the boot problems so I'm downloading the stock recovery for 5.1 now and will try that.
Any better instructions than what I'm doing is appreciated.
The build number shown on the phone is: LPA23.12-21.1
But the only possibly compatible recovery is XT1058_GHOST_ATT_5.1_LPAS23.12-21.7-1_cid1_CFC.xml, which appears to be newer than the build on my phone. I’m thinking-hoping this should be ok as I’m not downgrading anything.
I found “GHOST_ATT_5.1_LPA23.12-21.7_cid1_CFC.xml” and flashed that from RSD Lite and it worked, everything working, almost perfect. The only problem is now there is no recovery on the phone. Trying to boot into recovery results in “no command.”
I had to reinstall TWRP to have a recovery. Otherwise it's working fine, even took the latest OTA.