[Oreo][Stock][Rom] TWRP Flashable Stock Builds - Moto G5 Plus ROMs, Kernels, Recoveries, & Other De

About this project
This project provides repackaged Stock Oreo roms that can be flashed by TWRP. Modifications from stock are listed below.
As we are now moving into the Oreo world, I've decided that now is a good time to make a few changes to how things were done previously with Nougat. Please pay attention to the next few sections.
Modifications from stock
Note - It seems that I can't get DM-verity nor forced encryption disabled. The location of the fstab.qcom file is no longer in the Boot image. I found a similar file in the system image, but changing that appears to have had no effect. In order to disable these, use Magisk. UPDATE - Resolved since soak test 2, and soak test 1 with Aroma installer
DM-verity is disabled
Forced encryption of the data partition is disabled. It is still possible to encrypt the partition if you wish (optional with Aroma installer)
The partition table and boot loader are not included, which makes it safer to up/down-grade.
Do not attempt to apply standard OTAs over these builds. They'll probably fail, worst case they will brick your phone
Differences from previous Nougat builds
These roms are suitable for all channels. Previously there was separate firmware for different regions (e.g. retin had a separate build from retus), but as a general rule you are safe with any region's firmware.
I have now started using the Aroma installer for Oreo builds. Some of the below is now customisable at install time. Aroma installer zips will have "-aroma" in their filename.
The modified boot logo will no longer be included in the rom download. A separate zip will be provided to just flash the modified logo.
EFS will be erased on install! If your persist is intact, EFS will recreate itself. With the amount of exposure that the lost IMEI issue has had, all should be very familiar with the importance of backing up persist and EFS. And those that have had a compromised persist, will know that they should be hanging on to their EFS backups for dear life. Full details of the issue and solution (for those with intact persist) is here: Fix Persist, resolve IMEI=0, Volte, 4G, Explanation, Requirements From my perspective, the EFS is erased installing OTAs for a reason. I don't know what it is myself, but the folks at Motorola build it into their OTAs and they know far better than I do.
As a mitigation to the risk of people forgetting/losing their EFS and / or Persist backups, I will have a very crude backup system integrated into the zips. However, it will take some skill / knowledge to restore from these backups, and they should not be relied upon over the long term. Refer to the second post for more details.
Important information if downgrading to Nougat and Custom Oreo roms
The Oreo roms will change the ownership of specific files and folders in the /persist folder. As a result of this, stock Nougat will have issues such as lost IMEI, no Volte, no 4G, etc. In order to overcome these issues, either follow the instructions in the link above, or flash the following zip in TWRP.
potter-stock-persist-fix.zip
Additionally, the latest Nougat builds with the Aroma installer will apply the persist fix when installed.
Another potential issue is that, as a result of various partitions being updated, the new Oreo blobs may not be compatible with existing Nougat roms (stock or custom), or even current Custom Oreo roms. This may result in issues such as the fingerprint reader not working, etc.
UPDATE: Some custom roms are now using the Oreo blobs. However, if you require the older Nougat blobs, you can downgrade through one of the following methods:
1) install one of the latest Stock Nougat TWRP flashables. This will ensure that all affected partitions are compatible with Stock Nougat and Custom Oreo roms. You can get these from this thread here:
[Nougat][Stock][Rom] TWRP Flashable Stock Builds
2) install one of the firmware-only zips from the below folders. Note that if this results in other odd behaviour, you may need to install and boot into a full stock Nougat firmware as above. The main benefit of these zips is that they are much smaller, ~50MB rather than ~1.4GB.
https://www.androidfilehost.com/?w=files&flid=273039
potter-firmware-92-14.zip is for retin, retla, retbr
potter-firmware-93-14.zip is for retus, retapac, reteu
Out of respect for the purpose of this thread, please keep questions about whether or not to use Nougat or Oreo firmware for particular custom ROMs in the thread for the custom ROM you are trying to use. I do not support other custom ROMs - the maintainers of those custom ROMs should provide guidance.
Usage
Steps to flash
Ensure you have the latest TWRP
Download an appropriate zip from one of the links below
Copy to the phone or SD card
BACKUP YOUR DATA, INCLUDING EFS AND PERSIST
Flash the zip via TWRP
Optionally flash Magisk etc - NOTE - in order to disable dm-verity and forced encryption you must flash magisk before rebooting Resolved since Soak Test 2 and Soak Test 1 Aroma installer, Magisk is optional
Reboot
Profit?
How you can help with new builds
If your phone gets an OTA notification for a build that has not been released, please pull it and share it in this thread:
When the notification is received, allow your phone to download the OTA
Power off and boot into recovery
Go to Advanced -> File Manager
Navigate to /cache
There will be a file Blur_Version_x.y.z.potter.blah.zip - Note - Oreo OTAs may not be named this way, they may be named according to the version of the rom that is currently installed
Copy it to internal storage or the sdcard
Copy to PC (optional)
Upload to Mega, Google Drive, wherever
Share the link
You can also remove the file from the /cache folder to prevent any auto-updates from happening.
Latest versions
The 85-13 series is released to most channels except retus, and the last update was to 85-17-2.
The 85-17 series is released to the retus channel.
However, all releases can be used with all channels.
Official Oreo OPSS28.85-17-6-2 (Oreo 8.1, 1 February 2019 security patches) - Aroma Installer
Android File Host - potter-twrp-flashable-OPSS28.85-17-6-2-aroma.zip
Official Oreo OPSS28.85-17-6 (Oreo 8.1, 1 February 2019 security patches) - Aroma Installer
Android File Host - potter-twrp-flashable-OPSS28.85-17-6-aroma.zip
All versions that I have created will be placed in this folder (or the Archive sub-folder) at Android File Host:
Android File Host - Potter TWRP Flashable Stock Oreo
Modified Boot Logo
Optional, only needs to be flashed once. Replaces the warning screen with the standard logo. Can't hide the N/A. If you want to hide the N/A, go to the themes forum.
potter-logo.zip
Kernel Sources
Kernel sources are provided by Motorola:
https://github.com/MotorolaMobilityLLC/kernel-msm/
XDA:DevDB Information
Potter Oreo TWRP Flashable, ROM for the Moto G5 Plus
Contributors
NZedPred
ROM OS Version: 8.x Oreo
ROM Kernel: Linux 3.x
Version Information
Status: Stable
Created 2018-08-17
Last Updated 2019-12-28

FAQs
Frequently Asked Questions
What is the 'very crude backup system integrated into the zips'?
This is a script that is run at the start of the install. It's purpose is very simple - it creates "dd backups" (i.e. bit-perfect images) of the modemst1/2 and persist partitions. They are stored in your sdcard as "backup_yyyymmddHHMMSS_modemst1.img", etc., where yyyymmddHHMMSS represents the date and time the script was run.
For this to work, your data partition must be mounted. I haven't included any checks for this (I'm not really a shell script person - it would take me hours to get this sort of thing right) - this is what puts the "crude" in "very crude backup system". UPDATE - the aroma installers now check that data is mounted, and abort the install if not. Most of the time the data partition will be mounted in TWRP, so this will work 99% of the time. Caution should still be applied, and you should still copy these or any other backups to cloud storage to be safe.
OK, so if I needed to use these backups, how do I restore them?
To restore these, you will have to reboot into TWRP and open up a shell or use adb. The commands to restore each partition are as follows (replacing yyyymmddHHMMSS with the appropriate values of course):
Code:
dd if=/sdcard/backup_yyyymmddHHMMSS_modemst1.img of=/dev/block/bootdevice/by-name/modemst1
dd if=/sdcard/backup_yyyymmddHHMMSS_modemst2.img of=/dev/block/bootdevice/by-name/modemst2
dd if=/sdcard/backup_yyyymmddHHMMSS_persist.img of=/dev/block/bootdevice/by-name/persist
Note that these commands are very powerful, and applied incorrectly can result in you bricking your phone if you overwrite the wrong partition.
So are dm-verity and forced encryption now not able to be disabled?
OK some history... Nougat had fstab (file system table) in the boot image. So in those days, I would open up the image, and edit the fstab.qcom file, do the appropriate changes, repack the boot image, and all is fine.
Now, under Oreo, the fstab file is not in the boot image, it's under /system/vendor/etc/fstab.qcom or similar. Editing that file appears to have no effect. For now, Magisk is the easiest way of disabling both, but you must make sure to install it immediately after installing the rom and before rebooting.
Update - this is now resolved in the second Oreo soak test download. dm-verity is still disabled in the boot image, but a completely different way. Once this is done, disabling forced encryption works as expected.
Which partitions are modified?
The short of it is this - boot, system and 'firmware'-related partitions. None of the bootloader partitions are updated. The full list of partitions that are written is:
modem
fsg
dsp
boot
system
oem
Note that this list applies to the Nougat and Oreo flashable zips.
TWRP is no longer installed after flashing this
I believe this is related to dm-verity (see above). You will have to first reinstall TWRP via fastboot. When TWRP is back, install magisk immediately after installing the rom, and before rebooting.
I'm having problems with an Oreo custom rom after installing this rom, what can I do?
Refer to the OP, the section about downgrading to Nougat - the same approach applies. Oreo Custom roms will have been based upon the available Nougat blobs that were available. As the blobs have been updated in the Oreo release, the issue is that they are not compatible. So install a full TWRP Nougat zip and then install your Oreo Custom rom.
Dirty or clean flash?
I did a dirty flash, as I came from the latest Nougat stock rom. Keep in mind that this is nothing more than the OTA applied to the previous Nougat build and packaged into a TWRP zip. So, as long as you have come from (the latest) Stock Nougat, you should be able to dirty flash, as that would be the use-case for the OTA. If you were on another rom, clean flash required.
Once you are on one of these builds, you can dirty flash subsequent builds. Again, this would be just like flashing one OTA after the other. Also note that these builds are complete in their own right, you don't need to incrementally flash - you can flash the latest to get the full install.
My device was encrypted, and I really need to decrypt it. How can I do this?
Sorry, but the only way is to format the data partition. That means you will need to backup your data, and your internal storage as well (/sdcard). After backing up, use TWRP to format the partition. From the TWRP main menu, select Wipe > Format Data. Then follow the on-screen instructions.
Is it 32 bit or 64 bit
32 bit. We've known this would be the case for a long time.
How can I create flashable zips myself?
I created the guide below, and it has been updated for Oreo. A word of warning, it is not for the faint of heart. You will need to have a good understanding of the Linux command line, and be able to understand the techniques that are being taught, rather than expecting that the process is a 'step-by-step'. Adaptability is key here.
[GUIDE] Creating TWRP Flashbale Stock roms
What are the new Aroma zips?
The aroma zips use the Aroma installer. Some of you may have seen the Aroma installer for Open Gapps. The key here is that I, as the packager, can build in selection options into the installer. It's all available as a nice GUI for the users to pick and choose from the options I've provided. Here are the options that are available:
Do backups - does the backups as mentioned earlier in the FAQs.
Erase EFS - erases modemst1 and modemst2, as described in the first post. Also DDR is erased, but I'm not sure what purpose that has but it may as well go together with these.
Install Firmware - installs the following partitions - modem, fsg, dsp; each of these has something to do with hardware / connectivity.
Install System - Installs the following partitions - boot, system, oem.
Apply patches - as long as Install System is selected, will install the patched boot image with dm-verity disabled, and will edit the fstab (filesystem table) to disable forced encryption.
On soak test 2 or later, I have my IMEI but no signal. What can I do?
In all cases where this has happened, the user's phone has relied upon an EFS backup for IMEI, due to flashing another persist. In these cases, it appears that the only way to get a signal is to use the firmware (i.e. modem, fsg, dsp - refer previous FAQ) from soak test 1. We're probably seeing here that the EFS does in fact need to be recreated to be valid. Unfortunately for these users, by not having their own persist, they are stuck with an old EFS and the newer firmwares appear to not work.
To do this
if you are already on Soak Test 2 or later, download the Soak Test 1 firmware download at either of these links:
Android File Host - oreo-soak1-firmware.zip
Dropbox - oreo-soak1-firmware.zip
If you are on Soak Test 1, install Soak Test 2 or later / official aroma installer and de-select firmware
My fingerprint is not working on my custom ROM
Refer to the thread for your custom ROM, and ask questions there. In short, Nougat and Oreo firmware are not compatible with each other. Many custom ROMs are now using Oreo firmware, whereas previously (before October 2018) pretty much all custom ROMs were using Nougat firmware. It's messy now, but please ask the questions in the right place (which is NOT this thread).
My touchscreen isn't working after flashing, even within TWRP
This seems to happen somewhat rarely, although I don't know what the cause is. As it affects TWRP as well, and TWRP uses the 'modem' partition for getting its firmware blobs, I guess it's possible that this particular partition is getting a conflicting modification whilst flashing, which is causing problems (but this is purely speculation on my part).
To solve, fastboot flashing the stock ROM appears to work. It may also be possible whilst in TWRP to manually flash the partitions via ADB, but that takes a bit of work and knowledge. Until someone can truly work out what's happening and the minimum required to fix it, stick with fastboot.
Update - refer to post #3 for the latest information about this issue.

