yashsingh1/xdaforums huggingface dataset:
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] xdaGerry:
I did a restore from a backup which ended with error 255.

This is a Moto g7 1162-1

Has anyone else had this happen?

Is there a fix for the 255 error?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
Where was the backup made to? Phone itself, external sd, usb flashdrive? Apparently this unofficial twrp has a problem with backing up to external sd but I've not tried restoring from any yet.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] xdaGerry:
The backups were made to sd card.

The restore would not complete because the process ended with ERROR: 255

One of the main reason for TWRP is to be able to do backups and restore.

Is there any work around for restore.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
I'm no expert so I can't help much. When I asked about backups the developer wrote:

Apparently backups to the phone or via usb are OK. That's all I know.

Remember, this is an 'unofficial' twrp.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] xdaGerry:
OK, I will give it a try.

I tried to do a backup to USB. I received CreateTarFork( ) Process ended with ERROR: 255

I had just flashed the phone with the newest stock rom update.

XT1962-1_RIVER_AMZ_9.0_PPO29.114-134_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip

I had rooted the phone previously on stock rom 29-114-116-5 with Magisk without a problem and was able to do a backup without an error; however I had never tried to do a restore.

I am wondering if the newest rom might be a problem.

I can't find the original rom 29-114-116-5 that came on the phone, but I have download the 114-116-7 & 114-116-7-2 roms.

I am going to wait for some feedback, before flashing the earlier roms.

Please - any suggestions?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Hell-Razor:
I'm going to wait to see if anybody else has issues booting before I try. I would love to contribute and do nightly updates but right now, the failed and maybe brick installs seem too high.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Darlenix:
Same here, that was what I was actually thinking.

Since we're on topic, how's the development going?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
I'm no expert, but fwiw my Moto G7 came with PPO29.114-16-7 dated January 1, 2019. I rooted it using this TWRP and Magisk. Since then I've done several TWRP backups to usb flashdrive, to the second sd, and to the phone's primary sd - without errors. But like you I've not tried a restore.

Are you saying that if I updated to the latest Moto android version TWRP would then give errors in backups?

I've been planning to update the rom. Maybe I should leave things as they are in case my backups do not restore correctly. Has anyone successfully restored a PPO29.114-16-7 backup?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] anfield9:
Hello guys. Did recovery for Moto G7 will work for Moto G7 Power?

Or there is any working TWRP for Motorola Moto G7 Power?

I wan't to buy Moto G7 Power but I need to know that I will have custom recovery, please reply. Thanks!
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
No this one only works for G7.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Krazy-Killa:
Is it possible to keep the stock recovery on slot a, and install TWRP into slot b?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] nitrox095:
The Moto g7 power actually has a custom recovery but the project has stopped... Don't ask me why :confused:

---------- Post added at 09:55 PM ---------- Previous post was at 09:53 PM ----------

I thing than you can install it but you have to connect your cellphone to your PC, then you can change slot and then run your recovery but.... That's a lot of work haha :silly:
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] peajul:
Looks like an official TWRP has been released for Moto G7 (river)

Dear All,

Please see the link below for instructions, change-log, and file downloads:

MOD EDIT: LINK REMOVED
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] cou94114:
I see only a .img file on the referenced URL for TWRP (river). Shouldn't there also be a .zip file?

EDIT - I was not thinking correctly when I typed my reply. I re-read the installation instructions and realized that TWRP can be installed using the "Install Recovery Ramdisk" command on the TWRP Advanced menu.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
Is this official twrp different from Alberto'97 early version?

Is it now fully functional including all nandroid backups to sd?

I rooted my G7 with Alberto97's early unofficial version (thank you Alberto! ) and Magisk. Should I now update to this version?

