Author Topic: Enabling flashing the Cosmo on OS X  (Read 1244 times)

jjrv

  • Newbie
  • *
  • Posts: 13
    • View Profile
Enabling flashing the Cosmo on OS X
« on: February 02, 2020, 05:04:42 pm »
There's a whole thread about rooting on the hardware board but here's all the flashing unlocking steps in one place for a simple method that worked for me without downloading any unofficial tools or drivers.

This method will wipe all your data and settings. I did this immediately after getting my Cosmo so there was nothing to keep.

First in your Cosmo open Settings -> System -> Advanced -> About phone
Press 7 times on Build number.

You can now open a previously hidden menu: Settings -> System -> Advanced -> Developer options
Enable OEM unlocking and USB debugging

It might be a good idea to write down info from submenus under Settings -> Network & internet -> Mobile network -> Advanced -> Access Point Names

Now download This zip containing adb and fastboot.

Unzip it in the terminal and install the commands in your path or just change to the platform-tools directory and prepend ./ to all the following adb and fastboot commands.

Connect the Cosmo left side USB-C port to the Mac. I'm using a 16" MacBook Pro running macOS Catalina, version 10.15.2.

Each command to enter is listed in a CODE block and expected response in a QUOTE block:

Code: [Select]
adb devices
Quote
List of devices attached
ABCDEFGHIJKLMNOP   unauthorized

There should also be a popup on the Cosmo screen:

Quote
Allow USB debugging?
The computer's RSA key fingerprint is: ...

Press OK and try again:

Code: [Select]
adb devices
Quote
List of devices attached
ABCDEFGHIJKLMNOP   device

Note the change, unauthorized -> device

Code: [Select]
adb reboot bootloader
The Cosmo should now restart to a black background and tiny white text in the bottom left:

Quote
=> FASTBOOT mode...

Now the fastboot command should start working:

Code: [Select]
fastboot devices
Quote
ABCDEFGHIJKLMNOP   fastboot

Code: [Select]
fastboot flashing unlock
The Cosmo should now ask for confirmation in tiny white text. Press right side of fingerprint sensor button. This will confirm wiping your device! Afterwards, verify the unlocked status:

Code: [Select]
fastboot getvar unlocked
Quote
unlocked: yes
Finished. Total time: 0.001s

Now it's done. Reboot to get back to Android:

Code: [Select]
fastboot reboot
The planets will spin for quite some time while the device gets wiped.

Afterwards I couldn't get mobile data to work. The fix was to power down, remove the SIM card tray, power on (getting to the homescreen) and off again, reinsert the SIM tray and power on.
You can also compare APN settings (Access Point Names) if you wrote them down in the beginning.

Please reply if there's any problems with these instructions.
« Last Edit: February 02, 2020, 05:18:55 pm by jjrv »

LinuxGuy

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Enabling flashing the Cosmo on OS X
« Reply #1 on: February 03, 2020, 08:50:26 am »
Hi
I dont really understand the purpose of this procedure. In order to flash a non stockROM, you will need to root it anyway, dont you?

jjrv

  • Newbie
  • *
  • Posts: 13
    • View Profile
Enabling flashing the Cosmo on OS X
« Reply #2 on: February 03, 2020, 08:59:32 am »
Quote from: LinuxGuy
Hi
I dont really understand the purpose of this procedure. In order to flash a non stockROM, you will need to root it anyway, dont you?

I was able to flash Ninji's rooted boot partition through fastboot only after the above procedure. Please let me know if there's an easier way.

Original plan was to mess with the boot partition myself for other purposes but decided to postpone that. Either way, in my opinion the above steps are necessary.
« Last Edit: February 03, 2020, 09:04:56 am by jjrv »

oida

  • Newbie
  • *
  • Posts: 26
    • View Profile
Enabling flashing the Cosmo on OS X
« Reply #3 on: February 03, 2020, 11:11:11 am »
Why not just extracting the boot image with SP flash tool, modify it with magisk and reflash it with flash tool? That usually works like a charm on Mediatek devices, no unlocking bootloader, no recovery required. I have not tried it with the cosmo yet though.

gabs5807

  • Newbie
  • *
  • Posts: 42
    • View Profile
Enabling flashing the Cosmo on OS X
« Reply #4 on: February 03, 2020, 03:19:00 pm »
Hello oida,
my cosmo is broken  . Now i read here that it is possible to reflash it   .
Can you please tell me where i can get these SP flash tool?
And can i use the bin files from planets latest firmware page?

