FORUMS

mke2fs Error when flash factory images for Pixel

126 posts
Thanks Meter: 2
 
By hellobbn, Senior Member on 14th January 2018, 04:29 AM
Post Reply Email Thread
Hi there,
I am trying to flash the 8.1.0 (OPM1.171019.012, Jan 2018) for pixel but it failed with the following message:

Code:
wiping userdata...
/usr/local/bin/mke2fs failed with status 1
mke2fs failed: 1
I searched Google and found the problem occurred in Pixel 2 and the workaround is to flash dtbo.img but I couldn't find it in the factory images for Pixel ( I have downloaded images for 8.1 and 8.0 ).
Could someone offered me some help? Thanks.
14th January 2018, 11:30 AM |#2  
churchmice's Avatar
Senior Member
Thanks Meter: 77
 
More
Quote:
Originally Posted by hellobbn

Hi there,
I am trying to flash the 8.1.0 (OPM1.171019.012, Jan 2018) for pixel but it failed with the following message:

Code:
wiping userdata...
/usr/local/bin/mke2fs failed with status 1
mke2fs failed: 1
I searched Google and found the problem occurred in Pixel 2 and the workaround is to flash dtbo.img but I couldn't find it in the factory images for Pixel ( I have downloaded images for 8.1 and 8.0 ).
Could someone offered me some help? Thanks.

I have met exactly the same problem, are you using a mac or linux ? I am using mac and my solution is as follows:

1) download the latest platform tools, and place all ota/factory files under the same folder
2) edit flash_all.sh, change all fastboot to ./fastboot


The following is the directory structure:
[email protected]:~/Downloads/pixel/sailfish-opm1.171019.012 $-> ls -l
total 3680832
[email protected] 1 tesla staff 6096039 Jan 9 19:51 Magisk-v15.2.zip
[email protected] 1 tesla staff 2470501 Jan 9 20:02 MagiskManager-v5.5.3.apk
[email protected] 1 tesla staff 315051 Dec 14 06:00 NOTICE.txt
[email protected] 1 tesla staff 2581412 Dec 14 05:58 adb
[email protected] 4 tesla staff 128 Dec 14 05:59 api
-rw-r--r-- 1 tesla staff 29607142 Jan 1 2009 boot.img
-rw-r--r-- 1 tesla staff 33021952 Dec 19 08:33 bootloader-sailfish-8996-012001-1711091153.img
[email protected] 1 tesla staff 60512 Dec 14 05:58 dmtracedump
[email protected] 1 tesla staff 810388 Dec 14 05:58 e2fsdroid
[email protected] 1 tesla staff 306332 Dec 14 05:58 etc1tool
[email protected] 1 tesla staff 1380616 Dec 14 05:58 fastboot
-rw-r--r-- 1 tesla staff 997 Dec 19 08:33 flash-all.bat
-rwxr-xr-x 1 tesla staff 977 Jan 10 23:02 flash-all.sh
-rwxr-xr-x 1 tesla staff 898 Dec 19 08:33 flash-base.sh
[email protected] 1 tesla staff 17544 Dec 14 05:58 hprof-conv
-rw-r--r-- 1 tesla staff 1411963519 Dec 19 08:33 image-sailfish-opm1.171019.012.zip
[email protected] 3 tesla staff 96 Dec 14 05:58 lib
[email protected] 1 tesla staff 161884 Dec 14 05:58 make_f2fs
[email protected] 1 tesla staff 771876 Dec 14 05:58 mke2fs
[email protected] 1 tesla staff 1184 Dec 14 05:58 mke2fs.conf
[email protected] 2 tesla staff 64 Jan 10 21:47 platform-tools
-rw-r--r-- 1 tesla staff 58695680 Dec 19 08:33 radio-sailfish-8996-130091-1710201747.img
[email protected] 1 tesla staff 720088 Dec 14 05:58 sload_f2fs
[email protected] 1 tesla staff 38 Dec 14 05:58 source.properties
[email protected] 1 tesla staff 1274436 Dec 14 05:58 sqlite3
[email protected] 6 tesla staff 192 Dec 14 05:58 systrace
[email protected] 1 tesla staff 31690752 Jan 9 20:04 twrp-3.2.1-0-sailfish.img
-rwxrwxrwx 1 tesla staff 9164052 Dec 6 08:15 twrp-pixel-installer-sailfish-3.2.0-0.zip
[email protected] 1 tesla staff 11711021 Jan 9 19:58 twrp-pixel-installer-sailfish-3.2.1-0.zip
-rw-r--r-- 1 tesla staff 263172256 Jan 1 2009 vendor.img
The Following 2 Users Say Thank You to churchmice For This Useful Post: [ View ] Gift churchmice Ad-Free
14th January 2018, 02:57 PM |#3  
hellobbn's Avatar
OP Senior Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by churchmice

