Author Topic: Rooting the Cosmo Communicator  (Read 20063 times)

wapsi

  • Newbie
  • *
  • Posts: 10
    • View Profile
Rooting the Cosmo Communicator
« Reply #120 on: March 26, 2020, 11:20:23 am »
I'm using Ninji's images which I flashed by using SP Flash Tool. It would be really nice if someone could upload the new boot (Magisk patch installed) and system images to somewhere again. Otherwise I don't know how to flash the update because the installation by using the official flashing tool fails. I don't know if the OTA zip file is flashable via fastboot?

cam1965

  • Sr. Member
  • ****
  • Posts: 264
    • View Profile
    • http://
Rooting the Cosmo Communicator
« Reply #121 on: March 26, 2020, 12:39:23 pm »
Quote from: Zarhan
Quote from: cam1965
There is a  new version of firmware today  ( ota update )  . I've rooted android the unnoficial way following the steps in this forum. But this firmware update from Planet didn't install ( error ). Can someoone help ? Thank you.

You need to unroot your device first, obviously. I haven't tested the process myself, but you need to essentially install the original boot image via fastboot. Then boot, patch, and re-root (you need to create a new rooted image or wait for someone to publish one here).
OK. Thank you . I will try.

Zarhan

  • Full Member
  • ***
  • Posts: 201
    • View Profile
Rooting the Cosmo Communicator
« Reply #122 on: March 26, 2020, 01:00:16 pm »
Just did the OTA upgrade myself. Process as documented in my earlier post - just "fastboot flash boot boot_orig.img" and then patch as normal.

To get back root, you need to use sp_flashtool to grab the image off it, then use magisk manager to re-patch that image, and then flash it using fastboot again. I haven't done this yet.

PNuT

  • Newbie
  • *
  • Posts: 45
    • View Profile
Rooting the Cosmo Communicator
« Reply #123 on: March 26, 2020, 02:32:34 pm »
Quote from: Zarhan
To get back root, you need to use sp_flashtool to grab the image off it, then use magisk manager to re-patch that image, and then flash it using fastboot again. I haven't done this yet.

I just selected the rooted android version in the boot menu & it appears to be rooted and working as it should

mibry

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Rooting the Cosmo Communicator
« Reply #124 on: March 26, 2020, 06:34:44 pm »
Quote from: mibry
I was wondering if someone could help me. I was trying to be smart by deleting google system files off my cosmo. When I try to apply the v20 patch it fails. I have downloaded the system dump files from post 83 and when I try to restore my cosmo from the scatter files it is missing some files. So far I have been able to resolve some of the error I am getting but I have hit a road block. I seem to be missing the bin files for scp1, scp2, lk, lk2, logo, tee1, tee2, cache and userdata. If I am able to restore without these file please let me know.

Thanks in advance.

Regards

Mibry

Reply to my own post. I was able to fix my problem by using fastboot to restore the system.img file from the dump that was done by Ninji. Thanks for the dumped files.
« Last Edit: March 26, 2020, 06:36:10 pm by mibry »

wapsi

  • Newbie
  • *
  • Posts: 10
    • View Profile
Rooting the Cosmo Communicator
« Reply #125 on: March 27, 2020, 07:28:40 am »
Quote from: wapsi
I'm using Ninji's images which I flashed by using SP Flash Tool. It would be really nice if someone could upload the new boot (Magisk patch installed) and system images to somewhere again. Otherwise I don't know how to flash the update because the installation by using the official flashing tool fails. I don't know if the OTA zip file is flashable via fastboot?

Replying to my post: I was able to update from rooted V19 to V20 by re-flashing Ninji's V19 images and original (unrooted) boot img using SP Flash Tool. Then I did the upgrade manually by putting OTA.zip into phone's storage root and flashing it by using PlanetCom's update tool in Android (accessible via Settings). Upgrade was OK now. After that I re-flashed the rooted boot img provided by PlanetCom.

cam1965

  • Sr. Member
  • ****
  • Posts: 264
    • View Profile
    • http://
Rooting the Cosmo Communicator
« Reply #126 on: March 27, 2020, 12:48:47 pm »
Quote from: cam1965
Quote from: Zarhan
Quote from: cam1965
There is a  new version of firmware today  ( ota update )  . I've rooted android the unnoficial way following the steps in this forum. But this firmware update from Planet didn't install ( error ). Can someoone help ? Thank you.

You need to unroot your device first, obviously. I haven't tested the process myself, but you need to essentially install the original boot image via fastboot. Then boot, patch, and re-root (you need to create a new rooted image or wait for someone to publish one here).
OK. Thank you . I will try.

Installed the original image. Updated the firmware. Did a boot in Debian and extracted the android  boot image.Copied it to a folder in android.   Did a boot in android and patched it with magisk. Copied the image to my computer and did a fastboot to flash the new patched image from magisk. Worked !

irukandji

  • Newbie
  • *
  • Posts: 42
    • View Profile
Rooting the Cosmo Communicator
« Reply #127 on: April 10, 2020, 05:57:51 am »
I got myself into a boot loop, does someone maybe know what partitions to restore with twrp (i have created backup with v19 while I got into into bootloop with firmware v21)?

