[HOW TO] ENCRYPTING NX505J (Z7 MAX) [UPDATED Dec. 2nd, 2016] - ZTE Z7, Z7 Max, Z7 Mini

What is encryption?
Basically, if you lose your phone and someone wipes /data on Recovery mode, the phone boots with NO lock screen, your apps will be gone but YOUR FOLDERS becomes exposed, that means Whatsapp history and media, pictures, downloads, documents. Stuff you wouldn't want in the hands of thieves/strangers.
Does it affect performance?
It does increase memory readings on every phone. But z7 Max doesn't show any lag at all!
Tested ROMs able to ENCRYPT:
- CM13 beta7 by PaoloW8
Tested ROMs able to DECRYPT:
- Ressurection Remix M by pchatzop
(if you wanna try for yourself, please first MAKE FULL BACKUP of your storage folders, files and appdata)
Requirements:
1. External SD Card
2. Crypto footer
3. CM13 beta7
4. Secure screen lock (PIN, Pattern, Password)
5. Pchatzop's Ressurecution Remix 5.7.4 and GApps 6 (IN SD CARD)
Steps:
0. Boot to TWRecoveryP
1. Open Advanced > Terminal
2. Enter
Code:
umount /dev/block/mmcblk0p23
3. Enter
Code:
e2fsck -f /dev/block/mmcblk0p23
4. (this will resize storage LOSING DATA) Enter
Code:
resize2fs -f /dev/block/mmcblk0p23 6896600
5. (second data error check just for safety) Enter
Code:
e2fsck -f /dev/block/mmcblk0p23
6. Back to TWRP home menu > Install > flash CM13 beta7 and the same GApps you're going to use on RR ROM. (let's avoid future FCs). Wipe Dalvik/Cache then reboot to system.
7. Wait for system bootup
8. Head to Settings > Lock Screen
9. Set a secure screen lock
10. Head back to Settings > Security > Encrypt phone > Encrypt
11. Enter password > Encrypt
12. Wait for a while depending on the size of your used storage.
13. Screen lock input shows upon boot then decrypt successfully THIS TIME ONLY, so head back to TWRP.
14. Have your SD card inserted with your RR ROM and GApps. As of November 24, TWRP builds for the Z7 Max CAN'T decrypt storage so ignore screen lock input and head straight to TWRP main screen > Wipe > Advanced Wipe > Check CACHE and SYSTEM only!!!
15. TWRP main menu > Install > flash your ROM and GApps > Reboot and decryption input should show and decrypt on every restart, even if you change your password.
NOTE: To Decrypt Data you have to head to TWRP > Wipe > Format Data > Type "yes", meaning you will LOSE ALL DATA TO DECRYPT so BACKUP first.
3njoy!

bump

Can not get this to work, in order to try my modified twrp. I have tried beta 2 and Rel V9,still stuck at bootscreen. Done the resize2fs, and got past the overlap error, but still stuck at the bad magic error. Will try the beta7 and see if something changes. Do you have the /data original block size in order to revert the resizing? Didn't occur to me to save it Well, there is always nubia updater tool if i get too OCD .

pchatzop said:
Can not get this to work, in order to try my modified twrp. I have tried beta 2 and Rel V9,still stuck at bootscreen. Done the resize2fs, and got past the overlap error, but still stuck at the bad magic error. Will try the beta7 and see if something changes. Do you have the /data original block size in order to revert the resizing? Didn't occur to me to save it Well, there is always nubia updater tool if i get too OCD .
Click to expand...
Click to collapse
Sorry about the delay, final exams.
My original block size is 6896635. This thread is outdated, my new reports makes some info here invalid
Keep up the good work

Thank for the report, i made some STUPID mistake and mixed the fstab.qcom arguments with the twrp fstab argument, which resulted at data being mounted at failsafe mode, thefore not using any of the footer arguments i used,resulting at the recovery not finding the footer. I revert the twrp fstab to the twrptest2 level while keeping the decryption libs intact. New build is up, give it a spin .

