Diskussion / Ports / Custom Recoverys for Shift 6mq (LineageOS-Recovery 18.1/ Dirty functional TWRP 3.5)

@Lhotze

Original poster
Alpha Tester
Beta Tester
21 Oktober 2020
557
Hallo Leute,

dieser Thread hat sich mittlerweile zu einem Diskussionthread um Custom-Recoverys entwickelt. Deswegen habe ich mal die Beschreibung angepasst.

Wie überall gilt: Experimentieren auf eigene Gefahr und Kosten. Shift supported zwar wesentlich mehr als andere Smartphonehersteller, ist deswegen aber nicht verantwortlich Fehler zu korrigieren die man sich selbst beigebracht hat! Grundlagenwissen ist vorausgesetzt. Im Zweifel vorher Fragen.
Mit veränderten Recoverys den Bootloader nicht schließen. Das Gerät startet aufgrund eines Sicherheitsmechanismus dann nicht mehr!

Bisher besteht keine Notwendigkeit eines Custom-Recoverys (außer vll. zum Rooten/Backups), da es aktuell keine Custom-Roms für das 6mq gibt. Das ist aber nur noch eine Frage der Zeit, denke ich 🤔.


Im Anhang befindet sich ein funktionseingeschränktes TWRP, welches von mir in Ermangelung an Ahnung auch nicht weiter Maintaint wird. Sorry dafür.
Zur Funktionalität des TWRP nachfolgend:

