Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add e2fsdroid compile #38

Open
mengyanshou opened this issue May 14, 2020 · 4 comments
Open

add e2fsdroid compile #38

mengyanshou opened this issue May 14, 2020 · 4 comments

Comments

@mengyanshou
Copy link

hi! android sdk platform tools can provide e2fsdroid,can i compile e2fsdroid binary for arm64 architecture,and i know someone sucessed compiled,but they were unwilling to offer any help,any helps thanks.

@tytso
Copy link
Owner

tytso commented May 14, 2020

e2fsdroids has dependencies on some external libraries such as libsparse. Those libraries are not available from all distributions.

Creating a Makefile.in so it could be integrated into the standard Linux build infrastructure is possible, and it's on my todo list --- but to be honest, it's not very high. If someone wants to take that on, and submitting a proposed change to do this, I'm happy to take a look at it. Even if it's not 100% ready for upstreaming, if someone can move the ball to 80-90% there, I'm happy to help to get it cleaned up so it could be merged into the e2fsprogs tree.

@zokier
Copy link

zokier commented Feb 19, 2024

#16 seems closely related here.

I'm wondering if all (or at least some) of the functionality of e2fsdroid could be merged back to the main e2fsprogs? At a glance there seems to be many things there that might be more generally useful beyond just Android. I don't know what is the history here, why Android ended up with their own e2fsdroid in the first place?

@tytso
Copy link
Owner

tytso commented Feb 20, 2024

Android ended up with their own e2fsdroid because they contributed it. For many other applications where embedded projects have needed to construct an ext4 file system image, "mke2fs -d" has sufficed --- or when it hasn't, developers have contributed enhancements to the functionality provided by mke2fs -d to meet their needs.

The general rule is that what ends up in core e2fsprogs programs needs to be done highly general, and long-term maintainable way. Most of what is in e2fsdroid is done in a highly Android-specific way. If someone wants to cotntribute changes that can be made much more generalizable --- which is to say, even if it doesn't solve all possible use cases, it must be done in a way that doesn't paint us in a corner such that future enhancements won't result in backwards-incomptaible changes to how mke2fs or other core e2fsprogs work.

But the thing folks need to remember is in that e2fsprogs is an Open Source program. That means that what gets done happens when it's important enough for some developer to contribute enhancements.

@zokier
Copy link

zokier commented Feb 20, 2024

But the thing folks need to remember is in that e2fsprogs is an Open Source program. That means that what gets done happens when it's important enough for some developer to contribute enhancements.

Indeed, and I wish to fully respect that. I do appreciate both you responding here and having that Android code here at least as a reference. If it was just buried somewhere deep in AOSP tree I would have never even discovered it. Thank you for maintaining e2fsprogs!

My motivation here stems from trying to replace make_ext4fs with mke2fs, and finding that I need something similar to this: https://github.com/tytso/e2fsprogs/blob/master/contrib/android/perms.c#L134-L156 . Instead of just sending another patch like PR #126 I started thinking that for maintainability it could be useful to have something that fulfills also the Androids usecase here and reduce the overlap.

To that end it would be helpful to get e2fsdroid built and running, so here I am.

Anyways, point taken, patches speak louder than wishy-washy github comments :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants