yashsingh1/xdaforums huggingface dataset:
[Nexus 9 Android Development] cr0wnest:
Alright just tried it and got this error. I'm flashing it on Exodus 5.1.1 ROM which is CM based. Or perhaps its not supported on this particular ROM?
[Nexus 9 Android Development] gladiac:
Hey there,

well, my script works under the assumption that all roms include the same files that AOSP uses. This was obviously wrong. AOSP has 2 fstab files: fstab.flounder and fstab.flounder64. Your rom only has fstab.flounder.

I can fix this by changing the error handling in this case. I guess I will make a new release tomorrow. Sorry for that.
[Nexus 9 Android Development] cr0wnest:
No need to be sorry! I appreciate the quick response, I'll look forward to testing out the new version when its done. :good:
[Nexus 9 Android Development] gladiac:
Hello everybody,

I just released v5! This version changes the error handling to compensate for missing fstab files. Some roms seem not to ship with the complete set of boot-files from AOSP.
[MENTION=2701152]cr0wnest[/MENTION], please test :).

Enjoy
[Nexus 9 Android Development] cr0wnest:
That was fast! The zip flashes just fine now. However under the security settings it still shows as tablet encrypted. Is it supposed to say otherwise?
[Nexus 9 Android Development] gladiac:
This is normal, the problem is that the device is already encrypted. The froceencrypt-flag that my ZIP gets rid of enforces the encryption at the first boot of the device. You now have to do a full wipe to get rid of the encryption. Android will then not encrypt your device at the first boot because you patched that flag away. Android will let you encrypt your device in the security settings though.
[Nexus 9 Android Development] cr0wnest:
Ah no wonder, I totally forgot a full wipe is required as well. I'll test it out tomorrow and report back again. Thanks a lot!
[Nexus 9 Android Development] cr0wnest:
Alright it seems to be working. First did a full wipe, then flashed Exodus, flashed Gapps, flashed fed patch, then full wiped once more, then booted up. Took a while on first boot but now the device is giving me an option to encrypt tablet, indicating that encryption has been removed. :) Will test it out further! Thank you!
[Nexus 9 Android Development] gladiac:
Good morning!

I'm glad to hear this! You should now feel a clear difference in fluidness and app loading times. Additionally, you should see that TWRP starts a lot quicker because the decryption process will be omitted. Last but not least the boot time should be quite a lot quicker than on an encrypted device. At least that's what I noticed on my flounder. All in all the device just feels faster.

Enjoy
[Nexus 9 Android Development] cr0wnest:
Indeed it boots up a little faster, but more importantly the UI feels more fluid and stutters less. Maybe its also partially because I'm pairing the ROM with Fire-Ice kernel, but it does feel much more reliable while multitasking. Before I feel it always performs even worse than my OnePlus One.

Thanks again for your efforts!
[Nexus 9 Android Development] NTree45:
i tried to get this to work on the image "shamu-lyz28k-factory-665a20f2" and it wouldn't get past the Google logo right after startup, never could get the swirling colored dots

tried a full image install, wipe and re-wipe
[Nexus 9 Android Development] Syndrome666:
Same here. Also on T-Mobile, currently running LYZ28J unencrypted and rooted. Tried to update to LYZ28K via fastboot, flashing only bootloader, radio, boot, and system images, then going into recovery and flashing FED-Patch v5 zip. Gets stuck on initial black Google logo screen with the unlocked bootloader icon at the bottom, never gets past that screen whether I apply root or not (tried it both ways). So I'm back to LYZ28J via nandroid backup. By the way when i checked the bootloader log from my N6 bootloader menu, under boot.img it said something about it being mismatched due to its size (it was highlighted in pink rather than green), not sure if this can be the problem for this build. These are factory Google images I'm talking about, not a custom ROM build of any sort and I'm 100% sure my device had an unlocked bootloader, was rooted, and had the encryption disabled before flashing the update and FED-Patch zip file.

Just tried this for the 4th time for good measure and same result. Nexus 6 devices not on T-Mobile, use a slightly varied build, mainly for radio image and for wifi-calling feature, so not sure if any of this may be interfering with the boot image patch zip. I was initially going to modify the boot image myself using android image kitchen, but apparently the one I sourced is built for Windows OS use only, and I don't own one of these machines. I do however own a mac, chrome, linux, and android os machines, but not sure how to go about modifying an android boot image on one of these devices. Usually I'd just source a modified image that someone posts on xda, but for LYZ28K, no one seems to be cool enough to share one. As a matter of fact, an xda user who tested this zip file on the first page of this thread, recommended this option to me, so here I am still stuck on the google screen for about 10+ minutes at this point, which confirms it's not working on this build at least. Anyhow this sounds like a neat idea, but unfortunately it didn't work for me. If this issue is resolved via a new update or a fix on the current version, I'll gladly give it another spin.
[Nexus 9 Android Development] gladiac:
Hi guys,