Thanks.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] peajul:
Hello...I can't comment on the differences between this version and what Alberto97 developed (which is what I have installed as well); I just wanted to pass along that there is what appears to be an official TWRP version available. I speculate that the instructions that Alberto97 originally posted could be used to update to this version, if desired.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Ljrouse5:
Have you got anywhere with this bro? Im hard bricked and would absolutely appreciate if you had a debrick.img you could provide me with. please let me know. Thanks
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] the Doctor:
Do not use XDA to direct forum members to other sites for phone-related activities.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
I want to install the official twrp for my Moto G7. Because I already have the unofficial twrp installed I am looking for the official zip file but cannot find it. The official twrp for Moto river has a twrp image, but not the zip file.

Where can I download the official twrp zip for river?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] SyberHexen:
It does not yet, still waiting on an official rebuild
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
That explains why I couldn't find it.

Thank you for explaining.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Bluemgt06:
Recently I used twrp for making a backup, after rebooting my Cellular is on and off constantly, like someone flipping a light switch. Only way I have found to fix it temporarily is to erase modemst1 and modemst2, but sometimes after a reboot it's acting up again. Also every time I go to twrp that causes it too.

Anyone else have this issue? Or know a way to erase the modemst1/2 on the phone itself instead of using a computer?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] HueyT:
Try resetting networks in settings of rom
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] cou94114:
I found this information, but I don't know if it will work.

How to Fix EFS from TWRP recovery

Boot into TWRP recovery.

From TWRP’s main screen, select Advanced » then Terminal.

Type the following commands in terminal (one by one):

dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1

dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst2

Reboot device.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Bluemgt06:
I'll have to give this a try, anyone know if there's a way to make it into a script?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] HueyT:
https://play.google.com/store/apps/details?id=os.tools.scriptmanager
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] adibadi:
Looks like I'm in the exact same situation as you guys. Anyone have a possible fix for this? It's an XT1962-5. Talk about an expensive mistake, brand new phone!

edit: I managed to get some kind of USB activity in dmesg...

[Tue Oct 29 14:33:17 2019] usb 1-2: new high-speed USB device number 19 using xhci_hcd
[Tue Oct 29 14:33:23 2019] usb 1-2: device descriptor read/64, error -110
[Tue Oct 29 14:33:38 2019] usb 1-2: device descriptor read/64, error -110
[Tue Oct 29 14:33:39 2019] usb 1-2: new high-speed USB device number 20 using xhci_hcd
[Tue Oct 29 14:33:39 2019] usb 1-2: device descriptor read/64, error -71
[Tue Oct 29 14:33:39 2019] usb 1-2: device descriptor read/64, error -71
[Tue Oct 29 14:33:39 2019] usb usb1-port2: attempt power cycle
[Tue Oct 29 14:33:40 2019] usb 1-2: new high-speed USB device number 21 using xhci_hcd
[Tue Oct 29 14:33:40 2019] usb 1-2: Device not responding to setup address.
[Tue Oct 29 14:33:40 2019] usb 1-2: Device not responding to setup address.
[Tue Oct 29 14:33:40 2019] usb 1-2: device not accepting address 21, error -71
[Tue Oct 29 14:33:40 2019] usb 1-2: new high-speed USB device number 22 using xhci_hcd
[Tue Oct 29 14:33:40 2019] usb 1-2: Device not responding to setup address.
[Tue Oct 29 14:33:40 2019] usb 1-2: Device not responding to setup address.
[Tue Oct 29 14:33:41 2019] usb 1-2: device not accepting address 22, error -71
[Tue Oct 29 14:33:41 2019] usb usb1-port2: unable to enumerate USB device
[Tue Oct 29 14:35:48 2019] usb 1-2: new high-speed USB device number 23 using xhci_hcd
[Tue Oct 29 14:35:48 2019] usb 1-2: New USB device found, idVendor=05c6, idProduct=9008, bcdDevice= 0.00
[Tue Oct 29 14:35:48 2019] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[Tue Oct 29 14:35:48 2019] usb 1-2: Product: QUSB__BULK
[Tue Oct 29 14:35:48 2019] usb 1-2: Manufacturer: Qualcomm CDMA Technologies MSM
[Tue Oct 29 14:35:48 2019] qcserial 1-2:1.0: Qualcomm USB modem converter detected
[Tue Oct 29 14:35:48 2019] usb 1-2: Qualcomm USB modem converter now attached to ttyUSB0

