Update 3.4 on dubai: how to flash version 3.2 with fastboot? Is this a good idea?

Hello everyone,
a couple of topics already address the problem with Update 3.4 (and 3.3) for Moto Edge 30 a.k.a. dubai. However I still don’t want to do factory reset or wiping, so here is my specific case (I hope this is okay).

The situation: I’m using the official /e OS on Moto Edge 30 (dubai) and the last stable version I’ve been using has been 3.2 (Android 15). An update to 3.4 resulted in a boot-looped device, as described in other topics. On my laptop I’m using kubuntu 24.04. While boot-looped, the device stated using slot b.
The objective: Downgrading to version 3.2 again WITHOUT doing factory reset or wiping anything (so without losing data) and hopefully without bricking the device.

My questions:

  • which slot should I use? If I understood it correctly, the normal case is that the system is running from slot #1 and any update is written to slot #2, so with rebooting after the update is completed the system switches to slot #2. I assume that as the device displays slot b while being boot-looped, slot a still contains version 3.2?
  • which file(s) should I load using fastboot? I don’t need any bootloader software, do I? And is it correct to simply load <version 3.2.zip> from the /e OS download page? Do I need files named vendor or dtbo just as the first time installing /e OS?
  • which fastboot command is the right one? What is the difference between fastboot update and fastboot flash? Is there a specific command to ignore the latest update (which does not work) and boot from the recent version?

What I tried already:
I already tried to switch the slot with fastboot set_active other, this seemed to be successful as slot a was displayed by the device, and then used adb sideload <version 3.2>.zip from from the /e OS download page which seemed also to be successful (Status 0 or something similar), but the following reboot resulted in the device using again slot b and switching to recovery mode (if I understood it correctly).
I also tried to do adb sideload <version 3.2>.zip from from the /e OS download page to slot a, after a dialogue (Yes, this is a downgrade, I want to do that) it resulted in two error messages, the first one was “ErrorCode kInstallDeviceOpenError” and number 7, the second one with number 1. Also the device used again slot b after rebooting.
According to this article on droidwin, adb is not allowed (?) to downgrade, so I think I have to use fastboot. There are already several How-To’s to flash stock firmware or a general how-to on xda developers from 2013, but

  • I don’t want to lose the userdata (at least not now), so I want to avoid commands like fastboot erase system -w or to do a factory reset
  • fastboot seems to be a very powerful tool to me, I don’t want to brick the device by accidentally damaging the bootloader or something like that
  • I do have the ability to read articles etc, but my knowledge what exactly is an .img file, a recovery or anything else is very limited

I’m very very grateful for any information and help :slight_smile:
Thank you all so much for providing systems (and support) like /e OS!

Just a word of (too late) explanation here … when you fastboot switch slot you aim to get back to the previous instance in one go. If you successfully switched slot (did it run?) … then a following adb sideload will go to the “other slot” … that is what adb sideload does.

In other words

Is there a specific command to ignore the latest update (which does not work)?

Yes, what you tried … one will aim to switch slot away from the update to the previous working.

If only the above happened it is possible the previous instance is intact (but perhaps unlikely).

No, of course, understood but I suggest your efforts would be better spent right now to concentrate on a backup, if only as a minimum with adb pull -a any accessible contents.

Thanks a lot for your explanation, now it’s more clear to me. First, “active slot: b” is displayed, the phone starts in recovery mode with the message “Your data may be corrupt” and so on. I entered fastboot mode, and the device does appear on my laptop (using fastboot devices) with its serial number and status (?) fastbootd, so at least to this point, it worked.
Then I used fastboot set_active other, which gives the output “Setting current slot to ‘a’ … OKAY”. I selected on the device “reboot system now”, so the fastboot mode setup (?) is displayed, and I rebooted to recovery. Now “active slot: a” is displayed, but I don’t know what to do now in order to use the previous instance. It results either in this fastboot mode setup in recovery mode (setup). If I select (on the phone) enable ADB and then reboot system now, it switched back to slot b once without any adb commands from the laptop, but I couldn’t reproduce this until now.
What do I need to do? Do I have to use TWRP?

First the phone has three primary booting modes; Normal, Recovery and Fastboot.

“Reboot system now” would always attempt to boot system with the result that normal mode starts. The fallback in the event of system fail is recovery. A further fallback in the event recovery fails to boot, the phone reverts to Fastboot mode.

In an ideal world, the left hand slot was running fine, an update is attempted, it goes automatically to the right. The update fails to boot. Without delay the user fastboot switches slots, then “Reboot system now”. The left hand slot will boot again. Problem over.

I have no knowledge of the reason for failure in this case, so I won’t speculate on that part.