I'm sorry to hear about these problems. I will look into it as soon as I find the time. University has started again and disrupts my time schedule pretty badly at the moment. Is this (https://dl.google.com/dl/android/aosp/shamu-lyz28k-factory-665a20f2.tgz) the problematic rom you are talking about?

// UPDATE: I think I know what is wrong. The boot.img inside LYZ28K has a special boot commandline which mkbootimg does not add to the patched boot-image. This is probably why your shamus wont wake up anymore.

I already did the necessary changes to fed-patcher - ultimately leading to v6 - but I have no way of testing it right now. I will do that in the evening when I come home though with my flounder. I do not have a shamu so if any of you guys is willing to help me with this I can give you a dry-run version of fed-patcher (which does not actually flash anything but creates the resulting boot.img file) and you do a test-run and send me the resulting boot.img.

// UPDATE #2: The dry-run version is attached to this post. Can one of you guys please send me the resulting boot-new.img? You can pull the file from your phone while still being in your recovery via:

adb pull /tmp/fed_patcher/boot-new.img

// Update #3: Removed the download of the broken v6 dry-run version. There is a fixed version in a later post.
[Nexus 9 Android Development] Syndrome666:
I just tried flashing it in twrp and it keeps returning error. I'm attaching the snapshots.
[Nexus 9 Android Development] gladiac:
Hmm, something is obviously broken. I will continue investigating tomorrow.
[Nexus 9 Android Development] Syndrome666:
Thank you for your work. Wasn't really expecting you to start testing so soon, but thumbs up in either case. Let me know when you need anything else tested.
[Nexus 9 Android Development] gladiac:
Hi [MENTION=6029845]Syndrome666[/MENTION], I figured out what went wrong with the last dry-run version. Here is a fixed one! (I removed the old one to avoid confusion)... Please, if you find the time, run this version and send me over the resulting boot-new.img. If all goes well I will release a v6 for you to test.

Cheers!
[Nexus 9 Android Development] Syndrome666:
Okay, so I just ran the new dryrun v6, seemed to run successfully this time. I'm currently not near a desktop or laptop machine, so I can't adb pull boot-new.img but if it's possible to access the file from the root directory, I can pull it from my Nexus 6 directly (my device is rooted). I just can't find the "tmp" folder in the "/" directory. Is it placed somewhere else once I boot my device back up? If I can't access it on my phone directly, I'll pull it via terminal on my desktop once I get back to my place in a couple of hours.
[Nexus 9 Android Development] gladiac:
Ok, no problem. This version will copy the resulting boot-new.img to /sdcard (which is your internal storage). I hope it just works. I just hacked it in and didn't test it a lot.

// UPDATE: I forgot to explain. /tmp is only temporarily available and all its content gets lost after reboot. So if you run fed_patcher in twrp and reboot the device you will find that /tmp is empty or filled with other stuff. It is a virtual directory which is not persistent on flash. If you have a look at your mount-table via "mount" on the terminal you will see the following:

tmpfs on /tmp type tmpfs (rw,seclabel,relatime)

tmpfs is the filesystem for /tmp. This filesystem stores its content only it RAM.
[Nexus 9 Android Development] Syndrome666:
Worked perfectly this time, I've attached boot-new.img
[Nexus 9 Android Development] gladiac:
Very good, thanks for your help. The boot-new.img you just uploaded looks perfectly fine! Well... Here is v6. Please run it on the problematic rom and tell me if it worked this time :).
[Nexus 9 Android Development] Syndrome666:
No problem, glad I could help. I'll report back in about an hour.
[Nexus 9 Android Development] Syndrome666:
Just installed and flashed fed-patch v6, works as advertised. A major thank you for creating this patch!

Just on a side note, would this work for future updates (Android 6.0 and up) on Nexus 6, 9, upcoming Nexus devices, and any other Android devices with encrypted boot?
[Nexus 9 Android Development] gladiac:
I am glad to hear that it works!

In theory, fed-patcher should work on every rom no matter what android version it has. But it does not work on every device because fed-patcher has a whitelist of supported devices. This is necessary because depending on the device the location of the boot-partition differs as well as the fstab filenames. Luckily, adding new device support is easy.
[Nexus 9 Android Development] gladiac:
Hello everybody,

I just released version 6!

In this release, FED-Patcher will enforce the same structure for the patched boot.img that the original boot.img had. Additionally, the kernel commandline will also be taken over. This should fix pretty much every case where devices would not boot after patching.

Special thanks to [MENTION=6029845]Syndrome666[/MENTION] for helping me test this new version!

Enjoy
[Nexus 9 Android Development] ProfLonghair:
Please define 'full wipe'.

I tried doing backups, followers this script to install the latest version of Android http://xdaforums.com/showpost.php?p=62749817&postcount=3

Flashed twrp, booted into twrp, and when I did a flash, I did system, caches, and data. Then it said I had no OS installed, so I tried it again, following that script, flashing twrp again, then only doing a wipe of cache and data. All of this without booting I to Android itself so far, just bootloader and recovery. I then ran the fed-patcher, it said it worked, but when I booted, it still said encrypted. What am I doing wrong?
[Nexus 9 Android Development] gladiac:
Hi,

I am not exactly sure what you did but here is the generic installation process:

Unlock bootloader

Install custom recovery (TWRP)

Install desired ROM

Run FED-Patcher

Do a "full wipe" => in TWRP do "Wipe" - "Format Data". Don't wipe System or anything else because that also wipes your OS.

Reboot

This should leave you with your desired ROM without forced encryption flag and without encrypted /data partition.
[Nexus 9 Android Development] Muuhmann:
Hello,

so I just flashed a new rom, rebootet, rebootet into recovery, flashed your file and did a factory reset + internal storage wipe.

How do I check if the encryption really was removed?

Under "Security" in the Settings it still says "encrypted"...
[Nexus 9 Android Development] gladiac:
Hi,

well, in your Settings under the Security-Menu - if android offers you to encrypt to "Encrypt tablet" then you are not encrypted. I attached screenshots to this post.

Additionally, TWRP will start a lot quicker. (The TWRP logo only shows for 3 seconds instead of 15-20)

cheers
[Nexus 9 Android Development] Muuhmann:
ok, here's what it says for me. It says "encrypted".. so, I am guessing it didn't work?
[Nexus 9 Android Development] gladiac:
Uhm, yes, it seems like it did not work. What rom are you on? Maybe this is another case where FED-Patcher did not work as expected.
[Nexus 9 Android Development] Muuhmann:
Latest Pure Nexus Project Rom..

It says "Disabled forced encryption" in the "Features" list..

Maybe that means, I wouldn't need your patch to begin with?
[Nexus 9 Android Development] gladiac:
Yes, in theory you should not need my patch because the force-encrypt flags inside fstab should not be in this rom. I'm downloading "pure_nexus_flounder-5.1.1-20150916.zip" to have a closer look at this rom. It is possible that the settings-menu of Pure Nexus has a bug. Can you check how quickly the TWRP logo vanishes?
[Nexus 9 Android Development] Muuhmann:
No need! I reflashed everything without your patch and now forceencryption is disabled.

TWRP needs 3 secs only and I have the option to encrypt the tablet like in your screenshot

Thanks for your quick help!
[Nexus 9 Android Development] gladiac:
Alright! Thanks for the info!
[Nexus 9 Android Development] ProfLonghair:
Ah, THAT full wipe. Thank you, that did the trick.
[Nexus 9 Android Development] gladiac:
Hello everybody,

just to let you guys know - I just checked the new marshmallow factory image for flounder (MRA58K) and flounder_lte (MRA58K) => FED-Patcher should work for these new images too.

Enjoy!
[Nexus 9 Android Development] itlnstln:
Did you happen to notice if there is a "compromised device" warning on boot?
[Nexus 9 Android Development] gladiac:
I did not actually install marshmallow yet - I only checked the structure of the boot-image. I would assume that the stock factory image would not prompt the error because /vendor/build.prop and /system/vendor.prop are both original. A patched boot-image does not change that.

On the other hand, this is a new operating system => who knows :).
[Nexus 9 Android Development] Max128:
I have exactly this error after flashing the fed-patcher. Normally I install a custom rom but for now i installed the factory image marshmallow
[Nexus 9 Android Development] gladiac:
Oh, now I understand. So this is a _new_ error-message (not the build.prop variety problem). Well, the patched boot-image is not signed. Maybe that is something Android 6 checks for. I might have to do some more investigation on this matter but my time schedule is pretty tight lately.