Screen is still black, I got this through a combination of keeping buttons pressed in different order, can't say exactly which one did what...

Any ideas?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Nicolbol:
Hi,

I got the phone refunded as DOA from Amazon, didn't pursue debugging it past the first few attempts.

Sorry.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] adibadi:
Hi there, I have an XT1962-5, brand new, in Qualcomm 9008 mode (failed attempt to permanently install twrp). Any idea if your debrick.img could work?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] HueyT:
Telegr$m has blankflash file to get u out of Qualcomm qld 9008 mode. Ask for help there

---------- Post added at 12:08 PM ---------- Previous post was at 11:50 AM ----------

In future, don't use OP instructions as outdated. 1) Enable usb debugging in rom, install adb/fastboot/moto drivers, and move twrpxxxxx.zip and copypartitionsAB.zip files to ext sd card using Windows file explorer, 2) adb reboot bootloader, 3) fastboot boot TWRP.img (renamed twrpxxxxxxx.img file to TWRP.img, to temp boot TWRP), 4) In temp TWRP, install TWRPxxxxx.zip as it has to install to both A and B slots, 5) install copypartitionsAB.zip to copy bootloader files to both slots), 6) reboot
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] adibadi:
Just an update, everything works again, so if anyone else on here ends up in qualcomm 9008 mode, no need to worry or to send your phone in for repair hoping they don't check if the bootloader is unlocked. Thanks for the help!
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
Alberto, I really need your help. I'm totally messed up. All was working just fine with your unofficial twrp but when I tried to update to the official twrp everything went haywire.

Here's what I now have:

Moto G7, now only boots to twrp 3.3.1.0 which is unresponsive. I cannot boot to system. I can boot to bootloader.

I have nandroid backups made using your unofficial twrp both on the phone and elsewhere.

What I tried:

1. fastboot boot twrp-3.3.1-1-river.img

works and I get a functioning temporary twrp.

2. adb push twrp-installer-3.3.1-1-river.zip /sdcard

fails:

failed to copy 'twrp-installer-3.3.1-1-river.zip' to '/sdcard/twrp-installer-3.3.1-1-river.zip': couldn't create file: Required key not available.

3. Tap Advanced -> Install Recovery Ramdisk -> Navigate to /data or /external_sd and select TWRP ->

I cannot do this because there is no "Install Recovery Ramdisk".

Files are encrypted.

Reboot to system just returns to a frozen twrp screen.

Please help. Desperate.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] cou94114:
I'm having the same issue. TWRP is not prompting for a decryption key when launched.

I was able to format the data partition, then re-boot TWRP using fastboot boot command. The adb command worked and I was able to install TWRP. I could launch TWRP using fastboot and selecting Recovery. But, when I tried to reboot System from the TWRP menu my device just reboot into TWRP.

I loaded a stock boot.img (fastboot flash boot boot.img) and I have a working device.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
My phone is hard bricked. I gave up and got a new phone.

In your case if it is just decryption, remember you need to install twrp fully for decryption to work. First step (twrp installed temporarily ) may not provide decryption. Permanent install should.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] cou94114:
I edited my post with additional steps I tried. TWRP 3.3.1-1 when permanently installed doesn't prompt for a decryption key when launched. I think that is a bug.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] SmilingPerson:
The on and off cell problem was likely caused by a TWRP bug that corrupts the persist partition.

The fix is easy:

Open your terminal and do:

su

cd /mnt/vendor/persist/cache/recovery

rm log

rm last_log

then reboot.

There are a lot of people with this issue, and someone mentioned the fix the other day on a chat group, so major thanks to whoever that was.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Moyster:
So basically, why is there even posts / a forum for this phone on xda ? If everything is gate-kept on telegram, there's no reason to repost it here, that doesn't fit OP's mentality.

Btw It'S tHe DeViCe HaRdWaRe, even on stock rom it was dropping data network /s (probably why nothing is made public afterall :^) ).

