yashsingh1/xdaforums huggingface dataset:
[Moto G 4G Android Development] sdembiske:
Yes, thank you I did see that. The only file I modified was the device board config file to reflect the partition changes at the Byte level. I will look at the system.transfer.list and see what the issue might be, if any there. I have simply updated the device board config file in the same rom build, then re-built it with no other changes (no errors generated in the build process), so I'm wondering if it is failing because the changed system and cache total bytes do not reflect whole number blocks (out by one or two bytes at best), e.g., 0.999 block vs instead a 1.0 block.
[Moto G 4G Android Development] gingerlee:
I have found a strange problem. I have a work around so it's not an issue for me.

I have 3 of these phones, 2 of them I have flashed to the latest version of TWRP (3.7.0_9-0) without issue, but the third phone is very strange.

I can flash TWRP 3.0.2-3 which the phone runs without issue.

When I flashed latest TWRP the phone failed to boot into recovery.

I have tried flashing from within recovery and also from the TWRP app.

I tried other versions including 3.2.3 but they didn't work either.

I reflashed back to 3.0.2-3 and that worked, as before.

I backed up recovery from another phone that had latest TWRP and restored to this phone and it worked!

I then used the 'cloned' latest TWRP to flash latest TWRP then it was broken again.

My work around was to simply flash the cloned latest and then stop messing with it.

I'd be interested if anyone has any thoughts and maybe even a solution ...
[Moto G 4G Android Development] satanas17:
Yep, i've done it and worked nicely for me...sorry for you, mate.
[Moto G 4G Android Development] Gianlu92:
Just to know, was it a MM ROM or a LP one?
[Moto G 4G Android Development] satanas17:
MM

http://xdaforums.com/moto-g/4g-development/rom-beanstalk-6-03-12-27-2015-t3280520
[Moto G 4G Android Development] Gianlu92:
I see, mine was Lollipop, I think it may be the cause. Thanks!
[Moto G 4G Android Development] satanas17:
yep, maybe that...sorry no more LP save to test...oups, maybe one on my laptop, will look after and be back to you if i found one.

You're welcome ;)
[Moto G 4G Android Development] satanas17:
Ok, found one and tried it. Sorry again, mate, worked flawlessly for my saved BlissPop 5.1.1 ...

Procedure followed :

Mounted partitions

wiped cache/dalvik/data/system in "advanced wipe"

rebooted in recovery

mounted again

flashed backup

reboot without any wipe

Booted on BlissPop like a charm...much more slowly than my MM but as it was usual for this rom when it was my daily driver...

By the way, i played a little with it...what a change of reaction time between this "not too old" LP and my MM...for sure, i don't want to come back to LP !!!
[Moto G 4G Android Development] Lurker-Observer:
I have the same question :confused:
[Moto G 4G Android Development] satanas17:
If you're talking about encrypted save option, yes it has...

Not tried it yet but option is available...
[Moto G 4G Android Development] Lurker-Observer:
Thanks for the answer, but I'm talking about if the recovery supports an encrypted system, not the option itself.

Edit: Just tried, and nope, does not work.
[Moto G 4G Android Development] DocBrowns:
After flashing it with flashify it worked, but then I rebooted and tried to get into the recovery again, and It didn't work. Is this normal? Guess I have to flash it over ADB?
[Moto G 4G Android Development] satanas17:
Strange...flashed it the same way and no issue...
[Moto G 4G Android Development] DocBrowns:
What you could do is bring back encription support, that would be epic :D

---------- Post added at 03:39 PM ---------- Previous post was at 03:37 PM ----------

Strange, I will try it again, maybe it didn't work because I flashed a rom after the first reboot.
[Moto G 4G Android Development] satanas17:
Don't think is very relevant but who knows... ;)
[Moto G 4G Android Development] DocBrowns:
Yeah,.. Maybe I blocked something with xprivacy?

---------- Post added at 04:05 PM ---------- Previous post was at 03:55 PM ----------