Many thanks

gabs5807

Quote from: oida
Why not just extracting the boot image with SP flash tool, modify it with magisk and reflash it with flash tool? That usually works like a charm on Mediatek devices, no unlocking bootloader, no recovery required. I have not tried it with the cosmo yet though.
Amongst many other Computers and Phones i'm using a Gemini PDA WIFI+G4 and a Cosmo Communicator both with German keyboard, all with SailfishOS and Debian ;-)

mithrandir

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • http://www.mygnu.de
Enabling flashing the Cosmo on OS X
« Reply #5 on: February 03, 2020, 05:03:01 pm »
Quote from: gabs5807
Hello oida,
my cosmo is broken  . Now i read here that it is possible to reflash it   .
Can you please tell me where i can get these SP flash tool?
And can i use the bin files from planets latest firmware page?

Many thanks

gabs5807

Quote from: oida
Why not just extracting the boot image with SP flash tool, modify it with magisk and reflash it with flash tool? That usually works like a charm on Mediatek devices, no unlocking bootloader, no recovery required. I have not tried it with the cosmo yet though.

The downloadable firmware files are for the cover display ONLY. There are no Android images, yet. Assuming these will appear some day. If I remember correctly this also took some time for the Gemini.

mithrandir

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • http://www.mygnu.de
Enabling flashing the Cosmo on OS X
« Reply #6 on: February 03, 2020, 05:08:02 pm »
Quote from: oida
Why not just extracting the boot image with SP flash tool, modify it with magisk and reflash it with flash tool? That usually works like a charm on Mediatek devices, no unlocking bootloader, no recovery required. I have not tried it with the cosmo yet though.

Does this mean flashing (and booting) the rooted boot image with the flash tool works with locked bootloader? Always assumed the bootloader has to be unlocked or the image has to be signed somhow.

jjrv

  • Newbie
  • *
  • Posts: 13
    • View Profile
Enabling flashing the Cosmo on OS X
« Reply #7 on: February 04, 2020, 01:58:42 am »
Ninji has made Android images available here.

I used them to update to v19, which seems otherwise impossible at the moment. No tools other than fastboot were needed.

If you're wondering whether those images are trustworthy, later in the thread there are instructions for verifying them against files provided by Planet. Also, Ninji is the one who alerted us to the Digitime issue so you could say he's been more vigilant of our privacy than Planet itself.

jjrv

  • Newbie
  • *
  • Posts: 13
    • View Profile
Enabling flashing the Cosmo on OS X
« Reply #8 on: February 04, 2020, 02:05:37 am »
Quote from: oida
Why not just extracting the boot image with SP flash tool, modify it with magisk and reflash it with flash tool? That usually works like a charm on Mediatek devices, no unlocking bootloader, no recovery required. I have not tried it with the cosmo yet though.

Getting the SP flash tool to work on OS X might actually be considerably more problematic than the instructions in the first post. Not sure if it works in a Linux virtual machine, would prefer to avoid that kind of hassle.

oida

  • Newbie
  • *
  • Posts: 26
    • View Profile
Enabling flashing the Cosmo on OS X
« Reply #9 on: February 04, 2020, 11:59:11 am »
Quote from: mithrandir
Quote from: oida
Why not just extracting the boot image with SP flash tool, modify it with magisk and reflash it with flash tool? That usually works like a charm on Mediatek devices, no unlocking bootloader, no recovery required. I have not tried it with the cosmo yet though.

Does this mean flashing (and booting) the rooted boot image with the flash tool works with locked bootloader? Always assumed the bootloader has to be unlocked or the image has to be signed somhow.

It has for most snapdragon powered devices. BUT: For many MTK devices you do not have to unlock the bootloader. I have successfully rooted some MTK devices with this method. You do not need the stock rom, you have to extract the scatter file from your own phone, copy it to your phone and choose "flash image file" in magisk, and reflash it to your phone. SP flash tool is available for Windows and Linux, sadly I don't know of a version for OSx. If I had the time, I'd try it now. Just do a search on SP flash tool on XDA forums - there are many step-by-step guides there. The flash tool itself is available almost everywhere - just do a websearch.
As soon as I have some time, I will try it on the cosmo. ATM I am too busy with work but I will reply as soon as I have some time. Ninjis method is surely working 100% for now and is no big deal. I will wait until there is LineageOS and Sailfish or Linux before using the cosmo though.
« Last Edit: February 04, 2020, 12:01:01 pm by oida »