Must be fun browsing telegram to find a tip / a bug report / a link to a log, yada yada... or waiting for someone to tell you swapping blobs won't fix a corrupted persist partion, lmao.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] SmilingPerson:
I am not entirely sure what you are saying.

I was genuinely surprised that nobody here on XDA was able to help me out when I posted asking for help with this issue several weeks ago, because I had always considered / do consider it to be the best repository of Android information in the world. Nobody responded to my post on the official Lenovo/Mot support forum either, but that was *not* a surprise. But then I saw a post here that mentioned a Telegram support group. The name of the group had been censored by an XDA mod for some reason, but it only took a moment to track it down. I joined, asked about the problem, and they told me how to fix it. Two minutes later, my phone was back to normal. I came back here to share what that group had told me, because I knew that several people here had the same problem, and sharing information is what this scene is all about, I think. Since then, at least one person has popped in to the Telegram group and shared my post here with them (lol), which served as a reminder about the viral, incestuous nature of knowledge.

So help me understand - are you happy about the way that contemporary social media allows the proliferation of information, or upset that XDA isn't the only outlet? Personally I see it all as a beautiful, cyclic evolution, it is the breathwork of a collective mind. But that is probably because I did a lot of acid in college. :)
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] cou94114:
I figured out how to "adb push" the twrp-installer file. Under /data is a sub-directory named unencrypted. The adb push command completes successfully when I used /data/unencrypted/ as the target location. I then used TWRP to permanently install TWRP. That sounds recursive, but I think you understand.

I was able to reboot recovery and TWRP launched successfully. I installed magisk-20.1 and rebooted system. The device booted successfully and Magisk Manager was operational and indicated that Magisk 20.1 was installed.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
I'm all OK now with a working phone. All fixed.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] braindrainoh:
(noob here) I am stuck on TWRP with no OS and I'm unable to install the stock or lineageOS ROM. The lineageOS will seemingly install but only ever boots to twrp. attemping to install the stockROM will say "invalid zip format". I have no recovery, I wiped all data. I'm not finding any solutions :( (edit: I flashed the stock ROM using one of the guides mentioned in this forum (huzzah!) Thanks for the info guys, still trying to get lineageOS to boot...)
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
Twrp backup has many additional backup options available in its backup menu. Partitions like persist1, persist2, efs, etc. These are not selected/included by default when a routine backup is done. When, if ever, should all these unchecked options be used? There has to be a use for them or they wouldn't be offered as options.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] SyberHexen:
Before doing roms or anything I would backup EFS, persist1 & persist2 and store a copy safely on your PC

These partitions are nearly impossible to recover if damaged
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] maybeme2:
Thank you very much. I just backed these 3 to my PC.

1. Do I need to back these 3 up every time I install a new rom or just once per phone?

2. What items should be selected for 'routine' periodic nandroid back ups? Currently, on my phone twrp selections defaults to only the first 3 items on the twrp backup menu. Not the persist and efs partitions.

Thanks again.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] SyberHexen:
Just the first time is good (vanilla backup) .

Boot Data system vendor are only needed ones for full backup
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] peret2000:
TWRP is not able to make a backup if the SD Card is encrypted; and that happens if you decide to format it as internal storage (as an extension of the internal storage). In such situation, the backup fails, as TWRP cannot deal with encryption, as far as I understand.

I have not found any workaround or solution.

The only way I have come up with is formatting the SD card as external storage, but I loose the capability to extend my internal storage: I cannot move applications or their data to the sd card.

I am newbie with this phone, so perhaps my concern is not interesting at all, but my idea is to install different ROMs (starting from Lineage 16) to try them, but if I cannot make a full backup of the previous state of the phone, I don't think I will take the risk of moving to other ROM.

Any ideas? Thanks a lot!
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Phalanx7621:
Make your TWRP backup to an external hard drive via an OTG cable. That's what I do.
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] dnsource:
I'm getting an error when going the temp route:

downloading 'boot.img'...

OKAY [ 0.633s]

booting...

FAILED (remote failure)