I have met exactly the same problem, are you using a mac or linux ? I am using mac and my solution is as follows:

1) download the latest platform tools, and place all ota/factory files under the same folder
2) edit flash_all.sh, change all fastboot to ./fastboot


The following is the directory structure:
[email protected]:~/Downloads/pixel/sailfish-opm1.171019.012 $-> ls -l
total 3680832
[email protected] 1 tesla staff 6096039 Jan 9 19:51 Magisk-v15.2.zip
[email protected] 1 tesla staff 2470501 Jan 9 20:02 MagiskManager-v5.5.3.apk
[email protected] 1 tesla staff 315051 Dec 14 06:00 NOTICE.txt
[email protected] 1 tesla staff 2581412 Dec 14 05:58 adb
[email protected] 4 tesla staff 128 Dec 14 05:59 api
-rw-r--r-- 1 tesla staff 29607142 Jan 1 2009 boot.img
-rw-r--r-- 1 tesla staff 33021952 Dec 19 08:33 bootloader-sailfish-8996-012001-1711091153.img
[email protected] 1 tesla staff 60512 Dec 14 05:58 dmtracedump
[email protected] 1 tesla staff 810388 Dec 14 05:58 e2fsdroid
[email protected] 1 tesla staff 306332 Dec 14 05:58 etc1tool
[email protected] 1 tesla staff 1380616 Dec 14 05:58 fastboot
-rw-r--r-- 1 tesla staff 997 Dec 19 08:33 flash-all.bat
-rwxr-xr-x 1 tesla staff 977 Jan 10 23:02 flash-all.sh
-rwxr-xr-x 1 tesla staff 898 Dec 19 08:33 flash-base.sh
[email protected] 1 tesla staff 17544 Dec 14 05:58 hprof-conv
-rw-r--r-- 1 tesla staff 1411963519 Dec 19 08:33 image-sailfish-opm1.171019.012.zip
[email protected] 3 tesla staff 96 Dec 14 05:58 lib
[email protected] 1 tesla staff 161884 Dec 14 05:58 make_f2fs
[email protected] 1 tesla staff 771876 Dec 14 05:58 mke2fs
[email protected] 1 tesla staff 1184 Dec 14 05:58 mke2fs.conf
[email protected] 2 tesla staff 64 Jan 10 21:47 platform-tools
-rw-r--r-- 1 tesla staff 58695680 Dec 19 08:33 radio-sailfish-8996-130091-1710201747.img
[email protected] 1 tesla staff 720088 Dec 14 05:58 sload_f2fs
[email protected] 1 tesla staff 38 Dec 14 05:58 source.properties
[email protected] 1 tesla staff 1274436 Dec 14 05:58 sqlite3
[email protected] 6 tesla staff 192 Dec 14 05:58 systrace
[email protected] 1 tesla staff 31690752 Jan 9 20:04 twrp-3.2.1-0-sailfish.img
-rwxrwxrwx 1 tesla staff 9164052 Dec 6 08:15 twrp-pixel-installer-sailfish-3.2.0-0.zip
[email protected] 1 tesla staff 11711021 Jan 9 19:58 twrp-pixel-installer-sailfish-3.2.1-0.zip
-rw-r--r-- 1 tesla staff 263172256 Jan 1 2009 vendor.img

Thank you for your help, it seems the
Code:
brew cask install android-platform-tools
in macOS doesn't link all the necessary files and I finally solved it using the following command:
Code:
ln -s /usr/local/Caskroom/android-platform-tools/27.0.1/platform-tools/mke2fs /usr/local/bin/mke2fs
The Following User Says Thank You to hellobbn For This Useful Post: [ View ] Gift hellobbn Ad-Free
9th February 2018, 04:19 AM |#4  
Gungrave223's Avatar
Senior Member
Flag Loganville
Thanks Meter: 92
 
More
Quote:
Originally Posted by hellobbn

Thank you for your help, it seems the

Code:
brew cask install android-platform-tools
in macOS doesn't link all the necessary files and I finally solved it using the following command:
Code:
ln -s /usr/local/Caskroom/android-platform-tools/27.0.1/platform-tools/mke2fs /usr/local/bin/mke2fs

Thanks this was a god sent
8th March 2018, 05:56 PM |#5  
xguntherc's Avatar
Senior Member
Viva Las Vegas!
Thanks Meter: 13
 
More
Hey guys, I'm running into the same error. Any help would be great.

I tried editing flash_all.sh, and changed all fastboot to ./fastboot and then I got an error trying to perform my flash_all command.

What's this brew cask stuff? lol. If anyone can explain this a little further so I can flash P, that would be great.

