Added support for Motorola Moto G8 Power by MagicLike · Pull Request #202 · openandroidinstaller-dev/openandroidinstaller

@MagicLike

Added support for the Motorola Moto G8 Power.

@moan0s please test the config.

resolves #193

@moan0s

I am so sorry but I totally misunderstood/forgot the process. I now understand that I would need

  • the lineagOS image (which I have an unoffical version as linked in the issue at least)
  • but also the a TWRP build which does not seem to exist for this device https://twrp.me/Devices/Motorola/

So unless I misunderstood something again I think I wasted your time. I am very very sorry

@moan0s

Okay I think I found a fitting TWRP image 🥳 Currently I am at Boot custom recovery which takes worryingly long 😱

@moan0s

Well it's stuck at adb wait-for-sideload.

OpenAndroidInstaller log:

>$adb shell twrp sideload
>$adb wait-for-sideload

Phone output

MTP enabled
command is: 'sideload' and there is no value
starting ADB sidload feature...

I waited for 7 hours for the command to complete

@moan0s

And maybe that is relevant too: Before that got a lot of errors in Updating partitioning details which seems to be executed two times on the phone (with the same errors)

Updating partitioning details
Error opening /data/misc/recovery (Operation not permitted)
Error opening /data/misc/bluedroid (Operation not permitted)
...
Updating partitioning details...
Error opening /data/misc/recovery (Operation not permitted)
Error opening /data/misc/bluedroid (Operation not permitted)
...

@tsterbak

@moan0s

Can I somehow help by providing partition information?
Checking the backup option in TWRP allows me to select the following partitions

Boot (64MB)
DTBO (23MB)
Super (8288MB)
Data (excl. storge) (1MB)
Recovery (64MB)
Persist (1MB)
Bluetooth (4MB)
DSP (32MB)
EFS (8MB)
FSG (24MB)
LOGO (32MB)
Super (System, Product, Vendor) (8288MB)

And then flash LOS: https://www.getdroidtips.com/lineage-os-19-1-moto-g8-power/

The device here is called amogus I thnik this is a different device? Or should I be able to use that as well?
Here the Moto G8 Power is referred to as sofiar:https://www.xda-developers.com/motorola-moto-g8-power-twrp-omnirom/

@MagicLike

Can I somehow help by providing partition information?
Checking the backup option in TWRP allows me to select the following partitions

Boot (64MB)
DTBO (23MB)
Super (8288MB)
Data (excl. storge) (1MB)
Recovery (64MB)
Persist (1MB)
Bluetooth (4MB)
DSP (32MB)
EFS (8MB)
FSG (24MB)
LOGO (32MB)
Super (System, Product, Vendor) (8288MB)

And then flash LOS: https://www.getdroidtips.com/lineage-os-19-1-moto-g8-power/

The device here is called amogus I thnik this is a different device? Or should I be able to use that as well?
Here the Moto G8 Power is referred to as sofiar:https://www.xda-developers.com/motorola-moto-g8-power-twrp-omnirom/

Hmmmm - @moan0s Can you try and install this app and send a screenshot here? (It can show us if your device supports a/b partitioning and is a bit easier, than fiddeling with the command line)

@moan0s

No sorry, that app is not available for A11.

@MagicLike

No sorry, that app is not available for A11.

Weird, I can install it on Android 13...
Ok, then onto the command line.

What OS are you using on your PC?

@MagicLike

At first you will need to download the Android Platform Tools. I suppose USB-Debugging is already enabled?

Then navigate into the unpacked folder of the platform tools on your pc and open a command line in this folder and run the following commands:
./adb reboot bootloader
After your device rebooted into fastboot mode:
fastboot getvar all

If something like (bootloader) current-slot appears, with the value being either a or b your device is a/b partitioned. If not - it is not.

@moan0s

What OS are you using on your PC?

Endeavour OS (Arch based linux)

USB-Debugging is already enabled?

Yes :)

Here is the relevant output (AFAIK what relevant is):

 fastboot getvar all
... 
(bootloader) current-slot: b
(bootloader) running-bl-slot: _b/_b
(bootloader) running-boot-lun: 0
(bootloader) slot-count: 2
(bootloader) slot-successful:_a: yes
(bootloader) slot-successful:_b: yes
(bootloader) slot-unbootable:_a: no
(bootloader) slot-unbootable:_b: no
(bootloader) slot-retry-count:_a: 6
(bootloader) slot-retry-count:_b: 6
(bootloader) logical-block-size: 0x200
(bootloader) erase-block-size: 0x200
...

So it seems the device is a/b partitioned?

@MagicLike

What OS are you using on your PC?