Can you please check if your device is indeed unencrypted?
[Nexus 9 Android Development] rroohh93:
Hello there, hope you can help me since you are very knowledgeable about Encrypted Devices. I've been having issues with my Flouder LTE ever since i started using the Android M Dev Previews and i thought was a problem of the dev preview. but now im on the first android m build and still having the same issue.

when i flash twrp it asks me for a password which i dont know, i havent set up one (yes i already factory reset m tablet many times trying to get rid of that) on the GUI.

i tried to use the one i had before resetting my tablet but it just wont take it. so i am unable to access the data partition because its encrypted so i cant flash anything to my tablet. do you know if there is a way to get rid of this message so i can flash your zip and finally have my nexus 9 without encryption?

thanks for the time.
[Nexus 9 Android Development] madbat99:
In twrp, wipe data. Not factory reset.

Sent from my Nexus 9
[Nexus 9 Android Development] gladiac:
Exactly - that should work!
[Nexus 9 Android Development] rroohh93:
Yes i saw it but i noticed that is not necessary because of flashing this zip is because twrp is installed apparently.

look: http://gadgets.ndtv.com/mobiles/new...ng-system-safety-warnings-in-android-m-720797

---------- Post added at 07:48 AM ---------- Previous post was at 07:40 AM ----------

it worked! thanks so much! i notice the speed up at boot and apps load a lil bit faster.
[Nexus 9 Android Development] Max128:
Yes the device is still unencrypted.

Is exactly like this link: http://gadgets.ndtv.com/mobiles/new...ng-system-safety-warnings-in-android-m-720797

Is the red exclamation ( Your device is corrupt. )

It is possible to disable this? I think it comes from the boot.img.
[Nexus 9 Android Development] gladiac:
I think you are right - the logic for the red error message is part of boot.img (inside or ramdisk). I did some research on this matter here.
[Nexus 9 Android Development] Sayan1987:
I got a problem.

I was unencrypted.

I flashed 6.0 and android after boot said he was encryppting my device.

All works, if i browse my sd files i can see and watch them.

But when i go in twrp (it ask me a psw , which i didnt set) and try to flash a file i got on sd, all i see are empty folders.

What can i do? I guess i lost all files and need to flash userdata?
[Nexus 9 Android Development] mikebeatrice:
Do you have an android password on boot? If so, that's the password it needs.

If not, boot into android and set a password..can be a pattern, whatever you want. Then try picking the option to require that password during boot...I don't remember the exact phrasing....

After you do that, reboot to recovery and try entering that password in twrp.
[Nexus 9 Android Development] Sayan1987:
No i don't have password on boot.

I tried when in twrp instead skipping password to input the password i always use, probably i used that also when i first bought the tablet, but recovery keep saying uncorrect password.

After that i reboot tablet and android says me password correct but your data are corrupted, need a reset.

So i did that and now it works.

Thanks anyway for your help.
[Nexus 9 Android Development] gladiac:
The easiest way to disable dm-verification seems to be by removing the verify-flag from fstab. I created a new version of FED-Patcher to do that automatically. However, I want to test this a little more before releasing v7. I still don't fully understand why people are getting the red error message.
[Nexus 9 Android Development] gladiac:
Hello everybody,

I just released v7!

FED-Patcher will now disable dm-verity in fstab to get rid of the red error sign on marshmallow roms.

Enjoy!
[Nexus 9 Android Development] Max128:
I confirm is work, No more error. Thanks you !

Envoyé de mon HTC One M9 en utilisant Tapatalk
[Nexus 9 Android Development] NYCHitman1:
Yeeeeeeeeeah, this verity nonsense that Google added irritated the hell out of me. Removed it from the device tree altogether for DU. :good:
[Nexus 9 Android Development] sirdizzle415:
I don't suppose I can run this on a stock marshmallow rom for nexus 9 (flounder) with version 7, can I?
[Nexus 9 Android Development] gladiac:
Hi [MENTION=3706279]sirdizzle415[/MENTION],

v7 actually has support for stock marshmallow. I tested it and it works fine.

Enjoy!
[Nexus 9 Android Development] DanteGR:
So if I get this correctly after flashing the FED-PAtcher zip I ONLY have to wipe the "data partition" by going to wipe -> advanced -> and select only data.

Is this correct?