EDIT: Works after reflash
[Moto G 4G Android Development] wurstel:
I didnt habe that problem, I guess something went wrong. Try to reflash it via flashify, or flash it via fastboot.
[Moto G 4G Android Development] DocBrowns:
I did already, it works now. But thank you [emoji16]
[Moto G 4G Android Development] satanas17:
:good:
[Moto G 4G Android Development] schrickz:
anyone tried flash this directly from twrp ?
[Moto G 4G Android Development] Wyneg:
Nope, but working flashing from fastboot ;)
[Moto G 4G Android Development] MaterialMan:
Flashed with fastboot, all worked well. So huge thanks for this! Finally I can update my CM13 with SD Card formatted as internal storage properly by using the built-in updater! :)
[Moto G 4G Android Development] Thoniix:
xt1045?

hi there i want to know if there is someone that tried this recovery on the xt1045 model i'm scared of trying it by myself (bullying is wellcome)
[Moto G 4G Android Development] Pupet_Master:
Anyone is experiencing issues with the touch?

The slider to start an activity for example many times (and many at once as well) just wont slide untill the end. Also with the keyboard, when i name a ROM backup it just go back to TWRP main screen depending on the key i press (many times and many at once as well)? Not to mention i feel it is somewhat slower then the prev version of TWRP we had.
[Moto G 4G Android Development] alnaufra:
Hi,

i'm a bit frustrated XD, i can't install it, i do the flasboot flash recovery and then try to enter the recovery but it does nothing, just pops a moto image and then a battery image, tried with old recovery and try doing it several times but nothing...

My device is Xt1039 with stock lolipop and bootloader open

[edit]. Fastboot boot works, but not fastboot flash
[Moto G 4G Android Development] Pupet_Master:
Have you run cmd prompt as an admin?
[Moto G 4G Android Development] alnaufra:
Yep, cmd in administrator
[Moto G 4G Android Development] Pupet_Master:
Do you have the twrp img on the fastboot folder? Also, have you download the latest motorola drivers?

If so try this command after opening the fastboot folder as admin on cmd:

fastboot flash recovery twrp-3.0.0-0-peregrine_that1.img
[Moto G 4G Android Development] alnaufra:
yes, i have redownload drivers and all, but still not working, as i said if i do fastboot boot twrp-3.0.0-0-peregrine_that1.img it works and boots correctly onto the recovery, but i don't know why it won't boot the recovery after the fastboot flash

[edit] Okay i bypassed the flashing by fastboot. I did fastboot boot to enter the recovery, and from there i installed the recovery permanetly. Looks as if it worked, but still bothered about why it didn't flash by fastboot.

[re-edit] No, didn't work. The problem seems to be into the bootloader, if i access the recovery directly with adb reboot recovery it works nicely, but if i try to access by bootloader it's imposible.
[Moto G 4G Android Development] Pupet_Master:
Good job.

The only things that come to my mind is that maybe something on your fastboot folder or on the bootloader partition got corrupted.
[Moto G 4G Android Development] alnaufra:
Do you know where can i find the bootloader file to reflash it?
[Moto G 4G Android Development] Pupet_Master:
Only on the stock image of your device (the LP version).

But when i say stock, i mean the stock stock, not the ones we have on the forum here that are flashable zips.
[Moto G 4G Android Development] jmcollis:
Yep. It's worked fine for me on a XT1045
[Moto G 4G Android Development] ericmcgomes:
Thank you, Bro!

I've been waiting for this since the marshmallow's release.
[Moto G 4G Android Development] sarathsnair:
Can I use this one for installing BlissPop v6.1 rom on Moto G xt1033 (Indian Version)
[Moto G 4G Android Development] Pupet_Master:
No, far as i know the moto G XT1033 is falcon, not peregrune.
[Moto G 4G Android Development] raf.lozano:
Just installed it on my XT1040 via Flashify. Worked flawlessly on the first try. Also working well with AICP nightly builds and also via the auto update.

Just reporting ;)

Enviado de meu XT1040 usando Tapatalk
[Moto G 4G Android Development] homerohoh:
Is it possible to flash on 2.8.7.0?
[Moto G 4G Android Development] sztandi:
What do you mean ? flash via recovery ?
[Moto G 4G Android Development] homerohoh:
No, update an old version via fastboot, ie, overwrite the 2.8.7.0 version with 3.0.0.0 version.

BTW is it possible to flash via recovery?

Enviado desde mi XT1040 mediante Tapatalk
[Moto G 4G Android Development] sztandi:
In 3.0 yes, but yes you can update via fastboot

Wysłane z mojego XT1072 przy użyciu Tapatalka
[Moto G 4G Android Development] homerohoh:
Thanks!

Enviado desde mi XT1040 mediante Tapatalk
[Moto G 4G Android Development] peter_baz:
any workaround in order to recognise a 16gb external memorycard
[Moto G 4G Android Development] baxtex:
Does this version have encryption support?

So if I ecnrypt my device and want to to a backup, install something or whatever, it will work just fine?
[Moto G 4G Android Development] amigobuddy:
Bad Command

Thanks for posting. I tried on a XT1045 running 5.1 and I get a bad command error when trying to go into recovery after flashing with fastboot. Any ideas?
[Moto G 4G Android Development] jershxl:
Can't flash any zips

Whenever I try to flash a zip, the screen goes black and TWRP reboots.

EDIT: Moved zip to internal storage instead of external sd, it worked
[Moto G 4G Android Development] metRo_:
Take attention to the following:

Before enter fastboot reboot you need to press volume down key.
[Moto G 4G Android Development] panagiotis15:
Tried to install , seems that working well but i discovered that cant read the SD card
[Moto G 4G Android Development] daftaupe:
Works great ! and I can read my sdcard without any problem :)