Was funktioniert:
- booten
- einhängen von System und anderen Partitionen
- erkennen einer externen SD-Karte
- Installation von ZIP-Dateien (solange nicht auf /internal oder /data geschrieben wird; also nicht für Magisk-Module
- Navigieren in der Verzeichnisstruktur /system_root
- Wechsel der A/B-Partitionen
- ADB Sideload /ADB
- MTP
- Partitions-Backup / Wiederherstellung
  • Boot (A/B)
  • Recovery (A/B)
  • Metadata
  • Modem (A/B; gerätespezifische Partition mit IMEI u.a.)
  • Misc
  • Persist
  • Super (enthält System, Produkt, Vendor von beiden Slots)
  • alle weiteren realen Partition (außer Userdata)

- Image-Flashing
  • System (aktiver Slot) Entfernt wegen Fehler (Ist einen dynamische Partition unter "Super". Bisher keine Möglichkeit der Isolation gefunden; Flashen kann zu Partitionsfehler führen)
  • Boot (aktiver Slot und seperat A/B)
  • Recovery (A/B)
  • Recovery Ramdisk
  • Super-Partition
  • VBMeta (System und Vendor A/B nur für den Fall, dass GSI mal ein Thema wird)

Was nicht funktioniert:
- Einhängen der /Data Partition (verschlüsselt)
- Enhängen des Internen Speichers (verschlüsselt)
- Image Flashing von anderen Partitionen als Boot, Recovery, und Super (warum auch? Das macht mehr kaputt als heile...)
- separates Einhängen und Backup der dynamischen Partitionen /system, /vendor und /product.

Ungetestet:
- USB-OTG


Beim Booten braucht es eine Weile, da es erst die Partitionen einhängen muss.

Installationsanleitung:
Mit Root und Terminal aus Android mit den Befehlen:
dd if=/pfad/zum/recovery.img of=/dev/block/sde20 für Partition A oder dd if=/pfad/zum/recovery.img of=/dev/block/sde42 für Partition B.

Alternativ mit offenem Bootloader im Fastboot-Menü im Windows oder Linux Terminal:
fastboot flash recovery /pfad/zum/recovery/auf/dem/pc.img.
Das flasht dann auf die derzeit aktive Partition.

Oder mit Fastboot zum Testen ohne Installation:
fastboot boot /pfad/zum/recovery/auf/dem/pc.img
und das Recovery startet.

Das Flashen überschreibt die Partitionen /dev/block/sde20 und /sde42, auf denen sich die Recovery-Partitionen A und B des Gerätes befinden.
Ab dann bootet das Gerät in das Custom-Recovery anstatt des Shift-Recovery. Das Shift Recovery lässt sich über den gleichen Vorgang wieder installieren.

Im Anhang befinden sich die Initial Recoverys von ShiftOS-L und ShiftOS-G, der erwähnte "Dirty-TWRP-Port" und ein LineageOS-Recovery (18.1) welches @amartinz hier kompiliert und zum Testen zur Verfügung gestellt hat.

Dank an alle, die sich hier beteiligen und an SHIFT und seine Entwickler.

Greetz

Edit 05.09.2021: Geupdatete Threadbeschreibung, English is coming soon.
 

Anhänge

  • TWRP_3.5_Shift6mq.img
    31,4 MB · Aufrufe: 171
  • Shift6mq_ShiftOS-G_Recovery_initial_release.img
    21,8 MB · Aufrufe: 50
  • Shift6mq_ShiftOS-L_Recovery_initial_release.img
    21,8 MB · Aufrufe: 87
  • recovery_lineage-18.1-20210905-UNOFFICIAL-axolotl.img
    23 MB · Aufrufe: 19
Zuletzt bearbeitet:

@Lhotze

Original poster
Alpha Tester
Beta Tester
21 Oktober 2020
557
Hier noch Screenshots aus dem gebooteten TWRP.
______
Here some Screenshots out of the TWRP.
 

Anhänge

  • Screenshot_2021-01-07-02-48-36.png
    Screenshot_2021-01-07-02-48-36.png
    72,6 KB · Aufrufe: 33
  • Screenshot_2021-01-07-02-48-46.png
    Screenshot_2021-01-07-02-48-46.png
    91,8 KB · Aufrufe: 31
  • Screenshot_2021-01-07-02-50-45.png
    Screenshot_2021-01-07-02-50-45.png
    87,1 KB · Aufrufe: 26
  • Screenshot_2021-01-07-02-48-57.png
    Screenshot_2021-01-07-02-48-57.png
    83,5 KB · Aufrufe: 26
  • Screenshot_2021-01-07-02-50-07.png
    Screenshot_2021-01-07-02-50-07.png
    68,8 KB · Aufrufe: 26
  • Screenshot_2021-01-07-02-49-32.png
    Screenshot_2021-01-07-02-49-32.png
    113,8 KB · Aufrufe: 24
  • Screenshot_2021-01-07-02-49-40.png
    Screenshot_2021-01-07-02-49-40.png
    68 KB · Aufrufe: 26
  • Screenshot_2021-01-07-02-49-06.png
    Screenshot_2021-01-07-02-49-06.png
    69,7 KB · Aufrufe: 35
Zuletzt bearbeitet:

Ene

Alpha Tester
Beta Tester
21 Oktober 2020
71
Germany / Bavaria
Currently, after trying to boot into the recovery, my display just stays black. I'm guessing my OS is outdated. What Shift-OS version did you test it with?
 

@Lhotze

Original poster
Alpha Tester
Beta Tester
21 Oktober 2020
557
Shift-OS-L vom 09.12.2020.
Die Ramdisk des Recovery ist allerdings noch von der allerersten Shift-OS-G Release, sollte also, wenn es sogar mit dem letzten L-Release läuft aktuell überall laufen.

Greetz
___________
Shift-OS-L from 09.12.2020.
The ramdisk of the recovery is from the very first Shift-OS-G release, so if it is running even with the last L release it should currently run everywhere i think.

Greetz
 
  • Like
Reaktionen: Ene und Martin S.

Ene

Alpha Tester
Beta Tester
21 Oktober 2020
71
Germany / Bavaria
@Lhotze, please change the entry ro.adb.secure to 0 in the ramdisk/default.prop because ADB doesn't work in TWRP (adb: error: failed to get feature set: device unauthorized.)
 
Zuletzt bearbeitet:

@Lhotze

Original poster
Alpha Tester
Beta Tester
21 Oktober 2020
557
Edit: Ich lag falsch...
______
I was wrong...


Es ist in der prop.default mit ro.adb.secure=0 erstellt und ADB (Sideload, mehr ADB-Funktionen habe ich nicht getestet) sollte gehen.
Greetz
___________
It is created in the prop.default with ro.adb.secure=0 and ADB (sideload, i haven't tested more ADB-functions) should work.
Greetz
 
Zuletzt bearbeitet:
  • Like
Reaktionen: Ene

Ene

Alpha Tester
Beta Tester
21 Oktober 2020
71
Germany / Bavaria
Es ist in der prop.default mit ro.adb.secure=0 erstellt und ADB (Sideload, mehr ADB-Funktionen habe ich nicht getestet) sollte gehen.
Greetz
___________
It is created in the prop.default with ro.adb.secure=0 and ADB (sideload, i haven't tested more ADB-functions) should work.
Greetz
bei getprop steht allerdings da ro.adb.secure [1] und adb gibt den obrigen fehler aus (einfach bei eingabe von adb shell, bei adb devices steht auch unauthorized)
 
Zuletzt bearbeitet:

@Lhotze

Original poster
Alpha Tester
Beta Tester
21 Oktober 2020
557
Mmh, ich schau die Tage mal wenn ich Luft habe.
___
Will take a look if there is time to fix ADB.
Greetz

Edit:
Fehler gefunden und behoben. Der ro.adb.secure Befehl war doppelt in der Prop vorhanden. Einmal richtig und einmal falsch 🤦🏼‍♂️. Danke an @Ene für den Hinweis.
Einganspost wurde geupdatet.
______
Error found and fixed. The entry was there two times. One correct, the other wrong.🤦🏼‍♂️
Thanks to @Ene for pointing out.
Entrypost was updated.
 
Zuletzt bearbeitet:
  • Love
  • Like
Reaktionen: Ene und Martin S.

Revan335

Alpha Tester
Beta Tester
2 Juni 2016
302
Germany
Weiß nicht ob ich es richtig verstanden hab.
Ist das TWRP zum Backup und ggf. Restore schon geeignet sofern es nicht verschlüsselt ist?
Zum flashen von TWRP Updates und OpenGApps Pico?
Wipe Cache/Dalvik und DATA/System für Factory Reset möglich?
Für Updates von ShiftOS nutzt man die OTA App statt TWRP?
Wo findet man das passende Stock Recovery von ShiftOS L für seine Version?
Ob G oder L installiert ist, ist sehr wahrscheinlich egal da TWRP für beides bzw. das Gerät gilt?

Bei mir klappt das einbinden der Partitionen nicht.
Bspw. interner Speicher, SD Karte oder data ...
System funktioniert aber
Bei /data -> Invalid argument
 
Zuletzt bearbeitet:

@Lhotze

Original poster
Alpha Tester
Beta Tester
21 Oktober 2020
557
Ist das TWRP zum Backup und ggf. Restore schon geeignet sofern es nicht verschlüsselt ist?
Ja
___
Yes
Zum flashen von TWRP Updates und OpenGApps Pico?
Ja sollte gehen, aber ich würde ein vorhergehendes Backup der Super-Partition empfehlen. Da sind beide Systempartitionen enthalten. Weiterhin hättest du das Problem, dass nach einem Softwareupdate eine andere Systempartition angewählt wird. Ich würde was Gapps angeht eher eine Magisk-Lösung (Magic Gapps) empfehlen oder einen Wechsel auf ShiftOS-G.
______
Yes, but i would recommend an update of "Super" (includes both System partitions) first in case something goes wrong. After an Update Pico is gone. I would recommend an Magisk-Solution (Magic Gapps) or a change to ShiftOS-G.
Für Updates von ShiftOS nutzt man die OTA App statt TWRP?
Ja, Systemupdate über TWRP wird nicht funktionieren
____
Yes, TWRP should not work
Ob G oder L installiert ist, ist sehr wahrscheinlich egal da TWRP für beides bzw. das Gerät gilt?
Ja
____
Yes
Wo findet man das passende Stock Recovery von ShiftOS L für seine Version?
Das kannst du mit TWRP sichern. Entweder nur durch booten des TWRP und sichern irgendeiner Recovery Partition (die gesicherte .emmc Datei einfach in .img umbenennen...das war's) oder falls TWRP schon installiert ist das Recovery aus dem inaktiven Slot backupen.
Bei mir klappt das einbinden der Partitionen nicht.
Bspw. interner Speicher, SD Karte oder data ...
System funktioniert aber
Bei /data -> Invalid argument
Wegen der dateibasierenden Verschlüsselung. Geht noch nicht.
____
Because of the File based encryption.

Greetz
 
  • Love
Reaktionen: Martin S.

Revan335

Alpha Tester
Beta Tester
2 Juni 2016
302
Germany
Welches meinst du, das klingt geil?

Die scheinen beide nicht mehr so aktuell zu sein.
 

@Lhotze

Original poster
Alpha Tester
Beta Tester
21 Oktober 2020
557
Es gab (zumindest zu Zeiten von Android 7) mindestens ein Gapps-Paket für Magisk. Das hieß Magic Gapps. Ob es das zu Android 10 Zeiten noch gibt, wo sich das Android mountverhalten von Magisk grundlegend verändert hat weiß ich nicht, da ich es nicht selbst nutze.

Ich verstehe aber auch nicht, warum du extra Google Apps auf einem entgoogelten System installieren willst, wenn der Hersteller das identische System mit Google-Diensten bereits anbietet.

Aus Erfahrung kann ich dir sagen, dass du mit dem googlefreien Betriebssystem und nachträglich installierten Gapps mehr Probleme haben wirst, als wenn du eines mit vorinstallierten Diensten wählst.
Zumal bei Shift kein Bloat dabei ist.


Greetz
 
  • Like
Reaktionen: Uli und Martin S.

Revan335

Alpha Tester
Beta Tester
2 Juni 2016
302
Germany
Auf meinen alten Devices hab ich es mit LOS und OpenGApps pico gemacht. Da hat man nur das minimal notwendigste wie PlayStores, Push Dienste ... um gewisse Apps zu nutzen.

Was heißt kein Bloat?
Es ist soweit mir bekannt eine Vorgabe seitens Google wie ein Android mit GMS Google Mobile Services auszusehen hat bzw. was dort vorinstalliert werden muss.
Wenn das bei Shift anders ist, wäre das natürlich super.
 

danielp

SHIFT Friend
Alpha Tester
Alpha Tester
22 September 2019
3.146
Auf meinen alten Devices hab ich es mit LOS und OpenGApps pico gemacht. Da hat man nur das minimal notwendigste wie PlayStores, Push Dienste ... um gewisse Apps zu nutzen.

Was heißt kein Bloat?
Es ist soweit mir bekannt eine Vorgabe seitens Google wie ein Android mit GMS Google Mobile Services auszusehen hat bzw. was dort vorinstalliert werden muss.
Wenn das bei Shift anders ist, wäre das natürlich super.
Man mag die GMS zwar zu Recht als Bloat bezeichnen, andere Anbieter packen aber noch mehr Kram den keiner braucht rein. Das wird in der Regel als Bloat bezeichnet.
 
  • Like
Reaktionen: Martin S.

Martin S.

SHIFT Friend
Alpha Tester
15 Februar 2020
1.140
Mit Bloat sind Dinge gemeint wie:
Samsung Health
Samsung Galaxy Store
Samsung Cloud
Samsung usw
Samsung etc

Und dann noch Third Party Apps
Auf OS-G sind natuerlich eine Standard-Auswahl Gapps vorinstalliert (y)
 

Revan335

Alpha Tester
Beta Tester
2 Juni 2016
302
Germany
Kann man die GApps dann entfernen, die man nicht will oder kommen die dann beim nächsten Update wieder und man muss erneut aufräumen?
Was sind Shift Friends, ist das ne Speziell Gruppe wie Beta fürs Beta Forum?
Wie bekommt man das?
 

Darkijah

Banned
22 Oktober 2020
98
Danmark
Do we have an image for restoration of the mobile to its original origin if something fails and brick the device? I know I have for my LG V20 - so I can always go back to an original state if something goes wrong.
 

Darkijah

Banned
22 Oktober 2020
98
Danmark
Anyone knows what the difference is between TWRP 3.0.5 v9 and v10?
Might not be important here overall, just wanted to know as I recall there was something....
 

Darkijah

Banned
22 Oktober 2020
98
Danmark
Auf meinen alten Devices hab ich es mit LOS und OpenGApps pico gemacht. Da hat man nur das minimal notwendigste wie PlayStores, Push Dienste ... um gewisse Apps zu nutzen.

Was heißt kein Bloat?
Es ist soweit mir bekannt eine Vorgabe seitens Google wie ein Android mit GMS Google Mobile Services auszusehen hat bzw. was dort vorinstalliert werden muss.
Wenn das bei Shift anders ist, wäre das natürlich super.
I did wonder why Shift would not just have a nano or pico version installed - lots of Google apps for sure in the G version... But I guess it makes it easier for most to start out.
 

Darkijah

Banned
22 Oktober 2020
98
Danmark
okay got through this tread, so far so good. Just sniffing around to see what is possible for now. Working on the mobiles, on multiple layers :p
My new used now rooted LG V20 and the new Shift 6mq.
So... going back to the https://forum.shiftphones.com/threads/bootloader-unlock-root-custom-recoveries-roms.3207/ and reading that as well.

I'm not sure if I can use LGbackup for the new mobile, so I am going to test that, the other option is to get the stuff over to the rooted new used LG v20 I have and then use a rooted app to do it. But then I need the Shift mq6 to be rooted as far as I can gather.

Anyway nice to be guided into information, although I am clearly locked out of things to look at to learn. :/
 

Darkijah

Banned
22 Oktober 2020
98
Danmark
Hmm that did not go to well for me... Seems it goes into the TWRP now and not the system...
Well, I guess I will sleep on it, everything else went great, getting the bootloader unlocked and rooting the device. But this did not go to well apparently.
 

Darkijah

Banned
22 Oktober 2020
98
Danmark
Okay guys, I just did ADB and wiped every drive down accept the System which it failed. I am already in deep waters here, so no worries of doing more damage, so I might as well learn a little. So wiping it all clean from there I only had the FastBoot Mode running on my mobile. I just installed TWRP again, so at least it seems things are all clean now and not running 2 recovery's, which might have something to do with the A B mode thing confusing stuff.

If anyone have a Backup of the Shift L system from TWRP that might work for me for restoring it again to come alive, at the moment it is not that useable.

Well, it seemed I needed to install TWRP inside TWRP, or it would delete itself when I changed the clock and buttons in the option. Then it wiped it out apparently.
I then installed TWRP on Boot, Boot A and Boot B from inside TWRP and now it stays there, although the options if changed changes back to the beginning output.

Anyway, I found this video trying to learn a little on this nonsense A B mode.
URL: https://www.youtube.com/watch?v=qjC9Z3nmCa8

Some more Google craziness I guess, it never really stops. Sadly Linux Mobiles are not there yet, but I would love to say bye bye to Google and its Tyranny nonsense. At least we can go Degoogle, and I guess I went a step further just removing it all...

Anyway... I need something to restore a system on the mobile, for now only TWRP is on it. I might try some of the other Boot images just for the learning process. But would love to get the Light version of Shift up and running on the mobile at some point so I can begin to root and restore my apps from the other rooted mobile so I can move over to the Shift 6mq and begin using it as a daily driver.

Anyone knows why there is 3 Boots partitioning? Like that goes beyond the new A B mode of Google...

Because I stupidly did not do a backup at the install of TWRP -
- Partition backup / restore
Can this Restore any partition? If this is possible I could maybe restore my phone if someone could make a backup of their phone with TWRP and send it. Because stupidly I did not make a backup myself before messing up. It seems it is not as easy to restore as I thought. I really thought I had the file for restoring the Shift Light stock version, but apparently it is only a file with updates.
Like one thing is to not dig around and read and test things out and such, but if there is really no solution - I'm dead in the water. Although bootloader is unlocked and TWRP installed :p

(depending on the currently selected slot under "Recovery Slot A" or "Recovery Slot
B").
To self, TO RECOVERY NOT BOOT!!! Stupid me... Maybe that is why it is not working as it should.

Well, I got opened another door, so I got it rooted again and was trying for a second time with TWRP. Well, installed it to the boot not the Recovery and thereby the system does not boot anymore. I think I made the same mistake the first time. But I'll try again, just going to try out something first and then I will give it another go.

Okay I got the Light version installed, Rooted it and tried installing TWRP again in Recovery. Everything looked good until I tested the mobile in regards of the bootloader, Fastboot and such. And all of the sudden it would only boot into TWRP and could not get it into the system. I think it is when you enter FastBoot that it breaks it from working. Anyway reinstalled the Light stock Recovery and got it all working again, but it started out going into FastBoot before entering the system, so I think it is going into FastBoot that might be the problem for the TWRP. Although I have not further tested it.

Translated German:

Update auf TWRP, wenn Sie TWRP installieren und in Fastbootd neu starten - Sie erhalten eine TWRP-Bootloop und es wird nicht mehr in das System eingeben!!!
Sie müssen das Stock Recovery neu installieren und von dort aus geht es erst in Fastbootd und von dort aus schließlich ins System. Es scheint an diesem Fastbootd zu hängen, was dazu führt, dass es die ganze Zeit in TWRP geht. Es scheint nicht zu verstehen, dass es durch TWRP in Fastbootd eingetreten ist und dadurch - Sie keine Möglichkeit haben, in das System zu gelangen.

Wenn Sie also TWRP installieren, gehen Sie nicht in den Fastbootd, Sie brauchen ihn sowieso nicht, da Sie den Bootloader für die Verbindung verwenden. Ich habe immer noch nicht herausgefunden, warum es sowohl Bootloader als auch Fastbootd geben sollte... Was ist der Sinn davon??? Wie auch immer... Nur eine Vorwarnung für Leute, geben Sie nicht Fastbootd, wenn Sie die schmutzige TWRP installieren :)

original English:

update on TWRP, if you install TWRP and restart into Fastbootd - you will get a TWRP bootloop and it won't enter the system anymore!!!
You will have to reinstall the Stock Recovery and from there it first enters Fastbootd and then from there it will finally move into system. It seems it hangs on this Fastbootd which makes it go into TWRP all the time. It does not seem to understand that it has entered Fastboot by TWRP and thereby - you have no way of getting into the System.

So if you install TWRP do not go into the Fastbootd, you don't need it anyway as you use the bootloader for connection anyway. Still have not sorted out why there would be both bootloader and fastbootd... What is the point of it??? Anyway... Just a head up for people, don't enter Fastbootd if you install the dirty TWRP. :)

A more direct way of installing TWRP using fastboot is using the command: fastboot flash recovery TWRPfile.img
No need of going into TWRP by boot as far as I can see, to do the same thing from inside of the application.
Seems to work for me anyway... Then just restart and go into Recovery and it should be installed.
You do the same thing when and if you brake it and it does the TWRP boot load, just replace the TWRPfile.img with the SOS Light or Google recovery!
Or do it from inside TWRP, I think that works as well if I recall so it is not a biggie, as long as you know how to quickly correct it.
Wait, let me test it out... and confirm it by doing. Be right back! *from TWRP booting into fastbootd* Now it should be boot looping into TWRP... no apparently not, it seems it might only be from the System restart into fastbootd as it is still working now. Okay, well lets go into the system, restart and do the fastbootd from there and it should fault again making the boot loop into TWRP. Yup... Oh doh, I forgot to flash it with TWRP... Well, do it over. Yup it worked as well doing it from TWRP, but just remember to check if you are on A or B and flash the correct Recovery ;)

Done. And now... I will try to make a backup with TWRP and see if I can move some applications over to my new Shift 6mq mobile! :D

@Lhotze I am having some issues with backing up my system from TRWP, I thought this was possible???
I am getting an error, Unable to mount storage - Failed to mount '/data' (invalid argument)
Need some help and brain power on this.
Maybe it is not possible yet to make a backup... Would have been nice though.
 

danielp

SHIFT Friend
Alpha Tester
Alpha Tester
22 September 2019
3.146
@Lhotze I am having some issues with backing up my system from TRWP, I thought this was possible???
I am getting an error, Unable to mount storage - Failed to mount '/data' (invalid argument)
Need some help and brain power on this.
Maybe it is not possible yet to make a backup... Would have been nice though.
@Darkijah maybe you should re-read the guide again! @@Lhotze even bothered to provide an English version.
What does not work:
- Mount the / data partition (encrypted)
 

Darkijah

Banned
22 Oktober 2020
98
Danmark
@Darkijah maybe you should re-read the guide again! @@Lhotze even bothered to provide an English version.
My brain is faulty and overburdened, sometimes it just does not work as it should because it has not had a break for many many years. So bear with me! ;)
I understood it as it was possible, I was not totally sure... Thereby I asked! No wrong in asking a Question if one is in doubt.