FORUMS

ext2/3/4 filesystem create/fix tools (e2fstools pkg) static build for arm64 devices

2,542 posts
Thanks Meter: 2,280
 
By partcyborg, Recognized Developer on 2nd October 2017, 08:36 AM
Post Reply Email Thread
e2fstools package, statically built for arm64 devices from Google's googlecode.com Oreo branch

NOTE: These will support ANY version of android's filesystems that use ext2 or ext3 or ext4. I built them from oreo branch as that one was the closest to compiling without any editing of the Makefiles. Don't let the name throw you off


I needed to run a modern fsck on a rooted device I have that I have been doing some hacking on.

The filesystem was in bad shape and the on-device e2fsck absolutely refused to check it while it was even mounted, even with the force option. Out of part desperation part determination I decided I would just build one myself. So I went and dug up the sources from googlecode.com, transfered them to my linux workstation, and after much fighting with gcc for cross compilation, finding a place in the google git repo where they actually build (hence going with orero), and having to tweak the c code even in a few places (mostly fixing includes and whatnot, no actual coding on my part), I succeeded.


As it says in the title, these are all the e2fstools binaries built from Google's googlecode.com source tree in their Oreo release branch. They are also compiled statically (no libraries are needed for them to function) so they should work absolutely fine on any device that has a 64bit arm (aarch64) processor. I have tested a handfull of them and they work perfectly fine on my Samsung Galaxy s8. In fact I used the fsck.ext4 binary to repair my system partition which it did perfectly.

https://www.dropbox.com/s/owb76hohnjzjdwe/e2fstools-oreo-aarch64-static.tar.gz?dl=0

Hope they come in as handy to someone else as they did me.

List of files follows:

Code:
[email protected]:~> tar tzf e2fstools-oreo-aarch64-static.tar.gz
e2fsbin/
e2fsbin/e2undo
e2fsbin/e2image
e2fsbin/badblocks
e2fsbin/mkfs.ext3
e2fsbin/fsck.ext4dev
e2fsbin/e2initrd_helper
e2fsbin/fsck.ext3
e2fsbin/e4crypt
e2fsbin/e4defrag
e2fsbin/mke2fs
e2fsbin/e2fsck
e2fsbin/fsck.ext4
e2fsbin/filefrag
e2fsbin/tune2fs
e2fsbin/e2freefrag
e2fsbin/uuidd
e2fsbin/e2label
e2fsbin/mkfs.ext2
e2fsbin/blkid
e2fsbin/logsave
e2fsbin/lsattr
e2fsbin/uuidgen
e2fsbin/findfs
e2fsbin/mklost+found
e2fsbin/dumpe2fs
e2fsbin/mkfs.ext4
e2fsbin/debugfs
e2fsbin/fsck.ext2
e2fsbin/mkfs.ext4dev
e2fsbin/resize2fs
e2fsbin/chattr
e2fsbin/fsck

PS: Now that I have a working arm64 cross compilation system setup, if anyone else desperately needs a working static binary for anything relatively simple to build (as in not 50 million dependencies for me to track down and install) and can send me or link me the sources for it and its dependencies, I would be happy to oblige.
The Following 2 Users Say Thank You to partcyborg For This Useful Post: [ View ]
1st February 2018, 03:04 AM |#2  
Member
Thanks Meter: 16
 
More
Unfortunately, my device is armv7
1st February 2018, 11:06 AM |#3  
OP Recognized Developer
Thanks Meter: 2,280
 
Donate to Me
More
Quote:
Originally Posted by buengeut

Unfortunately, my device is armv7

I forget, is that 32bit? If so i could fairly easily build new ones that are 32bit. Did you try them and they didnt work? If its 64bit they may work anyway, as these dont use any fancy instructions, and i did not build them even with -O1. I thought the main differences between the different "v"s of the same arch (32v64) was in libc and friends, of which these dont use as they are completely static so libc is built in.

I was even thinking of making this a flashable zip, but i hadnt bothered as no one replied to my initial post so i didnt think anyone cared 😅️
1st February 2018, 02:04 PM |#4  
Member
Thanks Meter: 16
 
More
Quote:
Originally Posted by partcyborg

I forget, is that 32bit? If so i could fairly easily build new ones that are 32bit. Did you try them and they didnt work? If its 64bit they may work anyway, as these dont use any fancy instructions, and i did not build them even with -O1. I thought the main differences between the different "v"s of the same arch (32v64) was in libc and friends, of which these dont use as they are completely static so libc is built in.

I was even thinking of making this a flashable zip, but i hadnt bothered as no one replied to my initial post so i didnt think anyone cared 😅️

ARMv7 is ARM 32bit, 64bit program will not work on a 32bit system.
Can you build e2fstools for ARMv7.
4th December 2018, 04:18 PM |#5  
LNQ's Avatar
Junior Member
Thanks Meter: 1
 
More
Sadly your link is down.
would you care to reupload?
7th December 2018, 03:33 PM |#6  
OP Recognized Developer
Thanks Meter: 2,280
 
Donate to Me
More
Quote:
Originally Posted by LNQ

Sadly your link is down.
would you care to reupload?

Sure. I'll even make it flashable this time 😁
7th December 2018, 03:51 PM |#7  
LNQ's Avatar
Junior Member
Thanks Meter: 1
 
More
Thanks alot, good sir!
12th December 2018, 01:42 PM |#8  
Member
Flag Sydney
Thanks Meter: 22
 
More
Legend! I'd been dealing with not being able to repair my /data errors for the past few days since my Oreo update. The current TWRP (3.2.3.4) still has an ancient e2fsck that doesn't support the ext4 quota option that LG formats their Oreo data partition with. The updated version in /system/bin works while the OS is running which is why I knew I had errors, but I couldn't get it to run in TWRP to fix them because of the incompatible library files.

I was all set to reinstall my Android SDK and compile another version with inbuilt libraries when I decided to do one last search and found this thread where you'd already done it. So thanks for saving me a few hours of downloading/installing/remembering how to compile for Android all over again

I guess I can also vouch for it working on an LG V20. I don't know if it's just LG's version of Oreo that needs the later e2fsck or others too, but anyone who can't repair errors on their ext4 partitions in TWRP due to needing a newer e2fsck version should be able to use this version. I just copied the file fsck.ext4dev to /cache and ran it from there on my data partition.
9th February 2019, 10:51 AM |#9  
Junior Member
Thanks Meter: 0
 
More
Your link is dropbox banned...
Any chance you could attach the zip here...?
16th March 2019, 08:47 PM |#10  
Senior Member
Thanks Meter: 1,061
 
More
Quote:
Originally Posted by quotient

Your link is dropbox banned...
Any chance you could attach the zip here...?

Seconded!

@partcyborg

Any chance you could put this file somewhere else? The above link is banned.

Thanks!
19th February 2020, 01:31 PM |#11  
Junior Member
Thanks Meter: 0
 
More
Hi,

I have a Oneplus 3 that after 3 years of use became sluggish as hell at file system access.

After reading thus document https://www.usenix.org/system/files/...orage16_ji.pdf
I would give a try to your e2fstools build.
Can you repost a link to download?

Thanks in advance
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes