yashsingh1/xdaforums huggingface dataset:
[Oppo Find 7 and 7a] beton87:
This was what I needed.

Oppo stock recovery wiped /data and lost /sdcard

It seems that it was the same in Samsung - /sdcard was always intact when resetting/wiping data.

non-LVM TWPR didn't mount partitions properly and didn't let me to format /sdcard

some CWM based recovery I found on XDA froze on "formatting /data" or "formatting /recovery"

I knew that simple format of both partitions should do it but it seems it would only work with LVM aware TWPR and the key was to format "raw" partition.
[Oppo Find 7 and 7a] Entropy512:
Oddly, the "raw" partition should only appear of an intact LVM config is present, so if you formatted /data, LVM-aware TWRP should still behave as if it is a non-LVM config. (e.g. you would have to format /sdcard - or I think it's called /internal_sd ? Don't have my non-LVM reference device with me)

OEM recoveries are SUPPOSED to fully wipe the device when doing a factory reset (there was a bit of controversy recently regarding the OnePlus not doing this). Although I think SOMETIMES on the Samsungs, whether /sdcard was formatted depended on if you did a wipe in recovery vs. doing it from the Settings menu. (Even if sdcard is hosed, you should be able to boot the device enough to wipe in Settings.)

I also got some more info this morning on why lvmsetup is failing on TWRP 2.8.0.1 - someone who had those issues finally pulled /tmp/recovery.log, and it seems that even if you manually unmount /sdcard, it somehow remains mounted, which causes lvmsetup to fail to create a PV on the sdcard partition. I'm going to look into why this happens later this week.
[Oppo Find 7 and 7a] Entropy512:
OK. There's a minor bug in recent TWRP releases where it seems to insist on constantly remounting the internal SD. It also double-mounts the internal SD, also mounting it to /and-sec

This is what causes the following failure in recovery.log:

Can't open /dev/block/platform/msm_sdcc.1/by-name/sdcard exclusively. Mounted filesystem?
run_program: child exited with status 5

when setuplvm attempts to pvcreate on the sdcard partition

Workaround: Explicitly unmount /and-sec in the recovery script.

Attached is:

Updated setuplvm which works with recent TWRP releases (should include 2.8.0.1) - it REQUIRES an LVM-aware recovery now, and no longer flashes its own LVM-aware recovery

A repost of removelvm which should be self-explanatory and should work with nearly any recovery other than stock

Later this week I'm going to work on splitting this into two threads: Reference for developers, and reference for users. This thread was intended to be the developer reference for people wanting to implement LVM into their projects. :)

EDIT: REMEMBER, AS HAS BEEN STATED BEFORE: YOU MUST FLASH THIS FROM THE EXTERNAL SD. FLASHING FROM THE INTERNAL SD OR ADB SIDELOAD WILL FAIL.
[Oppo Find 7 and 7a] magostinelli:
Thank you [MENTION=591147]Entropy512[/MENTION] can you confirm the following procedure:

backup data (include /sdcard)

flash the twrp recovery 2.8.0.1

reboot into recovery

wipeall

flash setuplvm

reboot into recovery

flash rom.zip
[Oppo Find 7 and 7a] beton87:
@up

You're right.

4. wipe all - this is not necessary because setuplpm formats /data and /sdcard - thats a full wipe, you can wipe cache and dalvik cache

But it won't hurt if you wipe it too.

If you had Omni before, you don't have to flash it again :) /system is not affected.

So for previous Omni users (with Omni and TWRP 2.8.0.1)

1. Backup

2. Reboot to recovery

3. flash latest setuplvm

4. wipe cache and dalvik

5 reboot