Endeavour OS (Arch based linux)

USB-Debugging is already enabled?

Yes :)

Here is the relevant output (AFAIK what relevant is):

 fastboot getvar all
... 
(bootloader) current-slot: b
(bootloader) running-bl-slot: _b/_b
(bootloader) running-boot-lun: 0
(bootloader) slot-count: 2
(bootloader) slot-successful:_a: yes
(bootloader) slot-successful:_b: yes
(bootloader) slot-unbootable:_a: no
(bootloader) slot-unbootable:_b: no
(bootloader) slot-retry-count:_a: 6
(bootloader) slot-retry-count:_b: 6
(bootloader) logical-block-size: 0x200
(bootloader) erase-block-size: 0x200
...

So it seems the device is a/b partitioned?

It seems like... But why did it fail? 🤔
Is it also possible for you to upload the full openandroidinstaller.log?

@moan0s

@MagicLike

Interestingly - I can't find anything suspicious in the log... @tsterbak Can you also take a look at this?

@MagicLike

@moan0s Would it be possible for you to start over again, but flip the switch "Bootloader is already unlocked" at the beginning? It seems like you tried to unlock it multiple times, although it was already unlocked. Maybe the log is a bit clearer then...

@moan0s

Yes I did that after the initial double-unlocking problem (otherwise the installer would not have continued).

Here is the log of a "clean" attempt: https://pastebin.com/eaqGSeJX

@MagicLike

Yes I did that after the initial double-unlocking problem (otherwise the installer would not have continued).

Here is the log of a "clean" attempt: https://pastebin.com/eaqGSeJX

Thanks! Just for my understanding: Everything works up until adb sideload should be activated, right?

@tsterbak

Interestingly - I can't find anything suspicious in the log... @tsterbak Can you also take a look at this?

So you can boot into TWRP, but then sideloading is not activated or not recognized by the Installer, right?

Can you try to activate sideloading in TWRP the usual way, by going to "Advanced", then "ADB sideload" and then slide to start sideload. Is this recognized by the installer?

@moan0s

So you can boot into TWRP, but then sideloading is not activated or not recognized by the Installer, right?

It seems that way yes. This was what it shows me:

OpenAndroidInstaller log:

>$adb shell twrp sideload
>$adb wait-for-sideload

Phone output

MTP enabled
command is: 'sideload' and there is no value
starting ADB sidload feature...

Regarding

Can you try to activate sideloading in TWRP the usual way, by going to "Advanced", then "ADB sideload" and then slide to start sideload. Is this recognized by the installer?

Yes that seemed to work! I activated sideload, then pressed continue in the installer. The next steps worked and now I am again stuck at waiting for sideload at the step Install OS

@moan0s

There the trick does not work anymore as the first command is >$adb wait-for-recovery which only starts when I cancel sideloading

@tsterbak

There the trick does not work anymore as the first command is >$adb wait-for-recovery which only starts when I cancel sideloading

Hm, I think I saw a similar issue before with Motorola devices...
@SirRGB have you seen this issue before and what was a solution there? It seems like TWRP scripting doesn't activate sideloading.

@tsterbak

Yes that seemed to work! I activated sideload, then pressed continue in the installer. The next steps worked and now I am again stuck at waiting for sideload at the step Install OS

This is to copy_partitions step, right? Where you got these errors?

Error opening /data/misc/recovery (Operation not permitted)
Error opening /data/misc/bluedroid (Operation not permitted)
...
Updating partitioning details...
Error opening /data/misc/recovery (Operation not permitted)
Error opening /data/misc/bluedroid (Operation not permitted)

I'm not sure if this step should even be in the config. At least I can find no information if it should be there for this device.

@MagicLike

Yes that seemed to work! I activated sideload, then pressed continue in the installer. The next steps worked and now I am again stuck at waiting for sideload at the step Install OS

This is to copy_partitions step, right? Where you got these errors?

Error opening /data/misc/recovery (Operation not permitted)
Error opening /data/misc/bluedroid (Operation not permitted)
...
Updating partitioning details...
Error opening /data/misc/recovery (Operation not permitted)
Error opening /data/misc/bluedroid (Operation not permitted)

I'm not sure if this step should even be in the config. At least I can find no information if it should be there for this device.

I can remove it - I just copied from the g7 and customised it for the device...
Maybe @SirRGB can help indeed, as I have 0 xp with Motorola devices

@SirRGB

Well I just didnt face that error, might be cuz I have moto legacy devices without a/b dynamic or whatever stuff...

@MagicLike MagicLike linked an issue

Sep 9, 2023

that may be closed by this pull request

2 tasks

@MagicLike