Edit* actually, looks like once I removed the -w from the script (and stopped a full wipe) everything flashed just fine. Odd.
The Following User Says Thank You to xguntherc For This Useful Post: [ View ] Gift xguntherc Ad-Free
27th September 2018, 07:23 PM |#6  
Shamestick's Avatar
Senior Member
Thanks Meter: 273
 
More
Quote:
Originally Posted by hellobbn

Thank you for your help, it seems the

Code:
brew cask install android-platform-tools
in macOS doesn't link all the necessary files and I finally solved it using the following command:
Code:
ln -s /usr/local/Caskroom/android-platform-tools/27.0.1/platform-tools/mke2fs /usr/local/bin/mke2fs

Hey I just got this error when updating my Pixel 2 to Pie and I wanted to try this solution but I have a question. Was there already a mke2fs entry in /usr/local/bin when you linked them? Or was it only in your platform-tools directory? My platform-tools directory lies at ~/android/platform-tools and contains the mke2fs binaries but there is no entry at /usr/local/bin and I'm not sure if your linking solution would work in that scenario or not (not a UNIX wiz over here). I hope to hear back from you soon, thank you.

Shamestick

Edit: I decided not to wait for a reply and just try the symbolic link and running the commands, it worked haha. Thanks agian
27th November 2018, 09:23 PM |#7  
Junior Member
Thanks Meter: 4
 
More
I'm running linux and I have the same issue trying to flash my Nexus 6P. I figured out already about the symlink before reading this thread, however, I now get this:

Quote:

/tmp/TemporaryFile-g1yMBU: Unimplemented ext2 library function while setting up superblock
/usr/lib/android-sdk/platform-tools/mke2fs failed with status 1
mke2fs failed: 1
error: Cannot generate image for userdata

Any suggestions? I will keep tinkering until someone replies with a possible solution.
27th November 2018, 10:58 PM |#8  
Junior Member
Thanks Meter: 4
 
More
Quote:
Originally Posted by hexxamillion

I'm running linux and I have the same issue trying to flash my Nexus 6P. I figured out already about the symlink before reading this thread, however, I now get this:



Any suggestions? I will keep tinkering until someone replies with a possible solution.

Well.. tinkering did me some good. I figured downloading the platform-tools would be the solution. I just had issues trying to find it. If you just go to the android sdk site you really only see the studio download wich does not help for this. I stumbled on another post that had this link which helped. https://developer.android.com/studio...platform-tools

The ubuntu repo that has the android-platform-tools is minimal and missing tons. I just copied everything from the platform-tools I downloaded into the path /usr/lib/android-sdk/platform-tools. It even included mke2fs. I ran the flash-all.sh again and everything was magic.
The Following User Says Thank You to hexxamillion For This Useful Post: [ View ] Gift hexxamillion Ad-Free
13th December 2018, 05:07 AM |#9  
Junior Member
Thanks Meter: 7
 
More
fastboot erase userdata
fastboot update image-*
The Following 7 Users Say Thank You to ozz1386 For This Useful Post: [ View ] Gift ozz1386 Ad-Free
28th December 2018, 12:33 AM |#10  
alpike's Avatar
Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by ozz1386

fastboot erase userdata
fastboot update image-*

Two line of cmd, nothing more nothing less. that fixed my issue.

thanks you are a hero
7th July 2020, 02:32 PM |#11  
stari4ek's Avatar
Member
Flag Minsk
Thanks Meter: 3
 
More
I've got this issue when updating ADT-3 to most recent Android 11 Developer Preview.
This problem comes when system-wide mke2fs is used.
I have most recent SDK Platform Tools installed standalone:
Code:
$ whereis mke2fs
mke2fs: /usr/sbin/mke2fs /etc/mke2fs.conf /home/astar/dev/android/sdk/platform-tools/mke2fs.conf /home/astar/dev/android/sdk/platform-tools/mke2fs /usr/share/man/man8/mke2fs.8.gz
System-wide:
Code:
$ mke2fs -V
mke2fs 1.45.3 (14-Jul-2019)
	Using EXT2FS Library version 1.45.3
Standalone:
Code:
$ /home/astar/dev/android/sdk/platform-tools/mke2fs -V
mke2fs 1.45.4 (23-Sep-2019)
	Using EXT2FS Library version v1.45.4-867-g4bc58792
So, to solve this issue proper mke2fs should be in the PATH.
It's possible to workaround using symlink as mentioned above, but more elegant solution without messing with system is to temporary update PATH variable (Use proper path to platform tools instead of "/home/astar/dev/android/sdk/platform-tools/"):

Code:
$ export PATH=/home/astar/dev/android/sdk/platform-tools/:$PATH
$ /home/astar/dev/android/sdk/platform-tools/mke2fs -V
mke2fs 1.45.4 (23-Sep-2019)
	Using EXT2FS Library version v1.45.4-867-g4bc58792

$ ./flash-all.sh
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