TWRP may bring its own problems unless you are following a guide at your current Android version.

I suggest you don’t do further interventions without a backup. Maybe someone who has experience with dubai will chip in.

I am giving thought to your suggestion of a selective fastboot replacement of system.

Good catch. Fastbootd is not Fastboot mode. It does offer another recovery route, but requires knowledge of the full build to use it successfully. It is good to learn when you are in fastbootd as it can be very useful to use what is described as “Fastboot moved into userland” with the Dynamic partitions on your phone.

could it be usefull to reflash previous recovery to avoid “your data may be corrupted” message ?

I tried adb pull (the device is listed with “recovery” using adb devices), but without success. Using adb shell ls / lists a bunch of directories, but e.g. adb shell ls /data does not result in any output, so I think access is not given? Same with /data_mirror, /storage and so on. Using adb pull /data /locationOnMyLaptop results in 0 files pulled, 0 files skipped
So I can’t backup any of this folders?

You were correct. Error 7 is typical of refuse to downgrade but fastboot is powerful enough to disregard this. BUT you must assemble something that is coherent.

As said by @piero you may have the ability to fastboot flash a 3.2 recovery. Then use that to adb sideload 3.2 ROM. Stuff you do wrong with fastboot does have the ability to make userdata unreadable. Android says “never go back” and error 7 will prevent you from going back.

You ask about a fastboot ROM. You can experiment by disassembling the ROM. Use this to learn what is inside the ROM [Walkthrough] Extract eRecovery and boot images using payload-dumper-go. Now (potentially) if you find other tutorials (many will concentrate on flashing firmware) the job with /e/ will be more simple.

I am sorry I don’t understand half of this :confused:
As you mentioned it, to be correct it has been sometimes “fastbootd” and sometimes “fastboot”. Anyway switchting the slot succeeded, I guess, because it was also displayed on the phone. So I should not try any fastboot commands when its listed as “fastbootd”?

You are on very thin ice without a backup. A fresh install would be the fix for a broken build, but you may be able to make a repair as you arrived here with quite a good (partial) understanding displayed in your title.

I suggest some more reading. fastbootd is cool in allowing you to make running repairs with a fastboot command.

If however you are following a tutorial that expects Fastboot mode, then you should be sure to boot into Fastboot mode.

Fastboot is like a communication channel with the device inactive. Fastbootd is like working on the live system.

Thank you so much for all the explanation and information, it helped me a lot to understand the matter :slight_smile: For now (maybe not forever) my last question is about doing the backup, as the data seems to be unaccessible using adb pull. Or does this also depend on the slot that is displayed when booting in recovery mode?
That would be confusing to me, as the different slots belong to a completely different partition than the userdata, if I understood it correctly.
If I am able to see the directories using adb shell ls /, is there any option to move or copy the data? Unfortunately I can’t find an option for this in the adb manual, but I think it’s more a question of permission? The last time I checked it before the 3.4 update, USB debugging was not enabled, but is this a problem if I can use adb root?

in recovery-e you can enable ADB

