Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,813,216 Members 53,376 Now Online
XDA Developers Android and Mobile Development Forum

[REF] LVM Partition Remapping

Tip us?
 
maxwen
Old
#11  
Senior Member
Thanks Meter 4,521
Posts: 4,295
Join Date: Jun 2012

 
DONATE TO ME
Quote:
Originally Posted by ayysir View Post
how are the *.std files created?

atm this is tough for me to port from omni to cm base which AOSPA Oppo trees
the std files are also part of the device tree
https://github.com/omnirom/android_d...id-4.4/configs
 
Entropy512
Old
#12  
Senior Recognized Developer - OP
Thanks Meter 24,376
Posts: 13,277
Join Date: Aug 2007
Location: Owego, NY

 
DONATE TO ME
Quote:
Originally Posted by ayysir View Post
how are the *.std files created?

atm this is tough for me to port from omni to cm base which AOSPA Oppo trees
For the fstabs - they are simply moves/renames of the fstab files and other storage-related items from the standard Oppo configuration (they should appear as renames/moves in the Gerrit commit...)

For the init.fs.rc file - all of the "export <blah>_STORAGE" lines from init.qcom.rc/init.find7.rc are cut out of the RC file and put into .std

Obviously, the .lvm versions of the files are the ones where the fstab has been altered to support a single data partition with emulated storage.
*so much sig updating needed*

My Github profile - Some Android stuff, some AVR stuff

An excellent post on "noobs vs. developers"

A few opinions on kernel development "good practices"

Note: I have chosen not to use XDA's "friends" feature - I will reject all incoming "friend" requests.

Code:
<MikeyMike01> Smali is a spawn of hell
<shoman94> ^^^ +!
Code:
<Entropy512> gotta be careful not to step on each other's work.  :)
<Bumble-Bee> thats true
<jerdog> compeete for donations
 
Wendigogo
Old
#13  
Senior Member
Thanks Meter 311
Posts: 523
Join Date: Jun 2010
Location: Lyon

 
DONATE TO ME
Amazing work and amazing posts. Thanks a lot for your sharing. 👍

I've got a question related to your configuration (/data and /sdcard merged) : are the LV hot-resizables?
French OPPO Ambassador
 
Entropy512
Old
#14  
Senior Recognized Developer - OP
Thanks Meter 24,376
Posts: 13,277
Join Date: Aug 2007
Location: Owego, NY

 
DONATE TO ME
Quote:
Originally Posted by Wendigogo View Post
Amazing work and amazing posts. Thanks a lot for your sharing. 👍

I've got a question related to your configuration (/data and /sdcard merged) : are the LV hot-resizables?
In theory, you could probably use some of the ext4 resizing tools to do something like this, but I haven't looked into it as there isn't much point in the current config (since the LVM userdata volume is allocated to use all space on the volume group).

Something like that might be more useful if someone ever uses LVM to regain some of the wasted /system partition space on certain excessively bloated devices (like some GS4 units).
*so much sig updating needed*

My Github profile - Some Android stuff, some AVR stuff

An excellent post on "noobs vs. developers"

A few opinions on kernel development "good practices"

Note: I have chosen not to use XDA's "friends" feature - I will reject all incoming "friend" requests.

Code:
<MikeyMike01> Smali is a spawn of hell
<shoman94> ^^^ +!
Code:
<Entropy512> gotta be careful not to step on each other's work.  :)
<Bumble-Bee> thats true
<jerdog> compeete for donations
The Following User Says Thank You to Entropy512 For This Useful Post: [ Click to Expand ]
 
Wendigogo
Old
#15  
Senior Member
Thanks Meter 311
Posts: 523
Join Date: Jun 2010
Location: Lyon

 
DONATE TO ME
Quote:
Originally Posted by Entropy512 View Post
In theory, you could probably use some of the ext4 resizing tools to do something like this, but I haven't looked into it as there isn't much point in the current config (since the LVM userdata volume is allocated to use all space on the volume group).

Something like that might be more useful if someone ever uses LVM to regain some of the wasted /system partition space on certain excessively bloated devices (like some GS4 units).
Thanks for your answer.

Seems I misunderstood the way it's implemented here. All space is allocated to /data? So there's no more internal sdcard right?
But in that case an external sdcard is mandatory. How is it managed when there's no sdcard?

