[Miscellaneous Android Development] :
Hi,

Just a few questions. I have had a bit of experience with flashing roms (CyanogenMod, LineageOS etc) on the (Nexus S, Galaxy Nexus, Nexus 5 etc) but I haven't done it with a Motorola phone before. I am having some difficulty. It was a lot easier with those phones :) I bought a Motorola Moto C XT1758 (2018-04-17 date on box) it was bought not from any carrier or on a plan and therefore is unlocked from any carrier.

I have had trouble getting the scatter file. I set up my environment [TUTORIAL]How to setup SP_Flash_Tool_Linux (MTK/MediaTek Soc) with this guide. I am using Ubuntu 18.04.

I looked at [GUIDE][UTIL][MT65xx] Create Scatter File / Dump Full ROM For any MT65xx device, no matter how obscure

Method #1

I think that requires me to have a recovery ROM. I found that Motorola's Recovery Images are only for the Droid Maxx, Moto G, Moto X and XOOM. They also say you need a "Moto Pure Edition or a Developer Edition device."

Method #2

$ adb pull /proc/dumchar_info
adb: error: remote object '/proc/dumchar_info' does not exist

I have also read one can do:

namath:/ $ cat /proc/mtd
dev: size erasesize name

But that didn't work for me either.

I am running out of ideas.

On a side note I have tried to unlock my bootloader but have only gotten the below error. I also tried using mfastboot-v2.zip but that didn't help either.

$ sudo fastboot oem get_unlock_data
[sudo] password for me:
...
FAILED (remote: unknown command)
finished. total time: 0.002s

I made sure to go into Developer Options and toggle the "OEM unlocking", which asked for my PIN but that didn't help. I did look at Mark_Emeritus's Bootloader Unlock Problems? thread but it seems mine is in the table of unlockable CIDs, being 0x0032.

Any tips on that would be appreciated.

sudo fastboot getvar all

(bootloader)	max-download-size: 0x8000000
(bootloader)	partition-size:flashinfo: 1000000
(bootloader)	partition-type:flashinfo: raw data
(bootloader)	partition-size:userdata: 32000000
(bootloader)	partition-type:userdata: ext4
(bootloader)	partition-size:cache: 19000000
(bootloader)	partition-type:cache: ext4
(bootloader)	partition-size:system: c0000000
(bootloader)	partition-type:system: ext4
(bootloader)	partition-size:metadata: 2480000
(bootloader)	partition-type:metadata: raw data
(bootloader)	partition-size:nvdata: 2000000
(bootloader)	partition-type:nvdata: ext4
(bootloader)	partition-size:frp: 100000
(bootloader)	partition-type:frp: raw data
(bootloader)	partition-size:efuse: 80000
(bootloader)	partition-type:efuse: raw data
(bootloader)	partition-size:tee2: 500000
(bootloader)	partition-type:tee2: raw data
(bootloader)	partition-size:tee1: 500000
(bootloader)	partition-type:tee1: raw data
(bootloader)	partition-size:keystore: 800000
(bootloader)	partition-type:keystore: raw data
(bootloader)	partition-size:secro: 600000
(bootloader)	partition-type:secro: raw data
(bootloader)	partition-size:oemkeystore: 200000
(bootloader)	partition-type:oemkeystore: raw data
(bootloader)	partition-size:seccfg: 80000
(bootloader)	partition-type:seccfg: raw data
(bootloader)	partition-size:expdb: a00000
(bootloader)	partition-type:expdb: raw data
(bootloader)	partition-size:logo: 800000
(bootloader)	partition-type:logo: raw data
(bootloader)	partition-size:recovery: 1000000
(bootloader)	partition-type:recovery: raw data
(bootloader)	partition-size:boot: 1000000
(bootloader)	partition-type:boot: raw data
(bootloader)	partition-size:para: 80000
(bootloader)	partition-type:para: raw data
(bootloader)	partition-size:lk: 80000
(bootloader)	partition-type:lk: raw data
(bootloader)	partition-size:protect2: a00000
(bootloader)	partition-type:protect2: ext4
(bootloader)	partition-size:protect1: a00000
(bootloader)	partition-type:protect1: ext4
(bootloader)	partition-size:nvram: 500000
(bootloader)	partition-type:nvram: raw data
(bootloader)	partition-size:proinfo: 300000
(bootloader)	partition-type:proinfo: raw data
(bootloader)	partition-size:preloader: 40000
(bootloader)	partition-type:preloader: raw data
(bootloader)	ro.carrier: retapac
(bootloader)	radio: 5
(bootloader)	kernel.version[0]: Linux version 3.18.35+
(bootloader)	kernel.version[1]: (cibuild@dell-PowerEdge-R730)
(bootloader)	kernel.version[2]: gcc version 4.8 (GCC)
(bootloader)	kernel.version[3]: 1 SMP PREEMPT
(bootloader)	kernel.version[4]: 2018-01-24:15:35:20
(bootloader)	ro.build.fingerprint[1]: motorola/namath_58/namath:7.0/NRD
(bootloader)	ro.build.fingerprint[2]: D90M.014/1516778722:user/release-
(bootloader)	ro.build.fingerprint[3]: -keys
(bootloader)	ro.build.version.mtk[1]: alps-mp-n0.mp1-V1.0.2_wt6737m.65.
(bootloader)	ro.build.version.mtk[2]: .n_P109
(bootloader)	ro.build.version.full[1]: Blur_Version.25.21.14.namath_58.
(bootloader)	ro.build.version.full[2]: retail.en.US
(bootloader)	imei1: <CENSORED>
(bootloader)	imei2: <CENSORED>
(bootloader)	boot reason: wdt_by_pass_pwk
(bootloader)	hwrev: M11
(bootloader)	CID: 0x0032
(bootloader)	SKU: XT1758
(bootloader)	CPU: "MT6735"
(bootloader)	serialno: <CENSORED>
(bootloader)	off-mode-charge: 1
(bootloader)	warranty: yes
(bootloader)	securestate: no
(bootloader)	hwsecure: yes
(bootloader)	kernel: lk
(bootloader)	board: WT98736B32_DA1
(bootloader)	product: WT98736B32_DA1
(bootloader)	Ram size: 1GB
(bootloader)	emmc: KMFE60012M_B214
(bootloader)	storage-type: emmc
(bootloader)	version-preloader: 0.1.00
(bootloader)	version: 0.5
all: Done!!
finished. total time: 0.005s

I haven't yet tried this [Tutorial] How to create scatter file for Mediatek devices but it looks fairly recent. I am guessing as my phone is fairly recent and has MT6735 the old method using MTK Android Devices won't work. The guide for doing this with [Tutorial] How to use Wwr_MTK + SP Flash tool to backup Mediatek rom is there. Apparently there is an alternative way [Tutorial] How to get length addresses for full ROM dump using PGPT, Wwr_MTK & SP Flash Tool.

It would be nice if there was a way to do this without Windows. Any tips or insight you can provide would be welcome.