Touch screen unresponsive even in TWRP
The below post has the latest information on the Touch Screen Unresponsive issue
Likely Cause
From the testing that I've done to reproduce the issue, as far as I can tell the issue is that Stock Oreo is not able to be safely applied over the top of old builds of Stock Nougat. Furthermore, it doesn't seem to matter if you were on Custom ROMs after you were last on Stock Nougat, just what Stock Nougat build you were on last.
Avoiding the Issue
Again the key here is what build of Stock you were on last (and I guess booted into). So, if you were never on Stock Oreo, and you aren't sure what version of Stock Nougat you were on last, then the safest path to getting these builds working is to first flash the latest Nougat Stock ROM.
Get the latest from this thread: [Nougat][Stock][Rom] TWRP Flashable Stock Builds
Once you have flashed the latest Nougat, boot once to make sure everything is working. After that, you should be able to safely upgrade to Oreo.
Fixing the Issue
If you have been affected by the issue, most people have been able to get back the touch screen functionality by flashing a fastboot version of the ROM. However, as long as you have a PC handy you will be able to flash using TWRP as well via adb, using the steps detailed below. A third option is to connect a USB Mouse via an USB OTG adapter.
Note that for either method via TWRP, you cannot use the versions of the ROM with the Aroma installer, as the mouse is not supported within, and there is no way of providing input by adb.
Downloads
The 92-14 or 93-14 versions should be suitable. They are in these links (these do not erase EFS, so for the paranoid, you will retain your IMEI):
twrp-flashable-potter-NPNS25.137-92-14-no-erase-modemst.zip
twrp-flashable-potter-NPNS25.137-93-14-no-erase-modemst.zip
TWRP Commands
Once in TWRP, connect your USB cable. To copy the downloaded file into your internal storage (adapt the filename for the version you downloaded):
Code:
adb push twrp-flashable-potter-NPNS25.137-92-14-no-erase-modemst.zip /sdcard/
If you want to backup, you can do this via the command line as well. I haven't tested this myself, but the commands are available here: https://www.pocketables.com/2014/10/using-twrps-new-adb-interface.html
The example provided uses the following to back up system, data and boot, and compress:
Code:
adb shell twrp backup SDBOM
You will need to do a clean flash, so these commands will wipe data / factory reset and then install
Code:
adb shell
twrp wipe data
twrp install /sdcard/twrp-flashable-potter-NPNS25.137-92-14-no-erase-modemst.zip
reboot
After the reboot, you should have your touch screen functionality back. Then reboot to recovery, and install Oreo as normal. If for any reason the Oreo flash doesn't work, try the steps again, but rather than installing the latest Oreo, install an earlier one.

Awesome bro...
You Rock...
you even included auto backup of efs and persist ... wow thats very thoughtfull and nice of you...
hatsoff..
:good::good:

Thanks dude, downloading
Edit: working like a charm, again thanks.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

Thanks for uploading. Two questions though...
1. which one would be suitable for retin? (India)
2. Are there any bugs?

working for retin also thnx

Question: I'd like to flash this, but I'm planning to roll back in the future to take the OTA back up to O. If I restore nougat system, boot, persist, recovery, oem will that still be possible? I see some other stuff in the zip like adspo.bin, fsg.mbn, and modem. Not sure if those it lead to OTA failures or a brick.
also, nice job on the persist/efs script!

Worked on retin also thanks. Great work!!!!

I'm pretty sure forced encryption of the data partition is still enabled.

pfonck said:
I think forced encryption of the data partition is still enabled (formatting the data partition in TWRP does not help).
Click to expand...
Click to collapse
If that's the case magisk is probably needed to turn it off. Sorry, but I've only tested it with magisk installed. Moto have changed the fstab location, I thought I got it but maybe it's cosmetic and doesn't do anything. Will update OP when I get a chance.

NZedPred said:
If that's the case magisk is probably needed to turn it off. Sorry, but I've only tested it with magisk installed. Moto have changed the fstab location, I thought I got it but maybe it's cosmetic and doesn't do anything. Will update OP when I get a chance.
Click to expand...
Click to collapse
Yes, when you do;
rom installation > format data > flash magisk
everything is okay
verified.

Did Moto make Oreo 64bit?

redbeard1083 said:
Question: I'd like to flash this, but I'm planning to roll back in the future to take the OTA back up to O. If I restore nougat system, boot, persist, recovery, oem will that still be possible? I see some other stuff in the zip like adspo.bin, fsg.mbn, and modem. Not sure if those it lead to OTA failures or a brick.
also, nice job on the persist/efs script!
Click to expand...
Click to collapse
Good question, and this is something that I needed to consider before doing this, in case everyone installed this and we'd have no path to get to official Oreo.
Refer to the section in the OP "Important information if downgrading to Nougat". Basically you need to follow all of that to be able to get notification of the OTAs. Once the official public Oreo OTA is available, I will then put together a zip based upon the pre-requisite nougat rom with the official Oreo OTA.
I also believe that one or both of the 1 July 2018 and/or 1 August 2018 patches were announced, but neither were for Oreo. I do intend to keep Nougat up to date as well in its thread.

NZedPred said:
Good question, and this is something that I needed to consider before doing this, in case everyone installed this and we'd have no path to get to official Oreo.
Refer to the section in the OP "Important information if downgrading to Nougat". Basically you need to follow all of that to be able to get notification of the OTAs. Once the official public Oreo OTA is available, I will then put together a zip based upon the pre-requisite nougat rom with the official Oreo OTA.
I also believe that one or both of the 1 July 2018 and/or 1 August 2018 patches were announced, but neither were for Oreo. I do intend to keep Nougat up to date as well in its thread.
Click to expand...
Click to collapse
How did a recovery come in? with volume - and power enters and I say without command

JC Pzy said:
How did a recovery come in? with volume - and power enters and I say without command
Click to expand...
Click to collapse
I've only just added something to the FAQ (post 2) that covers this. Sorry, it was unexpected and didn't come up when I was testing as I always had magisk installed. Follow these steps:
TWRP is no longer installed after flashing this
I believe this is related to dm-verity (see above). You will have to first reinstall TWRP via fastboot. When TWRP is back, install magisk immediately after installing the rom, and before rebooting.

NZedPred said:
I've only just added something to the FAQ (post 2) that covers this. Sorry, it was unexpected and didn't come up when I was testing as I always had magisk installed. Follow these steps:
TWRP is no longer installed after flashing this
I believe this is related to dm-verity (see above). You will have to first reinstall TWRP via fastboot. When TWRP is back, install magisk immediately after installing the rom, and before rebooting.
Click to expand...
Click to collapse
I do not have a PC to reinstall the recovery

NZedPred said:
Good question, and this is something that I needed to consider before doing this, in case everyone installed this and we'd have no path to get to official Oreo.
Refer to the section in the OP "Important information if downgrading to Nougat". Basically you need to follow all of that to be able to get notification of the OTAs. Once the official public Oreo OTA is available, I will then put together a zip based upon the pre-requisite nougat rom with the official Oreo OTA.
I also believe that one or both of the 1 July 2018 and/or 1 August 2018 patches were announced, but neither were for Oreo. I do intend to keep Nougat up to date as well in its thread.
Click to expand...
Click to collapse
Maybe I'll try tweaking the zip to see if we can run it without the stuff we can't easily backup/restore with twrp. I'll take a stab at it shortly and let you know what happens if we flash just system, boot, and OEM.

redbeard1083 said:
Maybe I'll try tweaking the zip to see if we can run it without the stuff we can't easily backup/restore with twrp. I'll take a stab at it shortly and let you know what happens if we flash just system, boot, and OEM.
Click to expand...
Click to collapse
You can give it a go, but I've already done some very brief testing. Using the Nougat modem partition on the Oreo system results in things like 3G only, fingerprint not working.

JC Pzy said:
I do not have a PC to reinstall the recovery
Click to expand...
Click to collapse
I'm guessing you don't have root either? If you did, you could try installing it from a shell from within the rom:
Code:
su
dd if=/path/to/twrp.img of=/dev/block/bootdevice/by-name/recovery

Related

[RECOVERY][angler] TWRP 3.0.2-3 UNOFFICIAL touch recovery [2016-??-??]