(Probably posted in wrong part of forum: https://www.oesf.org/forum/index.php?showtopic=36230)

cam1965

  • Sr. Member
  • ****
  • Posts: 264
    • View Profile
    • http://
Rooting the Cosmo Communicator
« Reply #128 on: April 10, 2020, 01:11:51 pm »
Quote from: irukandji
I got myself into a boot loop, does someone maybe know what partitions to restore with twrp (i have created backup with v19 while I got into into bootloop with firmware v21)?

(Probably posted in wrong part of forum: https://www.oesf.org/forum/index.php?showtopic=36230)

You can restore to v19 firmware . Please see my post below :

https://www.oesf.org/forum/index.php?showto...15&start=15

Post #24.

irukandji

  • Newbie
  • *
  • Posts: 42
    • View Profile
Rooting the Cosmo Communicator
« Reply #129 on: April 11, 2020, 04:55:20 am »
Quote from: cam1965
Quote from: irukandji
I got myself into a boot loop, does someone maybe know what partitions to restore with twrp (i have created backup with v19 while I got into into bootloop with firmware v21)?

(Probably posted in wrong part of forum: https://www.oesf.org/forum/index.php?showtopic=36230)

You can restore to v19 firmware . Please see my post below :

https://www.oesf.org/forum/index.php?showto...15&start=15

Post #24.

Thank you, i have seen this post before but restoring from twrp is much more simple, thats why I am asking, I intend to play around android quite a bit and I would love to have a fast way to restore and backup and twrp is perfect for this. But I am confused by the amount of partitions and I would like to know which should be restored.
« Last Edit: April 11, 2020, 09:36:51 am by irukandji »

mithrandir

  • Full Member
  • ***
  • Posts: 180
    • View Profile
    • http://www.mygnu.de
Rooting the Cosmo Communicator
« Reply #130 on: June 22, 2020, 05:02:23 pm »
Anyone already has V22 stock and magisk boot images? Is there an easy way to extract the stock boot image on the unrooted device? I started with spflash tool, but I am unsure about the partition addresses since my scatter file does not match anymore because of reserving space for Linux.

Thanks!
« Last Edit: June 22, 2020, 05:02:39 pm by mithrandir »

ZimbiX

  • Newbie
  • *
  • Posts: 36
    • View Profile
    • http://twitter.com/ZimbiX
Rooting the Cosmo Communicator
« Reply #131 on: June 24, 2020, 10:29:42 am »
I've uncharacteristically been unrooted for a while (not using the Cosmo much recently I guess, due to the rona!), and had meant to get Magisk going again since the last update, but never quite got around to it. I've just finished the update now from v19 to v22, so it's been a good excuse to contribute the latest boot images again.

So here are the latest boot images =)

- boot-v22-stock.img: https://mega.nz/file/5w1TgKiQ#fwko3-fXJ1U8O...-SbgIUGUNj3Cgac
- boot-v22-magisk.img: https://mega.nz/file/14tjyQRQ#hvDW6EwCXGdZo...IkLeMogzPwbhpA8

I'm on Linux on a new computer, and just got SP Flash Tool readback working on Arch Linux for the first time, iirc. Reminder/note to self:

With SP Flash Tool v5.2020 for Linux:

Code: [Select]
$ cat /etc/udev/rules.d/20-mm-blacklist-mtk.rules    
ATTRS{idVendor}=="0e8d", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="6000", ENV{ID_MM_DEVICE_IGNORE}="1"

$ sudo udevadm control --reload

$ sudo ./flash_tool

Then according to the scatterfile, readback from 0x21700000 for length 0x2000000 (This is the original location for the boot partition as I have not yet tried installing Linux on my Cosmo).
« Last Edit: June 24, 2020, 10:31:57 am by ZimbiX »

Zarhan

  • Full Member
  • ***
  • Posts: 201
    • View Profile
Rooting the Cosmo Communicator
« Reply #132 on: June 25, 2020, 01:15:28 am »
Thanks for the images, but a question: From where do you acquire the scatterfile (or rather, how do you generate it)?

Second, when you use spflashtool to extract the boot partition, how do you remove padding from the end of the image (the actual boot image does not fill the entire partition)?

ZimbiX

  • Newbie
  • *
  • Posts: 36
    • View Profile
    • http://twitter.com/ZimbiX
Rooting the Cosmo Communicator
« Reply #133 on: June 26, 2020, 04:31:51 am »
Quote from: Zarhan
Thanks for the images, but a question: From where do you acquire the scatterfile (or rather, how do you generate it)?
Sure. I suppose I didn't describe that well earlier in the thread.

Back when I first worked out the process to root, I used this 'Wwr MTK tool' on Windows to generate a scatterfile that's compatible with SP Flash Tool. It has a great deal of functionality, but can be confusing. iirc, not having root, I had to follow the convoluted process documented there to do something like first generate a partial scatterfile, then use that to readback the whole device from SP Flash Tool as one image, then get Wwr to analyse that and generate the full scatterfile. Just follow the steps there. Or, I suspect that by starting from a rooted device, you'd be able to use a different function of Wwr to read the partition layout directly from the device to generate the scatterfile.

Let us know how you go! =)

Quote from: Zarhan
Second, when you use spflashtool to extract the boot partition, how do you remove padding from the end of the image (the actual boot image does not fill the entire partition)?
Haha, good question; I don't know how to do that yet. There is a function in Wwr for that, iirc, but the free version startup wait time is too annoying to bother. I think Wwr is just wrapping an open source partition editing binary for that though, so I suspect you could Google for like 'linux strip empty space from partition image'.
« Last Edit: June 26, 2020, 04:32:21 am by ZimbiX »

Zarhan

  • Full Member
  • ***
  • Posts: 201
    • View Profile
Rooting the Cosmo Communicator
« Reply #134 on: June 26, 2020, 12:16:57 pm »
Quote from: ZimbiX
Haha, good question; I don't know how to do that yet. There is a function in Wwr for that, iirc, but the free version startup wait time is too annoying to bother. I think Wwr is just wrapping an open source partition editing binary for that though, so I suspect you could Google for like 'linux strip empty space from partition image'.

Thanks for the answers. Ok, it's not exactly a showstopper since there is really no harm in flashing a bunch of junk at the end of the image except for slightly increased size.