If this is correct then why would my Internal Storage be wiped??

Thank you so much [MENTION=362563]gladiac[/MENTION] for this!

Makes life much much easier :)
[Nexus 9 Android Development] gladiac:
Hey there,

you need to do "Wipe" - "Format Data". This will remove all your apps and settings as well as clear the internal storage.

The problem is that "Advanced Wipe" - "Data" does not really format the partition. It only removes all files in /data without wiping /data/media -> this approach does not get rid of the encryption. The reason why that does not really format /data is because /data and /data/media are 2 distinct things in android which share the same physical partition.
[Nexus 9 Android Development] DanteGR:
Thank you sir.

Much appreciated :)

PS: If I update my ROM then you say that we need to flash your zip again. Does this include fomatting data again so we loose all data, settings and internal storage? Cause that would be tiresome considering that I flash once every few days.

Thanks again!
[Nexus 9 Android Development] gladiac:
Hi again,

you only have to "Factory Reset" once! After that your data will stay unencrypted as long as you don't start your devices with a ramdisk that enforces encryption.

This is why you have to flash FED-Patcher after every upgrade :).
[Nexus 9 Android Development] DanteGR:
All understood!

THANK YOU!

Swiftkeyed from my Renovated HTC One M8
[Nexus 9 Android Development] sirdizzle415:
Is there a tool available (play store or otherwise) to show that the patch is in fact working?
[Nexus 9 Android Development] gladiac:
Hi,

its pretty easy. Go into your "Settings"-App. In "Security", if it offers you to encrypt your device it is unencrypted. If it says something like "Device is encrypted" it indeed is encrypted.

Cheers!
[Nexus 9 Android Development] sirdizzle415:
That was too easy! I don't believe you. :p

Thanks!!
[Nexus 9 Android Development] gladiac:
Well, I guess it would have been clever if I had added that little piece of information to the op, right? :) (I just did)
[Nexus 9 Android Development] adrok76:
Hi just to check, I'm coming from PureNexus ROM LP flashing SlimLP the device currently has encryption disabled through the ROM. When flashing a new ROM from this state I simply factory reset, flash rom, Gapps and V7 FED patcher and reboot, No need to format data?

Thanks in advance

Edit, yep still unencrypted!
[Nexus 9 Android Development] DanteGR:
I can't believe how much faster the device became after unencrypting it!

I urge all who are thinking about it to simply do it.

It's worth it 1000%!

Thanks again [MENTION=362563]gladiac[/MENTION] [emoji6]

Sent from my Nexus 9
[Nexus 9 Android Development] ricco333:
[MENTION=362563]gladiac[/MENTION] Thanks very much for the patch, running stock Marshmallow on my Nexus 9, decrypted and it flies, don't even have root and I don't miss it.

Erik
[Nexus 9 Android Development] gladiac:
I am glad you guys like it :)
[Nexus 9 Android Development] gladiac:
Hi guys,

just to let you guys know - I am going to investigate the bullhead (Nexus 5X) boot.img. The necessary factory image files are now available. If everything goes as expected a new version of FED-Patcher with bullhead support should be out pretty soon.

Cheers

//UPDATE: Well, it is finished. But I am not sure if I really should create a new thread inside the Nexus 5X forum. In fact, FED-Patcher is very generic. All supported devices can be patched with the same flashable ZIP. As a result, FED patcher is probably better suited inside a more generic forum. Hmmm...
[Nexus 9 Android Development] gladiac:
Hey everybody!

This project has been moved to HERE! Please post your problems, success stories and so on there from now on.

Cheers, gladiac
[Nexus 9 Android Development] dkryder:
hi. thanks for this , it worked very well. i used twrp 2.8.7.1 which changed a few things in order to fix the nexus 9 password problem and threw a error during the flash process but it did not affect anything i'm aware of as far as the outcome of this process goes. i did not write the error down and to be honest i'm not sure if it was due to something unique to my device or not. however i thought i would mention it to you since i noticed you used 2.8.7.0 and you may want to try the routine with 2.8.7.1. incidentally twrp now allows flashing images, i think that was new to this build? thank you again.
[Nexus 9 Android Development] gladiac:
Hey there,

alright, thanks for the heads-up! I will retest FED-Patcher which the new version.

Have a nice evening
[Nexus 9 Android Development] rroohh93:
Already did it. and if i just reboot to recovery it don't asks me for a password but whenever i boot into system and my device gets Encryption again it asks me again for a password. is there any default password or anything i can try?