Hello folks!
Apparently the official TWRP recovery 3.0.2 has some sort of problems with android 7.1.1 Nougat, so this unofficial recovery was created to work around those issues in the meantime.
The official hosting of this unofficial recovery is in this thread: http://forum.xda-developers.com/nex...recovery-twrp-2-8-7-0-touch-recovery-t3234976
It is buried almost all the way at the end.
For sake of convenience, I am making it available here for those that wish to get going with it quickly. Note that I am not the developer of this nor am I the maintainer. This is here for easy reference only. You should speak with TWRP Grand Poobah Dees_Troy in the above thread for further details.
twrp-3.0.2-3-angler.zip 14.2 MB
https://mega.nz/#!tdcUAa4a!G-bGMWznEUAkE3Ih3ioaHq2Fx0NdzGnIlhY-nuPg__s
Installation instructions are straightforward:
1. Decompress the zip file so you have the .img file. Do not flash the zip file!
2. Place the recovery image in the same folder as your ADB / fastboot apps.
3. Put your phone in boot loader mode: Power button + volume down button.
4. Pull open a console in this directory and type fastboot devices. Proceed when you a serial number and "fastboot" next to it.
5. Type fastboot flash recovery twrp-3.0.2-3-angler.img. If all goes well you should see a success message of some sort.
6. Reboot and enjoy!
I've been using this for a few ROM installs already and haven't seen any problems.
Best of luck to you!
Guess I'll give this a go and report back later on heh. Will this recovery actually stay after a restart?
Sent from my Nexus 6P using XDA-Developers mobile app
Hmm, seems to be working ok for me on the 7.1.1 DP2 release.
Sent from my Pixel XL using Tapatalk
PearsonDKA said:
Guess I'll give this a go and report back later on heh. Will this recovery actually stay after a restart?
Click to expand...
Click to collapse
Like some others have mentioned, I keep seeing it disappear after restarting the phone once, twice or a few times, so I have to re-flash it almost every time I need it.
Not sure what the hangup is. Size-related?
CaptShaft said:
Like some others have mentioned, I keep seeing it disappear after restarting the phone once, twice or a few times, so I have to re-flash it almost every time I need it.
Not sure what the hangup is. Size-related?
Click to expand...
Click to collapse
You need to flash either Root or a modified boot image for it to stay
jaytv said:
You need to flash either Root or a modified boot image for it to stay
Click to expand...
Click to collapse
Good to know. 2 questions:
1) What modifications to a regular boot image do we need to make to keep it?
2) Are all boot images the same? Can we all use the same modified boot image or does it differ depending on the ROM?
CaptShaft said:
Good to know. 2 questions:
1) What modifications to a regular boot image do we need to make to keep it?
2) Are all boot images the same? Can we all use the same modified boot image or does it differ depending on the ROM?
Click to expand...
Click to collapse
Sounds like time for you to do some reading as to what root and boot images are. Search works great. I suggest the threads on SuperSU (a form of root) and also looking at the many wonderful custom boot images and Roms that are floating around in this forum.
The simple answer is flash Super Su or find a modified boot image for the current release and flash that.
Also, Heisenberg's excellent beginner's thread in Nexus 6p general is a great place to start.
Enjoy!
Just what I was looking for.
I was in TWRP loop forever and couldn't figure it out till this thread. No issues now
I've installed the one from the main thread and it's working for me.
I just wanted to mention what the bugs are:
shadowstep said:
TWRP versions 3.0.2-1 and above work with Android Nougat 7.0's encryption, TWRP 3.0.2-0 and below don't. Also, both versions 3.0.2-1 and 3.0.2-2 are buggy at the moment, but none of those bugs are along the lines of encryption. Read the end of this post for more information.
(Replies snipped)
EFS partition is never needed to be restored under any general circumstance. It is the partition where the phone stores its IMEI information, MAC address, product code, etc. and will never be needed to be modified or changed in any way. Even if you're flashing a stock factory image (be it of 6.0.1 or 7.0, whenever it is out), it would never touch this partition. You should just backup it once, store it away for emergency purposes and never backup or restore it again.
Okay now moving onto important notes and the bugs:
1. TWRP 3.0.2-0: Is stable and has no known bugs. However, it has not been updated to handle Android Nougat 7.0's encryption. Hence, if you're on 7.0 and you're encrypted, it will keep asking for an encryption password even if you don't have one or if you have one and are inputting it correctly, it will refuse to accept it. If you're on 7.0 and you're unencrypted, then this version should be fine.
2. TWRP 3.0.2-1: Is not stable and has a known bug. The bug would affect those who are restoring their EFS partition using this version of TWRP. The EFS partition has two subparts to it, i.e. /efs1 and /efs2. So, when you check EFS at the backup option menu in TWRP, it backups /efs1 to efs1.emmc.win and /efs2 to efs2.emmc.win, which is fine. However, while restoring (and here is when the bug comes in), it restores efs1.emmc.win to /efs1 but restores the same backup of efs1.emmc.win to /efs2 as well (which it shouldn't be doing and instead it should be restoring the corresponding efs2emmc.win to /efs2). This can brick your phone. Hence, the fatal bug.
This version, however, supports Android Nougat 7.0's encryption. Therefore, as long as you don't backup/restore EFS with this version, you should be good using it with either Android Marshmallow 6.0.1 or Android Nougat 7.0, encrypted or unencrypted.
3. TWRP 3.0.2-2: Is not stable and has a known bug (with the EFS bug most likely fixed in this version, but this is unconfirmed since there is no changelog available yet). The bug would affect those who are backing up their data using this version. TWRP creates the backups of your selected partitions as tar files. The bug that is present in this version would give you an error (most likely the one that @stankyou got) as it is unable to write the second tar file after processing approximately 1 GB of data and would cancel the backup. Hence, the bug.
This version, however, also supports Android Nougat 7.0's encryption. Therefore, as long as you don't create backups with this version, you should be good using it with either Android Marshmallow 6.0.1 or Android Nougat 7.0, encrypted or unencrypted.
4. @jcadduono has created unofficial builds (versions 3.0.2-3) for the Nexus 6P (Angler) and Nexus 5X (Bullhead) without the broken patches. They are up-to-date, but have the adb backup patches rebased out until the bugs are solved. These builds are untested, and he recommends sticking with 3.0.2-0 instead for the time being.
Click to expand...
Click to collapse
TL;DR 3.0.2-0 doesn't support Nougat encryption. 3.0.2-1 has bug restoring EFS. 3.0.2-2 has bug creating backups over 1GB.
ADB sideload is not working in TWRP 3.0.2-3 (twrp-3.0.2-3-angler.img - MD5 2fcc19da388ab727aac69b6165ac7888), not sure if this is @jcadduono or not. It's working in previous build IIRC. Is this expected? Thank you.
vibranze said:
ADB sideload is not working in TWRP 3.0.2-3 (twrp-3.0.2-3-angler.img - MD5 2fcc19da388ab727aac69b6165ac7888), not sure if this is @jcadduono or not. It's working in previous build IIRC. Is this expected? Thank you.
Click to expand...
Click to collapse
I had a few failures with it in TWRP, yes.
Until fixed, you'll have to do ADB push instead and then load from TWRP install.
Alternately, you can do fastboot flash commands while in the bootloader.
Grospolina said:
I've installed the one from the main thread and it's working for me.
I just wanted to mention what the bugs are:
TL;DR 3.0.2-0 doesn't support Nougat encryption. 3.0.2-1 has bug restoring EFS. 3.0.2-2 has bug creating backups over 1GB.
Click to expand...
Click to collapse
I noticed that bug yesterday restoring a backup. TWRP appeared to hang whilst restoring, I left it a further five minutes, then hard reset the power button. When the phone loaded up, I found it had restored correctly.
3.0.2-4 twrp ?
Anybody have the capabilities to roll the 3.0.2-3 version in with The Flash's 3.0.2-0_F2FS version lol; and make a version compatible with Nougat encryption as well as F2FS (and without EMS restore problem, nor backup error issue) ?
I know I sure don't, and now that I'm on christmas break I am just sitting around - in fact if anybody could point me to a resource, I have the time and I'm sure I could pick it up quick, I could try and compile it! I've been wanting to give back to this great community since I joined; maybe now that I've done a couple years of engineering school and been searching thru the forums, I can help throw this together.
I'm going to assume that I look up those two builds sources on GitHub, then use Parallels Windows to use a Linux distro (because I'm on a Macbook Pro) to combine the sources and make a build? Honestly, if I could get any advice, I'd love to jump on it.
3.0.3.0 is out. Anyone know the changelog ?
Here's the link: https://dl.twrp.me/angler/twrp-3.0.3-0-angler.img.html
Would be nice to know a changelog
ariefabuzaky said:
3.0.3.0 is out. Anyone know the changelog ?
Click to expand...
Click to collapse
Unfortunately, the answer is here. I did not expect to see a nag screen after making a backup!
bkkzak said:
Here's the link: https://dl.twrp.me/angler/twrp-3.0.3-0-angler.img.html
Would be nice to know a changelog
Click to expand...
Click to collapse
You can always look at their repository
Since 2016-09-01:
- Change version to 3.0.3 to support the app release - 27 hours ago
- Update Ukraine language translation (via jemmini) - 27 hours ago
- Add TWRP app install via TWRP recovery - 29 hours ago
- TWRP Language Update - 7 days ago
- Change handling of /cache due to AB devices not having cache - 7 days ago
- Support backup/restore of FBE policies - 8 days ago
- Support File Based Encryption - 10 days ago
- Add boot slot support - 12 days ago
- Support new AB OTA zips - 12 days ago
- Copy Kernel Logs - 5 months ago
- Improve backup & wipe exclusion handling - 2 weeks ago
- Fix adb shell in 7.0 tree - 6 weeks ago
- Check if mount point is dir during startup - 6 weeks ago
- MD5 verification sanity - 8 weeks ago
- Fix image flashing: attempt 2 - 8 weeks ago
- Fix image flashing - 3 months ago
- Update to android-7.1 - 4 weeks ago
- Fix libcrypto dependency in 6.0 trees - 3 months ago
- Clean up PartitionSettings - 3 months ago
- Fix compressed backups with split archives - 3 months ago
- Fix restore of subpartitions - 4 months ago
Unfortunately for me, I still have issues decrypting an encrypted phone on TWRP 3.0.2-3 and 3.0.3-0. TWRP prompts for a password and won't take my PIN.
Running the latest ResurrectionRemix (CM-based), which enables device encryption. I'm still searching around to see what I need to do about this.
Edit: Update: Huh, weird, got it to mount.
I rebooted back into Android, went in to Security and set a device encryption password with "Change encryption password".
I hadn't set one before. It requests my screen lock PIN then to enter an alphanumeric encryption password.
Attempted to remove it again immediately (it doesn't show any feedback when I tap "Replace encryption password" then enter my screen lock PIN), and rebooted into recovery.
TWRP prompted again for an encryption password but now accepts my device lock PIN and it mounts!
Rebooted again, and now the phone requests a PIN unlock during boot >.<
Went back in to Security and went straight to "Replace encryption password", entered my PIN, and saw no feedback again. Rebooted back into Recovery.
TWRP prompts again but accepts my PIN. Rebooting to Android again, I am prompted again on boot to enter my screen PIN to finish the boot process. Sooo now I guess I have to figure out how to disable the device encryption PIN, or something. Oh well. I'll update if I make progress.
The end goal is to reach a point where TWRP will mount (even if it's manually with an entered PIN), and to not have a phone that requires a PIN unlock during boot. But I guess that's still safer and I can live with it. It's just different from how the ROM originally behaved, is all.
Edit: Update again!
Disabled my PIN/security altogether, rebooted into recovery. TWRP mounts without any prompts. Nice. Reboot int system, it boots fine. Also nice.
Set a new screen lock PIN, do not select to use it on bootup, and set my fingerprints again. Apps work immediately fine after, I did not have to reset them to use that auth method. Woot, nice.
Restart into TWRP, no prompt, good. Restart into System again, no prompt during boot.
So I guess in the end you have to disable and re-enable device screen locking security if you hit this issue in TWRP on a 6P? It could be my ROM as well.
CaptShaft said:
Hello folks!
Apparently the official TWRP recovery 3.0.2 has some sort of problems with android 7.1.1 Nougat, so this unofficial recovery was created to work around those issues in the meantime.
The official hosting of this unofficial recovery is in this thread: http://forum.xda-developers.com/nex...recovery-twrp-2-8-7-0-touch-recovery-t3234976
It is buried almost all the way at the end.
For sake of convenience, I am making it available here for those that wish to get going with it quickly. Note that I am not the developer of this nor am I the maintainer. This is here for easy reference only. You should speak with TWRP Grand Poobah Dees_Troy in the above thread for further details.
twrp-3.0.2-3-angler.zip 14.2 MB
https://mega.nz/#!tdcUAa4a!G-bGMWznEUAkE3Ih3ioaHq2Fx0NdzGnIlhY-nuPg__s
Installation instructions are straightforward:
1. Decompress the zip file so you have the .img file. Do not flash the zip file!
2. Place the recovery image in the same folder as your ADB / fastboot apps.
3. Put your phone in boot loader mode: Power button + volume down button.
4. Pull open a console in this directory and type fastboot devices. Proceed when you a serial number and "fastboot" next to it.
5. Type fastboot flash recovery twrp-3.0.2-3-angler.img. If all goes well you should see a success message of some sort.
6. Reboot and enjoy!
I've been using this for a few ROM installs already and haven't seen any problems.
Best of luck to you!
Click to expand...
Click to collapse
tu 2: is that recovery image the same as under point one? and where is the ADB /fastbootfolder? these not exist

[RECOVERY][UNOFFICIAL][Sanders] TWRP-3.2.1-r20 (64bit Supported!)

Unofficial TWRP for Moto G5S Plus (Sanders)​
Additional Features over Official TWRP:
Supports flashing of both 32bit and 64bit ROMs and Kernels.
OREO Images/ROMs support.
Decryption and Encryption support.
No SuperSU by default.
No TWRP app.
No HTC Dumlock cruft.
Updated pigz compressor (slightly faster and more tolerant of corruption).
NTFS support(Both Read and Write).
Covers more partitions for nandroid backup (OEM, FSG and FSC).
Experimental support for SD cards that are partitioned for partial adopted storage and partial removable storage.
Faster I/O performance.
Fixed Gapps/aroma freeze issues.
IMPORTANT!!! : READ INSTRUCTIONS CAREFULLY BEFORE PROCEEDING TO FLASHING PROCESS..!!
At first boot twrp will ask for "Swipe to allow modifications for /system" and if you choose to allow it system partition will get modified. So if you choose to reboot back to OS without performing anything in twrp, the OS won't boot (as verity check is enabled in stock OS/kernel) . To avoid this you have to flash either Magisk or flash any of the verity disabler zips available on xda.
Force encryption is enabled by default in stock OS and twrp will successfully decrypt /data at first boot if all goes well
If in case decryption doesn't go fine, twrp will popup a dialog box asking for password and that means decryption went wrong and you would need to wipe data once via twrp wipe options and reboot back to twrp for functioning of /data
Flashing Instructions:
Using Existing TWRP:
Reboot to recovery > Click on Install > Install Image > recovery > select recovery image and flash > reboot to recovery
Other Methods(Fastboot) :
Make sure you have unlocked bootloader
Reboot to bootloader
Enter following command in terminal: fastboot flash recovery twrp-****.img (if you want permanent flash) or fastboot boot twrp-****.img (if you want temporary boot)
Incase your device is encrypted (while coming from stock rom), Follow these steps to decrypt:
Reboot to recovery > cancel the password prompt > mount all partitions > Format Data/Userdata (on f2fs) > Reboot Recovery > Mount all partitions again > Flash Magisk > Reboot
Now you are free to use Stock ROM (Decrypted) or Flash any custom rom you want.
Download Links: https://www.androidfilehost.com/?w=files&flid=216298
TWRP Themes: Check 3rd post
Known Issues: None || Report if you find any.
XDA:DevDB Information
[RECOVERY][UNOFFICIAL][Sanders] TWRP-3.2.1-r20 (64bit Supported!), Tool/Utility for the Moto G5S Plus
Contributors
CheckYourScreen
Source Code: https://github.com/CheckYourScreen/twrp_device_motorola_sanders
Version Information
Status: Stable
Current Stable Version: r20
Stable Release Date: 2018-04-04
Created 2017-10-26
Last Updated 2018-04-04
|| Changelog ||
r20:
Fixed Encryption support on custom roms.
Updated kernel
Updated build fingerprint for latest bootloader support.
Reverted pigz changes.
Switched back to original twrp themes. (TWRP Themes can be found in 3rd post )
Various bug fixes and improvements.
r16:
Fixed compatibility with New Bootloader (C2.07-December patch)
Merged october patches in kernel.
Various twrp upstream patches and fixes.
Fixed remote wipe process (Earlier remote wipe issued from play account wasnt processed due to twrp)
r15:
Added 64bit Support (You can flash both 32bit/64bit roms or kernels with it).
Fixed Encryption Support! (No need to format data to decrypt and mount).
Updated to 3.2.1 upstream changes with full oreo support.
Remove android reboot during password check on multiple wrong inputs.
r9:
Fixed F2FS mount issues(You can flash magisk modules or SuperSu now).
Enabled NTFS Write Support (You can make backups on sdcard/pendrives formatted on NTFS).
Fixed size of various partitions.
Switched to LZMA compression to decrease size.
r7: Initial Public Release
|| Themes ||
Here are some of the twrp themes:
Preview images: https://photos.app.goo.gl/DLrfDseGzfxE8Uq93
Download link: https://androidfilehost.com/?w=files&flid=233551
:good:
Only one that has actually be working for me ever since I got the phone. Thank you for your efforts.
this seems to suffer from the same thing the stock rom/kernel suffers from, the weird f2fs bug that makes certain mounts fail. geneticengineer has shared a kernel that fixes this in stock rom , maybe you could get in touch with him about how he updated f2fs
Thank you for your work, this seems to work well on my device. If you would like to swap the kernel, I posted a newer firmware NPS26.116-45 here:https://forum.xda-developers.com/showpost.php?p=74325160&postcount=33
revengineer said:
Thank you for your work, this seems to work well on my device. If you would like to swap the kernel, I posted a newer firmware NPS26.116-45 here:https://forum.xda-developers.com/showpost.php?p=74325160&postcount=33
Click to expand...
Click to collapse
But its for xt1806 only i think. Not real help. The most user here are outside usa.
Schrotty35 said:
But its for xt1806 only i think. Not real help. The most user here are outside usa.
Click to expand...
Click to collapse
Well my guess is that the kernel in the present twrp is from the -26 firmware posted in the other thread. That firmware was US Retail also. The OP in the other thread states in can be used on other models. But I am not going to tell you that because I do not know. I have not found any other firmware for the sanders model.
Ae3NerdGod said:
this seems to suffer from the same thing the stock rom/kernel suffers from, the weird f2fs bug that makes certain mounts fail. geneticengineer has shared a kernel that fixes this in stock rom , maybe you could get in touch with him about how he updated f2fs
Click to expand...
Click to collapse
Afaik it doesnt affect TWRP, you just need to be on a custom kernel if you are running stock rom.
Twrp has nothing to do with it.
If you face any problem flashing anything then post a screenshot or log.
revengineer said:
Thank you for your work, this seems to work well on my device. If you would like to swap the kernel, I posted a newer firmware NPS26.116-45 here:https://forum.xda-developers.com/showpost.php?p=74325160&postcount=33
Click to expand...
Click to collapse
Schrotty35 said:
But its for xt1806 only i think. Not real help. The most user here are outside usa.
Click to expand...
Click to collapse
Stock kernel is same in both the firmwares.
-45 is just for US variant, i dont recommend you to even flash that firmware on other variants.
CheckYourScreen said:
Afaik it doesnt affect TWRP, you just need to be on a custom kernel if you are running stock rom.
Twrp has nothing to do with it.
If you face any problem flashing anything then post a screenshot or log.
Click to expand...
Click to collapse
but i have a custom stock kernel, and things that fail in TWRP work in flashfire or magiskmanager
its mostly magisk modules im having problems with, ill reproduce an error when i get the chance
Ae3NerdGod said:
but i have a custom stock kernel, and things that fail in TWRP work in flashfire or magiskmanager
its mostly magisk modules im having problems with, ill reproduce an error when i get the chance
Click to expand...
Click to collapse
Flash the magisk module via twrp > take screenshot when flashing completes > go to advance section of twrp and take recovery log > reboot system > send that screenshot and recovery log here.
CheckYourScreen said:
Flash the magisk module via twrp > take screenshot when flashing completes > go to advance section of twrp and take recovery log > reboot system > send that screenshot and recovery log here.
Click to expand...
Click to collapse
will do, it happens with every magisk package i try. they used to fail in stock too till i used geneticengineers kernel from telegram now they work
didnt know you could screenshot in recovery, i assume its the same buttons
Ae3NerdGod said:
will do, it happens with every magisk package i try. they used to fail in stock too till i used geneticengineers kernel from telegram now they work
didnt know you could screenshot in recovery, i assume its the same buttons
Click to expand...
Click to collapse
Yes, same buttons to take a screenshot in TWRP
TWRP backup is frozen at 13% completed. The progress bar is still showing its animation.
I unlocked the bootloader, and then rebooted. Android came up with the language selection screen. I powered off, connected the phone to the PC, and booted into TWRP (not flashed yet):
Code:
fastboot boot twrp-3.1.1-sanders-r7.img
I did not let TWRP format /data.
Then I started a backup, selecting all partitions, so that I could always go back after flashing TWRP and Magisk.
Does anyone know why backup is stuck at 13%? Last log line says "Backing up System..."
I tapped "Cancel" after two hours. That stopped the progress bar animation, but not the backup itself.
BTW: I used TWRP from this thread, the one in another thread freezes at the TWRP boot logo.
Edit: after two hours I killed the backup by powering down (the only way it seemed). On retry it froze at 21%.
Edit 2: Retried, this time backing up everything except system. No problem. I then tried to backup system. Frozen at 1%. What is the problem here?
Edit 3: Finally, a complete backup of system! Only one to go: system_image. But unfortunately that froze at 0%. Every subsequent try freezes at 1666MB (40%). The card has over 30GB free. I tried backup to USB-OTG, but that also froze.
gewe said:
TWRP backup is frozen at 13% completed. The progress bar is still showing its animation.
I unlocked the bootloader, and then rebooted. Android came up with the language selection screen. I powered off, connected the phone to the PC, and booted into TWRP (not flashed yet):
Code:
fastboot boot twrp-3.1.1-sanders-r7.img
I did not let TWRP format /data.
Then I started a backup, selecting all partitions, so that I could always go back after flashing TWRP and Magisk.
Does anyone know why backup is stuck at 13%? Last log line says "Backing up System..."
I tapped "Cancel" after two hours. That stopped the progress bar animation, but not the backup itself.
BTW: I used TWRP from this thread, the one in another thread freezes at the TWRP boot logo.
Edit: after two hours I killed the backup by powering down (the only way it seemed). On retry it froze at 21%.
Edit 2: Retried, this time backing up everything except system. No problem. I then tried to backup system. Frozen at 1%. What is the problem here?
Edit 3: Finally, a complete backup of system! Only one to go: system_image. But unfortunately that froze at 0%. Every subsequent try freezes at 1666MB (40%). The card has over 30GB free. I tried backup to USB-OTG, but that also froze.
Click to expand...
Click to collapse
Might be due to data partition being encrypted, you cant write anything in it without decrypting it first.
Format data and reboot recovery, then make the backup. You can flash magisk after taking the backup.
Btw r9 new release on its way with some really important changes
CheckYourScreen said:
Might be due to data partition being encrypted, you cant write anything in it without decrypting it first.
Format data and reboot recovery, then make the backup. You can flash magisk after taking the backup.
Btw r9 new release on its way with some really important changes
Click to expand...
Click to collapse
I was not trying to write the backup to the data partition, but to external SD card (tried OTG-USB as well without success).
I have flashed TWRP, formatted the data partition, and flashed Magisk. I have not tried to create a new backup yet. First I want to find out why Magisk does not pass the Safetynet check.
Can't wait to see what r9 brings. Thanks for your efforts. :good:
gewe said:
I was not trying to write the backup to the data partition, but to external SD card (tried OTG-USB as well without success).
I have flashed TWRP, formatted the data partition, and flashed Magisk. I have not tried to create a new backup yet. First I want to find out why Magisk does not pass the Safetynet check.
Can't wait to see what r9 brings. Thanks for your efforts. :good:
Click to expand...
Click to collapse
Magisk won't pass safety net with stock boot.img (kernel). Here is a modified kernel.
https://forum.xda-developers.com/showthread.php?p=73930507
After flashing new kernel Magisk passes no problem.
Sent by way of magic
lilcdroid said:
Magisk won't pass safety net with stock boot.img (kernel). Here is a modified kernel.
https://forum.xda-developers.com/showthread.php?p=73930507
After flashing new kernel Magisk passes no problem.
Sent by way of magic
Click to expand...
Click to collapse
When I flash this my WiFi stops working completely. I'm running aosp extended rom. I'm not sure if I can achieve battery life as good as I can on the stock ROM as I can on this one so im not sure what I should do about that..
Brycearuuni said:
When I flash this my WiFi stops working completely. I'm running aosp extended rom. I'm not sure if I can achieve battery life as good as I can on the stock ROM as I can on this one so im not sure what I should do about that..
Click to expand...
Click to collapse
Sorry I wasn't aware you weren't still on stock. That kernel will only work on stock. I would verify with the maintainer of AOSP extended ROM that the kernel is patched to work with Magisk.
Sent by way of magic

[Nougat][Stock][Rom] TWRP Flashable Stock Builds

This project is a continuation of the thread here:
[ROM] TWRP Flashable Stock Builds
As the original author of that thread, Q9Nap, no longer has a Moto G5 Plus, I have started this project to continue the work that Q9Nap started.
About this project
This is a collection of stock roms that can be flashed by TWRP. These roms have the following modifications from stock:
DM-verity is disabled
Forced encryption of the data partition is disabled. It is still possible to encrypt the partition if you wish
The boot image has been modified to suppress the unlocked device warnings (although the N/A will still show)
The partition table and boot loader are not included, which makes it safer to up/down-grade.
Do not attempt to apply standard OTAs over these builds. They'll probably fail, worst case they will brick your phone
Usage
Steps to flash
Ensure you have the latest TWRP
Download an appropriate zip from one of the links below
Copy to the phone or SD card
BACKUP YOUR DATA
Flash the zip via TWRP
Optionally flash Magisk etc
Reboot
Profit?
How you can help with new builds
If your phone gets an OTA notification for a build that has not been released, please pull it and share it in this thread:
When the notification is received, allow your phone to download the OTA
Power off and boot into recovery
Go to Advanced -> File Manager
Navigate to /cache
There will be a file Blur_Version_x.y.z.potter.blah.zip
Copy it to internal storage or the sdcard
Copy to PC (optional)
Upload to Mega, Google Drive, wherever
Share the link
You can also remove the file from the /cache folder to prevent any auto-updates from happening.
Latest versions
NPNS25.137-93-18 (1 August 2018 security patches)
Android File Host - potter-twrp-flashable-NPNS25.137-93-18-aroma.zip
Dropbox - potter-twrp-flashable-NPNS25.137-93-18-aroma.zip
Released only for retus (US), but will be compatible with other channels.
NPNS25.137-93-14 (1 June 2018 security patches)
Android File Host - potter-twrp-flashable-NPNS25.137-93-14-aroma.zip
Dropbox - potter-twrp-flashable-NPNS25.137-93-14-aroma.zip
Suitable for the following channels:
retus (US)
reteu (Europe)
retapac (Asia Pacific)
NPNS25.137-92-14 (1 June 2018 security patches)
Android File Host - potter-twrp-flashable-NPNS25.137-92-14-aroma.zip
Dropbox - potter-twrp-flashable-NPNS25.137-92-14-aroma.zip
Suitable for the following channels:
retin (India)
retla (Latin America)
retbr (Brazil)
All versions that I have created will be placed in this folder at Android File Host:
https://androidfilehost.com/?w=files&flid=273039&sort_by=date&sort_dir=DESC
New - they will also be mirrored at Dropbox:
https://www.dropbox.com/sh/vgw7me2f8p5gcgq/AABoBfx1tMCOMMaXL4m75Fdma?dl=0
An important note for those who have flashed custom Oreo roms
It is a frequent issue regarding Oreo roms that the device's IMEI is set to 0 in certain conditions. It is possible that these roms (or something used with them) are tampering with the persist partition of the devices. When this occurs, if the EFS is erased, it is not reconstructed correctly.
The scripts used in earlier versions this rom erase the two modem partitions, modemst1 and modemst2. These are your EFS. Normally, if you have an intact persist partition, they are recreated on boot. However, if your persist is not intact, they may fail to be recreated. The ideal scenario in this case is that you have a backup of an intact persist partition, and you restore it before flashing this. The next best is to backup a working EFS before flashing this rom, and then restore the EFS after flashing. Note that the second scenario is not guaranteed to work for any future updates. If the modem firmware is updated in an update, then it may require the EFS to be reconstructed, relying upon an intact persist.
Versions of this rom that have "no-erase-modemst" in their filename do not have the commands to erase modemst1 and modemst2. The aroma installers make it optional to erase modemst1 and modemst2.
An update on the IMEI zero issue
I have created another project linked below, that explains what has happened to some people who have lost their IMEI after flashing Oreo roms, then flashing stock builds that erased the modemst1/2 partitions.
Fix Persist, resolve IMEI=0, Explanation, Requirements
If you have installed an Oreo rom previously, or have lost your IMEI, I recommend that you read the first couple of posts in that thread. Take appropriate steps to back up your persist and EFS before installing these roms.
Guide to creating TWRP flashable builds
The following post is a guide to creating these flashable builds. Please ask questions on how to create such builds in this project:
https://forum.xda-developers.com/g5-plus/how-to/guide-creating-twrp-flashbale-stock-roms-t3804776
XDA:DevDB Information
[Nougat][Stock][Rom] TWRP Flashable Stock Builds, ROM for the Moto G5 Plus
Contributors
NZedPred
ROM OS Version: 7.x Nougat
Based On: Stock ROM
Version Information
Status: Snapshot
Current Stable Version: 1 June 2018 security
Stable Release Date: 2018-07-07
Created 2018-07-07
Last Updated 2018-10-30
Hello that sir, nice job yours... Ive a question: its safe to flash the 93-14 version on a retus xt1687? Thanks and Keep the good work.
Armando Lopez said:
Hello that sir, nice job yours... Ive a question: its safe to flash the 93-14 version on a retus xt1687? Thanks and Keep the good work.
Click to expand...
Click to collapse
Thanks. Yes, the 93-14 is suitable for retus. You may need to clean flash depending on what rom you were on last.
NZedPred said:
Thanks. Yes, the 93-14 is suitable for retus. You may need to clean flash depending on what rom you were on last.
Click to expand...
Click to collapse
Wow. That was fast... Im on stock, and always flash over my current versión without a clean flash... Its ok? (sorry 4 my poor english)
Armando Lopez said:
Wow. That was fast... Im on stock, and always flash over my current versión without a clean flash... Its ok? (sorry 4 my poor english)
Click to expand...
Click to collapse
Yeah if you previously on stock then you should be ok.
NZedPred said:
Yeah if you previously on stock then you should be ok.
Click to expand...
Click to collapse
Im always update my g5 plus with the thread of Q9nap, and now i will with yours... Seriously thanks for your great work.
I m on custom rom right now. If i Flash this rom , will there be any issue with volte or imei?
Would anybody what images i need to flash to only update firmware? and kep my custom rom?
I can flash any version?
karan3660 said:
I m on custom rom right now. If i Flash this rom , will there be any issue with volte or imei?
Click to expand...
Click to collapse
Shouldn't be. From what I've read, the issues with IMEI and VOLTE are relating to installing an Oreo custom rom and then flashing back to stock using fastboot.
Having said that, always make sure you have a backup of your persist and EFS. Refer to this thread for more details: https://forum.xda-developers.com/g5-plus/how-to/dev-fixing-baseband-t3806064. In particular, post #16 in the thread details how to backup and restore persist.
tldr; if you never installed an oreo custom rom, you'll be fine. if you installed an oreo custom rom, more than likely you're fine, but in either case, backup persist and efs.
EDIT: I've added a note to the OP about coming from an Oreo rom. My advise is changing slightly - if you previously installed an Oreo custom rom and don't have a persist backup from prior to doing so, you need an EFS backup. But as above, backup persist and efs to be safe regardless.
Tech_Savvy said:
Would anybody what images i need to flash to only update firmware? and kep my custom rom?
Click to expand...
Click to collapse
I've replied in your post in my guide thread.
Kinteshi said:
I can flash any version?
Click to expand...
Click to collapse
As a general rule, stick to the rom that is the same as the channel that you were on in full stock.
Which one for Indian version?
nitinbhalla95 said:
Which one for Indian version?
Click to expand...
Click to collapse
Indian channel is retin. It's in the OP which one to use
Thanks again, works like a charm.
Thanks mate
TL;DR: I lost my IMEI while flashing this, and I'm trying to find out why did I lost it. PLEASE MAKE SURE TO BACKUP PERSIST, AND EFS, SO YOU DON'T HAVE TO GO THROUGH THE TROUBLE I WENT TO
Just to let you guys know, I came from the MIUI 9.6 ROM and flashed this ROM. Here was my steps
Rebooted to Recovery
Flashed the latest TWRP(Had an old one, I believe it was the Treble unofficial one)
Rebooted to Recovery again (to Boot into the new TWRP)
Clean Wiped and Formatted the Data
Flashed this ROM(NPNS25.137-93-14)
Rebooted to the new ROM
While Flashing this, I noticed it erased modemset1 and 2. I didn't bother much about it, until the ROM booted.
I noticed it deleted my IMEI, I managed to recover it, but I am now scared of flashing it again. What should I do
(PS: I never had this problem while flashing other ROMs, everything worked fine until I flashed this)
EDIT:
I checked updater-script, it apparently erases modemset1 and 2 to RAW, maybe that could be the problem?
EDIT 2: (Sorry for the constant edits )
if you notice this:
Code:
ui_print("Erasing modemst1 ...");
format("raw", "EMMC", "/dev/block/bootdevice/by-name/modemst1", "0", "/modemst1");
ui_print(" ");
ui_print("Erasing modemst2 ...");
format("raw", "EMMC", "/dev/block/bootdevice/by-name/modemst2", "0", "/modemst2");
ui_print(" ");
I think the problem is that it erases them to "0", and that could be why I lost my IMEI
EDIT 3:
I noticed in another thread you mentioned you were patching the Modem with the new patches released on the June Security update. Isn't Modem unique for each device?
Hi. I see that MIUI 9.6 is an Oreo rom, correct? If so, I'd be interested to know if you've ever flashed stock using fastboot at any stage since having an Oreo build.
On my phone, and I'm guessing on everyone else's for whom it works, the modemst partitions are recreated on boot of they have been erased. The lines on the script are no different from those that were on the previous thread's builds, so these builds aren't doing anything differently.
The modem partition is like drivers, so no it's not unique per device. The persist partition is unique per device, which is why it's important to back it up.
NZedPred said:
Hi. I see that MIUI 9.6 is an Oreo rom, correct? If so, I'd be interested to know if you've ever flashed stock using fastboot at any stage since having an Oreo build.
On my phone, and I'm guessing on everyone else's for whom it works, the modemst partitions are recreated on boot of they have been erased. The lines on the script are no different from those that were on the previous thread's builds, so these builds aren't doing anything differently.
The modem partition is like drivers, so no it's not unique per device. The persist partition is unique per device, which is why it's important to back it up.
Click to expand...
Click to collapse
No, I have stayed away from the Stock builds using fastboot. If anything, I have been using a debloated stock ROM that's on the November 2017 patch(and it's made to be flashed on TWRP).
Related to the modem partition, I understand now. But my question is, why does it turn my IMEI to 0? All I can think about is the "0" on the code I posted in my other post.
Sorry if it seems bland, it's late over here and I sending this message in the very same phone it got the IMEI problem.
If you need anything from my part, ask away. I know some stuff about Android and I can try to help you out to find a solution :fingers-crossed:
Angel_Wolf said:
No, I have stayed away from the Stock builds using fastboot. If anything, I have been using a debloated stock ROM that's on the November 2017 patch(and it's made to be flashed on TWRP).
Related to the modem partition, I understand now. But my question is, why does it turn my IMEI to 0? All I can think about is the "0" on the code I posted in my other post.
Sorry if it seems bland, it's late over here and I sending this message in the very same phone it got the IMEI problem.
If you need anything from my part, ask away. I know some stuff about Android and I can try to help you out to find a solution :fingers-crossed:
Click to expand...
Click to collapse
I can only assume that the device checks the EFS for IMEI data, and if it doesn't exist, creates the EFS (modemst1 and modemst2). The creation of the EFS is based upon data in the persist partition. Effectively, EFS is a cache. So if you have restored an old EFS backup, you have restored the cache, so it is using the IMEI data from the old backup. But if it didn't create it automatically, that suggests that there is an issue with the persist partition.
This post has lots of info (and I keep on linking to it - the IMEI issue is a big one!) https://forum.xda-developers.com/g5-plus/how-to/dev-fixing-baseband-t3806064