pchatzop said:
Thank for the report, i made some STUPID mistake and mixed the fstab.qcom arguments with the twrp fstab argument, which resulted at data being mounted at failsafe mode, thefore not using any of the footer arguments i used,resulting at the recovery not finding the footer. I revert the twrp fstab to the twrptest2 level while keeping the decryption libs intact. New build is up, give it a spin .
Click to expand...
Click to collapse
OK Twrptest4 formats and resizes correctly but doesn't decrypt yet
Kerneltest1 was better than kerneltest2. Flashed both after CM13 beta7, both kernels enabled f2fs support for Paolo's CM13, kernel1 encryption works on first tries on both ext4 and f2fs (on cm13, not RR), kernel2 always give bad superblock. I guess it is not something just in kernel at all but on RR or CM recent builds :?
As a Senior Member, you have more chance of getting response from @luca020400, @luk133, @Vidhanth, @Vatsal (they all contributed for moto G 2014 encryption on ROMs and TWRP) or @golden-guy, @Android-Andi (for s3 mini's)!
Keep up the good work!!

That is a great report, thank you so much! I will check the diffs between kernel 1 and 2, and will get you a twrp with the configuration of kernel 1 with decryption libs. F2fs encryption working is a great step forward. You are right about the second part, kernel does work, but seems like cyanogen source broke the encryption on later builds. I want to get this to work, and even incorporate it in my nougat builds, but twrp needs to work first! Does twrp find the footer but fail to decrypt, or does not find it at all?
---------- Post added 3rd December 2016 at 12:06 AM ---------- Previous post was 2nd December 2016 at 11:17 PM ----------
Just made a new test kernel, together with a new recovery with the above changes. Hope something changes now(at least the kernel should encrypt fine). I also have the qseecomd blob from cm13 beta7 in the folder, i have a feeling that if we replace that blob in the latest RR with a kernel that can encrypt in beta 7, encryption should work there too. Hope you can test and report back. Feeling we are closer to cracking(pun intended) this!

pchatzop said:
That is a great report, thank you so much! I will check the diffs between kernel 1 and 2, and will get you a twrp with the configuration of kernel 1 with decryption libs. F2fs encryption working is a great step forward. You are right about the second part, kernel does work, but seems like cyanogen source broke the encryption on later builds. I want to get this to work, and even incorporate it in my nougat builds, but twrp needs to work first! Does twrp find the footer but fail to decrypt, or does not find it at all?
---------- Post added 3rd December 2016 at 12:06 AM ---------- Previous post was 2nd December 2016 at 11:17 PM ----------
Just made a new test kernel, together with a new recovery with the above changes. Hope something changes now(at least the kernel should encrypt fine). I also have the qseecomd blob from cm13 beta7 in the folder, i have a feeling that if we replace that blob in the latest RR with a kernel that can encrypt in beta 7, encryption should work there too. Hope you can test and report back. Feeling we are closer to cracking(pun intended) this!
Click to expand...
Click to collapse
twrp does find the footer but fail to decrypt, even the Default Android password dont decrypt, I have the TWRP log at home if you want.
When I get home I'll download your new tries.
Thanks again, regards

Good, that means that either the service does not start, or that the zuk decryption libs are incompatible with z7max encryption model. The logs would be great. Meanwhile, im getting a new recovery with all decryption libs replaced with nubia counterparts, so that you can test both variants and see what is really stopping it from decrypting. Its in the folder too.

pchatzop said:
Good, that means that either the service does not start, or that the zuk decryption libs are incompatible with z7max encryption model. The logs would be great. Meanwhile, im getting a new recovery with all decryption libs replaced with nubia counterparts, so that you can test both variants and see what is really stopping it from decrypting. Its in the folder too.
Click to expand...
Click to collapse
Oh, I tested your RR N, it shows decryption screen lock input but after decryption it bootloops, mostly because the /data has Marshmallow stuff, so we need to fix TWRP first to wipe /data without wiping /media along :highfive:

Got a new twrp in the folder, plenty more testing for you! Is beta7 the last build encryption works? Because i can check the github diffs between beta7 and beta8 and see what i can revert to try getting it working again in the latest builds. That is if it is positively the last build that encryption works.

pchatzop said:
Got a new twrp in the folder, plenty more testing for you! Is beta7 the last build encryption works? Because i can check the github diffs between beta7 and beta8 and see what i can revert to try getting it working again in the latest builds. That is if it is positively the last build that encryption works.
Click to expand...
Click to collapse
Yes it is beta7! I tried beta8, V1.... with your boot.img3, encryption starts but gives the same unsuccessful screen from RR. Only beta7 reboots to decryption input.
Also, I have suspicions: as your TWRP set data partition to 6896631 which was originally 6896635, the password MUST BE OF 4 characters (6896631 - 6896635 = -4) for encryption to work?
Unfortunately, no TWRPtest could decrypt yet, it finds the crypto footer but fails. Attaching twrp log and encryption success logcat:

So boot3 works with beta7? I will sift through the logs, think this is a selinux issue introduced in beta8, i will get a new build and try it on my phone, maybe it will work this time.

I got a new twrp in the folder. Spend 5 hours trying to get RR-M to encrypt, tried selinux changes, test builds, replacing blobs with some from beta7, still not there. I could get it to begin encrypting sometimes by rebooting in safe mode with root disabled, but got the encryption unsuccessful screen. There is something that does not allow /data to get unmounted properly during the soft reboot for the encryption, and even when it does, it gets stuck in another point. Hopefully the new twrp will decrypt an already encrypted system.

Got a new twrp in the folder, my attempts at encrypting have failed so far, most i could get was here: "Cryptfs : Error writing crypto_blkdev /dev/block/dm-0 for f2fs inplace encrypt" where "12-31 13:32:09.246 237 306 I Cryptfs : Encrypting from block 0" wuld be on your log. I will attach it , and hopefully you can try to help me, since you have more exprerience with encryption. Hopefully something changes at the recovery front.

pchatzop said:
I got a new twrp in the folder. Spend 5 hours trying to get RR-M to encrypt, tried selinux changes, test builds, replacing blobs with some from beta7, still not there. I could get it to begin encrypting sometimes by rebooting in safe mode with root disabled, but got the encryption unsuccessful screen. There is something that does not allow /data to get unmounted properly during the soft reboot for the encryption, and even when it does, it gets stuck in another point. Hopefully the new twrp will decrypt an already encrypted system.
Click to expand...
Click to collapse
pchatzop said:
Got a new twrp in the folder, my attempts at encrypting have failed so far, most i could get was here: "Cryptfs : Error writing crypto_blkdev /dev/block/dm-0 for f2fs inplace encrypt" where "12-31 13:32:09.246 237 306 I Cryptfs : Encrypting from block 0" wuld be on your log. I will attach it , and hopefully you can try to help me, since you have more exprerience with encryption. Hopefully something changes at the recovery front.
Click to expand...
Click to collapse
Hey, thanks and sorry for taking your time! Did you try a password/PIN/Pattern 4-character/digits/dots long?
TWRPtest8 doesn't decrypt yet
Could you please make your TWRP "Copy Log to SD" save the log in the external SD when available? It is always trying to save in /data/media, but as it is encrypted, the file goes nowhere. So I always have to format, save the log and re-encrypt :highfive:
Keep up the good work!:highfive:

Related

[RECOVERY][bullhead] TWRP 3.1.1-0 touch recovery [2017-05-19]

Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
CHANGELOG for 3.0.2-0:
-Backups will now include adopted storage keys (Dees_Troy)
-Fixed an adb restore issue (bigbiff)
-Fixed rebooting when no OS is present (Dees_Troy)
-Fixed line wrapping in the GUI terminal (_that)
-Updated TWRP source code to AOSP 7.1.2 (Dees_Troy)
CHANGELOG for 3.1.0-0:
-vold decrypt on a few select HTC devices, TWRP will now attempt to use the system partition's vold and vdc binaries and libraries to decrypt the data partition (nkk71 and CaptainThrowback)
-adb backup to stream a backup directly to or from your PC, see documentation here: https://github.com/omnirom/android_bootable_recovery/commit/ce8f83c48d200106ff61ad530c863b15c16949d9 (bigbiff)
-tweak MTP startup routines (mdmower)
-support new Android 7.x xattrs for backup and restore to fix loss of data after a restore (Dees_Troy)
-support POSIX file capabilities backup and restore to fix VoLTE on HTC devices and possibly other issues (Dees_Troy)
-better indicate to users that internal storage is not backed up (Dees_Troy)
-improve automatic determination of TW_THEME (mdmower)
-minimal getcap and setcap support (_that)
-try mounting both ext4 and f2fs during decrypt (jcadduono and Dees_Troy)
-shut off backlight with power key (mdmower)
-timeout during FDE decrypt (Dees_Troy and nkk71)
-support for FBE decrypt and backing up and restoring FBE policies (Dees_Troy)
-boot slot support (Dees_Troy)
-TWRP app install prompt during reboot (Dees_Troy)
-support for AB OTA zips (Dees_Troy)
-support new Android 7.x log command (Dees_Troy)
-update recovery sources to AOSP 7.1 (Dees_Troy)
-numerous bugfixes and improvements by too many people to mention
CHANGELOG for 3.0.2-0:
-Fix a bug with the input box that affected masked inputs (passwords). This fixes decrypt of full device encryption on devices that support decrypt. This bug also impacts encrypted backups. Users are highly encouraged to stop using 3.0.1 if you use encrypted backups or if you need decrypt of data in TWRP.
-Add Greek translation to some builds.
CHANGELOG for 3.0.1-0:
-support new CM 13.0 pattern encryption (sultanqasim)
-fix slow flashing issue due to modprobe (present on only some devices) (#twrp)
-libtar updated to latest upstream and fixes (jcadduono)
-fixes for loading custom themes (_that)
-TWRP will now detect and install TWRP themes automatically through the normal zip install process (Dees_Troy)
-translation updates - added Italian, Czech and Polish and significant updates to Dutch
-progress bar improvements - progress bar updates during image flashing and better tracks progress during file system backups (tar) (Dees_Troy)
-fix input box text display (Dees_Troy)
-reboot option after zip install complete (bigbiff)
-other mostly invisible bug fixes and improvements
CHANGELOG for 3.0.0-0:
-Completely new theme - Much more modern and much nicer looking (by z31s1g)
-True Terminal Emulator - Includes arrow keys, tab and tab completion, etc. (by _that)
-Language translation - It won’t be perfect and especially some languages that require large font files like Chinese & Japanese won’t be availble on most devices. Also some languages may only be partially translated at this time. Feel free to submit more translations to OmniROM’s Gerrit. (mostly by Dees_Troy)
-Flashing of sparse images - On select devices you will be able to flash some parts of factory images via the TWRP GUI (by HashBang173)
-Adopted storage support for select devices - TWRP can now decrypt adopted storage partitions from Marshmallow
-Reworked graphics to bring us more up to date with AOSP - includes support for adf and drm graphics (by Dees_Troy)
-SuperSU prompt will no longer display if a Marshmallow ROM is installed
-Update exfat, exfat fuse, dosfstools (by mdmower)
-Update AOSP base to 6.0
-A huge laundry list of other minor fixes and tweaks
WARNING: This is our first release in a long time. We have a lot of new and somewhat aggressive changes in this new release. The changes to the graphics back-end may cause some devices to not boot up properly or have other display-related issues. If you are not in a position to reflash an older build of TWRP, then wait until you are or at least wait until others have tried the new version for your specific device. You don’t want to end up with a non-working recovery and have to wait several hours or days to get to a computer to be able to fix it.
Notes for themers: In addition to the udpated theme, we have introduced a theme version variable to the TWRP theme system. If the theme version does not match the version that TWRP expects, TWRP will reject the custom theme and load its stock theme. This change will ensure that people who update TWRP without updating their theme will still have a workable recovery. We have removed libjpeg support. The stock theme was only using a jpeg image for the splash / curtain. This change means that any custom themes will no longer be able to use jpeg images. It also means that tools used to repack recovery images with a different curtain / splash will need to be updated to use the new method.
Version number notes: For a while we’ve been using a 4 digit version number and reserved the 4th digit for device-specific updates. For instance, we find and fix a device-specific issue like decryption of data on Nexus 5, we would release that as a 2.8.7.1. After a while, some people would start asking where 2.8.7.1 was for other devices. So, going forward we have decided to change the numbering scheme to 3.0.0-2, etc. Our hope is that this version numbering scheme will more clearly identify that the 4th digit does not indicate a version change for the code base.
We need your help! The bulk of TWRP work is done by 3 people on a volunteer basis. We have pushed most of our device files to our github and we have a gerrit instance. If you have the ability, please help us maintain our official devices and/or add your device to our official device list. Thanks in advance!
DOWNLOAD:
1) Install the TWRP app from the Play Store or grab the apk from our website
2) Open the app, agree to the terms, and enable root access
3) Select TWRP Flash
4) Search for your device and select the version you wish to download
5) Once the download is complete, select the file (it's usually in your downloads folder) and then Flash Recovery
OR:
Most devices can be updated quickly and easily within TWRP if you already have version 2.8.4.0 or higher installed
1) Download the latest version from our website on your device
2) Reboot to TWRP
3) Hit Install and tap the "Images..." button in the lower right
4) Browse to the location of the TWRP image on your device and select it
5) Select recovery from the partition list and swipe to flash
OR:
You can find more information and download links on our website.
BUGS:
If you have found a bug, please consider posting it to our github issues log. It's pretty much impossible for us to keep up with the more than 40 threads that we have for the devices that we "directly" support. If you have a significant problem that cannot be answered in this thread, your best bet is to PM me directly, contact us via our website, or find us in our IRC channel below. If you see someone that's struggling, feel free to point it out to us. We need your help to help us keep track of all of our devices! Thanks!
SUPPORT:
Live support is available via #twrp on Freenode with your IRC client or just click this link.
PSA: DO NOT restore EFS backups made with TWRP 3.0.2-1 as there is a bug in that version that affects how the backup is made. Backups of EFS made with TWRP 3.0.2-1 are invalid and should be discarded. Also, seriously people, do not restore EFS unless you absolutely know that you need to.
Device specific page including instructions for a manual install
Download links for current and past versions of TWRP
Dees_Troy said:
NOTE: Decrypting data is not supported yet. The Nexus 5X will normally attempt to encrypt the device automatically on first boot. To use TWRP as you normally would, you will have to format data and install a slightly modified boot image with forceencrypt disabled.
Click to expand...
Click to collapse
Coming from an N5 I'm completely new to device encryption. Could someone explain what the implications of this are? Does installing TWRP require an unencrypted device? Will flashing it require a data format? When you say "use TWRP as you normally would," what would be different with this as it is?
Sorry for these probably really basic questions. I just have no idea what the implications of this are.
From what I put together TWRP requires unencrypted kernel/boot. Not to fear though. Looks like chainfire had released an unencrypted kernel/boot - http://forum.xda-developers.com/showthread.php?t=3219344
The N6 came with a forced encrypted kernel/boot. If you want to use a custom kernel you will be flashing an unencrypted kernel. When flashing a unencrypted kernel it will wipe your sdcard. You can encrypt your device later but this will wipe the sdcard.
It's best to flash an unencrypted kernel/boot first if you plan on using custom kernels/ROMs down the road.
Can a kernel with encryption be flashed even though the device is encrypted? The reason I ask is for compiling stock kernel with a lower vibration intensity value and not touching anything else
0.0 said:
Can a kernel with encryption be flashed even though the device is encrypted? The reason I ask is for compiling stock kernel with a lower vibration intensity value and not touching anything else
Click to expand...
Click to collapse
If your device is encrypted you can still flash any image to your system (as long as the bootloader has been unlocked). Flashing a no-encrypt kernel will not change anything in the system until the device is wiped.
Mark.
Awesome ! Was waiting for this ! Will flash in an hour And report back !
EDIT: Works Great !
So would I be good to go to install twrp after unlocking bootloader on the 5x?
briant1234 said:
So would I be good to go to install twrp after unlocking bootloader on the 5x?
Click to expand...
Click to collapse
No, this will screw up your device. http://www.xda-developers.com/a-look-at-marshmallow-root-verity-complications/
aes512 said:
No, this will screw up your device. http://www.xda-developers.com/a-look-at-marshmallow-root-verity-complications/
Click to expand...
Click to collapse
How would that screw up his device? At worst, he would have a half broken recovery that can't read or write to his /data partition since he isn't also flashing a modified boot image or kernel, no?
I tried flashing Chainfire's modified boot.img for this phone yesterday and it didn't seem to work. I initially had problems mounting my data partition, and when that failed I had issues with flashing the system.img to restore it - I fixed this by using a program called mfastboot to flash the system.img in 512mb chunks. I eventually managed to get the phone to boot after flashing it and formatting userdata but then I incurred more problems. I had multiple force closes of gapps when trying to go through Google setup. Once I got past these I couldn't check whether the phone had successfully been decrypted as Settings force closed if you tried to enter security. I'm not sure if anyone could shed any light on what I might have done wrong or whether they face the same issues and there's a problem with Chainfire's modified boot.img for the 5x.
EDIT: I think it might've been due to the fact there's 3 different builds - I'm on MDA89E so I'll wait for a modified boot.img for that before trying again.
Hayth said:
I tried flashing Chainfire's modified boot.img for this phone yesterday and it didn't seem to work. I initially had problems mounting my data partition, and when that failed I had issues with flashing the system.img to restore it - I fixed this by using a program called mfastboot to flash the system.img in 512mb chunks. I eventually managed to get the phone to boot after flashing it and formatting userdata but then I incurred more problems. I had multiple force closes of gapps when trying to go through Google setup. Once I got past these I couldn't check whether the phone had successfully been decrypted as Settings force closed if you tried to enter security. I'm not sure if anyone could shed any light on what I might have done wrong or whether they face the same issues and there's a problem with Chainfire's modified boot.img for the 5x.
EDIT: I think it might've been due to the fact there's 3 different builds - I'm on MDA89E so I'll wait for a modified boot.img for that before trying again.
Click to expand...
Click to collapse
I noticed that @mskip has this mda89e modified image mentioned in this post: http://forum.xda-developers.com/showpost.php?p=63422766&postcount=17
PS: I've not ordered any new phone (yet) but am following things here anyway.
Hayth said:
I tried flashing Chainfire's modified boot.img for this phone yesterday and it didn't seem to work. I initially had problems mounting my data partition, and when that failed I had issues with flashing the system.img to restore it - I fixed this by using a program called mfastboot to flash the system.img in 512mb chunks. I eventually managed to get the phone to boot after flashing it and formatting userdata but then I incurred more problems. I had multiple force closes of gapps when trying to go through Google setup. Once I got past these I couldn't check whether the phone had successfully been decrypted as Settings force closed if you tried to enter security. I'm not sure if anyone could shed any light on what I might have done wrong or whether they face the same issues and there's a problem with Chainfire's modified boot.img for the 5x.
EDIT: I think it might've been due to the fact there's 3 different builds - I'm on MDA89E so I'll wait for a modified boot.img for that before trying again.
Click to expand...
Click to collapse
SOMEONE TRIED FLASHING THE IMAGE AND IT DIDN'T BOOT SO I GUESS THE 5X IS A BIT DIFFERENT WITH REPACKING KERNELS. I WOULDN'T ADVISE TRYING TO FLASH IT BUT I WILL FIND OUT WHATS DIFFERENT AND REPACK THE IMAGE PROPERLY.
Mark.
Pbrah said:
How would that screw up his device? At worst, he would have a half broken recovery that can't read or write to his /data partition since he isn't also flashing a modified boot image or kernel, no?
Click to expand...
Click to collapse
It will put the phone in boot loop is why.
In other news: http://forum.xda-developers.com/showpost.php?p=63426368&postcount=11
seems like .. I have I am first person who didn't read the complete thread before taking the plunge.
So I fastboot unlocked my bootloader and flashed TWRP straight after. I am now stuck in a bootloop between "your device software cant be checked for corruption" organge screen and TWRPfirst install Failing.
can someone help me please ? I cant even turn off the phone .. kept holding the power switch for a minute no go.
update: I managed to get into fastboot mode again. then installed chainfire's bullhead boot.img and re-flashed recovery.img still no go
suhail_kapoor said:
seems like .. I have I am first person who didn't read the complete thread before taking the plunge.
So I fastboot unlocked my bootloader and flashed TWRP straight after. I am now stuck in a bootloop between "your device software cant be checked for corruption" organge screen and TWRPfirst install Failing.
can someone help me please ? I cant even turn off the phone .. kept holding the power switch for a minute no go.
update: I managed to get into fastboot mode again. then installed chainfire's bullhead boot.img and re-flashed recovery.img still no go
Click to expand...
Click to collapse
Before you try anything, attach your cable from the phone to the PC and open up a command window in any folder that has "fastboot" in the path. Periodically try this command "fastboot devices" and if you get any output that shows a device number, you can do fastboot commands. It isn't so important what's on the screen as whether you can communicate with the device. (I don't have a 5x, but this usually works on just about everything with a similar button config). Be patient. It might take a few tries. So that ^ is something you try periodically but you need to do this next paragraph or two depending upon how far you get:
You can try holding down (all at once for ~10-30 seconds) up & down & power and when you let go (or perhaps before) you should see the fastboot screen. If you do, good because you can repair it one way or another from there. If you see it or even if you don't, try the "fastboot devices" cmd from the cmd window. Repeat until you see a device number come back.
If you ever get fastboot talking to the phone, then download, unpack, (I mean unpack everything down to a directory with a windows batch file and some .img files in it) this file:
Here are the specific links for each variant:
don't need this: MDA89E - 6.0.0: https://dl.google.com/dl/android/aosp/bullhead-mda89e-factory-29247942.tgz
don't need this: MDA89F - 6.0.0: https://dl.google.com/dl/android/aosp/bullhead-mda89f-factory-08c99420.tgz
Get this one: MDB08I - 6.0.0: https://dl.google.com/dl/android/aosp/bullhead-mdb08i-factory-64536fcf.tgz
The one you probably need is the last one MDB081 since I think that is the modified boot image-version that Chainfire has made for bullhead.
Your phone and you probably need a break before trying this again, so just burn that entire file (the link after mdb08I) and if you use the batch file that basically resets everything, then you should be back to "stock" again but with this version (I think it's the latest OTA version).
Good luck.
hachamacha said:
Before you try anything, attach your cable from the phone to the PC and open up a command window in any folder that has "fastboot" in the path. Periodically try this command "fastboot devices" and if you get any output that shows a device number, you can do fastboot commands. It isn't so important what's on the screen as whether you can communicate with the device. (I don't have a 5x, but this usually works on just about everything with a similar button config). Be patient. It might take a few tries. So that ^ is something you try periodically but you need to do this next paragraph or two depending upon how far you get:
You can try holding down (all at once for ~10-30 seconds) up & down & power and when you let go (or perhaps before) you should see the fastboot screen. If you do, good because you can repair it one way or another from there. If you see it or even if you don't, try the "fastboot devices" cmd from the cmd window. Repeat until you see a device number come back.
If you ever get fastboot talking to the phone, then download, unpack, (I mean unpack everything down to a directory with a windows batch file and some .img files in it) this file:
Here are the specific links for each variant:
don't need this: MDA89E - 6.0.0: https://dl.google.com/dl/android/aosp/bullhead-mda89e-factory-29247942.tgz
don't need this: MDA89F - 6.0.0: https://dl.google.com/dl/android/aosp/bullhead-mda89f-factory-08c99420.tgz
Get this one: MDB08I - 6.0.0: https://dl.google.com/dl/android/aosp/bullhead-mdb08i-factory-64536fcf.tgz
The one you probably need is the last one MDB081 since I think that is the modified boot image-version that Chainfire has made for bullhead.
Your phone and you probably need a break before trying this again, so just burn that entire file (the link after mdb08I) and if you use the batch file that basically resets everything, then you should be back to "stock" again but with this version (I think it's the latest OTA version).
Good luck.
Click to expand...
Click to collapse
many thanks mate that worked flawlessly, managed to recover device and so far installed chainfire's boot.img and twrp. on to rooting now.
QUESTION: Can someone who STILL has their device encrypted, flashed TWRP Recovery, pushed the root zip and then entered twrp to flash it explain exactly what happens on the screen in TWRP. Does it block the install process completely, ask for a password to decrypt the device before continuing, or not allow you to unlock it?
I just need to know that part to give better instructions for the toolkit rooting operation. Once the device has been decrypted there should be no problems at all but im just not sure whether to encourage the user to run a decrypt procedure first, before the root prodecure starts.
Any feedback would be appreciated.
Mark.
EDIT: I added the option anyway.
anybody know where the sources are for the kernel?
m4r0v3r said:
anybody know where the sources are for the kernel?
Click to expand...
Click to collapse
They will be here https://android.googlesource.com/kernel/msm/ once Google updates a few things other repos for bulkhead such as device tree and more kernel files will be at https://android.googlesource.com under device/lge/bullhead and under device/lge/bullhead-kernel if that's needed. Let me know if you have more questions!

S3 (9300) with lineage os build 2017/10/25 and gapps aroma -> encryption

Hello,
I sucessfully flashed lineageos from last Wednesday (2017/10/25). And the latest Gapps Aroma release. In the aroma release I selected only a few apps (GMaps, Youtube, ...).
Unfortunately when I try to encrypt my phone, the phone starts and the android mascot is comming but the phone restarts afterwards
I tried to do without SD-card. Same problem.
I read that there are some Google Apps needed for the encryption. But I could not find out which Gapps are really required. (I only want a few Gapps that I really need!) - Does some one hafe a list what is needed with encryption.
I did an encryption wiht the release 2017/09/20 and this worked. But unfortunately I didn't installed the Gapps and could not use Play Store. Installing later let the GApps Pico crashed. So I recreated the /data/ partiion using mk2fs.
As I read, I should install both together (Lineageos and Gapps) - so I did with twrp (it gives me the possiblity to install two zips [in that step I used the latest lineageos release]). This works fine, but the encryption process does now not work?
Have you decrypted your phone before flashing new rom?
I could find something, but see below the boot is not working any more.
The problem was that I did an encryption with lineageos before BUT I did the installation of the Gapps not directly with lineageos so I got a crash of the Gapps.
For reinstalling I must recreated the data partition. I did with:
mke2fs -t ext4 /dev/block/mmcblk0p12
After analysing the log output (adb log ) carefully I found the following lines in the output:
10-31 19:55:21.291 1958 13454 E Cryptfs : Bad magic for real block device /dev/block/mmcblk0p12
10-31 19:55:21.291 1958 13454 E Cryptfs : Orig filesystem overlaps crypto footer region. Cannot encrypt in place.
So I analyzed my current block size - mounted the device with twrp and used df for the output of the mounting and looked at the current size, and decremented 16KB block size (see post below):
mke2fs -t ext4 /dev/block/mmcblk0p12 56867076
The relavant post with the 16KB block size;
https://dustri.org/b/cyanogen-reboot-without-encrypting-the-phone.html
https://github.com/TeamWin/Team-Win-Recovery-Project/issues/342
Now the encrpytion started but after restart the lineage os logo is just puting the circle from right to left....
I can insert the encrpytion password and it is accepted. Afterwards the boot in the lineageos starting screen hangs
Unfortunately the Power Up button is defect, so no recovery can be started or the download mode can be confirmed...
adb is not working - no log, no shell for booting to recovery
Goodbye phone - I think no chance... it was a try, but without the hardware buttons...
what do you mean power up button is defect? you removed it? if it is in place or was removed carefully there is possibility that you can solder new one from ebay ($1 at most) so it is possible to repair any way
Yes. But I don't have the hands to do it. This is nothing I can do. I already searched the tutorial.
I'll try with a jig then i can come to download mode.
And hopefully the adb bridge is working in download mode to reboot recovery. This is where I'm not sure and then in recovery i can flash new software and look for the encryption.
Is adb working in download mode? So that I can
Reboot into recovery. Or any other odea.
The jig needs 2 weeks to ship.
I got it now working...
With the Jig I flashed the Stock rom to have a working system.
From that I could flash the recovery again.
With help of the recovery I flashed the lineageos build w0171101 and the encryption than worked. I did not Lock the handy using a password first and then started encryption. Afterwards I changed to use password. So everything is working now And I am happy.
Twrp 3.1.1.0 is also able to mount the partitions with encryption.
Thanks for your help :good:

[RECOVERY][UNOFFICIAL][TWRP 3.2.1][MOTO x4 PAYTON][7.1.1/8.0]

OFFICAL TWRP RELEASED, this thread is no longer active. 3-30-2018
https://twrp.me/motorola/motorolamotox4.html
---
UNOFFICIAL BUILDS -- USE AT YOUR OWN RISK AND KNOW HOW TO GET YOURSELF OUT OF TROUBLE IF IT ARISES. I ASSUME NO RESPONSIBILITY FOR YOUR BROKEN THINGS.
UPDATED 01-11-2018
There are now 7.1 based and 8.0 based builds. Obviously, be careful to select the proper download. While I don't think flashing/booting the wrong one would permanently brick the device, let's not find out
For now I will not be attempting to make data decryption work. It is REQUIRED that you unencrypt your device by formatting userdata, so back up your stuff first.
IMPORTANT NOTES: TWRP for OREO is a bit of a pain as it currently requires manually editing your fstab. I have tried to automate this process, but it breaks stuff. So just be aware before you begin that it is a rather time consuming process.
If you make any change to your boot partition after flashing SuperSU, you will need to reflash it or you will get a bootloop.
8.0 OREO TWRP INSTALLATION:
OREO SEEMS VERY FINICKY AND DOES NOT LIKE CHANGES TO ITS FILESYSTEM -- BE PREPARED TO REFLASH STOCK.
0. FLASH OREO FACTORY IMAGE (may work otherwise, but we should be starting from fresh stock here)
1. Download FASTBOOT BOOTABLE TWRP for 8.0/OREO below
2. Download SuperSU 2.82 SR5 below
3. Move SuperSU to external SD or USB OTG
4. From bootloader, fasboot BOOT TWRP
5. Flash SuperSU (note: do not format /data now... not necessary and will cause errors on boot)
6. Reboot system
7. With any root file editor/text editor (Amaze, Total Commander, etc) open /system/vendor/etc/fstab.qcom as a text file for editing.
8. At the end of the /data partition entry, delete "fileencryption=ice" and replace it with "encryptable=footer".
9. Save fstab.qcom (and make sure it is actually saved properly!)
10. Reboot to bootloader and fasboot BOOT TWRP
11. Go to Wipe, hit the FORMAT DATA button, and type "yes" to format /data. This will erase your data, obviously:silly:
12. Reboot system (should now be unencrypted, verify in Settings>Security or by booting TWRP and checking /data with File Manager.
If you later choose to flash TWRP (not the bootable we used here!), you may need to flash SuperSU again to avoid bootloops.
7.1.1 NOUGAT TWRP INSTALLATION:
1. Download current TWRP for 7.1.1 build below
2. Download SuperSU 2.85 SR5 (https://forum.xda-developers.com/apps/supersu/2014-09-02-supersu-v2-05-t2868133
3. Move SuperSU to your external Micro SD card.
4. Fastboot flash the TWRP image.
5. Reboot to TWRP.
6. FORMAT data (not wipe...use the "FORMAT DATA" button and type "yes". OBVIOUSLY THIS WILL ERASE YOUR DATA)
7. Install SuperSU 2.85 SR5
8. Reboot to system (it WILL bootloop a couple times...don't panic!) and confirm that device is unencrypted by checking that SETTINGS>SECURITY>ENCRYPTION now prompts "encrypt" (don't do it).
DOWNLOADS:
TWRP FOR 7.1.1 (Nougat) DOWNLOAD: https://drive.google.com/open?id=1Et-AQgCNx7WDAwzihlI51euUa2ixKHEP
TWRP FOR 8.0 (Oreo) DOWNLOAD: https://drive.google.com/open?id=1WcVS_3rloF7jxPulj_jKxfsp3zy5pB5N
FASTBOOT BOOTABLE TWRP IMAGE (OREO BASED): https://drive.google.com/open?id=12ClviqtEjtflB63UQ1CZQNKEqkprBO0u **For temporary TWRP boot using "fastboot boot". Do not flash or you will be stuck in recovery!**
DEVICE TREE: https://github.com/mightysween/android_device_motorola_payton (NEEDS TO BE UPDATED WITH OREO BRANCH)
changelog:
BETA4
-reverted to 3.2.0 for current build (release candidate rebased to 3.2.1).
-fixed "format data" button
-finalized fstab for OTG/SD/INTERNAL mounting
-target is now UNENCRYPTED devices only (/data decrypt will not be fixed)
BETA3
-Rebased to TWRP 3.2.1
-USB OTG working
-all partitions mounting correctly
-considered working except for decrypt and MTP/ADB
BETA2
-fixed internal storage mount
BETA1
- updated source to TWRP 3.2.0
ALPHA3
- Fixed USB mounting (adb/mtp still nonfunctional) BROKEN IN BETA1
ALPHA2
- SD Card fixed
ALPHA1
- /system is now properly mounted.
- now plays nice with our working root method.
- ramdisk is patched to prevent first boot encryption once /data is decrypted (now requires flashable ZIP)
NOT WORKING:
adb/mtp/sideload
/data decryption (abandoned -- /data access requires unencryption)
CREDITS: @kraatus90 for kernel fix, @Chainfire for SuperSU, @jcadduono for no-verity-opt-encrypt scripts.
---
Thanks so much for all your work!
hi,
you said this is really unstable and could brick the device easily. however, you seem to be testing and experimenting with your device a lot, so i'd like to ask if you have any particual unbrick method that you use when something goes wrong.. like, a via fastboot flashable image or something simmilar...?
thanks for your work!
Thanks for you work. If you have any unbrick methods pls tell.appreciated your work ?
I am not going to provide step by step "unbrick" methods, because until the partitioning is properly set up, TWRP has potential access to things that can not be fixed.
Again, this is still highly experimental.
All that said, my entire process to protect any device remains the same: Have a backup for every partition you will be testing, make as few changes as possible at a time, test boot images before flashing (fastboot boot), and test restore methods frequently (flashing back to stock or backups), and don't do anything unless you are highly certain of the outcome.
By those standards, there is nothing to gain by installing TWRP right now, as its basic function (install/backup/restore) is not set up yet.
Found the BoardConfig flag to enable FBE (TW_INCLUDE_CRYPTO_FBE := true) but do not have the lib it is dependent on (libe4crypt) and I don't see it anywhere yet...
For reference (not sure this is most current, but it demonstrates the process)
https://github.com/nijel8/TWRP/commit/bd7492de28963b7e74e8e5d3f17ec9a5a287d9c3
I have confirmed that FBE support is present in the source, dependent on this missing module... so need to figure out where/how to enable it.
It is possible that this entire process is specific to only certain devices (i.e. Pixel, Nexus). If this is the case, we may be stuck at this point for awhile.
Obvious workaround is to not be encrypted to begin with -- but that isn't a "solution".
mightysween said:
It is possible that this entire process is specific to only certain devices (i.e. Pixel, Nexus). If this is the case, we may be stuck at this point for awhile.
Click to expand...
Click to collapse
This appears to be the case, unfortunately. Seems that the TWRP FBE support was built specifically for the Google implementation of FBE which was merged into kernel sources for Nexus and Pixel. Not even using the qseecomd I assumed it was... will remove on next build.
Info on FBE:
https://source.android.com/security/encryption/file-based
Will be testing options to disable forced encryption, and if necessary dm-verity...
Anyone who wants to dig through kernel for related flags and props, it would be greatly appreciated!
Hey, where did the big "format data" button go in TWRP? Is that optional on compile... can't find a flag for it...
Making good progress this morning.
Seem to have a build with properly decrypted /system, and working SD Card. I also have patched the boot.img to disable forced encryption on the first boot. But now, I can not find a safe way to fully format (not "wipe") the /data partition. As mentioned in the previous post, the "FORMAT DATA" button is missing. The fastboot command "fastboot format userdata" returns an error that it does not support RAW format.
Need to figure out why this is happening... and once I do, I believe I can reformat /data without encryption and then will have an almost fully working TWRP build. Obviously, the ideal solution would be to have TWRP work out of the gate with an encrypted /data, but until then this is going to be our best option.
Will post an updated test build in the OP soon.... needs further testing before I would recommend non-expert users to try it.
Getting very close now!
UPDATE: ADDED NEW BUILD TO OP
---
Also, just occurred to me that the ramdisk will need to be patched every time, so now that I have SD card support will be testing some of the existing flashable ZIPs out there that are designed specificially to prevent first-boot encryption and/or disable dm-verity.
---
mightysween said:
Hey, where did the big "format data" button go in TWRP? Is that optional on compile... can't find a flag for it...
Click to expand...
Click to collapse
This is really the only hold up... I changed the partition from 'Advanced Wipe", but as expected, it was still encrypted on boot as it doesn't actually format the footer where encryption is stored. I can't figure out where that darn "FORMAT DATA" button ran off to, and that is exactly what we need here.
mightysween said:
This is really the only hold up... I changed the partition from 'Advanced Wipe", but as expected, it was still encrypted on boot as it doesn't actually format the footer where encryption is stored. I can't figure out where that darn "FORMAT DATA" button ran off to, and that is exactly what we need here.
Click to expand...
Click to collapse
I don't know how to help except to say that using TWRP 3.1.0-MOD_1 with my XT1254 (DROID Turbo), when you go to wipe it has two buttons --- one on the left for Advanced Wipe and Format Data on the right.
johnjingle said:
I don't know how to help except to say that using TWRP 3.1.0-MOD_1 with my XT1254 (DROID Turbo), when you go to wipe it has two buttons --- one on the left for Advanced Wipe and Format Data on the right.
Click to expand...
Click to collapse
I have 3.1.1-0 (same version I am building here) on several other devices, and the button is there. It has to be triggered by something during compile, but I can't figure it out. Driving me nuts
Looking through TWRP source, and can find actions for every other button (wipe, backup, restore, install, etc) but not for format. Hmm.
I posted over on an old but semi-active TWRP flags thread, maybe someone will have some insight.
Wondering if I make a stock boot image without the encryption tag in fstab, and then wipe data and reboot... then flash my image. That may make it so the data partition is never encrypted in the first place and allow TWRP to work.
But that is an ugly, non-user friendly fix. Why can't we just format /data?
---
Final update for today... this seems to be a compile issue, which is a good thing. I tried to manually decrypt /data from the TWRP command line, and got this:
No crypto support was compiled into this build.
Click to expand...
Click to collapse
So, I must be missing something in boardconfig still... and maybe need to set up a small proprietary vendor folder with the necessary libs
mightysween said:
Final update for today... this seems to be a compile issue, which is a good thing. I tried to manually decrypt /data from the TWRP command line, and got this:
So, I must be missing something in boardconfig still... and maybe need to set up a small proprietary vendor folder with the necessary libs
Click to expand...
Click to collapse
Thanks for doing all of this! I wish I had the time and knowledge to help.
Had a few PM's checking on TWRP status, so an update.
The good news is that the X4 is using Qualcomm based decryption for /data... the bad news is that most if it seems to be closed source. This will take some time for me to figure out, but I have already made some progress by sifting through logs.
Right now, I am trying to find a device with similar decrypt scheme to have some more guidance on the process.
mightysween said:
Had a few PM's checking on TWRP status, so an update.
The good news is that the X4 is using Qualcomm based decryption for /data... the bad news is that most if it seems to be closed source. This will take some time for me to figure out, but I have already made some progress by sifting through logs.
Right now, I am trying to find a device with similar decrypt scheme to have some more guidance on the process.
Click to expand...
Click to collapse
dont know all about these things but maybe xiaomi mi a1 twrp can help as it is also using same a/b partition. and twrp is already there for it
vivek638 said:
dont know all about these things but maybe xiaomi mi a1 twrp can help as it is also using same a/b partition. and twrp is already there for it
Click to expand...
Click to collapse
Thanks, the Mi A1 is one of the devices I have been comparing to, and has been quite helpful.
mightysween said:
Thanks, the Mi A1 is one of the devices I have been comparing to, and has been quite helpful.
Click to expand...
Click to collapse
Keep searching. wish i could have helped but dont know anything about compiling n all..
I'm not much of a programmer, but I can look through the files. Is there anything in particular we're searching for?

[RECOVERY][OFFICIAL] TWRP 3.5.2 [CEBU]

This build is now official.
Check out https://twrp.me/motorola/motorolamotog9power.html
Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.​
Code:
#include <std_disclaimer.h>
/*
*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this recovery
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*
*/
XDA:DevDB Information
TWRP, Tool/Utility for the Motorola G9 Power
Contributors
mistersmee
Source Code:
Device tree: https://github.com/teamwin/android_device_motorola_cebu
Kernel sources: Prebuilt (for now) [Note: Thanks @fddm, for your patched kernel!]
https://github.com/mistersmee/kernel_motorola_sm6115
TWRP sources: https://github.com/TeamWin/android_bootable_recovery
Telegram group: https://t.me/g9power (English language)
Version Information
Status: Stable
Created 20-05-2021
This is the list of things that need to work, as per TWRP's FAQs.
I will update as I find stuff that works, and as you guys tell me what works.
Code:
Blocking checks
- [X] Correct screen/recovery size
- [-] Working Touch, screen
- [X] Focaltech touchscreen panel (confirmed working)
- [X] Novatek touchscreen panel (confirmed working)
- [X] Chipone touchscreen panel (confirmed working)
- [X] Backup to internal/microSD
- [X] Restore from internal/microSD
- [X] reboot to system
- [X] ADB
Medium checks
- [X] update.zip sideload
- [X] UI colors (red/blue inversions)
- [X] Screen goes off and on
- [X] F2FS/EXT4 Support, exFAT/NTFS where supported
- [X] all important partitions listed in mount/backup lists
- [X] backup/restore to/from external (USB-OTG) storage (not supported by the device)
- [X] backup/restore to/from adb (https://gerrit.omnirom.org/#/c/15943/)
- [X] decrypt /data
- [X] Correct date
Minor checks
- [X] MTP export
- [X] reboot to bootloader
- [X] reboot to recovery
- [X] poweroff
- [X] battery level
- [X] temperature
- [X] encrypted backups
- [X] input devices via USB (USB-OTG) - keyboard, mouse and disks (not supported by the device)
- [X] USB mass storage export
- [X] set brightness
- [X] vibrate
- [X] screenshot
- [X] partition SD card
If it isn't filled, it means it hasn't been checked yet. 'X' denotes that it is working. '!' denotes that it is not working.
Note: As I mentioned in the initial post, I'm using the prebuilt kernel for now, although the kernel sources have been released. For the long-term, using the prebuilt kernel is not ideal. I have been working on the kernel sources, but as of this writing, I have been unable to get them to boot. If any of you have experience working with Android kernels, please let me know, PM me, etc.
The kernel repo I'm working on is here: https://github.com/mistersmee/kernel_motorola_sm4250
PRs are always welcome.
Edit: Nevermind, I got them to boot.
A few notes on the image:
1. Yes, VBMeta shows 0MB in TWRP. It is intentional, nothing is wrong with the build, or your phone.
VBMeta as a partition, is only a few bytes in size, 65536 bytes, which is 65 KB, which is 0.06 MB, to be exact. TWRP displays sizes in MB, and probably rounds those decimals up, hence a size this small registers as 0. However, it is still an important partition, and it is in the stock fstab, so it cannot be left out.
2. The above point applies for "Prodpersist" as well. Although it is not as small as VBMeta, it is still just a few KBs in size, Again, it is in the stock fstab, so it cannot be left out.
Another probable explanation as to why Prodpersist shows up as 0MB, is that it is actually related to the /product partition. Due to the way Android 10, and dynamic partitions work, basically, the /system, /product, and /vendor have been subsumed under one big "super", which is incidentally read-only. Those individual partitions can only be mounted if the super partition as a whole is mounted, and TWRP does not mount that partition while booting, hence why it probably shows up as 0MB.
In any case, Prodpersist is actually not *that* important, so it doesn't *really* matter anyways.
3. As I said in the last paragraph above, Android 10 changed the way the /system partition works. Because of this, most modifications that in earlier Android versions we could do in TWRP, think flashable zips that change your boot animation, or anything that modified the system partition, will not work.
The only way to do those kinds of mods is through Magisk.
4. Yes, the image is 64MB in size. But, the stock recovery image is also 64MB.
The reason as to why it is 64MB, is because AVB support is enabled. AVB is, of course, Android Verified Boot, which allows GSI support, which should theoretically mean support for flashing GSI images in this TWRP build.
Without AVB support, the image is around 20MB, which is the more "normal" size of TWRP images of the past.
I'm a little late but. Thank you very much
Unfocusedobsessiv said:
I'm a little late but. Thank you very much
Click to expand...
Click to collapse
You're welcome!
Also as a general note to everybody:
If you updated to Android 11 and find that TWRP is not working for you i.e. it doesn't boot, nothing is wrong with your phone/you didn't mess anything up.
The build isn't working due to the Android 11 update, but I'm currently working on it.
still waiting for twrp for android 11
bhavesh.kale.73 said:
still waiting for twrp for android 11
Click to expand...
Click to collapse
No ETA except to say I'm working on it. It depends on external factors, i.e Motorola releasing the updated kernel sources which they haven't done as of this writing.
Hello everyone. I've never had any luck restoring twrp backups of stock on encrypted A/B phones. Does anyone know if that's possible nowadays? I'm still on 10 too because of a Real Racing 3 bug that prevents it from loading in 11.
And a big thank you to you, @mistersmee . Your twrp is the reason I chose this phone.
arkansawdave74 said:
Hello everyone. I've never had any luck restoring twrp backups of stock on encrypted A/B phones. Does anyone know if that's possible nowadays? I'm still on 10 too because of a Real Racing 3 bug that prevents it from loading in 11.
And a big thank you to you, @mistersmee . Your twrp is the reason I chose this phone.
Click to expand...
Click to collapse
You're welcome! And yeah, I had no problem backing up and restoring /data on cebu, so not sure what's going wrong for you.
mistersmee said:
You're welcome! And yeah, I had no problem backing up and restoring /data on cebu, so not sure what's going wrong for you.
Click to expand...
Click to collapse
Actually, I haven't tried in a couple years...Not since the G7 Power (Ocean). We had a terrible time trying to restore stock backups on that phone. I haven't even looked at the partition list in the backup section of your TWRP, but I'm about to. What partitions besides /data did you backup and restore successfully, if you don't mind my asking.
arkansawdave74 said:
Actually, I haven't tried in a couple years...Not since the G7 Power (Ocean). We had a terrible time trying to restore stock backups on that phone. I haven't even looked at the partition list in the backup section of your TWRP, but I'm about to. What partitions besides /data did you backup and restore successfully, if you don't mind my asking.
Click to expand...
Click to collapse
Just about every partition that is available to backup/restore. Though frankly, backing up any partition other than /data is a waste of time and space, we don't actively modify them, and they are available in the stock firmware file if you manage to mess them up anyway.
Oh my gosh why didn't I think of that before.
The Moto G7 Power was the first a / B phone any of any of us had had back then. We tried and tried and tried many different ways to restore a backup but we never thought of that, which is surprising, but we were trying to make a complete backup that you could restore all from TWRP like in the old days. System, Boot, and data.
Anyway, I went to flash Resurrection Remix Q GSI and made it back up of stock first just /data. Restored just fine after the GSI failed to boot. You really made my Android experience so much better.
Thank You.
Hey guys. Just wanted to mention that I'm trying Android 11 Official GSI Customs coming off a stock 10 and TWRP still boots fine while running the 11s.
arkansawdave74 said:
Hey guys. Just wanted to mention that I'm trying Android 11 Official GSI Customs coming off a stock 10 and TWRP still boots fine while running the 11s.
Click to expand...
Click to collapse
That's great to hear.
New release
TWRP 3.6.0_11
This build supports the Android 11 stock ROM. Unknown if it is backwards compatible with stock Android 10. Until confirmed that it is backwards compatible, people running 10 for whatever reason should stick to the 3.5.2 image, or update to 11 and run 3.6.0.
Everything is confirmed working. Download links are on the TWRP website, as always.
mistersmee said:
Is your new build official as well?
New release
TWRP 3.6.0_11
This build supports the Android 11 stock ROM. Unknown if it is backwards compatible with stock Android 10. Until confirmed that it is backwards compatible, people running 10 for whatever reason should stick to the 3.5.2 image, or update to 11 and run 3.6.0.
Everything is confirmed working. Download links are on the TWRP website, as always.
Click to expand...
Click to collapse
Is your new build official as well?
EDIT. Nevermind. I missed the last line.
arkansawdave74 said:
Is your new build official as well?
Click to expand...
Click to collapse
Yes, it is official.
Booting twrp-3.6.0_11-0-cebu.img boots ok TWRP but touch freezed, any idea?
sirjuncos said:
Booting twrp-3.6.0_11-0-cebu.img boots ok TWRP but touch freezed, any idea?
Click to expand...
Click to collapse
Try this image: https://build.twrp.me/twrp-3.6.0_11-0-cebu.img

[RECOVERY][UNOFFICIAL] - (1/16/22) TeamWin Recovery Project [BRAMBLE]

Essentially copy/paste from the official TWRP for redfin thread, except I've made my own unofficial build for the Pixel 4a5G that in my own testing appears to be on feature parity with the official build for the Pixel 5! There are reports of the Pixel 5 build not working on devices with Android 12 and a PIN set at this time, so I advise against using this build if you've upgraded to Android 12 on your Pixel 4a5G and require having a PIN for your day to day.
I've decided I might as well try to maintain the device since no one else is doing so yet. I've pushed the trees I've modified to GitHub so y'all can keep track and maybe help out before I submit them for official status.
device/google/bramble: https://github.com/JoshuaDoes/twrp_device_google_bramble
device/google/redbull: https://github.com/JoshuaDoes/twrp_device_google_redbull
You can find the latest unofficial test build here: twrp-3.6.0_11-0.1-bramble.img
Boot it with `fastboot boot twrp-3.6.0_11-0.x-bramble.img`, decrypt your data if necessary, then install it permanently by navigating to `Advanced -> Flash Current TWRP`. Test by navigating to `Reboot -> Recovery` and you should reboot back into TWRP!
Changelog
11-0.1 (1/16/2022):
- Fix missing libion dependency, which appears to allow booting and installing TWRP if A12 is installed
11-0 (1/13/2022):
- Sync bramble with patches from redfin
You can find the historical builds here (but please don't use them): https://files.joshuadoes.com/TWRP/twrp-11/bramble/
Thank you it's so cool but update my pixel 4a 5g to A12
Stay an update too for it
I've ran into a `ErrorCode::kError` issue trying to install the latest official LineageOS 18.1 ZIP, but everything else appears to be working!
fastboot boot twrp-3.6.0_11-0-bramble.img
It sees partitions and super.
I hit compresson option and confirm/change name and it's backing up. adb appears to work (didnt check too into it). Just booted it and see if I can make a backup--AND I CAN. Good work @JoshuaDoes ! Good good job!
smokejumper76 said:
fastboot boot twrp-3.6.0_11-0-bramble.img
It sees partitions and super.
I hit compresson option and conirm/change name and it's backing up. adb appears to work (didnt check too into it). Just booted it and see if I can make a backup--AND I CAN. Good work @JoshuaDoes ! Good good job!
Click to expand...
Click to collapse
I did a successful data restore earlier today, just remember to disable your PIN first and then reboot immediately after the first boot following the restore
what if I just have no pin/password. just swipe to unlock? i did see a message in backup log 'sucessfully decrypt with default password'.
smokejumper76 said:
what if I just have no pin/password. just swipe to unlock? i did see a message in backup log 'sucessfully decrypt with default password'.
Click to expand...
Click to collapse
You're in the best case scenario then, just make sure you always disable PIN before restoring a backup so long as it gives you the warning to do so (I get the warning because I have a PIN, but you should just be free to restore as you please)
awesome. Only things I notice not there (and in no way complaining as its a WIP) is encryption option, and date seems to be stuck on 1970 and time way off despite changing time zone. But that's minor right now. The fact you got this going is no small feat. I am so glad I got a 4a5g (5/5a would have been fine too) and not a 6. You should put a donate link so we can buy you some coffee or weed or something, lol. Again great job. Feel free to hit me up if you need me to destroy my phone for you (testng). I got a dd backup, and now twrp backup so between all of that and the alfabet of partitions I should be able to restore from just about anything short of EDL crap out and I'm sure if that's not resolvable by now, it will only be a matter of time.
smokejumper76 said:
awesome. Only things I notice not there (and in no way complaining as its a WIP) is encryption option, and date seems to be stuck on 1970 and time way off despite changing time zone. But that's minor right now. The fact you got this going is no small feat. I am so glad I got a 4a5g (5/5a would have been fine too) and not a 6. You should put a donate link so we can buy you some coffee or weed or something, lol. Again great job. Feel free to hit me up if you need me to destroy my phone for you (testng). I got a dd backup, and now twrp backup so between all of that and the alfabet of partitions I should be able to restore from just about anything short of EDL crap out and I'm sure if that's not resolvable by now, it will only be a matter of time.
Click to expand...
Click to collapse
Encrypting backups? I didn't realize that was missing so I'll look into it too, but yeah the date is stuck which screws with file and backup times and I def need to fix that. XDA forbids me from putting a donation link in a post, however if you go to my profile and expand the info details about me it lists my PayPal email there and I'd super appreciate it! Because lemme tell ya, it took energy drinks and some good highs to do most of my Android work and thankfully this TWRP build only took me a few hours to tear into lmao. If you got a Discord I'm most active there as well as the Pixel 4a5G/5 Telegram (I can get a link to all if you've got them), and having extra testers for some of what I wanna do would be phenomenal as well! And we're Qualcomm, there's a flash tool out there somewhere for the worst of board states
Sorry for the wall of text lmao, I appreciate the kind words for sure and I'm likely gonna try maintaining this device officially for TWRP too
Hi ! Thank you for all your work. I was surprised when buying my Pixel 4a 5g when it came out that there was no Twrp because of Android 11. But coming from Xiaomi and Oneplus there were unofficial ones for Android 11 and 12.
When you can update it for A12 I have noob question. After flash the Twrp and boot it (with no pin) I can make a backup of all my Pixel. Copy it on my Pc and them do format data ? Or not necessary ? If I do format it them boot the Pixel and when it start check dev options, adb and reboot to Twrp Root (Magisk) and restore my data ? If not how to make a backup of my data.
Thanks
JoshuaDoes said:
Essentially copy/paste from the official TWRP for redfin thread, except I've made my own unofficial build for the Pixel 4a5G that in my own testing appears to be on feature parity with the official build for the Pixel 5! There are reports of the Pixel 5 build not working on devices with Android 12 and a PIN set at this time, so I advise against using this build if you've upgraded to Android 12 on your Pixel 4a5G and require having a PIN for your day to day.
I've decided I might as well try to maintain the device since no one else is doing so yet. I've pushed the trees I've modified to GitHub so y'all can keep track and maybe help out before I submit them for official status.
device/google/bramble: https://github.com/JoshuaDoes/twrp_device_google_bramble
device/google/redbull: https://github.com/JoshuaDoes/twrp_device_google_redbull
You can find the latest unofficial test build here: twrp-3.6.0_11-0.1-bramble.img
Boot it with `fastboot boot twrp-3.6.0_11-0.x-bramble.img`, decrypt your data if necessary, then install it permanently by navigating to `Advanced -> Flash Current TWRP`. Test by navigating to `Reboot -> Recovery` and you should reboot back into TWRP!
Changelog
11-0.1 (1/16/2022):
- Fix missing libion dependency, which appears to allow booting and installing TWRP if A12 is installed
11-0 (1/13/2022):
- Sync bramble with patches from redfin
You can find the historical builds here (but please don't use them): https://files.joshuadoes.com/TWRP/twrp-11/bramble/
Click to expand...
Click to collapse
Hello. Link is for ver. 0. Ver 0.1 returns 403 Forbidden. Can you please fix it?
Been waiting so long for this, thanks a bunch, i'm running lineageos 18.1 so i hope it will work (probably disable automatic updates flashing ?).
N34S said:
Hello. Link is for ver. 0. Ver 0.1 returns 403 Forbidden. Can you please fix it?
Click to expand...
Click to collapse
I fixed the link for v0.1!
J0kker said:
Been waiting so long for this, thanks a bunch, i'm running lineageos 18.1 so i hope it will work (probably disable automatic updates flashing ?).
Click to expand...
Click to collapse
Automatic OTAs will replace TWRP, so disable automatic OTAs and download them with the Updater app whenever you get a notification, then install using TWRP (/data/lineageos_updates) and check "Install TWRP after flashing" before swiping to install (or go to Advanced -> Install Current TWRP before rebooting). Easy as that!
But I may make a Magisk module to handle all this since Magisk has a survival script that works. It'd be a oneshot service that caches the latest copy of TWRP and installs it each boot, so you'd only have to deal with one update cycle that has Lineage Recovery installed.
Just wondering, i have a game that won't run when rooted (even with magisk hide), i somewhat managed to have lineageos rooted with magisk in slot b, and in slot a magisk installed but no root, so when i want to run the game i switch to slot A from twrp, now i have an update notification, i downloaded it, if i boot to twrp, select slot a, so that it will install update to slot b (rooted), that way it should keep my slot a unrooted, able to play my game right ?
New to this slot a/b i read a lot but still not sure about everything.
Anyway, thanks again for your work, and your answers, i missed twrp so much coming from oneplus 5 =)
Hi just installed the boot twrp img, worked great! Thank you for your great work. If you were to develop a module through Magisk would that enable the twrp to stick as a recovery and not lose root?
I wanted to say thank you again for building this.
Also, does anyone know if there is a way to exclude a folder (or folders) from TWRP backups? I had this great idea to go from mp3 to flac music when I got 128gb storage on my first pixel and...well...it's too big. Thanks again!
Hello,
I am trying to recover some data off of my 4a 5g with a broken display. It seems like my partitions are not mounting correctly.
This is what etc/fstab looks like:
Code:
/dev/block/dm-0 /system_root ext4 ro 0 0
/dev/block/dm-3 /system_ext ext4 ro 0 0
/dev/block/dm-4 /vendor ext4 ro 0 0
/dev/block/dm-2 /product ext4 ro 0 0
/dev/block/sda15 /metadata ext4 rw 0 0
/dev/block/sda19 /data f2fs rw 0 0
/auto0 vfat rw 0 0
/dev/block/sda2 /persist ext4 rw 0 0
This is what I get when trying to mount partitions:
Code:
bramble:/ # mount -a -v -t f2fs
try '/dev/block/sda19' type 'f2fs' on '/data'
mount: '/dev/block/sda19'->'/data': Invalid argument
My question is, am I doing something wrong here? I suspect data is not decrypted but I have no working display to verify whether I am actually entering the password when booting recovery. Also can anyone please walk me through how to properly enter the password using a USB keyboard
Sorry guys , got a new 4a5g and did a fresh Feb 2022 factory install both slots and this 11.0.1 will not boot. Fastboot tools are latest along with drivers and this recovery failed to flash or boot. Fastboot sent the file however in all cases failed to write into recovery partition. Tried all of the builds just in case. Never could get past writing to the recovery partition
Hi if you can access fastboot try the the android flash tool, I had the same issue and that worked for me

Categories

Resources