“adb pull” it is something about dev/block/*/by-name/userdata

That is unfortunate but as said by @piero you may be able to enable ADB and mount system. You found a useful manual. I guess it is a matter of finding just what you can do. Try adb root'. Try to open adb shell. As well as trying to read userdatayou may search forsdcardthis is the name given to to internal storage. (The SD card, if present is namedext_sdcard`.)

Slots only apply to the OS. userdata and sdcard are “solo”.

You might first try to explore for internal storage. On my Moto ocean I can successfully

$ adb pull -a /storage/emulated/0

Hello again,
unfortunately all the data I want to backup seem to be inaccessible (at least to me). If I enable adb in the recovery mode, the device is listed using adb devices as <number> recovery. Is there any other or further way to enable ADB? Additionally, https://teamandroid.com/adb-commands-list/ is another list of adb commands, but none of the following was successful:

  • adb rootadbd is already running as root
  • adb remount/system/bin/sh: remount: inaccessible or not found
  • adb shell ls -l → long list, directories/files are dated to 1970 (???)
  • adb pull -a/storage/: 0 files pulled, 0 skipped. happens with any directory/file, file is generated but empty
  • adb backup -f <path>/backup.ap -all → file is generated but empty, also this is deprecated
  • adb shell getprop → a ton of … values, but I know way not enough to get information from this

adb dumpstate/system/bin/sh: dumpstate: inaccessible or not found, even adb shell dumpsys batteryinfo results in that output…

Are there any leftover (feasible to me) options to create a backup? I appreciate all your help already given :slight_smile:


$ adb devices
123abd456 recovery

Indicates you have a connection.

  1. adb pull does not work out of adb shell.
  2. Just type adb shell Enter
  3. This is the shell – you should now have a root prompt within the device. (If you do not have root exit and adb root again.)
  4. Try ls and cd
  5. Can you now continue to explore the filesystem.
  6. Can you find /storage/emulated/0/

Scroll right down to
Advanced Access Methods for Developers

ADB File System Exploration

1 Like

Thanks again for your help. So I did steps 1-4. ls does work in the very first layer (?), so directories e.g. data, cache, sys, sdcard are listed. cd does also work on this layer, but if I try e.g. cd storage and then ls -la, only two entries, . and .. are shown in every directory. I can’t find or access to /storage/emulated/0
If I select Mount/unmount system on the phone in recovery mode, this does not change anything, as well if I use mount within the adb shell.

I can reproduce this.

If from /

cd storage

then try cd emulated

does tab completion work … and then again cd for0.

Hello again,
are you sure the directory /storage/emulated/0 can accessed in recovery mode?
I tried to understand what /emulated is, and this article says it is a virtual path? So maybe it is only mounted (if this is the correct term) when in normal mode?
By now, I’m really running out of ideas how to access this data.
After using adb shell, cd storage, cd data or whatever is successful, but any “second layer” command as cd /storage/emulated/0 or cd /data/0 is not, the output is likely the same: “/system/bin/sh: cd: /storage/emulated/0: No such file or directory”
Just in case, the data is not mounted, I selected Mount/unmount data on the phone in recovery mode, with no effect. After this, I tried in the adb shell the command mount. Using tab completion, the same options are given as for cd, but if I choose e.g. mount data/, the output is “mount: ‘data/’ not in fstab“.
Only using mount, without any additional argument, the following list is given:

”rootfs on / type rootfs (rw,seclabel,size=3529152k,nr_inodes=882288)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=3765068k,nr_inodes=941267,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600,ptmxmode=000)
proc on /proc type proc (rw,relatime,gid=3009,hidepid=2)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /mnt type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=3765068k,nr_inodes=941267,mode=755,gid
=1000)
tmpfs on /apex type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=3765580k,nr_inodes=941395,mode=755)
tmpfs on /linkerconfig type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=3765580k,nr_inodes=941395,mod
e=755)
tmpfs on /mnt/installer type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=3765068k,nr_inodes=941267,mo
de=755,gid=1000)
tmpfs on /mnt/androidwritable type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=3765068k,nr_inodes=941
267,mode=755,gid=1000)
none on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime)
tmpfs on /tmp type tmpfs (rw,seclabel,relatime,size=3765580k,nr_inodes=941395)
tmpfs on /storage type tmpfs (rw,seclabel,relatime,size=3765580k,nr_inodes=941395,mode=050,gid=1028)
binder on /dev/binderfs type binder (rw,relatime,max=1048576,stats=global)
pstore on /sys/fs/pstore type pstore (rw,seclabel,relatime)
none on /config type configfs (rw,relatime)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
fastboot on /dev/usb-ffs/fastboot type functionfs (rw,relatime)”

I’m not sure if there is any further information in this, but tmpfs is temporary file system, isn’t it? So is this another hint that the data is inaccessible at the moment?
I’m just trying to understand this…

“Press tab to autocomplete” is a way to avoid this error.

??

As mentioned in the linked article Android is full of distracting symlinks … and if your phone is “broken” in any way it may well not be going to do same as a working phone … or a broken phone is not the place to learn how to extract a backup.

Ofc your sdcard might be findable in a different location to my suggestion … my suggestion was initially just to see if you can explore the device.

You might do a forum Search for userdata there are cases where a solution is found …

No, tab completion does not work as no options are displayed except for the first layer. :confused:

1 Like

I read a little bit about fastboot commands and recovery files and now I have even more questions…
As it seems to be not that easy to do any backup, I tried to backup all possible data via messengers and so on, so the loss of userdata is acceptable to me by now, but still unwanted. But I really want to avoid bricking the phone. So, in order to use fastboot and maybe still avoid loss of data, I don’t know if it is possible to simply use
fastboot flash recovery <recovery-3.2>.img
without any preparation. I read that it’s not a good idea to select reboot at any time during this procedure, because the system will try to boot in normal mode. Flashing a recovery file using fastboot flash recovery won’t touch the bootloader, does it? As I understood, the phone probably won’t be bricked if the bootloader stays untouched. In a few articles several files are flashed and the order seems to be important, something like fastboot flash boot <boot>.img, then system, vendor and then dtbo. But I don’t feel able to do this because of too little understanding.