[GUIDE][TREBLE][PIE][9.0] Axon 7 path to HavocOS 2.0 Pie GSI via EDL and TWRP

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
YOUR WARRANTY WILL BE VOID
I AM NOT responsible for anything that may happen to your phone while attempting to follow this guide.
You are doing so at your own risk, and you take full responsibility for your decisions and actions.
You are not to blame me or XDA, or any of it's respected developers.​​​
Anyways, now that that is out of the way. Those of us who have been in the Axon 7 forums know that information is quite scattered about. So it can be difficult for any newcomers to find everything they need before making any leaps or dives with their device. This guide’s purpose is to centralize the quickest and easiest steps to follow in order to get Treblized and to get on a stable Pie GSI build that can be used as a home base before experimenting further with other ROMs and/or GSIs.
Even if you are not satisfied with the Havoc Pie GSI, your device will still be in an optimal state to try the latest Oreo 8.1 ROMs, such as LOS 15.1 or DotOS 2.5, or to try any of the other Pie GSIs in the Treble forums.
Things you will sacrifice:
No VOLTE
No Encryption
No Dolby
No Daydream
No AK4490 DAC (will default to AK4491)
Camera Flash out of sync (Use OpenCamera for flash shots)
Not able to set password for Hotspot (Open connection only)
Again, if you don't find using a Pie GSI worth these sacrifices after trying it out, you can easily move to an Oreo ROM like LOS 15.1 or DotOS 2.5, which have more functioning features.
----------------------------------------
DOWNLOAD
----------------------------------------
(NOTE: The below setup will be fluid as discussion in this thread finds more stability with newer vendor builds and newer HavocOS 2.0 GSI builds)​
After completion of this guide, your device will be setup with the following (might as well download everything):
Oki's TWRP 3.2.3.0 Lab's Mod v1.3
B20 Bootstack by DrakenFX - Modified by Verequies (Splash or NoSplash)
Oreo Modem (U, G, or Chinese)
DotOS 2.5 boot.img (This also contains the DotOS vendor, if you wish to use it)
LOS 15.1 vendor (20181110) build
HavocOS 2.0 Pie GSI (20181027) build - NOTE: Most GSIs are provided compressed. You must extract the .img file from the downloaded file.
Your preferred GApps ( https://opengapps.org/ ) (ARM64, 9.0, Micro or below only)
Also download OrdenKrieger's TWRP 3.2.3.0, going to need it handy to flash the vendor img.
And the NFC_Hotspot Fix by Kountry83 (You will need this for almost every GSI you try)
----------------------------------------
FAQ
----------------------------------------​
WHATS UP WITH THE BOOTSTACKS?
The bootstacks that are currently available for the Axon are somewhat of a mess, if not careful, you can easily brick your device.
For Pie GSI setups, I recommend the B20 bootstack by DrakenFX that has been modified by Verequies, Splash version.
Verequies has asked that I also link the NoSplash version in case some users have issues with the Splash version, but many testers have had no problems with the Splash version on this setup.
Unlike the DrakenFX B20 bootstack, these modified versions do not flash the modem, so there is no need to flash modem again when switching between them. Sometimes will need to Unlock Password in TWRP when switching though, it will say not recognized.
Splash
Ability to have Read/Write access in system.
Nice three logo splash screen, replacing bootloader warning screen.
No bootloader warning screen means not able hit volume button during boot to get menu for Recovery, Fastboot, etc.
Which also means you will have to use power button + volume up combo to enter Recovery, or reboot to recovery from the ROM.
No EDL three button combo.
Can't charge without booting system or TWRP.
NoSplash
Read Only access in system. (Which will break Magisk)
Ugly bootloader warning screen.
Able hit volume button during boot to get menu for Recovery, Fastboot, etc.
Able to use EDL three button combo.
Allows offline charging without booting into system.
​
WHY EDL?
Starting out with Oki’s LOS 15.1 EDL package just makes it easier for everyone. It’s easier for you because there will be less steps needed to get treblized, which will also mean less room for error. It’s easier for me because it makes for a much shorter guide, and it’s easier to find answers to issues if we all started on the same page. However, if there are enough requests, I’ll make a longer guide without the use of EDL.
If you are already treblized you won’t necessarily need to EDL (in most cases), but if you run into issues please don’t comment until you’ve tried starting with first step.
----------------------------------------
GUIDE
----------------------------------------​
STEP 1:
Please follow Oki’s Easy Guide to EDL LOS15.1
IT IS IMPORTANT TO FOLLOW EVERY STEP
Try not to boot into system while going through the steps if possible, but it’s ok if you do.
You can use @djkuz Axon 7 EDL Tool, instead of MiFlash, if you are more familiar with that.
Also, in step 12, it states to format to F2FS, but I recommend to format to EXT4 for the best compatibility with GSIs. As a precaution, to make sure your partitions will read correctly, format the partitions to F2FS per the instructions, then format them back to EXT4.
You can always test if F2FS works for you later.
Thank you @Oki for this wonderful starting point for new Treble users.​
CONGRATULATIONS - You are now TREBLIZED and should never have to do Step 1 again.
STEP 2:
Once done with Oki’s guide, stay in TWRP
Wipe Dalvik, Cache, Vendor, System and Data.
Flash the bootstack you chose.
Flash the appropriate modem for your variant.​
CONGRATULATIONS - You should never have to flash those again, unless changing bootstack for whatever reason.
STEP 3:
In TWRP make sure System and Vendor partitions are mounted.
Flash the DotOS Vendor flashable.
(It doesn’t have DotOS in the file name, so it should be named something like “Vendor_Flashable_GSI…”)
In TWRP go to Install and in the bottom right select Install Image
Now we flash the Havoc GSI image you extracted, selecting the System partition.​
DO NOT BOOT TO SYSTEM - We need to use OrdenKrieger’s TWRP 3.2.3.0 to flash the LOS 15.1 vendor.img
(If you wish to use the DotOS vendor, you can skip to Step 5. You will still need to reboot to Recovery, so don't skip that.)
STEP 4:
Flash TWRP 3.2.3.0 to Recovery partition and then reboot to Recovery
You should now be in TWRP 3.2.3.0
Flash the LOS 15.1 vendor.img to the Vendor partition​
DO NOT BOOT TO SYSTEM - We need to restore Oki’s TWRP and flash GApps.
STEP 5:
Flash Oki’s TWRP 3.2.3.0 Lab’s Mod to Recovery partition and then reboot to Recovery
You should now be in Oki’s TWRP 3.2.3.0 Lab’s Mod
Flash GApps
Make sure System and Vendor are mounted
Flash the NFC_Hotspot Fix​
NOW BOOT SYSTEM
I will wait here while you setup your device.
DONE? GOOD. Lets set up Magisk and pass SafetyNet
STEP 5:
At this time I recommend Magisk 17.2
Find it, download it, and flash it in TWRP
Once booted, in Magisk search for the module “MagiskHide Props Config” and install it.
Then search for BusyBox module by Osmosis and install it.
Reboot
Using a terminal app (not in TWRP) like Termux, type “su”
Grant root privileges
Then type “props”
You should be greeted with a menu
Select 1 to Edit fingerprint
Select F to Pick a Certified fingerprint
Then follow the menu to select ZTE and Axon 7
Then yes and yes to reboot.​
Everything should be good to go now. ENJOY!!
To add just a few more options to your setup without overdoing it with a heavy launcher, I highly recommend:
Lean Launcher Optimized
I will surely be adding to this guide and modifying it as the situation evolves. So feel free to give me any input on how to improve it.
----------------------------------------
THANKS
----------------------------------------​
Thanks to @raystef66 and all of the testers in the [SUMMARY][PIE] BEST PIE ROMS to TRY thread, as well everyone in the "Axon7 (s)GSI trebleSHOOT" Telegram group, for testing, "trebleSHOOTing" and reporting your findings.
Thanks to @Oki again for his easy guide and LOS 15.1 EDL package.
Thanks to @Unjustified Dev for uploading separate vendors for us GSI users, and for all of the work he's done on LOS and his help in the LOS threads.
Thanks to @Verequies for creating the two modified versions of @DrakenFX 's B20 bootstacks, and of course @DrakenFX for his B20 and B12 bootstacks.
Thanks to @SaintZ93 for his work on DotOS and for providing a flashable for boot and vendor only.
Thanks to @SaintZ93 and @Skrem339 for their great work on the Schwifty kernel.
And thanks to @hundeva for his work on Lean Launcher.
----------------------------------------
GUIDE EDIT LOG
----------------------------------------​
11/22 - Updated that it is optional to stay with DotOS vendor and skip a step.
11/30 - Changed Step 1 to recommend EXT4 for best compatibility. Also to format from EXT4 to F2FS, then back to EXT4, to avoid internal storage error some are getting.
12/10 - Props Config module now requires BusyBox module, updated Step 5.
Thanks for the guide!
On step 4, The vendor partition doesn't show up on orden's twrp. You probably already know you can't flash with Okis twrp. Skipped this step and it booted anyway.
Don't beat me up about this but for those of us with the 50% battery bug, it happens with this method.
JKSurf said:
Thanks for the guide!
On step 4, The vendor partition doesn't show up on orden's twrp. You probably already know you can't flash with Okis twrp. Skipped this step and it booted anyway.
Don't beat me up about this but for those of us with the 50% battery bug, it happens with this method.
Click to expand...
Click to collapse
Please make sure you redownload Ordens TWRP. There are two of them with the same name out there. The one I linked should allow you to see Vendor partition. I should list this step as optional, as the DotOS vendor works, Ive just found the LOS vendor to show improvement personally. I also wanted to teach how to flash vendor.img, as there is only one way atm, using Ordens TWRP.
The vendor setup in this guide is all based off LOS sources, so any issues LOS is having that are vendor related will carry over to this setup. Sorry.
Really nice guide, sadly I just flashed but one thing that I like is that you try to explain why you choose what you choose and I would really like if you could elaborate more on that for example why DotOS boot image and kernel or why LOS 15.1 vendor.
And also is there a way for me (or anyone on havoc), already on havoc but got there differently, to painlessly migrate to your setup?
I am using this gsi for a week and I like it a lot. It has better battery life than LOS 16 right now and you can customise so much.
And btw for me daydream works normally and I installed the ported pixel camera with night sight, which seems to work normal, too.
Mousman said:
Really nice guide, sadly I just flashed but one thing that I like is that you try to explain why you choose what you choose and I would really like if you could elaborate more on that for example why DotOS boot image and kernel or why LOS 15.1 vendor.
And also is there a way for me (or anyone on havoc), already on havoc but got there differently, to painlessly migrate to your setup?
Click to expand...
Click to collapse
I found minor things to work better with the LOS vendor, such as GPS locking and Bluetooth not freezing display data in my car. Of course this can vary from user to user. And my preference changes as well when I find improvements with other vendors.
The DotOS vendor flashable is provided as it's the easiest way to get an up to date vendor. Otherwise you would have to download and flash an entire ROM, or extract the boot.img from that ROM, or modify the install script. Unjustified didn't provide the LOS vendor in combo with the boot.img, so the DotOS flashable is the best option as of now.
If you're already on the Havoc GSI, then you can just flash the bootstack, wipe vendor, flash DotOS vendor flashable, flash LOS vendor.img if you want (using Ordens TWRP), flash Magisk. Then boot.
It will feel like a dirty flash, but it's not, thanks to Treble.
Please do a full backup before doing so, as I think if your vendor partition was created differently, pulled from data, it might not work.
Kleva94 said:
I am using this gsi for a week and I like it a lot. It has better battery life than LOS 16 right now and you can customise so much.
And btw for me daydream works normally and I installed the ported pixel camera with night sight, which seems to work normal, too.
Click to expand...
Click to collapse
I don't use Daydream, I only know what was reported by others. If more people want to test and report that it's working, I'll gladly remove it from the sacrifices.
EBeatFLA said:
I don't use Daydream, I only know what was reported by others. If more people want to test and report that it's working, I'll gladly remove it from the sacrifices.
Click to expand...
Click to collapse
Re. sacrificing encryption, I thought LOS 15.1 vendor supports it. Is that not enough?
In other words, do you need vendor + system + rom for encryption to work? Or just system + rom? Or...?
Thx for all your work.
piet8stevens said:
Re. sacrificing encryption, I thought LOS 15.1 vendor supports it. Is that not enough?
In other words, do you need vendor + system + rom for encryption to work? Or just system + rom? Or...?
Thx for all your work.
Click to expand...
Click to collapse
This particular setup will sacrifice encryption. Getting encryption on a GSI would be another path. The TWRP and bootstack options we have for our device play a part in why I find encryption to be a mess right now, and chose to move forward without it.
I'm kinda having issues flashing LOS 15.1 vendor.img. I flashed Ordens TWRP, the one you provided but I do not get an option to flash to vendor partition when I choose to flash that LOS 15.1 vendor.img
g0dzstar said:
I'm kinda having issues flashing LOS 15.1 vendor.img. I flashed Ordens TWRP, the one you provided but I do not get an option to flash to vendor partition when I choose to flash that LOS 15.1 vendor.img
Click to expand...
Click to collapse
JKSurf said:
Thanks for the guide!
On step 4, The vendor partition doesn't show up on orden's twrp. You probably already know you can't flash with Okis twrp. Skipped this step and it booted anyway.
Don't beat me up about this but for those of us with the 50% battery bug, it happens with this method.
Click to expand...
Click to collapse
OMG guys, so sorry, was linking to the wrong TWRP. Link updated. It's not on AFH, so if you don't trust it's a legit link and want to check, it's the same link in the LOS16 op.
Thanks for testing.
Did everything from guide, but it seems like i don't have access to internal storage in havoc os and still accesible in twrp. Any suggestion what i did wrong?
Reakleases said:
Did everything from guide, but it seems like i don't have access to internal storage in havoc os and still accesible in twrp. Any suggestion what i did wrong?
Click to expand...
Click to collapse
Make sure to follow all of the steps in Oki's guide. Also, if you used the NoSplash bootstack, that might be it. But I'm pretty sure it's a missed step in his guide.
did everything again without success, but something of that helped, tried chmod 755 on root directory and fix contexts.
Really nice guide, thanks!
Having an issue flashing the DotOS vendor file. Getting the error 7. Edited the file with Notepadd ++ and took out the assert line and deleted the empty line. Resaved and recompressed zip and tried to flash and still getting the error. Followed all the steps to this point no issues.
juniorD said:
Having an issue flashing the DotOS vendor file. Getting the error 7. Edited the file with Notepadd ++ and took out the assert line and deleted the empty line. Resaved and recompressed zip and tried to flash and still getting the error. Followed all the steps to this point no issues.
Click to expand...
Click to collapse
Make sure system and vendor are mounted before flashing.
juniorD said:
Having an issue flashing the DotOS vendor file. Getting the error 7. Edited the file with Notepadd ++ and took out the assert line and deleted the empty line. Resaved and recompressed zip and tried to flash and still getting the error. Followed all the steps to this point no issues.
Click to expand...
Click to collapse
Wrong bootstack,flash bootstack again!
Also i read in previous post,people are not wiping correctly the system with clean flash
Predatorhaze said:
Wrong bootstack,flash bootstack again!
Also i read in previous post,people are not wiping correctly the system with clean flash
Click to expand...
Click to collapse
Thanks for the reply.
I flashed the bootstack in the EDL package uploaded in the guide using MiFlash went through fine. Also did a clean wipe of everything and formatted my Internal Storage before I flashed the package.
---------- Post added at 07:51 AM ---------- Previous post was at 07:50 AM ----------
EBeatFLA said:
Make sure system and vendor are mounted before flashing.
Click to expand...
Click to collapse
Yup did that and checked a second time to make sure I did. They were mounted.
---------- Post added at 07:52 AM ---------- Previous post was at 07:51 AM ----------
EBeatFLA said:
Make sure system and vendor are mounted before flashing.
Click to expand...
Click to collapse
Yup did that and checked a second time to make sure I did. They were mounted.

7.0-N Stock ROM F3111 Modded : Android One meets Sony XA

I thought I would share this ROM just in case anyone wants something a little different to the Shipped Stock Sony Firmware​
The ROM is based on Sony XA F3111 (Single SIM UK Firmware)
Firmware Version: 33.3.A.1.97
Build Date: Fri Sep 15 04:41:21 CST 2017
It has only been tested on my own UK version Sony XA F3111
BootLoader needs to be Unlocked and of course Usual T&C's apply. Use at your own risk don't blame me if you brick your device or lose your valuable data etc etc.
So what's different about this ROM??
Ok so I have been working on this for quite sometime during the little free time I have.
The ROM is my own preferences only and it may not be to everyone's tastes so you're quite welcome to take it, leave it, add to it, strip it, mod it, etc, etc.
The ROM ditches the not so useful stuff of Sony's but retains what I consider the good stuff like Music Album and the Camera.
Where possible I have replaced the Sony stuff with Google's Stuff which receive regular updates and keep the Rom looking fresh.
The trick to this ROM was finding a good balance without breaking anything in the process which I think I have now achieved.
This is a list of the visible apps installed, there are quite a few none visible Sony & MediaTek apps still installed that relate to settings functions and some background stuff.
Google Apps:
Clock
Calculator
Contacts
Calendar
Chrome
Drive
Files
GMail
Hangouts
Maps
Messages
Phone
Photos
Play Store
Wallpapers
YouTube
Sony Apps:
Album (Please disable this in /settings/app It will constantly search for other apps I removed otherwise. Use the pre-installed Google Photos app instead)
Camera
Music
Radio
Swiftkey (Left this in because I like it)
There is nothing Fancy about this ROM it's based on pure stock with the mods being restricted to the following.
Converted boot.elf to Boot.img
forceencryption Removed.
dm-verity Removed
I converted all the images in the stock Boot Animation so it is now a much more pleasing black rather than the awful white burning out your eyeballs one.
I remember messing with the logo partition once before and that did not end well so I left it alone. Sadly the logo splashscreen is still the awful white version.
TWRP Recovery fixed to support more partitions (Backing Up and Restore)
Flashing Instructions​The ROM is packaged as a TWRP Backup containing system, oem, boot and recovery (TWRP)
First you will need to install this TWRP HERE which has oem partition support and others too.
1. Install the TWRP Recovery above.
2. Boot to the new TWRP and backup oem, system and boot then move it to a safe place off device or to and external sdcard. Same goes for anything you value like pictures, music, etc, etc
3. Once you have Backed Up everything FORMAT your /data partition using TWRP. Wipe > Format Data (type yes to confirm)
When that's done choose Wipe > Advanced Wipe and select Dalvik / ART Cache and Cache after that from the TWRP menu choose Reboot and select Recovery
4. When back in recovery swipe to allow then do a quick Backup of any small partition like boot or recovery. This will just create the folders on your clean data partition unless your default backup is external sdcard.
5. Now extract/unpack the downloaded ROM from HERE and move the folder SonyXA-Android-One to TWRP/BACKUPS/Sony_XA/
6. Once done go to TWRP Menu and choose Restore and select SonyXA-Android-One
7. Once done go to the Reboot Menu and Choose Power OFF
8. Wait a few Mins and power on normally.
First boot can take a while but if you see the boot animation start everything should be fine so go have a brew while you wait.
Play Services will want to Update so allow that then most apps will need to be updated to the latest version.
Arrange the app icons and widgets on your Home screen and choose a nice wallpaper or live wallpaper and your done.
Hopefully everything will be quick & smooth. :fingers-crossed:
The ROM is not pre rooted so Root in the usual way using Magisk
PS: Ensure you check your app permissions and Default APPS the Phone app is Not the Default one even though it's the only one installed so please choose it Manually along with any others that do not set by themselves.
Thanks
Some Screenshots
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
......
.....
.....
Thank you so much! I'm looking a long time for a custom ROM for xperia xa. The hardware and the device itself are still good for an average user like me but the bloatware are really annoying. A custom ROM based on stock ROM brings the stability but better performance, I hope. I will definitely try it at the next weekend. :good:.
If some one else tried it, please post your experience with other country versions.
z4Android said:
Thank you so much! I'm looking a long time for a custom ROM for xperia xa. The hardware and the device itself are still good for an average user like me but the bloatware are really annoying. A custom ROM based on stock ROM brings the stability but better performance, I hope. I will definitely try it at the next weekend. :good:.
If some one else tried it, please post your experience with other country versions.
Click to expand...
Click to collapse
Thanks. :good:
Be sure to let me know how you get on with it. :fingers-crossed:
I am not sure where you are from or which version of the XA you have but I am sure the ROM could be easily adapted for your own version.
All I would need would be a backup of your /oem & /boot partitions and the build.prop from your /system .
There is a modem config file in /oem which states telefonica uk I am unsure if this has any effect at all as I am sure I have flashed firmware from other European regions with no noticable effects.
I'm from Germany. I not sure but I think it should be no problems installing on my device f3111 single sim like yours (but german version of course ).
I'm not at home now. When I get back I will try your ROM. If it doesn't work I will backup OEM and boot partition as you mentioned. Last time I try to make a backup with twrp I got a error that system cannot be mounted. No idea why, so I hope I don't need make backup (I will just backup my data manually).
z4Android said:
I'm from Germany. I not sure but I think it should be no problems installing on my device f3111 single sim like yours (but german version of course ).
I'm not at home now. When I get back I will try your ROM. If it doesn't work I will backup OEM and boot partition as you mentioned. Last time I try to make a backup with twrp I got a error that system cannot be mounted. No idea why, so I hope I don't need make backup (I will just backup my data manually).
Click to expand...
Click to collapse
Hi, Your version should have no issues as it's identical to mine :good:
As for TWRP yes it does have issues with Unmounting /system for some reason
So if you mount /system from the Mount Menu TWRP or auto mount system you will not be able to Unmount mount it due to the "device or resource busy" error
If this happens you will need to ensure auto mounting is unselected and reboot to recovery from the Reboot menu.
I will look into the TWRP issue later to make things easier
Greetings,
quick question: Does the ROM restore procedure keep the TWRP on the boot partition somehow? Will it be possible to boot in TWRP after restoring the modded ROM?
I got the "bluesplash" ROM right now, it's modded quite similar and was restored by TWRP the same way. If only TWRP would sill be accessible...
Bluesummerz said:
Greetings,
quick question: Does the ROM restore procedure keep the TWRP on the boot partition somehow? Will it be possible to boot in TWRP after restoring the modded ROM?
I got the "bluesplash" ROM right now, it's modded quite similar and was restored by TWRP the same way. If only TWRP would sill be accessible...
Click to expand...
Click to collapse
TWRP lives in the Recovery partition which can be accessed by holding Volume Down and pressing the Power button until you see the logo then release the Power button but keep holding the volume down.
This ROM is based on Android 7.0 and I think your current bluesplash ROM is based on Android 6.0 if I am not mistaken so there may be some unknown issues so I would recommend upgrading your device to 7.0 before flashing this ROM
bigrammy said:
TWRP lives in the Recovery partition which can be accessed by holding Volume Down and pressing the Power button until you see the logo then release the Power button but keep holding the volume down.
This ROM is based on Android 7.0 and I think your current bluesplash ROM is based on Android 6.0 if I am not mistaken so there may be some unknown issues so I would recommend upgrading your device to 7.0 before flashing this ROM
Click to expand...
Click to collapse
Hey, thanks for the quick response!
of course I meant recovery but still maybe you can clear this one up for me in general. Since I'm looking our for a decent custom ROM (and while waiting for the LinageOS port) I was wondering about some stuff...
1. You're right the bluesplash ROM is Android 6. It does have some nice features which I guess have to weight off for against how much I'd like Android 7. Also Security Update status of Bluesplash is January 2017 and won't update beyond that... while the screenshot here tells it's August 2017.
2.
I unlocked the bootloader, flashed the TWRP by fastboot and used the TWRP on my F3111 to successfully restore the bluesplash ROM. Now holding down Volume- while booting to enter TWRP does NOT work any more. You'll still see like one quick 'flicker' on the boot animation which kinda suggests "ok, would have booted to recovery, but not this time".
Here comes the part I never really understood even after using this awesome forum for finding and flashing custom ROMs for several phones. Even though, TWRP is on the recovery and the kernel is on the boot partition (right?) so often you'll read instructions on TWRP threads containing download links for recovery.img AND boot.img. I had - or guess I had to - fastboot-flash both .img files to boot into TWRP.
I never had this when the flashing was done by TWRP "install" .zip mechanisms. Bluesplash as well as this ROM - if I'm not mistaken - comes not in that format but by the Backup/Restore TWRP feature. So for me it seems, that using "install .zip" does flash system partition and maybe boot but keeping recovery for re-entering TWRP, while the "Restore backup" also flashes the boot.img in a way such that TWRP won't boot. Also just re-flashing recovery.img and boot.img after restoring Bluesplash kinda break the normal, non-TWRP boot
--> So how can this be, how is it supposed to be and what is the connection between recovery and boot partitions when it comes to TWRP?
--> does all of this goes for this Android 7 ROM as well? Can anyone verify that on this ROM you'll still be able to boot in TWRP?
3. I know now I got the Sony Xperia XA F3111. When I first got it with stock firmware, I somehow flashed TWRP and when I USB connected the phone while in TWRP to a PC, it showed up as "ukulele". I thought I got "tuba" which was reinforced when some ROM couldn't get flashed, saying "this rom [...] is for ukulele [...] this is tuba".
Bluesummerz said:
Hey, thanks for the quick response!
of course I meant recovery but still maybe you can clear this one up for me in general. Since I'm looking our for a decent custom ROM (and while waiting for the LinageOS port) I was wondering about some stuff...
1. You're right the bluesplash ROM is Android 6. It does have some nice features which I guess have to weight off for against how much I'd like Android 7. Also Security Update status of Bluesplash is January 2017 and won't update beyond that... while the screenshot here tells it's August 2017.
2.
I unlocked the bootloader, flashed the TWRP by fastboot and used the TWRP on my F3111 to successfully restore the bluesplash ROM. Now holding down Volume- while booting to enter TWRP does NOT work any more. You'll still see like one quick 'flicker' on the boot animation which kinda suggests "ok, would have booted to recovery, but not this time".
Here comes the part I never really understood even after using this awesome forum for finding and flashing custom ROMs for several phones. Even though, TWRP is on the recovery and the kernel is on the boot partition (right?) so often you'll read instructions on TWRP threads containing download links for recovery.img AND boot.img. I had - or guess I had to - fastboot-flash both .img files to boot into TWRP.
I never had this when the flashing was done by TWRP "install" .zip mechanisms. Bluesplash as well as this ROM - if I'm not mistaken - comes not in that format but by the Backup/Restore TWRP feature. So for me it seems, that using "install .zip" does flash system partition and maybe boot but keeping recovery for re-entering TWRP, while the "Restore backup" also flashes the boot.img in a way such that TWRP won't boot. Also just re-flashing recovery.img and boot.img after restoring Bluesplash kinda break the normal, non-TWRP boot
--> So how can this be, how is it supposed to be and what is the connection between recovery and boot partitions when it comes to TWRP?
--> does all of this goes for this Android 7 ROM as well? Can anyone verify that on this ROM you'll still be able to boot in TWRP?
3. I know now I got the Sony Xperia XA F3111. When I first got it with stock firmware, I somehow flashed TWRP and when I USB connected the phone while in TWRP to a PC, it showed up as "ukulele". I thought I got "tuba" which was reinforced when some ROM couldn't get flashed, saying "this rom [...] is for ukulele [...] this is tuba".
Click to expand...
Click to collapse
You are confusing things beyond what they need to be
This is why I said you should first upgrade to 7.0 You can use FlashTool for this if need be. After that is done simply rename the recovery.emmc.win & boot.emmc.win from the download to recovery.img & boot.img then fastboot them to recovery & boot respectively.
You Should now be able to boot to TWRP and use restore once your /data partition is FORMATED per the instructions above.
TWRP is a stand alone recovery.img complete with the kernel and on Android 7.0 you can boot to recovery without any issue providing the bootloader is unlocked.
You would need to be at this stage for flashing Lineage 14.1 anyway so may as well do it now just in case we make any break through on that which is still very much a WIP.
bigrammy said:
You are confusing things beyond what they need to be
This is why I said you should first upgrade to 7.0 You can use FlashTool for this if need be. After that is done simply rename the recovery.emmc.win & boot.emmc.win from the download to recovery.img & boot.img then fastboot them to recovery & boot respectively.
You Should now be able to boot to TWRP and use restore once your /data partition is FORMATED per the instructions above.
TWRP is a stand alone recovery.img complete with the kernel and on Android 7.0 you can boot to recovery without any issue providing the bootloader is unlocked.
You would need to be at this stage for flashing Lineage 14.1 anyway so may as well do it now just in case we make any break through on that which is still very much a WIP.
Click to expand...
Click to collapse
And that is exactly why I like these forums, if you provide enough insight to a question, you'll get the full-spectrum answer, splendid!
And yes, confusing things is in my nature, also I might find it troublesome to know when I get like off topic here, so please stop me the moment, it would be better to switch to pm.
So the image format in those firmware bundles, typically having the emmc.win file extension are actually the same binary format as the fastboot .img ones? Now that's good to know.
Upgrading with FlashTool: I'll use the stock Android 7 Firmware for this right?
After that I fastboot recovery first, then boot using the renamed files from this threads ROM, got it. And then booting into TWRP, doing the system format, making it 'ready' for the restore.
And if everything goes as planned, you would guarantee, that after this thread's ROM is restored, booting into TWRP does work?
PS
indeed, Linage for F3111 would be glorious, meanwhile, what does WIP stand for (no native speaker here from Germany)
Bluesummerz said:
So the image format in those firmware bundles, typically having the emmc.win file extension are actually the same binary format as the fastboot .img ones? Now that's good to know.
Click to expand...
Click to collapse
Correct they are essentially a dd backup of the entire partition in question.
[Edit] To expand TWRP does not convert anything so if those partitions had the stock recovery & boot .elf format on them when the backup was performed they will still be .elf's which are not fastboot compatible. Those in my ROM have already been converted to .img format which is compatible with fastboot.
If you ever got stuck for some reason then you could simply use FlashTool to restore the Stock Recovery (fotakernel), Boot, OEM & System
Bluesummerz said:
Upgrading with FlashTool: I'll use the stock Android 7 Firmware for this right?
Click to expand...
Click to collapse
Correct.
My Phone is restored using the F3111_33.3.A.1.97_1302-4476_R2B.ftf (FlashTool Firmware) and the ROM is based on this version.
Try to use a 33.3.A.1.97 if possible as I know that works.
Bluesummerz said:
After that I fastboot recovery first, then boot using the renamed files from this threads ROM, got it. And then booting into TWRP, doing the system format, making it 'ready' for the restore.
Click to expand...
Click to collapse
Fastboot the recovery and the boot then You Simply need to follow the Flashing Instructions from step 2 in the first post from this point.
It is /data that gets wiped manually BTW (By The Way). TWRP will take care of the /system during it's restore tasks.
Bluesummerz said:
And if everything goes as planned, you would guarantee, that after this thread's ROM is restored, booting into TWRP does work?
Click to expand...
Click to collapse
Yes providing you did everything correctly I see no reason why it would not work for you unless your device is a extra special Sony XA
Bluesummerz said:
indeed, Linage for F3111 would be glorious, meanwhile, what does WIP stand for (no native speaker here from Germany)
Click to expand...
Click to collapse
It stands for a Work In Progress.
The term work-in-progress (WIP) describes partially finished goods awaiting completion.
Does it has VOLTE support
Great work bro
I am from India using f3116 Dual Sim version
I really wanted VOLTE
does anyone tried it?????
altmash mirza said:
Great work bro
I am from India using f3116 Dual Sim version
I really wanted VOLTE
does anyone tried it?????
Click to expand...
Click to collapse
Not sure about VOLTE
If anyone did try this ROM nobody reported back
I guess this device is dead now as there seems to be very little activity which is a shame
drm fix working in case we use sony backups?
Hi, i just want to give a feedback. I could restore your backup successfully. Every things work fine, no issuses till now. Thank you very much. :good:
Do you plan to make a rom based on oreo or maybe pie it would be great.
z4Android said:
Hi, i just want to give a feedback. I could restore your backup successfully. Every things work fine, no issuses till now. Thank you very much. :good:
Do you plan to make a rom based on oreo or maybe pie it would be great.
Click to expand...
Click to collapse
Thanks for the feed back. :good:
Sorry no Oreo or Pie unless we fix the Ril issue on none Stock custom ROM's like the Lineage 14.1
bootlogo
bigrammy said:
I thought I would share this ROM just in case anyone wants something a little different to the Shipped Stock Sony Firmware​
The ROM is based on Sony XA F3111 (Single SIM UK Firmware)
Firmware Version: 33.3.A.1.97
Build Date: Fri Sep 15 04:41:21 CST 2017
It has only been tested on my own UK version Sony XA F3111
There is nothing Fancy about this ROM it's based on pure stock with the mods being restricted to the following.
Converted boot.elf to Boot.img
forceencryption Removed.
dm-verity Removed
I converted all the images in the stock Boot Animation so it is now a much more pleasing black rather than the awful white burning out your eyeballs one.
I remember messing with the logo partition once before and that did not end well so I left it alone. Sadly the logo splashscreen is still the awful white version.
TWRP Recovery fixed to support more partitions (Backing Up and Restore)
Click to expand...
Click to collapse
hello sir @bigrammy,
i want to ask about bootlogo.
i have follow this guide :
1. https://forum.xda-developers.com/android/general/info-how-to-device-partition-info-adb-t3766930 : for get detail of android partition
2. https://forum.xda-developers.com/showthread.php?t=1953726 : For Changing Bootlogo App
3. https://forum.xda-developers.com/oneplus-3t/themes/change-oem-splash-screen-t3516818 : for flash and dump logo partition
i have done with editing bootlogo, but i cant flash logo.img to logo partition.
twrp : black screen - no boot
fastboot : not allowed
can you guide me to doing this?
Hello, I got this phone from my grandfather and I would like to give it to my little sister, the system being really bloat I want to put a custom rom on the phone to have more space and battery life, so I found yours which loook very nice, can you just tell me if that this rom is 100% compatible with a European Xperia XA F3111 ? Also, is the rom easy to use ? for an 11 years old girl ?
Thanks a lot, great job !!
Codetrr said:
hello sir @bigrammy,
i want to ask about bootlogo.
i have follow this guide :
1. https://forum.xda-developers.com/android/general/info-how-to-device-partition-info-adb-t3766930 : for get detail of android partition
2. https://forum.xda-developers.com/showthread.php?t=1953726 : For Changing Bootlogo App
3. https://forum.xda-developers.com/oneplus-3t/themes/change-oem-splash-screen-t3516818 : for flash and dump logo partition
i have done with editing bootlogo, but i cant flash logo.img to logo partition.
twrp : black screen - no boot
fastboot : not allowed
can you guide me to doing this?
Click to expand...
Click to collapse
If your TWRP is not working you should fix this FIRST before doing anything else.
Warning: The logo partition is very important and as I said before it's part of the secure boot chain so if the logo does match the signature and or hash the ROM will boot loop or soft brick it did for me when I tried to change it so be very careful and make sure you can recover the phone with FlashTool.
To find partitions on Mediatek devices use this cmd.
Code:
ls -l /dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name
This will give you a list of all partitions by-name and the actual dev block.
The logo partition is
Code:
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/logo
So to flash the logo.img with dd you would copy the logo.img to your internal sdcard and use the following cmd.
Code:
dd if=/sdcard/logo.img of=/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/logo
Sorry I cannot test your logo's because my wife use's this phone now as her everyday phone so she would not let me mess around with it now.
Akinimaginable said:
Hello, I got this phone from my grandfather and I would like to give it to my little sister, the system being really bloat I want to put a custom rom on the phone to have more space and battery life, so I found yours which loook very nice, can you just tell me if that this rom is 100% compatible with a European Xperia XA F3111 ? Also, is the rom easy to use ? for an 11 years old girl ?
Thanks a lot, great job !!
Click to expand...
Click to collapse
The ROM is just stock ROM with most bloat ware removed and Google alternatives installed. I would recommend not to use the Sony "Album" app as it requires some other Sony apps which I removed and it continually looks for these apps. So just disable it in /settings/apps and use the pre-installed Google photos instead.
Also ensure you manually set the Phone app as the default dialer even though it's the only one or you will not be able to make or answer calls.
11 year girl! I would not worry they probably know more than we do at that age :laugh:
Yes it should be 100% compatible with a European Xperia XA F3111 ?
How to do this ?
I just rooted and flashed my old LG, and probably the by the "good" method. So if you have a link for the way to root and flash this phone, you'll make me very happy. I know that I have to go in adb flash TWRP as recovery, go in recovery by resetting the phone. Once this is done I have to wipe the phone, put the rom (and opengaps ?). And finally flash the rom. But previously I saw a lot of commands and warning so I'm a bit confused ?
Thanks for your attention ??

Categories

Resources