Edit: I think Entropy512 mentioned that restoring backup from non-lvm to lvm configuration causes weird permission issues. I just let google play to restore all my apps and contacts and it's working like a charm .
[Oppo Find 7 and 7a] theradec:
Still getting error executing updater binary while trying to flash setuplvm_find7_FULL_WIPE_10282014.zip with TWRP 2.8.0.1 (installed with TWRP Manager) :(

please find attached the recovery.log as requested

Wonder if I shoud install TWRP with fastboot
[Oppo Find 7 and 7a] Entropy512:
script aborted: This package is for "FIND7" devices
this is a "find7a".
This package is for "FIND7" devicesthis is a "find7a".

The recovery installed by TWRP Manager is BOGUS. Official TWRP hasn't reported as "find7a" in many months.

I don't know where TWRP Manager even found such a recovery, something like that hasn't been built in ages. (Does it even report as being TWRP 2.8.x when it boots???)

Use fastboot or Flashify (with Flashify, manually download the recovery image from TWRP's site and flash it. I don't trust automatic-fetch apps any more...)

Edit: After a little bit of testing, and talking with Dees_Troy:

find7a is mostly deprecated, but apparently, it might still be building from the (long dead) find7a device tree

TWRP's site SHOULD be rerouting all requests for find7a to the find7 image file, but it looks like that might not be working properly for TWRP Manager

End result: ALL users (both 7a and 7s) should download the "find7" TWRP images (not "find7a" images, these are obsolete) from TWRP's site, and if they choose to risk TWRP Manager, they need to choose "find7" instead of "find7a"
[Oppo Find 7 and 7a] Entropy512:
No need for 4, that hasn't been needed in ages.

So (assuming you're already on Omni and a proper release of TWRP 2.8.0.1 or later):

Backup internal SD to PC or external SD

Backup apps with TiBu or whatever to external SD

Flash the new setuplvm from a few posts back

Reboot

Restore internal SD contents

Restore "Missing apps and data" only with TiBu or whatever (WARNING: Possibility of weird behavior here. If stuff seems flaky, wipe and don't restore anything)

I eventually want to figure out how to get a recovery backup from split partitions to restore properly on a device with emulated partitions, but that isn't working yet.
[Oppo Find 7 and 7a] theradec:
That was it

Was using the one supposedly for my device instead of the unified Find7 one.

Flashed SetupLVM

Was a bit scary as I got lots of red "can't find internal SD and all those (sorry forgot to get the recovery.log)

rebooted recovery

Storage showed 0Mb

Rebooted phone and forgot to press vol- so OS booted

But LVM seems to have work as Storage shows

Internal Storage 12.18GB

BTW, if you are on Dirty Unicorns 8.1, you can do like Omni and just flash LVM.
[Oppo Find 7 and 7a] Entropy512:
After the process completes, there are some "errors" that TWRP spits out unrelated to the ZIP that are expected.

Since the ZIP formats the internal_sd and data partitions, TWRP won't be able to remount them when the ZIP finishes (TWRP tries).

That's why the ZIP says to reboot recovery. However, recovery reporting 0MB after you rebooted recovery worries me... After rebooting, an LVM-aware TWRP should be seeing the LVM storage.
[Oppo Find 7 and 7a] theradec:
Just rebooted in Recovery and in [Mount] internal storage still at 0

Which probably means flashing new rom would be difficult

Tomorrow I will try to go back to twrp_lvm_09012014.img and see if it detect LVM properly or not.

(if it's compatible with the new LVM)

and if you need any other logs, please ask
[Oppo Find 7 and 7a] Entropy512:
Where did you flash this TWRP release from? It sounds like you again have a non-LVM-aware TWRP - I cannot reproduce these problems with TWRP 2.8.0.1 from the official site ( http://techerrata.com/browse/twrp2/find7 )

Also, HOW did you flash it? I tried playing with TWRP Manager again:

It has issues with selecting a different device to download if you've already selected one.

Its feature to flash an image of your own choosing is completely broken - you can't actually select the image file

So at this point:

I AM NO LONGER SUPPORTING ANYONE WHO FLASHES TWRP VIA TWRP MANAGER.

Please use fastboot or Flashify's "flash image" function. (I don't trust auto-downloaders)
[Oppo Find 7 and 7a] theradec:
I did exactly as you told us to do

TWRP Manager was uninstalled the second you explained how broken it was.

And I just didn't even wanted to try flashify.

Like always almost CLI >>> GUI

So,

I downloaded the TWRP from their Official site

techerrata.com/file/twrp2/find7/openrecovery-twrp-2.8.0.1-find7.img

The openrecovery-twrp-2.8.0.1-find7.img I got has an md5 hash of 5b11966ec631ce6638922d2f4ca40b34, same as source

img file was copied in same folder as adb.exe and fastboot.

I rebooted the phone to bootloader and typed

fastboot flash recovery openrecovery-twrp-2.8.0.1-find7.img

Now I just want to know what would be best course of action

Re-flash TWRP 2.8.0.1 ?

Remove LVM and Re apply it (may not work if Internal storage is seen as 0Mb

Do both ?

Go back to twrp_lvm_09012014.img and try with old setuplvm ?
[Oppo Find 7 and 7a] Entropy512:
If 2.8.0.1 is not reporting any storage, but an LVM-aware firmware (Omni, DU) is running fine in LVM mode, something is strange.

I need /tmp/recovery.log from recovery

adb pull /tmp/recovery.log

from your desktop when you're booted into TWRP with USB connected
[Oppo Find 7 and 7a] theradec:
Hopefully this will help you understand what went wrong
[Oppo Find 7 and 7a] beton87:
Get recovery from this post: http://xdaforums.com/showpost.php?p=55187001&postcount=558

It's the twrp_find7_lvm_09012014.img

I did setup with this version and it worked.

Now Entropy512 is working hard with maxwen to bring up lollipop on find7. I thihk recovery update was left to be done later, we didn't get lastest TWRP build too. I think he mentioned that they wanted to do some larger changes to support LVM in recovery properly but it was not finished. There are still issues with TWRP 2.8.0.1 and LVM.
[Oppo Find 7 and 7a] theradec:
Thank for your help

Checking procedure

flash twrp_find7_lvm_09012014.img on top of mine

reboot recovery

done ?

Or do you think I should flash setuplvm_find7_FULL_WIPE_09012014.zip after recovery reboot too ?

(Phone is already lvm partitioned, it's just twrp that can't see it)
[Oppo Find 7 and 7a] beton87:
Just fash the recovery, it's no need for setting up LVM again.

I do it with fastboot, flashify is also ok. You have to reboot phone to enter recovery ;)

You can check if it's ok by downloading latest nightly and trying to flash it from recovery.
[Oppo Find 7 and 7a] Entropy512:
I haven't worked on LVM in ages because there's no work to be done. It's working solid EXCEPT for the fact that there seem to be broken recoveries all over the place.

I need you to do the following:

adb shell ls /

when booted into recovery

For some odd reason, I don't know why, but TWRP is not detecting LVM on your device even though it is set up. As a result, it's trying to mount the /sdcard partition and failing because it's an LVM member instead of an ext4 partition (that's what all of the LVM2_member spam is). I've tested the latest official TWRP 2.8.0.1 and don't have this problem, so I'm at a loss as to why you're having it.

Also, please give me the md5sum of the TWRP image you flashed. It should be 5b11966ec631ce6638922d2f4ca40b34 per TWRP's site
[Oppo Find 7 and 7a] RagingHarry:
For some odd reason i had to use the alpha edition of twrp you ( [MENTION=591147]Entropy512[/MENTION] ) released at first to get lvm working on my 7s to start with, when not using the alpha but later releases, all ended up in errors that it couldn't set it up properly.

After some time i had some trouble, couldn't get it fixed with twrp 2.8.*.

Then flashed the alpha twrp you released in this thread, flashed the zip that changed to stock layout first to make sure that lvm setup could do it's stuff, then flashed the lvm setup, then flashed twrp 2.8.* (latest available) then installed OmniROM again, everything is just fine since then...

Didn't keep logs of it, but this was the sequence I used to get everything working, and havn't had any troubles since.
[Oppo Find 7 and 7a] theradec:
adb shell ls /
----------------------
ls /
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
and-sec
boot
cache
charger_find7a
data
default.prop
dev
etc
external_sd
file_contexts
fstab.qcom
init
init.rc
internal_sd
license
proc
property_contexts
recovery
res
root
sbin
seapp_contexts
sepolicy
supersu
sys
system
tmp
ueventd.qcom.rc
ueventd.rc

TWRP image comes from TWRP site and was flashed manually with flashboot

md5 checksum match (as you can see in attached pic)

Do you think it's safe to flash back your old lvm aware recovery, remove lvm and flash your old lvmsetup ?

Atm my phone is walking on 3 legs, but it's still better than being bricked
[Oppo Find 7 and 7a] beton87:
Yes, I had the same issue and it is exactly what I did.

Flash twrp_find7_lvm_09012014.img with fastboot

flash remove lvm

flash setup lvm
[Oppo Find 7 and 7a] Entropy512:
OK, something is REALLY weird there. At first glance (I need to double check some things tonight) your config there appears not to be an LVM-aware recovery... But I've personally tried 2.8.0.1 and I'm positive it was LVM-aware.

find7 never received 2.8.1.0 for some reason, I'm going to talk to Dees about doing a release. That should fix a few things, I also need to make an update to TWRP to prep for 5.0
[Oppo Find 7 and 7a] Entropy512:
OK, I'm REALLY confused now.

The md5sum of what you're flashing matches what I'm flashing.

HOWEVER:

What you are actually running is clearly different than what I have on my device. All of the LVM support scripts, etc. are missing from your recovery ramdisk. They're present in mine, even though supposedly we flashed the exact same thing.

Have you ever had KitKat ColorOS flashed on your device? It seems like the light bootloader locking Oppo applied has done some WEIRD things with respect to recovery flashing on some people's devices.
[Oppo Find 7 and 7a] Wendigogo:
[Wrong thread]

I'm not sure how this lvm implementation works ...

If I wipe /data in a twrp lvm compliant recovery, what will happen? It will wipe only /data stuff in lvm pool or the whole "partition" (including internal sdcard)?

Enjoy!

EDIT : I want to make a "factory reset" but without erasing my personnal datas (photos etc.).

[/Wrong_thread]
[Oppo Find 7 and 7a] theradec:
Nope

Find7a came with COS 1.20i

As I was enjoying Mokee on myXiaomi MI2S, I flashed that Rom on the 7a too.

Unfortunatly, as with many CM based rom, I had a black flickering horizontal bar glitch.

So I went with TeamEOS for a long time till I tried Dirty Unicorns.

Then LVM

At first I was unabled to use LVM because I was using the logical TWRP for Find7a, not knowing this was a dead branch shoud have been cut long ago.

You helped me get the proper TWRP, and after reading your post about TWRP flash tools, I decided it was best to follow your advice and flash recorvery manually.

Could there be some leftovers of the 7a TWRP ?

Thank you for your time

PS: Maybe I should buy you a box of Aspro instead of a pack of beer :p
[Oppo Find 7 and 7a] Entropy512:
I'm going to tlak to Dees_Troy about doing a TWRP 2.8.1.0 release this weekend, that should solve many of these issues once and for all.

On an unrelated note, some linkdumps for future reference regarding questions people have had about performance of LVM:

http://unix.stackexchange.com/questions/7122/does-lvm-impact-performance

http://www.phoronix.com/scan.php?page=article&item=fedora_15_lvm&num=2 (need to look into the barrier writes thing here, I don't believe we are doing anything different with LVM in this regard on find7, unlike Fedora)

http://www.umiacs.umd.edu/~toaster/lvm-testing/ - No noticeable performance degradation unless using a VERY screwy (as in unrealistic and no sane person would use it in a production environment) setup, and even then, negligible impact

http://serverfault.com/questions/209461/lvm-performance-overhead - far less info here other than "snapshot is bad for performance" - we don't use snapshot

http://www.hasenstein.com/lvm_whitepaper.pdf - No measurable performance impact on page 9

http://blog.andrew.net.au/2006/08/09 - LVM impact less than measurement variation
[Oppo Find 7 and 7a] maxwen:
[MENTION=591147]Entropy512[/MENTION] we also need to test encryption with lvm now that it works on split layout
[Oppo Find 7 and 7a] beton87:
[MENTION=591147]Entropy512[/MENTION]

You guys did a great job. From what I understand if you implement dm-req-crypt then Omni will support encryption on Quallcomm devices without performance issues like on nexus?
[Oppo Find 7 and 7a] Entropy512:
Yup... hopefully later this week.

Yeah, although it could lead to some interesting challenges. dm-req-crypt devices won't be compatible with dm-crypt (AOSP encryption) devices, and honestly - TWRP probably needs support for it. (However it's probably the "answer" to TWRP supporting HTC device encryption, among other devices.) dm-req-crypt is mostly offtopic though.
[Oppo Find 7 and 7a] Entropy512:
I'm waaay overdue for a documentation update and code cleanups now...

Just putting this here for future reference in my documentation update (Coldbird's solution HAS hardbricked devices) - http://www.oppoforums.com/threads/t...ut-for-oppo-find-7a.17952/page-80#post-307948
[Oppo Find 7 and 7a] znarf2369:
Maybe just a very minor thing, but lvm seems to mess up something in the storage section of settings (just look at the colors and the numbers). (file is attached)
[Oppo Find 7 and 7a] Entropy512:
It seems like sometimes Android will accidentally double-count stuff in multiple categories. I believe this is a general Android issue that affects any device that has emulated storage and high disk usage, although I'm not entirely sure.
[Oppo Find 7 and 7a] theradec:
Is TWRP 2.8.3.0 lvm aware ?

Can I upgrade isafely on my strange phone to see if TWRP will finally see the lvm storage or do I need to do something before ?
[Oppo Find 7 and 7a] kishd:
Yes it does support lvm.
[Oppo Find 7 and 7a] kishd:
Just installed ColorOS 2.0.4i. Used twrp to install and color is now lvm aware.
[Oppo Find 7 and 7a] hulicow:
[MENTION=591147]Entropy512[/MENTION] Sir, what are your thoughts about this? http://www.oppoforums.com/threads/5-x-namelessrom-all-variants.22451/page-24#post-299859 Coldbird said that his method has more faster I/O times and LVM causes much overhead. Thanks.
[Oppo Find 7 and 7a] maxwen:
Has been answered already here
[Oppo Find 7 and 7a] Entropy512:
Please read the posts in this thread before posting.

The TL;DR summary is - Coldbird is an idiot who is spouting bull**** that is in direct conflict with over a decade of benchmarking. (see my post earlier for more...) He also claims that his method is safe when it's proven to frequently screw up half the partitions in the device and has hardbricked at least two devices in the past two weeks. http://www.oppoforums.com/threads/t...ut-for-oppo-find-7a.17952/page-80#post-307948 and http://www.oppoforums.com/threads/t...ut-for-oppo-find-7a.17952/page-82#post-313608 for example
[Oppo Find 7 and 7a] znarf2369:
Hey entropy, just asking. If there will be newer zips than the 10/28 one (I unfied with this) then should I kind of "update" my lvm setup by flashing this? Will there even be a new zip or is the 10/28 the best thing possobile to setup lvm?

EDIT: Ok you already said that lvm is fine and only recovery stuff need a little more work.

So maybe, when its done and you do the documentation (dunno what you exactly mean by that, sorry), how about the idea to open a "downloads" section in this thread where you attach the final lvm setup zip and undo zip so people have easy and instant acess to both of these files? ;)
[Oppo Find 7 and 7a] lesscro:
Entropy, you kill me... so funny war about partition...

No need to enter in conflict...

If you already explain about LVM, non need more... if people are dispointed by Unified method... and won't read result of two methods... left him go to wall...

FAIL is a best way to learn but give some crying...

i use Coldbird method using a beta from Oppo... no more Coldbird method...
[Oppo Find 7 and 7a] Entropy512:
Probably unlikely, since the 10/28 one seems to be working fine. The actual LVM configuration is unlikely to ever change, the only reason to change the ZIPs is to make the conversion process more reliable. But it seems like it's solid with the 10/28 version.

I just need to find the time to organize/clean up the documentation. I've been really burned out lately due to non-Android stuff. :(

Yeah, the thing is, Coldbird blatantly lied in that post (or he's completely clueless/lazy and didn't bother to do any research into the reality of LVM performance, and instead decided to just talk out of his ass with no evidence to back up his claims), and people keep on pointing to it. That pisses me off.
[Oppo Find 7 and 7a] theradec:
I have upgraded TWRP to 2.8.3.0 on my crancky Find7a and now it's correctly reporting the free space in mount \o/

Thanks a lot Entropy and Dees_troy

Is there any logs I could look at to check if everything is fine now or if I should reapply b

LVM for example
[Oppo Find 7 and 7a] leungclj:
I would like to report that "Removelvm_find7_FULL_WIPE.zip" works in TWRP 2.8.3.0, but "setuplvm_find7_FULL_WIPE.zip" does not, I had to revert back to the custom made recovery "twrp_find7_lvm_09012014.img" to flash the "setuplvm_find7_FULL_WIPE.zip".

I have two OPPO find 7 and both device behaved as described above.
[Oppo Find 7 and 7a] Entropy512:
Which ZIP? You need 10282014 from http://xdaforums.com/showpost.php?p=56348347&postcount=60 for TWRP 2.8.0.1 and later.

(If 2.8.0.1 works but 2.8.3.0 doesn't, there's a new problem. But I haven't heard any other people report issues with 10282014 and 2.8.3.0)
[Oppo Find 7 and 7a] maxwen:
You might ping Dees about it.

Can remember he mentioned something was different when building 2.8.3.0 for find7.
[Oppo Find 7 and 7a] Entropy512:
One thing I did notice is that 2.8.3.0 fails to "fastboot boot" while 2.8.0.1 is OK (On 7a, will try 7s tonight)
[Oppo Find 7 and 7a] darrenpauli:
Risks?

Can I commit an offence and ask a TLDR of sorts for myself and I suspect others in the same boat who are comfortable with the GUI-based ROM flashing (and maybe ADB pushing) but know nil about actual Android development:

I've never bricked a thing using iOS jailbreaks or Android ROM flashing. What are the chances of a brick or complications with this?

Would you say if you can follow and flash, you can do this? Or is there a prerequisite knowledge required as complications are more likely than ROM flashing?

Thanks, and that's the last question I'll ever ask without reading every post.

d

(Find 7s on Nameless / OmniRom)
[Oppo Find 7 and 7a] leungclj:
I consider myself one of those people you mentioned. There really aren't any issue or complications as long as you follow the instruction provided. I have messed around with flashing LVM, removing LVM, wiping internal storage of all sort, and my device is still working as intended. I don't think there were any cases LVM brick any phone yet.
[Oppo Find 7 and 7a] leungclj:
ok, I apologize for not noticing there was the newer setuplvm_find7_FULL_WIPE_10282014.zip, and i was using the older setuplvm_find7_FULL_WIPE_09012014.zip.

I am getting two more find 7s tomorrow. May be I will record a video tutorial from unboxing to flashing LVM to flashing ROM.
[Oppo Find 7 and 7a] Entropy512:
In general, the risk of bricking is fairly low IF you flash something that was intended for your device and tested by the developer.

Especially a "hardbrick", which on most devices can't be recovered from without JTAG (Oppos are an exception here, even hardbricks can be recovered from)

A "softbrick" usually just needs reflashing of stock firmware or whatever.

One of the exceptions is Coldbird's partitioning method, which alters the partition table of the device and has hardbricked at least two devices recently, plus has also really screwed up a bunch of others. LVM was specifically developed on the Find 7 to provide a MUCH safer and easier alternative. The implementation I use includes a number of safety features intended to prevent accidentally doing major damage.
[Oppo Find 7 and 7a] darrenpauli:
Thanks mate, that's great to hear :)
[Oppo Find 7 and 7a] ayysir:
i know this may be asking too much but [MENTION=591147]Entropy512[/MENTION] any way to tut how to implement lvm coding/implement into roms