finished. total time: 1.381s
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] Phalanx7621:
More info. Obviously your bootloader is already unlocked right?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] dnsource:
I got it. All I had to do was reboot the bootloader
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] peret2000:
Thanks a lot, Phalanx7621. I have got a USB OTG cable and tried it. Unfortunately, I am getting the famous error 255 "createTarFork() process ended with ERROR: 255". However, I have only one user (nothing about 999 user ID, as I have read that could be the cause of the problem)

So, stuck on it. Regards
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] seethegreen:
I've got a similar issue, rebooting the bootloader did not resolve however.

When I try and temporary boot TWRP I get the following.

$ fastboot boot twrp-3.3.1-2-river.img
creating boot image...
creating boot image - 10240 bytes
Downloading 'boot.img' OKAY [ 0.001s]
booting FAILED (remote: '')
Finished. Total time: 0.202s

My device is river XT1962-1 and has been unlocked.

Anyone have any ideas?
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] prsa01:
I mistakenly posted this in another thread, this is probably the more appropriate place. Sorry for duplicating.

Has anyone found a way to reliably do full backup/restore with twrp? Each time I have tried it so far either the backup or restore has failed (tar errors) . I was told on telegram that it was because of encryption and that a pin needed to be setup and then used for restore but I don't really understand that answer.

Now that they say they have cdma apn fix in place for Los I would like to try it but would like to be able to get back to my configured stock rooted if I can't get it working.

Thanks much
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] prsa01:
Flug32 - am I understanding correctly that for twrp to successfully backup/restore on this device you must secure it with a pin and then use that pin during backup and restore?

Thanks for your great, detailed post. It helps a lot!
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] peret2000:
Thanks a lot, flug32, for the detailed explanation. I am afraid it is not working for me.

I have 100% of the SD devoted to adoptable storage (I do not know how to specify a percantage), and I have deleted some of the directories I have seen empty, of the kind '/data/../0'. Then I have installed the zip. But I am getting the same error.

I think the issue is related to the encryption of the SD: TWRP seems unable to decrypt it; although it says the is it successfully decrypted, once I put the correct pattern. Thinking that the problem could be the length of the pattern, I have simplified it to four points, but again, with no success. By the way, I do not see the option to enter a PIN, I can only draw the pattern.

My suspicion with the encription comes because the last error I see in the log is:

failed to lookup tar policy for '/external_sd/user/0' - 'fca0edbb67a976a3'

I:Error adding file '/external_sd/user/0' to '/usb_otg/TWRP/BACKUPS/....../2020-01-03--12-47-13/external_sd.f2fs.win000'

That directory exists, but having a look at /sdcard, I notice that data is encripted.

So, the problem now is, how can TWRP unencript external SD? I am using the right pattern (obviously, I am pretty sure of that, because I am using it continuously)

Thanks a lot for your help
[Moto G7 ROMs, Kernels, Recoveries, & Other Develop] flug32:
I use a pin, and it worked. That is about all I can say for sure! If you're having problems, you could try temporarily switching your security from a pattern to a pin and see if it makes a difference.

The online instructions I saw had a procedure for translating your pattern to a list of numbers (like a pin) that you would enter in TWRP. But peret2000's comment above sounds like TWRP will let you enter a pattern if you have a pattern as your security. So, I'm not sure - and it might vary by exact TWRP version.

---------- Post added at 09:35 PM ---------- Previous post was at 09:23 PM ----------

Hmm, that is interesting.

What I think is happening in my case, because I have two partitions on the SD card (adoptable + portable) this seems to confuse TWRP and it doesn't even realize the adoptable partition is there.

So it just skips it and doesn't every try to back up anything on it.

But in your case, since you only have the one partition (adoptable) it is detecting it AOK but somehow malfunctioning in accessing it.

Poking around online, it looks similar to the problems on this thread:

https://github.com/TeamWin/Team-Win-Recovery-Project/issues/1354

Solutions they talk about there are removing any extra accounts on your device, removing anything like a "Work Profile", Island, or similar apps that create separate work environments, and turning off File Based Encryption (FBE) if you have it turned on.

FBE info: https://source.android.com/security/encryption/file-based