LG Nexus 4 (mako)
BartMassey opened this issue · 8 comments
Thanks much for REPIT. It looks really nice. I would really like to use it on my Nexus 4: I'm trying to install latest CyanogenMod and Gapps-nano won't fit in my system partition. I can fit pico, but I lose some functionality. Anyway...
- repit-dump.log: attached
- device: Google LG Nexus 4 (mako)
- recovery: TWRP 3.0.2-0 official
- kernel: unknown
- ROM: CyanogenMod 14.1 nightly 20161225 mako
- Stock partitions, as far as I'm aware. (I guess maybe CM repartitioned everything?)
Thanks much for any help you can give!
EDIT: IGNORE THIS.
hi and thanks for your kind words!
could you please boot TWRP, connect to PC, and
adb pull /dev/block/platform/msm_sdcc.1/by-name/aboot
and
adb pull /dev/block/platform/msm_sdcc.1/by-name/aboot2
and post those files (maybe zipped) here?
thanks!
never mind about those partition pulls. i got the latest stock image from google and found the bootloader there.
$ strings bootloader-mako-makoz30f.img | grep -i gpt
`/home/dojip.kim/home2/apq8064_l_mako/non_HLOS/boot_images/core/boot/secboot3/src/boot_gpt_partition_id.c
PPI GPT Secure
PPI GPT Secure
PPI GPT Non Secure
GPT: FAILED to write the partition entry array
GPT: Could not read primary gpt from mmc
GPT: (WARNING) Primary signature invalid
GPT: Could not read backup gpt from mmc
GPT: Primary and backup signatures invalid
GPT: mmc read card failed reading partition entries.
MMC Boot: GPT read failed!
GPT: Primary signature invalid cannot write GPT
GPT: Backup signature invalid cannot write GPT
Failed to write GPT header
Failed to write GPT backup header
GPT: Could not write GPT Partition entries array
Re-reading the GPT Partition Table
GPT: Failure to re- read the GPT Partition table
GPT: Partition Table written
Writing GPT partition
GPT signature does not match.
there are references to a signed GPT, but also to a non-secure mode. i also found a thread in which the GPT is overwritten:
https://forum.xda-developers.com/showthread.php?t=2160124
i downloaded those GPT images and they do not sport signatures, AFAICT. it looks as if the signature is not being enforced, but who knows.
modifying the GPT might brick your device. if that happens, the expectation is that you'd land on one of qualcomm's recovery modes, for which recovery files might or might not exist in the wild. what do you want to do?
Huh. Thanks for taking such a detailed look at this!
I guess I'm a little confused about the Nexus 4 flash. I keep seeing references to an "external sdcard", and maybe I'm being dumb but I don't see a slot for one anywhere on the device. Is there an internal card my very hw-skilled friends and I could pull out and clone or something? Can we JTAG the thing before we start?
Anyhow, I guess I'm willing to sacrifice my Nexus 4 for science if you think there's a reasonably high chance of success, as it's not doing anything anyway. But maybe if I'm the only one looking for this we should just leave a note and leave it alone: the phone is working fine right now, except missing a few extras from GApps nano.
What would you suggest? tl;dr: it's a free discard phone and I like science, but it seems a shame to brick a working device for no reason.
Again, thanks.
Is there an internal card my very hw-skilled friends and I could pull out and clone or something?
no, there's a single, soldered emmc. the "internal sdcard" is an emulation of storage backed by /data/media. the name "sdcard" is a historical artifact having to do with its mount point and what it replaced. but there is no sdcard anywhere.
Can we JTAG the thing before we start?
yes! you can jtag the emmc.
you can also unmount everything adb pull the complete emmc from TWRP. i think 32 bit adbd pull can handle >4GB files without wrap-around issues. (busybox dd's CANT!)
adb pull /dev/block/mmcblk0
you'll later need JTAG to push it back in. unless you get qualcomm mass storage mode when bricked, in which case you can just dd it from a 64 bit linux.
What would you suggest?
lol, it's your phone!
i have very little time to do this now unfortunately. in the meantime you can get a feel in the N4 forum about how many people would like this, cause i cant do it any time soon. (sorry.)
so you tell me :)
there has been a new development regarding detection of GPT signatures via strings in the bootloader. it is now known that this method can result in false positives.
please see the details here.
It seems perfect to me to leave it for now. I'll try to grab an image and get a JTAG setup figured out at some point, and we can try it then. Thanks huge for all your work on this!
i'll reopen the issue if somebody is interested.