Thanks a lot
[Moto G 4G Android Development] Alessandrotischer:
Is it possible to flash this recovery without pc? Can I flash the .img file via older version of twrp?
[Moto G 4G Android Development] _that:
I generally recommend against messing with recovery if you don't have a PC available, but yes, you can flash the image via TWRP if your TWRP is new enough to have that option.
[Moto G 4G Android Development] raf.lozano:
Or with Flashify.... Works like a charm :)
[Moto G 4G Android Development] jdegreef:
As does Simple Recovery Switcher from [MENTION=3537886]graffixnyc[/MENTION]
[Moto G 4G Android Development] patadune:
I was unable to decrypt an encrypted partition with this version (I'm running official cyanogen 13 nightlies), my pin code wasn't recognized. I reverted to TWRP 2.8.7.0 and it works fine.
[Moto G 4G Android Development] augt:
Is there a way to backup and restore the EFS partition? I didn't see that option in this recovery. I thought it's always safe to have a backup of this partition in case it is changed accidentally when flashing stuff.

thanks
[Moto G 4G Android Development] _that:
There is no EFS partition on this Motorola device. But you can backup and restore any partition using the dd command (dd if=/dev/block/mmcblk0pXX of=pXX.img).
[Moto G 4G Android Development] rpcll:
Is the official 3.0.2 for peregrine from twrp.me safe to use?
[Moto G 4G Android Development] karbon222:
its official. yea
[Moto G 4G Android Development] _that:
I did a quick test before Dees_Troy released the official build and found no obvious bugs. Since it's based on the same device tree, only with TWRP fixes, it should work fine.
[Moto G 4G Android Development] jdegreef:
Is it because I made something wrong but here 3.0.2.0 from twrp.me still shows 3.0.0-0.

No other problem thought
[Moto G 4G Android Development] Pupet_Master:
Do you have a link for it, m8?
[Moto G 4G Android Development] lordnils:
Yay, finally. Version 3.0.2-0 from twrp.me (https://dl.twrp.me/peregrine/twrp-3.0.2-0-peregrine.img.html) supports encryption with sd-card formatted as internal! :D

edit: Sry that was too fast. It say "successfully decrypted" but somehow fails to mount the "adopted storage device" which results in only the internal part of the storage beeing available.
[Moto G 4G Android Development] jdegreef:
Answering my own question (I'm on xt1039 peregrine) :

To update from TWRP 2.8.7.0 to 3.0.0.0 I used Simple Recovery Switcher from [MENTION=3537886]graffixnyc[/MENTION].

It worked perfectly.

Now, for some reason flashing TWRP 3.0.2.0 to swich from 3.0.0.0 don't work with SRS. It doesn't give an error but it doesn't flash the recovery. That's why it was still showing as 3.0.0-0

Flashing TWRP 3.0.2.0 with Flashify worked though. And it shows 3.0.2-0 as expected.
[Moto G 4G Android Development] karbon222:
i flash from recovery 3.0.0

just install .img file via recovery
[Moto G 4G Android Development] beraca:
where is the download link ? :)
[Moto G 4G Android Development] _that:
3 posts above yours.

(what am I doing here?)
[Moto G 4G Android Development] meekrawb:
Any plans for an official thread, or are you just going to be updating here?
[Moto G 4G Android Development] _that:
I changed the OP accordingly - no more need for unofficial builds right now.
[Moto G 4G Android Development] Wyneg:
Anyway, thanks for bring us first your unofficial version ;)
[Moto G 4G Android Development] kirokko:
Unofficial 3.0.0 worked perfectly without issues, but 3.0.2 doesn't mount encrypted storage. Is anyone having the same issue?

At the same time, SD card is availavle through MTP, so TWRP is decrypting the storage, but cannot mount it.
[Moto G 4G Android Development] TadMSTR:
Some have said they lost encryption support with 3.0.2-0. I just flashed it and was able to decrypt upon entering recovery (phone was already encrypted). I'm using an xt1045 and do not have expanded storage enabled.

I did get the partition mismatch error when I flashed the recovery but as others stated I was able to enter the recovery without issue.
[Moto G 4G Android Development] kirokko:
So, to be clear. My phone is XT1039 (UK version). I have SD card which was formatted as adopted storage long time ago even before 3.0 was released. I don't use phone encryption, so no passlock, pinlock or any other such things.

I had 3.0 unofficial, very first release which worked fine including adopted storage. Today I tried 3.0.2 which didn't work correctly with adopted storage. It can decrypt it and then adpoted storage will work fine via MTP, but the recovery itself cannon mount adopted partition. I installed 3.0 unoffial and everythong works fine now.
[Moto G 4G Android Development] _that:
That makes no sense at all. To serve files via MTP, TWRP must have mounted the partition successfully. Where is your recovery.log?
[Moto G 4G Android Development] kirokko:
I checked that again, and you're right, that's not working. It's very strange because I remember how I saw all files from my Download folder on PC via new recovery. My fault, sorry for inconvenience.

Here's my log file from 3.0.0 and 3.0.2, if it helps.
[Moto G 4G Android Development] Andersonbg:
md5 file error while dirty flash with twrp 3.0.2-0

I tried a dirty flash but all i got was a md5 error, any idea of what's going on? Is there any possibility that the error is because my sdcard is unified with the internal storage? :(
[Moto G 4G Android Development] jdegreef:
This could also be caused by a corrupted download. Did you try to re-download and apply ?
[Moto G 4G Android Development] Andersonbg:
Nevermind, i got it.

After lots of random tries, i did it.

All i needed to do was eject my sdcard and reconnect it again and match the md5 generation during backup option.

After this the dirty flash works perfectly, but obviously dunno why it works. :confused::rolleyes:
[Moto G 4G Android Development] BitingChaos:
Encryption works for me about once every 5 boots into Recovery. Most of the time I'm completely cut-off from the contents of my SD card. :/
[Moto G 4G Android Development] sebastian_ita:
I've noticed that booting into the recovery from a reboot doesn't work, but just sometimes.

If I go into the recovery starting with a turned-off phone, and then selecting "recovery" from the bootloader, it works more often than not. I see when it's working because the recovery takes some time to load when the access to the adopted storage works.
[Moto G 4G Android Development] Andersonbg:
My update problems returns

While trying to update, again my phone has failed to map the update file. He is in the right folder "cmupdate" which in my sdcard is, but in recovery fails.

It is an annoying problem and I don't know any solution. Can someone help me?
[Moto G 4G Android Development] okayokayokay:
I get "Mismatched partition size (recovery)"
[Moto G 4G Android Development] okayokayokay:
This actually happens with any recovery that I try to flash via fastboot. I get the error "Mismatched partition size (recovery)" I have an XT1045 perigrine unlocked via the Motorola website.

I finally used Flashify from the Playstore. Amazing. I now have TWRP working.
[Moto G 4G Android Development] _that:
You can ignore that message and it works anyway - updated OP.
[Moto G 4G Android Development] Axaion:
The sliders keep resetting all the time, very annoying

Fonz's TWRP is running flawlessly, i dont know what his fix was to it, but it worked.

Sadly im not sure if his supports encryption like this one does..
[Moto G 4G Android Development] Andersonbg:
Hello, I tried to update my cel and I get the following error message:

Error installing zip file '/cache/recovery/block.map

I do not know what to do and I'm not sure if this is where I must inform you that, if anyone can help me ...

My phone is a xt1040
[Moto G 4G Android Development] Kwen:
Can't seem to be able to get Kouch's Superuser.zip to install, keeps complaining that the su binary is out of date and is unable to update it

Edit: ah, no longer maintained and doesn't support Lollipop, installed SuperSU fine.
[Moto G 4G Android Development] luks333:
Guys, is it possible that this latest build of the recovery somehow messes up encryption process of the device?

I tried all ROM's here and also restored to original ROM but still I cannot encrypt phone, I just get a soft reboot. Since this happens across all ROM's can be TWRP the culprit? Thanks

Sent from mobile
[Moto G 4G Android Development] luks333:
Solution found. TWRP was the problem. Please see here:

http://xdaforums.com/showpost.php?p=67076462&postcount=1146
[Moto G 4G Android Development] RaTa22:
Few questions

After I updated my XT1040 (peregrine), I installed the XOSP and everything was ok.

After that, I tried to install GApp-nano downloaded from the official page and a XOSPApps.

I saved it in my ext-sd (16gb) and then shutdown the phone, to boot from recovery.

When i'm in the recovery, trying to install the zip's, the twrp say's:

"Zip's file is corrupt"

I tried moving the files to internal storage, but it was the same

Anybody can help me?
[Moto G 4G Android Development] karbon222:
Redownload the file, check md5 after download and do the same... Put to sd and install it.
[Moto G 4G Android Development] RaTa22:
I done what you said.

It's the same

Installing zip file '/sdcard1/ROM/open_gapps-arm-6.0-nano-20160723.zip'

Checking for MD5 file...

Skipping MD5 check: no MD5 file found

Zip file is corrupt!

Error installing zip file '/sdcard1/ROM/open_gapps-arm-6.0-nano-20160723.zip'

Updating partition details...

...done

Thats the log of the TWRP
[Moto G 4G Android Development] karbon222:
Try download other version open gaps. (Pico, full)

Maybe nano version on site is really corrupt.

I think is not a problem twrp.
[Moto G 4G Android Development] aha360:
Here's a flashable ZIP and feel free to use this flashable recovery ZIP template, as long as the "updater_script" commands are compatible with your target phone.
[Moto G 4G Android Development] masantula:
I flashed this and i get the mismatched error and everyone says to just ignore it, yet when i try to boot into recovery i still end up getting the stock recovery :(

My bootloader is unlocked too
[Moto G 4G Android Development] _that:
You must boot to recovery directly from the bootloader menu, and you must not boot Android between flashing TWRP and starting it.
[Moto G 4G Android Development] masantula:
OMG THANK YOU SO MUCH!! That was the trick, perfect!
[Moto G 4G Android Development] sirxdroid:
I was never able to do a nandroid backup on this device. Now trying TWRP-3.0.2 in hopes it would work, but still getting errors:

I:addFile '/data/data/com.google.android.play.games/lib' including root: 1
==> set selinux context: u:object_r:system_data_file:s0
I:addFile '/data/data/com.android.printspooler' including root: 1
==> set selinux context: u:object_r:app_data_file:s0
I:addFile '/data/data/com.android.printspooler/lib' including root: 1
==> set selinux context: u:object_r:system_data_file:s0
I:Error adding file '/data/data/com.android.printspooler/lib' to '/sdcard1/TWRP/BACKUPS/TA95000E73/2016-09-18--09-02-36_KXB21.14-L1.56//data.f2fs.win000'
Error creating backup.
I:ERROR tarList for thread ID 0
Error creating backup.
I:InfoManager saving '/sdcard1/TWRP/BACKUPS/TA95000E73/2016-09-18--09-02-36_KXB21.14-L1.56/data.info'
createTarFork() process ended with ERROR: 255
Backup Failed. Cleaning Backup Folder.

Any ideas? The phone is encrypted if it makes a difference.
[Moto G 4G Android Development] aha360:
Try changing your filesystem from F2FS to EXT4, and/or DO NOT ENCRYPT your phone - do the latter first by leaving your phone unencrypted.
[Moto G 4G Android Development] sirxdroid:
Can the phone be decrypted safely without losing data? Kinda scared to do it without a backup ...

As for changing the fs, is there a guide on how do go from f2fs to ext4? Thanks.

---------- Post added at 07:54 AM ---------- Previous post was at 07:35 AM ----------

Is the above nandroid error a problem with reading files or writing the tar archive? If it's writing, I think it should be possible to send it straight to the computer using and adb bridge. If it's reading the files, well that's a problem.
[Moto G 4G Android Development] _that:
Unfortunately the error handling of libtar sucks, so all we know is that tar_append_file failed.
[Moto G 4G Android Development] sirxdroid:
The phone has a 32GB external SD card, though I'm not sure how it was formatted. How can I check and how can I format it ext4 from Android? I know I can put it in a Linux machine and do it but not sure whether the card won't be formatted again by Android the minute I put it back in the phone.

FWIW, I'm trying to send the nandroid backup to this external card, not internal storage which is very small at 8GB.
[Moto G 4G Android Development] _that:
"adb shell mount" should output the current filesystem on the card. If booted to Android, it should be some line with "media_rw", in TWRP probably "mmcblk1".

You can use TWRP's "Advanced Wipe" to format it.

I know that CM supports cards formatted as ext4, not sure about stock Android.
[Moto G 4G Android Development] sirxdroid:
If TWRP supports ext4, it's worth trying to write the backup to ext4.

Any other tricks I can use so that TWRP sends its backup to a computer? Would a plain 'adb shell tar ...' command via adb that outputs to stdout and send that to a file on the computer work?
[Moto G 4G Android Development] _that:
"adb shell" is not binary safe because it creates a pseudoterminal. The undocumented "adb exec-out" is binary-safe. So "adb exec-out tar ... > backup.tar" should work.

If that fails, you can also try using the command line tar in adb shell to write the backup to the SD card.
[Moto G 4G Android Development] sirxdroid:
Thanks for the exec-out tip. In general just running tar on the correct partition (assuming I mount it first in TWRP) should just work, right? Or does TWRP do anything special for backups besides running tar?
[Moto G 4G Android Development] _that:
The only "special" thing I can think of right now is that it also stores the SELinux contexts in the tar.