Enjoy!
French OPPO Ambassador
 
Entropy512
Old
#16  
Senior Recognized Developer - OP
Thanks Meter 24,376
Posts: 13,277
Join Date: Aug 2007
Location: Owego, NY

 
DONATE TO ME
Quote:
Originally Posted by Wendigogo View Post
Thanks for your answer.

Seems I misunderstood the way it's implemented here. All space is allocated to /data? So there's no more internal sdcard right?
But in that case an external sdcard is mandatory. How is it managed when there's no sdcard?

Enjoy!
Android has supported emulated storage (where /data/media is mapped to /sdcard with a special FUSE daemon that makes /sdcard have DOS-like permissions despite an underlying ext4 partition) since ICS. It's pretty much the standard in all new devices - the Find 7 is to my knowledge the only device launched in 2014 not to use emulated storage. Most devices in 2013 also did - Oppos were again the rare exception.

As I understand it - for some reason Chinese users prefer the legacy pre-ICS partitioning scheme. My guess is due to UMS vs. MTP - MTP is required for access to emulated storage, UMS can't be used, but a lot of older desktop OSes have issues with MTP. So Oppo finds themselves in conflict between their home market (China) and expanding in the West. That said, the Find 7 was kind of a screwup in achieving this goal, since the internal sdcard partition was ext4 which meant UMS was a no-go for it.
*so much sig updating needed*

My Github profile - Some Android stuff, some AVR stuff

An excellent post on "noobs vs. developers"

A few opinions on kernel development "good practices"

Note: I have chosen not to use XDA's "friends" feature - I will reject all incoming "friend" requests.

Code:
<MikeyMike01> Smali is a spawn of hell
<shoman94> ^^^ +!
Code:
<Entropy512> gotta be careful not to step on each other's work.  :)
<Bumble-Bee> thats true
<jerdog> compeete for donations
The Following 5 Users Say Thank You to Entropy512 For This Useful Post: [ Click to Expand ]
 
Wendigogo
Old
#17  
Senior Member
Thanks Meter 311
Posts: 523
Join Date: Jun 2010
Location: Lyon

 
DONATE TO ME
Quote:
Originally Posted by Entropy512 View Post
Android has supported emulated storage (where /data/media is mapped to /sdcard with a special FUSE daemon that makes /sdcard have DOS-like permissions despite an underlying ext4 partition) since ICS. It's pretty much the standard in all new devices - the Find 7 is to my knowledge the only device launched in 2014 not to use emulated storage. Most devices in 2013 also did - Oppos were again the rare exception.

As I understand it - for some reason Chinese users prefer the legacy pre-ICS partitioning scheme. My guess is due to UMS vs. MTP - MTP is required for access to emulated storage, UMS can't be used, but a lot of older desktop OSes have issues with MTP. So Oppo finds themselves in conflict between their home market (China) and expanding in the West. That said, the Find 7 was kind of a screwup in achieving this goal, since the internal sdcard partition was ext4 which meant UMS was a no-go for it.
I've got it now. Thanks for your explanations

I saw that Oppo phones didn't follow Android guidelines (yet?) by not using the emulated_storage mounting method but I didn't know why.

And your right, mtp doesn't work in Windows XP (or is hard to make working) and there's a lot of Asian people still using it. Obvious once you said it...

And that's also why only external sdcard is accessible in UMS mode in recovery.

Thanks again for your enlightenment. 😊
French OPPO Ambassador
 
kishd
Old
#18  
Senior Member
Thanks Meter 61
Posts: 236
Join Date: Oct 2011
Reading some of the comments on G+ it looks like Oppo might be using this solution for their KitKat release. I would be so pleased if they did.

Sent from my X9076 using Tapatalk
 
Wendigogo
Old
#19  
Senior Member
Thanks Meter 311
Posts: 523
Join Date: Jun 2010
Location: Lyon

 
DONATE TO ME
Quote:
Originally Posted by kishd View Post
Reading some of the comments on G+ it looks like Oppo might be using this solution for their KitKat release. I would be so pleased if they did.

Sent from my X9076 using Tapatalk
You could be pleased...
French OPPO Ambassador

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes