[peregrine]System read-only, can't update TWRP, flash or wipe - Moto G Q&A, Help & Troubleshooting

Hi everyone, thanks for the awesome place that XDA is!
As the title suggests I'm into a bit of trouble with my XT1039! (Moto G 4G 2nd gen/peregrine)
I had previously been running AOSP Extended and then Lineage 14.1 by MSe1969 without too much issues for 1-2 years.
Every app started crashing on my phone, I rebooted thinking it was just a temporary issue.
When I realized it wouldn't boot again I set to flash a newer version of the Lineage ROM and here starts the fun.
I did a more-than-what's-necessary wipe to get rid of any serious issue, I didn't mind losing anything I had on the phone.
The zip install would then not work, log:
Code:
BLKDISCARD ioctl failed: I/O error
failed to execute command [erase 6,70603,97792,131586,163328,197122,228864]
script aborted: E1001: Failed to update system image.
E1001: Failed to update system image.
error: 1001
Updater process ended with ERROR: 7
Only after this first issue did I realize what really was wrong:
The wipe had not had any effect at all, even though not showing any error.
I tried updating TWRP to 3.5.9 using Install > Install images and then "fastboot flash" which also didn't show any error yet had no effect at all, I was back to 3.3.1 after that. The only way I just found to run TWRP 3.5.9 is with "fastboot boot twrp....img" though I don't think that makes the situation any different?
The whole system is locked on read-only and the various operations as well as dmesg show error on the internal mmcblk0 although not as bad as what I've seen on other threads. This looks similar: https://forum.xda-developers.com/t/my-xt1039-lte-is-soft-bricked-please-help.3595044/ although we don't get to see any log.
Log during wipe shows about 20k lines like this one, presumably one for every file despite resulting success:
Code:
I:Unable to unlink '/data/misc/bluedroid/bt_config.bak': Read-only file system
Relevant part of dmesg from boot:
Code:
<3>[ 44.781618,0] mmcblk0: error -110 transferring data, sector 2670487, nr 1, cmd response 0x900, card status 0x0
<3>[ 44.783137,0] end_request: I/O error, dev mmcblk0, sector 2670487
<2>[ 44.784164,0] EXT4-fs error (device mmcblk0p34): ext4_find_entry:941: inode #1759: comm recovery: reading directory lblock 0
<3>[ 44.784379,0] Aborting journal on device mmcblk0p34-8.
<2>[ 44.784988,0] EXT4-fs (mmcblk0p34): Remounting filesystem read-only
<2>[ 44.785980,0] EXT4-fs error (device mmcblk0p34): ext4_put_super:844: Couldn't clean up the journal
Output of mount command:
Code:
# mount
rootfs on / type rootfs (rw,seclabel)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=440132k,nr_inodes=110033,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,seclabel,relatime,size=440132k,nr_inodes=110033)
/dev/block/mmcblk0p33 on /cache type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/mmcblk0p36 on /data type f2fs (ro,seclabel,relatime,background_gc=off,user_xattr,inline_xattr,acl,inline_data,active_logs=6)
/dev/block/mmcblk0p36 on /sdcard type f2fs (ro,seclabel,relatime,background_gc=off,user_xattr,inline_xattr,acl,inline_data,active_logs=6)
/dev/block/mmcblk1p1 on /sdcard1 type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
Log for "Format data" operation which I also tried several times:
Code:
Info: zone aligned segment0 blkaddr: 512
Info: format version with
"Linux version 3.4.42-g5e5969d-dirty ([email protected]) (gcc version 4.9.x-google 20140827 (prerelease) (GCC) ) #1 SMP PREEMPT Sun Feb 7 22:11:19 CET 2016"
Error: Could not conduct fsync!!!
Info: format successful
I:mkfs.f2fs -t 0 /dev/block/mmcblk0p36 process ended with RC=0
Done.
I:mount -o bind '/data/media/0' '/sdcard' process ended with RC=0
You may need to reboot recovery to be able to use /data again.
Updating partition details...
I:Data backup size is 3927MB, free: 1191MB.
This would be enough indications to declare the internal ROM dead if I could have at least found one other thread with the same issue, and it doesn't look as bad as what I've seen during my search.
Googling has resulted in extremely few results for the specific errors reported (Could not conduct fsync or BLKDISCARD for example) as they are either non-android specific or very rare.
Would it be worth it to try to flash from fastboot?
I've seen it advised here and there, I'd be more than happy if I could be pointed to useful documentation on the process.

Related

[06/06/09] Haykuro 6.0r1 boot.img with atime+ext3 mod (and now hero)

Well, there was a lot of chatter today about the speed increases on cyanogen's JF-1.51 ROM today, attributed to some changes in the ramdisk (see below). Attached is a boot.img with the same modifications but for Haykuro's 6.0r1 build - go ahead and download it now or read on for more details. Note: you'll only notice a difference if you run your apps/cache from your SD card.
The Changes
The only change is to mount your SD card's ext2 partition with the 'noatime' option. This is exactly what cyanogen did in his JF build, as per his post here. I also added the 'nodiratime' option. This is merely a very minor change in the runme.sh script of the boot ramdisk. [See below for more info on the ext3 mod, added 05/27/09]
By default, ext2 maintains the last access time ('atime') of every file and directory in the filesystem. This means that every time you access (read or write to) a file, this time will be reset and you'll be writing to your SD card. Two problems: 1) SD cards are slow as it is; requiring a write every time you access a file is going slow your whole system down. 2) SD cards fail after enough writes to the same location, so you're reducing your card lifetime by not having these options.
ext3 'auto' mod
Cyanogen added this to his latest build, so again, merely making this available for Haykuro 6.0r1 users. He wrote a bit more detail here which is working reading too.
In short: No other ROMs or app2sd solutions handle a clean shutdown of the ext2 partition, and Android doesn't have fsck tools. The result is that shutting down or crashing can corrupt your ext2 partition and you can lose data. Meanwhile, ext3 is a journaling file system; it recovers gracefully from unclean shutdowns. It's also backwards compatible, you can still mount an ext3 as ext2, you just lose journaling capability.
The mod mounts the 2nd SD partition as type 'auto', which means it will read your existing partition as ext2 and in the future as ext3 if you upgrade. This is more for advanced users but I'll try post some simple instructions below. Make sure you download the boot-haykuro-6.0r1-atime-ext3.zip image.
What about hero? (added 06/06/09)
This is a modded kernel 2.6.29 with unionfs support from daproy. Besides the atime+ext3 stuff, by request I also added support to run /system/init.rc and /data/init.rc (needed by some scripts).
http://turtle.wastelands.net/dragon/...uto-initrc.zip
See also:
1) Daproy's release: http://forum.xda-developers.com/showthread.php?p=3905574#post3905574
2) Release in this thread: http://forum.xda-developers.com/showpost.php?p=3909682&postcount=10
Note: you also need to
1) adb remount
2) push wlan.ko /system/lib/modules
How to apply
Download and unzip the file to get your new boot.img
Option 1:
Code:
adb push boot.img /sdcard
adb shell
# cat /dev/zero > /dev/mtd/mtd2 write: No space left on device [this is ok, you can ignore]
# flash_image boot /sdcard/boot.img
(or mount your SD card, copy the image, and run the above commands in a terminal).
Option 2:
1. Boot into fastboot mode (boot with power+camera)
2. fastboot flash boot boot.img
How to check if it's working
Type 'mount' in an adb shell or your phone's terminal, and look for the 'noatime' and 'nodiratime' option on your ext2 mount point. (If you go ahead with the ext3 mod and upgrade, you'll see it will show up as ext3 in the mount list below).
Code:
$ adb shell
# mount
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
/dev/block/mtdblock3 /system yaffs2 rw 0 0
/dev/block/mtdblock5 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock4 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block/mmcblk0p2 /system/sd ext2 rw,[b]noatime,nodiratime[/b],errors=continue 0 0 <--
/dev/block//vold/179:1 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8 0 0
If things go wrong
If for some reason you can't boot after trying this, you can restore your system simply by reapplying Haykuro's image (boot with power+home and alt-s). Alternatively, I'm attaching the original boot.img as well, which you could reflash with option 2 above.
How to upgrade your ext2 partition to an ext3
I found this really easy on Linux. People can write about alternative methods, but this worked great for me: (substitute /dev/sdb2 below as necessary)
1. Connect to USB and mount your SD card in Android
2. Unmount your ext2 partition from inside linux (e.g. sudo umount /dev/sdb2)
3. sudo tune2fs -j /dev/sdb2 (this adds a journal to the filesystem)
4. adb shell, reboot (or just reboot phone without tapping 'turn off USB storage')
Even though I found this really simple and didn't even bother to make a back up first, I'm really familiar with Linux and linux filesystems -- this should be considered advanced use, and I'm not responsible for you losing your entire ext3 partition.
Note - I agree with cyanogen; I don't think the journal writes is a big performance impact or will wear out your card. This is a relatively small amount of extra data on each write... very low performance/wear impact and for me very worth the benefits.
References
1. Original launch thread of cyanogen's JF 1.51 build
2. Boot Image how to referenced by cyanogen's post
I'm also attaching my compiled versions of mkbootfs and mkbootimg in case anyone wants to play around without downloading and compiling the 2.3 GB Android source.
Worked like a charm thanks man!
This worked perfectly for me! Great job on this; noticable speed improvements for me
Not a great improvement.. Apps are starting circa a second faster..
anyone try this or have a method for Haykuro's Hero build?
boot.img for JACHero r1.4
jroid said:
anyone try this or have a method for Haykuro's Hero build?
Click to expand...
Click to collapse
Which build? I think beta 4 is out yes? I haven't moved over to Hero yet because of the bluetooth issue. Nevertheless, I just made a boot.img for JACHero1.4 - it's untested, but can't imagine it giving any problems... you can always just reapply the update.zip if things go wrong (I still take no responsibility though ). It will probably work with the recent hero builds, let me know how it goes.
I was reffering to the official build he dropped w/ rosie.
thanx I'll give it a shot
confirmed. works on hero build.
very noticeable speed improvement. thanks
# cat /dev/zero > /dev/mtd/mtd2 write: No space left on device
cat /dev/zero > /dev/mtd/mtd2 write: No space left on device
write: No space left on device
# flash_image boot /sdcard/boot.img
flash_image boot /sdcard/boot.img
# mount
mount
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
/dev/block/mtdblock3 /system yaffs2 ro 0 0
/dev/block/mtdblock5 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock4 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block/mmcblk0p2 /system/sd ext2 rw,errors=continue 0 0
/dev/block//vold/179:1 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=
1000,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,s
hortname=mixed,utf8 0 0
# reboot
reboot
C:\>adb shell
# mount
mount
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
/dev/block/mtdblock3 /system yaffs2 ro 0 0
/dev/block/mtdblock5 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock4 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block/mmcblk0p2 /system/sd ext2 rw,noatime,nodiratime,errors=continue 0 0
/dev/block//vold/179:1 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=
1000,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,s
hortname=mixed,utf8 0 0
#
Click to expand...
Click to collapse
confirmation #2 it works on hero w/ Rosie
From another thread:
http://forum.xda-developers.com/showpost.php?p=3905574&postcount=42
daproy said:
Ok I reverted the recent commits to the 2.6.29 tree and camera works fine again and I patched in UnionFS. Sorry for the mess guys. I guess it shows I should have tested it before uploading. I put the kernel zImage in there separate as well in case people wanted to make their own boot.img
http://drop.io/tgbvqky
Click to expand...
Click to collapse
For those that were asking, here are some mods to daproy's great work.
* Mounts the 2nd partition as type 'auto' - ext3 if u have it, else ext2.
* Mounts with noatime and nodiratime options
* Includes appropriate calls to /system/init.rc and /data/init.rc
http://turtle.wastelands.net/dragon/android/hero-boot-unionfs-2-atime-auto-initrc.zip
Kinslayer81 said:
From another thread:
http://forum.xda-developers.com/showpost.php?p=3905574&postcount=42
For those that were asking, here are some mods to daproy's great work.
* Mounts the 2nd partition as type 'auto' - ext3 if u have it, else ext2.
* Mounts with noatime and nodiratime options
* Includes appropriate calls to /system/init.rc and /data/init.rc
http://turtle.wastelands.net/dragon/android/hero-boot-unionfs-2-atime-auto-initrc.zip
Click to expand...
Click to collapse
Hey thanks for the new kernel package.
Simple question.
I had now problem fastbooting the boot.img or adb pushing the wlan.ko but what do I do with the kernel file? Anything, or is it just there in case I want to make changes to the boot or wlan.ko files?
Ext3 on flash media drastically reduces the lifetime because of the frequent writes to the journal, a simple search on google brings up tons of things against the idea, yaffs2 or jffs would be a better decision because it is optimized for flash media and has a journal, not everyone has a class 6 sdhc, and ext3 will cause curruption in any lower class sd, and it will reduce a class's lifetime as well, there is plenty of docs and specs on this, if u prefer speed over reliability/sd lifetime have fun
defconoi said:
Ext3 on flash media drastically reduces the lifetime because of the frequent writes to the journal, a simple search on google brings up tons of things against the idea, yaffs2 or jffs would be a better decision because it is optimized for flash media and has a journal, not everyone has a class 6 sdhc, and ext3 will cause curruption in any lower class sd, and it will reduce a class's lifetime as well, there is plenty of docs and specs on this, if u prefer speed over reliability/sd lifetime have fun
Click to expand...
Click to collapse
This has been discussed ad nauseam.
Even in average high use (compiling the linux kernel!), ext3/journalling with the noatime option results in LESS THAN A 4% INCREASE IN WRITES. Even an abnormal case ('make clean' on the linux kernel, i.e. deleting literally thousands of files) maxed out at a 40% increase, which for deletes really isn't such a big deal. http://thunk.org/tytso/blog/2009/03/01/ssds-journaling-and-noatimerelatime/
Yaffs2, etc, ARE WORSE FOR YOUR SD CARD, which implements it's own hardware anti wear levelling. If you have the hardware and software both swapping around locations, you're doing more work, making things slower, and shortening the life of your card. Flash file systems are contra indicated for SD and other such media.
And it's not about preferring speed over reliability. Ext3 will be slightly slower than ext2, but it's definitely more reliable, because when you shut down, your phone crashes or something else goes wrong, it can recover gracefully instead of YOUR EXT2 PARTITION BECOMING CORRUPT and you losing your data.
I hope this issue is closed now.
ccyrowski said:
Hey thanks for the new kernel package.
Simple question.
I had now problem fastbooting the boot.img or adb pushing the wlan.ko but what do I do with the kernel file? Anything, or is it just there in case I want to make changes to the boot or wlan.ko files?
Click to expand...
Click to collapse
Yea I did the steps with the boot.img and wlan.ko and it appears to be working (noatime and nodiratime are showing). But whats the deal with the kernal file?
sacredsoul said:
Yea I did the steps with the boot.img and wlan.ko and it appears to be working (noatime and nodiratime are showing). But whats the deal with the kernal file?
Click to expand...
Click to collapse
It was included by daproy for ROM developers. I just left it in there to provide the complete package. You can safely ignore it
Kinslayer81 said:
It was included by daproy for ROM developers. I just left it in there to provide the complete package. You can safely ignore it
Click to expand...
Click to collapse
Ah. Thanks man! Enjoying my speedy JACHero Optimized build with this boot.img.
i pushed the wlan and use fastboot to flash the boot.img but when i check with the "mount" command it shows :
i'm using Jac's ROM
/dev/block/mmcblk0p2 /systemsd ext2 rw,errors=continue 00
instead of this:
/dev/block/mmcblk0p2 /system/sd ext2 rw,noatime,nodiratime,errors=continue 0 0
I get a wifi unable to start.
ifconfig tiwlan0 in Terminal returns No such device. Any help guys? Yes I tried rebooting already.
EDIT: Posted this on JACHero thread too. Posting here to get more response...
adb remount
adb push wlan.ko /system/lib/modules
Click to expand...
Click to collapse
Microsoft Windows [Version 6.1.7100]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Shanker>cd C:\android-sdk-windows-1.5_r1\tools
C:\android-sdk-windows-1.5_r1\tools>adb remount
remount succeeded
C:\android-sdk-windows-1.5_r1\tools>adb push wlan.ko /system/lib/modules
1117 KB/s (676043 bytes in 0.591s)
C:\android-sdk-windows-1.5_r1\tools>
Click to expand...
Click to collapse
I rebooted and I still cant start wifi. Btw I am using the kinslayer81 boot.img for JACHero 1.4...
namsir said:
i pushed the wlan and use fastboot to flash the boot.img but when i check with the "mount" command it shows :
i'm using Jac's ROM
/dev/block/mmcblk0p2 /systemsd ext2 rw,errors=continue 00
instead of this:
/dev/block/mmcblk0p2 /system/sd ext2 rw,noatime,nodiratime,errors=continue 0 0
Click to expand...
Click to collapse
i got the samething.... when i check to see if its working with "mount"
it doesnt show the noatime, nodiratime :\
Kinslayer81 said:
From another thread:
http://forum.xda-developers.com/showpost.php?p=3905574&postcount=42
For those that were asking, here are some mods to daproy's great work.
* Mounts the 2nd partition as type 'auto' - ext3 if u have it, else ext2.
* Mounts with noatime and nodiratime options
* Includes appropriate calls to /system/init.rc and /data/init.rc
http://turtle.wastelands.net/dragon/android/hero-boot-unionfs-2-atime-auto-initrc.zip
Click to expand...
Click to collapse
can we do aufs/unionFS on Haykuro's original hero build? I've got the new boot.img and wlan.ko and ext3 FS, just wondering what I would need to do.

[solved]BRICKed: inside eMMC's dead, with E:Can't open /cache/recovery/log

hi guys, this problem was solved, unexpectedly.
after read guhl99's post in Thread: PSA: Rooting methods and recently discovered dangersthread,
i finally confirm that my htc DS was bricked by an accidentally freeze and the immediately battery pulled-out-&-pushed-in unstably.
the eMMC-chip(marked as SAMSUNG104, KLM4G2DEJE A001, FDAE15PC) was completely dead,
i made a replacement with a new one(made by Sandisk serial:SEM04G), and then everything goes on good.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
"Thanks to" the design of the battery compartment door, the battery pullout-pushin becomes running-risks.
Make sure there's NOT any tiny battery move when you flipping the compartment door from the side.
Make sure disconnect the battery and DS itself quickly & stably as soon as you could.
Make sure there's at least 10 seconds between battery pullout and pushin.
"How can I be sure if it's a hw problem? I mean, it looks like one, but I would like to be sure..."
please check #27 http://forum.xda-developers.com/showpost.php?p=16135893&postcount=27
A eMMC design flaw, Confirming info from htc-offical (thanks apairofscissors)
http://forum.xda-developers.com/showpost.php?p=20163494&postcount=23
=============Debug Procedure=============
Here are 3 parts in this post.
Actually, it's not that long,
and the most important info is in 8. [ adb shell ]
================Background================
SAGA PVT SHIP S-OFF RL
HBOOT-0.98.00RADIO-38.03.02.15_M
eMMC-boot
Mar 10 2001,14:58:38
ClockworkMod Recovery 3.2.0.0
a busybox within
================what happend================
while installing some apps from the market, DS was stuck at a app called "push ups".
i pulled out battery and reboot, and there came loopboot.
got in Recovery, it promts
Code:
E:Can't open /cache/recovery/log
E:Can't open /cache/recovery/log
E:Can't open /cache/recovery/last_log
E:Can't open /cache/recovery/last_log
================things i did================
1. [ wipe data/factory reset]
Code:
Formating /data...
black splash screen, and then
E:Can't open /cache/recovery/command
E:Can't open /cache/recovery/log
E:Can't open /cache/recovery/last_log
[ wipe cache ]
Code:
Formating /cache...
Cache wipe complete.
E:Can't open /cache/recovery/log
E:Can't open /cache/recovery/last_log
2. [ install zip from sdcard ]
Code:
-Checking Model ID
-success!
-Model ID - HTC sage
Now flashing
E:Error in /sdcard/*******.zip
(Status 1)
Installation aborted.
3. [ backup and restore ]
Code:
Checking MD5 sums...
Erasing boot before restore...
Restoring boot image...
Restoreing system....
Error while formatting /system!
E:Can't open /cache/recovery/log
E:Can't open /cache/recovery/last_log
4. [ RUU+Goldencard ]
Goldencard is good, in FASTBOOT USB mod,
passed the (version) checking, updating 1.28.401.1 to 1.47.950.3, but stuck at
Code:
rebooting bootloader ......
upgrading ROM image in your Android Phone...
Please do NOT disconnect USB cable nor run any program.
5. [ ROM.zip->PG88IMG.zip ]
ROM.zip was picked-up from RUU, renamed to PG88IMG.zip, copied to sdcard,
reboot to HBOOT, and it unzip the pack normally, then stuck at updating screen, more than 1 hour.
Code:
HBOOT
[INDENT]Parsing...[SD ZIP]
[1] BOOTLOADER -updating
[2] BOOT
[3] RECOVERY
[4] SYSTEM
[5] SLPASH1
[6] USERDATA
[7] TP
[8] DADIO_V2
[9] RADIO_CUST
Do you want to start update?
[/INDENT]
6. [ PG88IMG.zip for Recovery/Radio ]
HBOOT asks do you wanna upgrade, click VOL-up, then stuck at updating screen
Code:
HBOOT
[INDENT]Parsing...[SD ZIP]
[1] RECOVERY -updating
*********
Updating is in progress...
Do not power off the device!
[/INDENT]
7. [ fastboot ]
Code:
SH********8 Connected.
STARTING PRINT OF DEVICE INFO.
-----------------------------------.
Radio version: 38.03.02.15_m.
SPL/hboot version: 0.98.0000.
product: saga.
mid: pg88*****.
security: off.
build-mode: ship.
-----------------------------------.
Print of device info SUCCESSFUL.
[B]fastboot erase cache[/B]
erasing 'cache'...
[COLOR=red]erasing 'cache'... FAILED (command write failed (Unknown error))[/COLOR]
8. [ adb shell ]
DS has 2 storages:
eMMC-chip inside, /system /data /cache are mounted to mmcblk0p25, mmcblk0p26, mmcblk0p27;
SDCard removable /sdcard is mounted to mmcblk1p1.
i connect the my phone(DS-brick) through adb-shell, and compared with my friend's (DS-good), here are the prompts:
DS-good shows
Code:
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/block/[COLOR=blue]mmcblk0p25 on /system type ext3 [/COLOR](rw,relatime,errors=continue,barrier=0,data=writeback)
/dev/block/[COLOR=blue]mmcblk0p26 on /data type ext3[/COLOR] (rw,relatime,errors=continue,barrier=0,
data=writeback)
/dev/block/[COLOR=blue]mmcblk0p27 on /cache type ext3 [/COLOR](rw,nodev,noatime,nodiratime,errors=co
ntinue,barrier=0,data=writeback)
/dev/block/[COLOR=blue]mmcblk1p1 on /sdcard type vfat[/COLOR] (rw,relatime,fmask=0000,dmask=0000,all
ow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-
ro)
DS-brick shows
Code:
/dev/block/[COLOR=blue][COLOR=red][B]mmcblk0p27 on /cache type ext4[/B][/COLOR] [/COLOR](ro,nodev,noatime,nodiratime,barrier=1
,data=ordered)
~ # mount system
mount: mounting /dev/block/mmcblk0p25 on /system [COLOR=red][B]failed: Invalid argument[/B][/COLOR]
~ # mount data
mount: mounting /dev/block/mmcblk0p26 on /data [COLOR=red][B]failed: Invalid argument[/B][/COLOR]
it means the filesystem on eMMC was accidentally broke down. so, im trying to restore the filesystem, and get these:
list the eMMC-chip partition info
Code:
~ # fdisk -l /dev/block/[B]mmcblk0[/B]
fdisk -l /dev/block/mmcblk0
[B][COLOR=red]fdisk: can't open '/dev/block/mmcblk0': I/O error[/COLOR][/B]
format /cache with type ext3
Code:
~ # mke2fs -j /dev/block/[COLOR=blue]mmcblk0p27[/COLOR]
mke2fs 1.40.8 (13-Mar-2008)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
76912 inodes, 307196 blocks
15359 blocks (5.00%) reserved for the super user
[B]First data block=1[/B]
Maximum filesystem blocks=67633152
38 block groups
8192 blocks per group, 8192 fragments per group
2024 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185
[COLOR=blue]Warning: could not read block 0: [/COLOR]
[COLOR=blue]Attempt to read block from filesystem resulted in short read[/COLOR]
[COLOR=blue]Writing inode tables: done[/COLOR]
[COLOR=red][B]ext2fs_mkdir: Attempt to read block from filesystem [/B][/COLOR]
[COLOR=red][B]resulted in short read while creating root dir[/B][/COLOR]
format /system with type ext3
Code:
~ # mke2fs -j /dev/block/[COLOR=blue]mmcblk0p25[/COLOR]
mke2fs -j /dev/block/mmcblk0p25
mke2fs 1.40.8 (13-Mar-2008)
Warning: 256-byte inodes not usable on older systems
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
35760 inodes, 142847 blocks
7142 blocks (5.00%) reserved for the super user
[B]First data block=0[/B]
Maximum filesystem blocks=146800640
5 block groups
32768 blocks per group, 32768 fragments per group
7152 inodes per group
Superblock backups stored on blocks:
32768, 98304
[COLOR=blue]Warning: could not read block 0: [/COLOR]
[COLOR=blue]Attempt to read block from filesystem resulted [/COLOR][COLOR=blue]in short read[/COLOR]
[COLOR=blue]Writing inode tables: done[/COLOR]
[COLOR=blue][B]Creating journal (4096 blocks): done[/B][/COLOR]
[COLOR=blue][B]Writing superblocks and filesystem accounting information: done[/B][/COLOR]
[COLOR=blue][B]This filesystem will be automatically checked every 39 mounts or[/B][/COLOR]
[COLOR=blue][B]180 days, whichever comes first. Use tune2fs -c or -i to override.[/B][/COLOR]
format /data with type ext3
Code:
mke2fs -j /dev/block/mmcblk0p26
mke2fs 1.40.8 (13-Mar-2008)
Warning: 256-byte inodes not usable on older systems
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
75200 inodes, 300799 blocks
15039 blocks (5.00%) reserved for the super user
[B]First data block=0[/B]
Maximum filesystem blocks=310378496
10 block groups
32768 blocks per group, 32768 fragments per group
7520 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
[COLOR=blue]Warning: could not read block 0: [/COLOR]
[COLOR=blue]Attempt to read block from filesystem resulted [/COLOR][COLOR=blue]in short read[/COLOR]
[COLOR=blue]Writing inode tables: done[/COLOR]
[COLOR=blue]Creating journal (8192 blocks): done[/COLOR]
[B][COLOR=blue]Writing superblocks and filesystem accounting information: done[/COLOR][/B]
[COLOR=blue][B]This filesystem will be automatically checked every 22 mounts or[/B][/COLOR]
[COLOR=blue][B]180 days, whichever comes first. Use tune2fs -c or -i to override[/B][/COLOR].
Not identical but market related to this thread http://forum.xda-developers.com/showthread.php?t=1141843
Sent from my HTC Desire S using XDA Premium App
Sorry to hear that mate, Have you tried flashing a custom recovery and format the partitions in ext4 format, cause as far as I know DS default partition format is ext4...
zorbakun said:
Sorry to here that mate, Have you tried flashing a custom recovery and format the partitions in ext4 format, cause as far as I know DS default partition format is ext4...
Click to expand...
Click to collapse
thanx for reply...
but my friend's DS shows:
Code:
/dev/block/mmcblk0p25 on /system type [B]ext3[/B] (rw,relatime,errors=continue,barrier=0,data=writeback)
/dev/block/mmcblk0p26 on /data type[B] ext3 [/B](rw,relatime,errors=continue,barrier=0,
data=writeback)
/dev/block/mmcblk0p27 on /cache type [B]ext3[/B] (rw,nodev,noatime,nodiratime,errors=co
ntinue,barrier=0,data=writeback)
/dev/block/mmcblk1p1 on /sdcard type vfat (rw,relatime,fmask=0000,dmask=0000,all
ow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-
ro)
Well, I'm quite sure the DS default partition format is ext4, mine is like wise ext4, you have got nothing to lose there, try to flash that customer recovery and format or convert your phone partitions to ext4, then flash any of the customs roms available around or a RUU if you want.
The easiest way to rectify is to RUU and start over. Unless you enjoy the frustration!
zorbakun said:
Well, I'm quite sure the DS default partition format is ext4, mine is like wise ext4, you have got nothing to lose there, try to flash that customer recovery and format or convert your phone partitions to ext4, then flash any of the customs roms available around or a RUU if you want.
Click to expand...
Click to collapse
thank you guys.
as i wrote above, i did RUU. and stuck at the updating screen.
could zorbakun tell me, how can i format the emmc with ext4(especially to cache)
download this Custom recovery, Flash it and there is an option to format/wipe the partitions in ext4 format or convert current ext3 to ext4, also try to flash one of the custom roms in the development section but first flash the custom recovery.
i ran fastboot oem boot, and got these info:
is there anything wrong about my cid?
Code:
... INFOsetup_tag addr=0xC0000100 cmdline add=0x8D09D070
INFOTAG:Ramdisk OK
INFOTAG:smi ok, size = 0
INFOTAG:hwid 0x0
INFOTAG:skuid 0x28102
INFOTAG:hero panel = 0x400010
INFOTAG:engineerid = 0x0
INFOMCP dual-die
INFOMCP dual-die
INFOTAG:mono-die = 0x0
INFOTAG: PS ID = 0x0
INFODevice CID is super CID
INFOCID is super CID
INFOBackup CID is empty
INFOsetting->[COLOR="Red"][B]cid::11111111[/B][/COLOR]
INFOserial number: SH*********8
INFOcommandline from head: no_console_suspend=1
INFOcommand line length =533
INFOactive commandline: board_saga.disable_uart2=0 board_saga.us
INFOb_h2w_sw=0 board_saga.disable_sdcard=0 diag.enabled=0 board_
INFOsaga.debug_uart=0 smisize=0 userdata_sel=0 androidboot.emmc=
INFOtrue androidboot.pagesize=4096 androidboot.baseband=38.03.0
INFO2.15_M androidboot.[COLOR="Red"][B]cid=11111111[/B][/COLOR] androidboot.batt_poweron=goo
INFOd_battery androidboot.carrier=ALL androidboot.mid=PG88*****
INFOandroidboot.keycaps=qwerty androidboot.mode=normal androidbo
INFOot.serialno=SH*********8 androidboot.bootloader=0.98.0000 zy
INFOgote_oneshot=off msm_watchdog.enable=1 kmemleak=off no_conso
INFOle_suspend=1
INFOaARM_Partion[0].name=misc
INFOaARM_Partion[1].name=recovery
INFOaARM_Partion[2].name=boot
INFOaARM_Partion[3].name=system
INFOaARM_Partion[4].name=cache
INFOaARM_Partion[5].name=userdata
INFOaARM_Partion[6].name=devlog
INFOaARM_Partion[7].name=pdata
INFOpartition number=8
INFOValid partition num=8
INFOjump_to_kernel: machine_id(3107), tags_addr(0x4400100), kern
INFOel_addr(0x4408000)
INFO-------------------hboot boot time:80883 msec
FAILED (status read failed (Too many links))
Edit: INFOsetting->cid::11111111 means it's super cid, and super cid is good!
It's the very same thing as what happened to me, thought I haven't done deep debugging like you did and my device is S-ON. I did step 5 and my device froze at updating bootloader too. I guess there is something wrong with the phone, I'm worried about this massive market update issue. Maybe you'll be able to provide some more informations.
Also, I'm very sorry to hear this, I hope you'll be able to fix it asap, as this is very strange issue (how can market or battery pulled out brick phone???).
Numline1 said:
(how can market or battery pulled out brick phone???.
Click to expand...
Click to collapse
indeed!!!!
well, i'm kinda glad i'm not the only one with this problem... so far, the phone is still working and only sometimes crashes, so i can live with it...
i guess replacing the chip as mentioned in the first post requires sending the device to htc... would that cost anything with my xtc-clip-s-offed device? if so, how much? an estimate would be nice...
szallah said:
well, i'm kinda glad i'm not the only one with this problem... so far, the phone is still working and only sometimes crashes, so i can live with it...
i guess replacing the chip as mentioned in the first post requires sending the device to htc... would that cost anything with my xtc-clip-s-offed device? if so, how much? an estimate would be nice...
Click to expand...
Click to collapse
if ur DS is S-OFF and can't be succeed in wipe data/cache, can't mount nor open...
i did this replacement in our local-telecomm-market not htc official service.
that cost me US$60.
Same happened to me DAMMIT !!! What can i do? Tell me
All you need do is reflash Recovery and fresh install your rom. DO NOT RUN FLASH THE Nandroid BACK UP. Use PB88 the method.
Replace the chip? lol.
wait wait wait. I had a problem, that my phone wouldn't boot up after a radio flash. In recovery it said
E:Can't mount /cache/recovery/command
E:Can't mount /cache/recovery/log
E:Can't open /cache/recovery/log
E:Can't mount /cache/recovery/last_log
E:Can't open /cache/recovery/last_log
I restored a nandroid backup and it booted up, with the new radio (i checked), What should i do now?
There are 2 issues that can cause these errors.
1) Messed up Partition table,
2) Broken eMMC chip (or more specifically, chip controller)
Issue 1 can be fixed by fixing the Partition table, which can be acheived by flashing an RUU.
Issue 2 cannot be fixed. (Unless you're a confident solder-er and know what you're doing, which chip to replace)
It is a hardware issue and your device will have to be returned.
Luckily, We don't know of anyone who has had an issue returning a rooted, s-off device.
There is more information in this thread, as well as how to know definatley whether you have the broken chip or not.
-Nipqer
Nipqer said:
There are 2 issues that can cause these errors.
1) Messed up Partition table,
2) Broken eMMC chip (or more specifically, chip controller)
Issue 1 can be fixed by fixing the Partition table, which can be acheived by flashing an RUU.
Issue 2 cannot be fixed. (Unless you're a confident solder-er and know what you're doing, which chip to replace)
It is a hardware issue and your device will have to be returned.
Luckily, We don't know of anyone who has had an issue returning a rooted, s-off device.
There is more information in this thread, as well as how to know definatley whether you have the broken chip or not.
-Nipqer
Click to expand...
Click to collapse
The partition table is written specifically by Recovery, therefore flashing a new Recovery should write a new partition table. As for a hardware error? I doubt if the phone would boot properly after the third of fourth time if this were the case. A hardware problem causes software errors which spreads quickly like a virus, and because there's an error, the phone gets gunked up and cannot be fixed by a wipe.
What solved the issue? I have the same problem... (
If you have the broken chip, you'll have to return it and get it replaced under warranty.
-Nipqer

Stuck at fastboot screen, but can't flash ROMs

I've recently received a Mi4i device from a friend who messed it up a little.. This looks hopeless, but I thought I might get some insights from folks around here..
When I hit the power button, I immediately see the fastboot screen. I can still get into recovery mode.
I'm using MiFlash, connecting the phone, and the device is detected. I use "flash all" to flash one of the few mi4i fastboot ROMs I dug up from the web, install successful. Then, the device boots itself immediately back to the fastboot screen each time
I'm out of ideas.. Is there anything else I could try?
Nadav
It seems to be pressing volume keys all the time, hence might be going into fastboot mode
stoppnadav said:
I've recently received a Mi4i device from a friend who messed it up a little.. This looks hopeless, but I thought I might get some insights from folks around here..
When I hit the power button, I immediately see the fastboot screen. I can still get into recovery mode.
I'm using MiFlash, connecting the phone, and the device is detected. I use "flash all" to flash one of the few mi4i fastboot ROMs I dug up from the web, install successful. Then, the device boots itself immediately back to the fastboot screen each time
I'm out of ideas.. Is there anything else I could try?
Nadav
Click to expand...
Click to collapse
Download TWRP file and flash it via fastboot. Then try a custom ROM. While flashing the file you can try fastboot boot twrp.img to boot into recovery. Then when TWRP opens up it will grant access to the storage, copy the files for flashing a custom ROM, don't forget the firmware zip file too. Try this if it helps.
Regards,
Sharan
sharan.nyn said:
Download TWRP file and flash it via fastboot. Then try a custom ROM. While flashing the file you can try fastboot boot twrp.img to boot into recovery. Then when TWRP opens up it will grant access to the storage, copy the files for flashing a custom ROM, don't forget the firmware zip file too. Try this if it helps.
Regards,
Sharan
Click to expand...
Click to collapse
Is there any other way to flash TWRP via fastboot without using ADB? I had USB Debugging Off in my device, before it got stuck in a boot loop. I can only access FASTBOOT and RECOVERY .
zak31 said:
Is there any other way to flash TWRP via fastboot without using ADB? I had USB Debugging Off in my device, before it got stuck in a boot loop. I can only access FASTBOOT and RECOVERY .
Click to expand...
Click to collapse
Actually we don't use ADB to flash the recovery. We always use FASTBOOT. The commands are to be ran when booted in fastboot mode. Just make sure that all the required drivers are installed or the phone will reboot at FASTBOOT mode if it is not detected by your computer.
ADB drives showing error code 10
sharan.nyn said:
Actually we don't use ADB to flash the recovery. We always use FASTBOOT. The commands are to be ran when booted in fastboot mode. Just make sure that all the required drivers are installed or the phone will reboot at FASTBOOT mode if it is not detected by your computer.
Click to expand...
Click to collapse
That's what is happening with me I think. I have installed all the ADB drivers required. When I go to Device manager, those drives show little yellow triangles with a !. I proceed to update them, they get updated but error code 10 shows up. Also, now my device isn't getting detected by my computer, and rebooting at FASTBOOT mode continuously. Sometimes, it does get detected by the computer. I enter into FASTBOOT mode and I start the flashing with MiFlash, then the device reboots itself. Please help.
zak31 said:
That's what is happening with me I think. I have installed all the ADB drivers required. When I go to Device manager, those drives show little yellow triangles with a !. I proceed to update them, they get updated but error code 10 shows up. Also, now my device isn't getting detected by my computer, and rebooting at FASTBOOT mode continuously. Sometimes, it does get detected by the computer. I enter into FASTBOOT mode and I start the flashing with MiFlash, then the device reboots itself. Please help.
Click to expand...
Click to collapse
Install Mi suite. Probably that will solve the issue. ... hopefully. :silly:
I am also facing similiar problem..... after flashing twrp when rebooting twrp via fastboot teturns error dtb not found...... if someone can help
i have the same problem,
I try to flash with any version of rom,
when i see the fastboot device info,
the bootloader status
(bootloader) Device unlocked: false
Click to expand...
Click to collapse
then i do bootloader unlock,
and the bootloader status become
(bootloader) Device unlocked: true
Click to expand...
Click to collapse
but after fastboot reboot,
the status of bootloader become false again,
(bootloader) Device unlocked: false
Click to expand...
Click to collapse
anyone know what shoult i do?
stoppnadav said:
I've recently received a Mi4i device from a friend who messed it up a little.. This looks hopeless, but I thought I might get some insights from folks around here..
When I hit the power button, I immediately see the fastboot screen. I can still get into recovery mode.
I'm using MiFlash, connecting the phone, and the device is detected. I use "flash all" to flash one of the few mi4i fastboot ROMs I dug up from the web, install successful. Then, the device boots itself immediately back to the fastboot screen each time
I'm out of ideas.. Is there anything else I could try?
Nadav
Click to expand...
Click to collapse
Were you able to solve this problem?. I have the same issue since past week. MiFlash works, tried fastboot commandline flashing, device restarts to fastboot only.
loaded twrp, unfortunately internal memory 0mb.
Hi guys,
+1 from me
I've totally screwed up ferrari.
Scenario: I was on Resurrection Remix 5.8.5 For some reason, I've started storage encryption. Probably it wasn't successful, and on next reboot, I've got error "Decryption unsuccessful, your password is ok, but data partition is corrupted, blah, blah, blah. I've successful rescued my storage files:
Code:
boot into TWRP:
adb pull /dev/block/mmcblk0p36
then, mounted mmcblk0p36 partition file under Linux on my PC (example):
sudo mkdir /mnt/data
sudo mount /home/stiw47/mmcblk0p36 /mnt/data
Whoala, few files was corrupted, but all from android internal storage (my personal files) was rescued.
Ok. After this, I've performed factory reset on phone, but device going to fastboot, not in Android OS. TWRP says that /data cannot be mounted.
I flashed latest MIUI from fastbot
Reboot
device going to fastboot, not in Android OS. TWRP says that /data, /system and /cache cannot be mounted.
Variable : In following text, "same" is equal to "device going to fastboot, not in Android OS. TWRP says that /data, /system and /cache cannot be mounted."
I've tried to flash fastboot ROM zilion times - same
Tried to flash from MI PC Suite - same (MI Suite giving "success" info)
XiaoMI Flash Tool - same (tool giving success info)
Was want to flash with QFIL (Qualcomm Flash Image Loader), after several Qualcomm Xiaomi driver installation, founded here and there over the internet, on two different PCs - No COM port detected, both in QFIL and in Device Manager
[*]Wipe from TWRP not working:​[*]Failed to mount '/system' (Invalid argument)
[*]Failed to mount '/cache' (Invalid argument)
[*]Failed to mount '/data' (Invalid argument)​[*]Format Data from TWRP not working:​[*]Failed to mount '/system' (Invalid argument)
[*]Failed to mount '/cache' (Invalid argument)
[*]Failed to mount '/data' (Invalid argument)​[*]Repair or change file system from TWRP not working:​[*]Failed to mount '/system' (Invalid argument)
[*]Failed to mount '/cache' (Invalid argument)
[*]Failed to mount '/data' (Invalid argument)​[*]Mount system cache data from TWRP not working:​[*]Failed to mount '/system' (Invalid argument)
[*]Failed to mount '/cache' (Invalid argument)
[*]Failed to mount '/data' (Invalid argument)​[*]TWRP => Advanced => Terminal:​
Code:
Example:
mount -o remount,rw /dev/block/mmcblk0p36 /data
giving error:
mount: '/data' not in /proc/mounts
(same for adb)
/proc/mounts is pretty empty (wtf)
Code:
adb shell
cat /proc/mounts
rootfs / rootfs rw,seclabel 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=949708k,nr_inodes=237427,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime,gid=3009,hidepid=2 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
tmpfs /tmp tmpfs rw,seclabel,relatime,size=949708k,nr_inodes=237427 0 0
adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
And here is the question
Can someone, please, upload /proc/mounts file here, I would like to do:
Code:
adb push mounts /proc/mounts
After that, I will try to reformat partitions with parted.
Of course, if someone has some more elegant solution, I'm listening, thanks in advance.
Notice: Sorry cause kilometer post, I was want to full explain that I've really tried every usual method to alive a phone. I suppose that first ~6 answers and propose would be - "Flash fastboot ROM", but this not helping in this stage.
Same problem with my MI4I
stiw47 said:
Hi guys,
+1 from me
I've totally screwed up ferrari.
Scenario: I was on Resurrection Remix 5.8.5 For some reason, I've started storage encryption. Probably it wasn't successful, and on next reboot, I've got error "Decryption unsuccessful, your password is ok, but data partition is corrupted, blah, blah, blah. I've successful rescued my storage files:
Code:
boot into TWRP:
adb pull /dev/block/mmcblk0p36
then, mounted mmcblk0p36 partition file under Linux on my PC (example):
sudo mkdir /mnt/data
sudo mount /home/stiw47/mmcblk0p36 /mnt/data
Whoala, few files was corrupted, but all from android internal storage (my personal files) was rescued.
Ok. After this, I've performed factory reset on phone, but device going to fastboot, not in Android OS. TWRP says that /data cannot be mounted.
I flashed latest MIUI from fastbot
Reboot
device going to fastboot, not in Android OS. TWRP says that /data, /system and /cache cannot be mounted.
Variable : In following text, "same" is equal to "device going to fastboot, not in Android OS. TWRP says that /data, /system and /cache cannot be mounted."
I've tried to flash fastboot ROM zilion times - same
Tried to flash from MI PC Suite - same (MI Suite giving "success" info)
XiaoMI Flash Tool - same (tool giving success info)
Was want to flash with QFIL (Qualcomm Flash Image Loader), after several Qualcomm Xiaomi driver installation, founded here and there over the internet, on two different PCs - No COM port detected, both in QFIL and in Device Manager
[*]Wipe from TWRP not working:​[*]Failed to mount '/system' (Invalid argument)
[*]Failed to mount '/cache' (Invalid argument)
[*]Failed to mount '/data' (Invalid argument)​[*]Format Data from TWRP not working:​[*]Failed to mount '/system' (Invalid argument)
[*]Failed to mount '/cache' (Invalid argument)
[*]Failed to mount '/data' (Invalid argument)​[*]Repair or change file system from TWRP not working:​[*]Failed to mount '/system' (Invalid argument)
[*]Failed to mount '/cache' (Invalid argument)
[*]Failed to mount '/data' (Invalid argument)​[*]Mount system cache data from TWRP not working:​[*]Failed to mount '/system' (Invalid argument)
[*]Failed to mount '/cache' (Invalid argument)
[*]Failed to mount '/data' (Invalid argument)​[*]TWRP => Advanced => Terminal:​
Code:
Example:
mount -o remount,rw /dev/block/mmcblk0p36 /data
giving error:
mount: '/data' not in /proc/mounts
(same for adb)
/proc/mounts is pretty empty (wtf)
Code:
adb shell
cat /proc/mounts
rootfs / rootfs rw,seclabel 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=949708k,nr_inodes=237427,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime,gid=3009,hidepid=2 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
tmpfs /tmp tmpfs rw,seclabel,relatime,size=949708k,nr_inodes=237427 0 0
adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
And here is the question
Can someone, please, upload /proc/mounts file here, I would like to do:
Code:
adb push mounts /proc/mounts
After that, I will try to reformat partitions with parted.
Of course, if someone has some more elegant solution, I'm listening, thanks in advance.
Notice: Sorry cause kilometer post, I was want to full explain that I've really tried every usual method to alive a phone. I suppose that first ~6 answers and propose would be - "Flash fastboot ROM", but this not helping in this stage.
Click to expand...
Click to collapse
Did you find any solutions for this. I have tried every single method mentioned above and getting same errors mentioned above like unable to mount/invalid cache/invalid data etc....
nepya1009 said:
Did you find any solutions for this. I have tried every single method mentioned above and getting same errors mentioned above like unable to mount/invalid cache/invalid data etc....
Click to expand...
Click to collapse
Hi,
Yes, I found solution, I bought MI 6

TWRP cannot mount /data; nothing 'sticking' using fastboot

Hi all,
hoping on the off-chance someone's still monitoring the Nexus 5 forums here
So decided to dust off the old Nexus 5 (now with extra COVID-19 time on my hands!) to use as a backup device, but having serious issues getting it up and running. I had it rooted years ago, and had no issues installing custom roms.
Now I'm having the following situation:
I cannot flash the factory image using fastboot, nor anything is 'sticking' to the phone when I try to re-flash individual component for the factory image. I've also tried to flash TWRP, but again, it doesn't stick and the only way i can boot into TWRP is by using
Code:
fastboot boot recovery.img
.
However in recovery, the data partition is not mounting and all the tutorials/guides I read about fixing it aren't working (e.g. repairing the partition-- get a 'unable to repair data' error; changing from EX4 to EX2 and back-- get 'failed to mount '/data' error).
Ran the following command in the terminal window in TWRP
Code:
cat /etc/fstab
and got the following output:
Code:
/dev/block/mmcblk0p25 /system ext4 rw 0 0
/dev/block/dm-0 /data ext4 rw 0 0
/dev/block/mmcblk0p27 /cache ext4 rw 0 0
/dev/block/mmcblk016 /persist ext 4 rw 0 0
/dev/block/mmcblk0p1 /firmware vfat rw 0 0
/usb-otg vfat rw 0 0
tried using the make_ext4fs command, but again- nothing happens.
Using TWRP 3.3.1-0 by the way
Any ideas? is the phone completely bricked? it's stuck in a bootloop where the google colours come up but freeze within half a second, repeat and continue.
Any advice would be very much appreciated!

Guide to Treble/GSI on the Palm Phone

From this thread: https://forum.xda-developers.com/pr...velopment/aosp-10-0-quack-phh-treble-t3992559, the TrebleCheck app indicates we need an arm64 "a-only" ROM. The Palm Phone is running vendor version 8.1.
Step 1: Download Sugar. This thread: https://forum.xda-developers.com/android/general/release-root-palm-phone-t4021201, has everything you need to know about Sugar. I ran the upgrade once to download the full stock ROM (make a backup as described). Warning, this erases all of your data.
Step 2: Follow this guide: https://forum.xda-developers.com/android/general/guide-porting-twrp-source-t3843473, to build a TWRP for the Palm Phone without source. I used the latest TWRP for the Asus Nexus 7 2013 LTE as my base. From your Palm upgrade backup, the recovery image is the one that starts with 'R', about 36MB. Rename your new TWRP image to match the stock recovery and replace it similar to the rooting guide for replacing the boot image.
Update: snoopy20 has shared his TWRP image here: https://forum.xda-developers.com/showpost.php?p=82654073&postcount=26
Step 3: Extract the system image you downloaded and rename and replace the stock system image. It's the largest file in your Sugar device folder.
Step 4: Re-run the upgrade in Sugar with your replaced images in place.
Step 5: You're probably stuck in a boot loop. Press and hold the power button until you get into recovery, which is now TWRP. First, I formatted data. Then push or otherwise copy this zip to the device: https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389 and install it from TWRP. The stock configuration should be fine, i.e. don't worry about re-naming the zip. Note, do NOT use adb sideload, since that seems to wreck the zip installer's ability to use its own file name to configure itself.
Update: The Universal dm-verity zip may not always work, in particular on AOSP Android 10 images. In this case, you can use another Android device and Magisk Manager to patch the Palm boot image. Push the boot image from your Palm backup (described in Step 1) to the other Android device. It's the mbn file that starts with 'B'. I chose to rename it to boot.img for easier use. Than use Magisk Manager to patch it. Push the modified boot image back to the Palm (in TWRP) and use TWRP to Install->Image it.
Step 6: Reboot! Wipe data and cache for good measure, and you should be set!
All credit goes to the folks from the links above for creating the Treble system image, TWRP guide, and dm-verity script. Thanks to snoopy20 for his TWRP image.
Things that work so far:
* Almost everything
Doesn't work
* Soft key requires an app, such as Key Mapper, to use
* Screen auto brightness is missing
Can you post the TWRP you created?
snoopy20 said:
Can you post the TWRP you created?
Click to expand...
Click to collapse
Is it kosher to publicly post a TWRP created like this (i.e. not from source)?
Additionally, I'm not entirely confident I didn't screw something up, so I'm a little wary to risk everyone's device. Specifically, I do not know what would happen if you get caught in a boot loop and don't have a functioning recovery to boot into in order to restore...
Yeah you just write "Unofficial" or something in the title. Right now I'm happy to brick the Palm, I'm 99% of the way to dropping it but it would be fantastic if I can get a stock Android on it.
By the way do the restrictions, i.e wifi tethering, get applied by the Vendor package?
snoopy20 said:
Yeah you just write "Unofficial" or something in the title. Right now I'm happy to brick the Palm, I'm 99% of the way to dropping it but it would be fantastic if I can get a stock Android on it.
By the way do the restrictions, i.e wifi tethering, get applied by the Vendor package?
Click to expand...
Click to collapse
Hard for me to test since I don't have a supported SIM, but the tethering menu is available in Settings. You'll have to try it and let us know.
If you post the TWRP I'll do so. My biggest concern is if I **** up building it. I sent you a PM.
snoopy20 said:
If you post the TWRP I'll do so. My biggest concern is if I **** up building it. I sent you a PM.
Click to expand...
Click to collapse
Just waiting for android file host to approve
I've attempted to repack but found:
1. Two fstab files are fstab.qcom and fstab.grouper, don't know if I should delete them but instructions seem to indicate I should.
2. Stock ramdisk folder doesn't have a fstab.* file to copy over.
I ended up with this twrp.fstab. Note the encryption part from /data is gone? Unsure if this is ok.
# mount point fstype device
#twrp.fstab
/system ext4 /dev/block/bootdevice/by-name/system
/cache ext4 /dev/block/bootdevice/by-name/cache
/data ext4 /dev/block/bootdevice/by-name/userdata
/misc emmc /dev/block/bootdevice/by-name/misc
/boot emmc /dev/block/bootdevice/by-name/boot
/recovery emmc /dev/block/bootdevice/by-name/recovery
/external_sd vfat /dev/block/mmcblk1p1 flags=removable;storage;display="SDCARD"
/usb-otg auto /dev/block/sda1 flags=removable;storage;display="USB-OTG"
Just a big heads up, when trying to connect to the network today (Visible) I noticed that my IMEI was 0000.... I have never successfully connected the Palm phone and while the behavior now is consistent with my issues before, I can't say whether or not flashing the GSI as outlined here erased my IMEI.
Proceed with caution.
I'm not proceeding at all unless you post your twrp or verify the issues I've had creating it.
I read the IMEI is held on another partition, type 'efs'. I can't see Sugar killing it. More likely your fstab options aren't mounting it.
---------- Post added at 06:57 PM ---------- Previous post was at 06:33 PM ----------
Here is a list of all the mountpoints on a working phone. At a guess the IMEI is held in /firmware. Do you have this mounted?
rootfs on / type rootfs (ro,seclabel,size=1358776k,nr_inodes=339694)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=1439668k,nr_inodes=359917,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime,gid=3009,hidepid=2)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
/dev/block/mmcblk0p27 on /system type ext4 (ro,seclabel,relatime,discard,data=ordered)
/dev/block/mmcblk0p28 on /vendor type ext4 (ro,seclabel,relatime,discard,data=ordered)
none on /acct type cgroup (rw,relatime,cpuacct)
debugfs on /sys/kernel/debug type debugfs (rw,seclabel,relatime)
tmpfs on /mnt type tmpfs (rw,seclabel,relatime,size=1439668k,nr_inodes=359917,mode=755,gid=1000)
none on /config type configfs (rw,relatime)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
pstore on /sys/fs/pstore type pstore (rw,seclabel,relatime)
/dev/block/mmcblk0p52 on /fotadata type ext4 (rw,seclabel,nosuid,nodev,noatime,discard,noauto_da_alloc,data=ordered)
/dev/block/mmcblk0p29 on /cache type ext4 (rw,seclabel,nosuid,nodev,noatime,data=ordered)
/dev/block/mmcblk0p12 on /dsp type ext4 (ro,seclabel,nosuid,nodev,relatime,data=ordered)
/dev/block/mmcblk0p1 on /firmware type vfat (ro,context=ubject_r:firmware_file:s0,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=437,iocharset=iso8859-1,shortname=lower,errors=remount-ro)
/dev/block/mmcblk0p30 on /persist type ext4 (rw,seclabel,nosuid,nodev,noatime,data=ordered)
tmpfs on /storage type tmpfs (rw,seclabel,relatime,size=1439668k,nr_inodes=359917,mode=755,gid=1000)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,seclabel,relatime)
tmpfs on /sbin type tmpfs (rw,seclabel,relatime,size=1439668k,nr_inodes=359917,mode=755)
/sbin/.magisk/block/persist on /sbin/.magisk/mirror/persist type ext4 (rw,seclabel,relatime,data=ordered)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
/dev/block/dm-0 on /data type ext4 (rw,seclabel,nosuid,nodev,noatime,discard,noauto_da_alloc,resuid=10010,data=ordered)
/sbin/.magisk/block/system on /sbin/.magisk/mirror/system type ext4 (ro,seclabel,relatime,discard,data=ordered)
/sbin/.magisk/block/vendor on /sbin/.magisk/mirror/vendor type ext4 (ro,seclabel,relatime,discard,data=ordered)
/sbin/.magisk/block/data on /sbin/.magisk/mirror/data type ext4 (rw,seclabel,relatime,discard,noauto_da_alloc,resuid=10010,data=ordered)
/data/media on /mnt/runtime/default/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid)
/data/media on /storage/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid)
/data/media on /mnt/runtime/read/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=23,derive_gid)
/data/media on /mnt/runtime/write/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid)
The original firmware recovery has the /firmware mounted as the sdcard so depending on how you mounted for twrp could you have wiped it?
/dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1 wait,verify
/dev/block/bootdevice/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered wait,check
/dev/block/bootdevice/by-name/fotadata /fotadata ext4 noatime,nosuid,nodev,barrier=1,data=ordered wait,check
/dev/block/bootdevice/by-name/vendor /vendor ext4 ro,barrier=1 wait,verify
/dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc wait,check
/dev/block/mmcblk0p1 /sdcard vfat nosuid,nodev wait
/dev/block/bootdevice/by-name/boot /boot emmc defaults defaults
/dev/block/bootdevice/by-name/recovery /recovery emmc defaults defaults
/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
/dev/block/bootdevice/by-name/fsg /fsg emmc defaults defaults
Added my TWRP to the OP
OK I've compared and I can't see anything major. The only thing you do have is a few more mount points which I've not had in mine (listed). Where are they from? I think mounting the sdcard (modem firmware) is a bad idea so I'm going to skip that.
/sbl1 emmc /dev/block/bootdevice/by-name/sbl1
#/sbl2 emmc /dev/block/bootdevice/by-name/sbl2
#/sbl3 emmc /dev/block/bootdevice/by-name/sbl3
/tz emmc /dev/block/bootdevice/by-name/tz
/rpm emmc /dev/block/bootdevice/by-name/rpm
/aboot emmc /dev/block/bootdevice/by-name/aboot
#/sbl2b emmc /dev/block/bootdevice/by-name/sbl2b
#/sbl3b emmc /dev/block/bootdevice/by-name/sbl3b
#/tzb emmc /dev/block/bootdevice/by-name/tzb
#/rpmb emmc /dev/block/bootdevice/by-name/rpmb
#/abootb emmc /dev/block/bootdevice/by-name/abootb
#/usb-otg vfat /dev/block/sda1 /dev/block/sda flags=removable;storage;display=USB-OTG
/external_sd vfat /dev/block/mmcblk0p1
/usb-otg auto /dev/block/sda1
So, I have twrp installed, and a fast bootloop almost instantly on start. I haven't been able to solve it thus far. I can get into twrp which is something though.
snoopy20 said:
OK I've compared and I can't see anything major. The only thing you do have is a few more mount points which I've not had in mine (listed). Where are they from? I think mounting the sdcard (modem firmware) is a bad idea so I'm going to skip that.
/sbl1 emmc /dev/block/bootdevice/by-name/sbl1
#/sbl2 emmc /dev/block/bootdevice/by-name/sbl2
#/sbl3 emmc /dev/block/bootdevice/by-name/sbl3
/tz emmc /dev/block/bootdevice/by-name/tz
/rpm emmc /dev/block/bootdevice/by-name/rpm
/aboot emmc /dev/block/bootdevice/by-name/aboot
#/sbl2b emmc /dev/block/bootdevice/by-name/sbl2b
#/sbl3b emmc /dev/block/bootdevice/by-name/sbl3b
#/tzb emmc /dev/block/bootdevice/by-name/tzb
#/rpmb emmc /dev/block/bootdevice/by-name/rpmb
#/abootb emmc /dev/block/bootdevice/by-name/abootb
#/usb-otg vfat /dev/block/sda1 /dev/block/sda flags=removable;storage;display=USB-OTG
/external_sd vfat /dev/block/mmcblk0p1
/usb-otg auto /dev/block/sda1
Click to expand...
Click to collapse
I think the guide for porting TWRP mentioned to add it, so I did.
snoopy20 said:
So, I have twrp installed, and a fast bootloop almost instantly on start. I haven't been able to solve it thus far. I can get into twrp which is something though.
Click to expand...
Click to collapse
Sounds similar to me. Did you flash the new system as well? If so, this is when you use TWRP to flash the zip to disable dm-verity.
I did, then the dm-verity but with no success. Assuming /system was corrupt or wrong I've deleted it. I'm now trying to work out how to flash the system.img without fastboot (which I don't have).
So far dd is ending up with a corrupt partition and twrp insists on a zip for system flash. Trying to figure out how to convert it.
---------- Post added at 09:44 PM ---------- Previous post was at 09:26 PM ----------
I did, then the dm-verity but with no success. Assuming /system was corrupt or wrong I've deleted it. I'm now trying to work out how to flash the system.img without fastboot (which I don't have).
So far dd is ending up with a corrupt partition and twrp insists on a zip for system flash. Trying to figure out how to convert it.
Actually you said you tried 10 unsuccessfully, so how did you then flash the v8 image?
snoopy20 said:
So far dd is ending up with a corrupt partition and twrp insists on a zip for system flash. Trying to figure out how to convert it.
Click to expand...
Click to collapse
TWRP doesn't say "Install Image" at the bottom when you go to Install?
Actually you said you tried 10 unsuccessfully, so how did you then flash the v8 image?
Click to expand...
Click to collapse
I'm assuming the 2nd link down in OP (github).
This is exciting!
Anytime I got stuck, from TWRP I used
Code:
adb reboot edl
then I used Sugar to reflash everything all over again.
Phew, I didn't know about that one. I'll try again.
You can't flash an img from TWRP, there's no boot partition to enter fastboot mode.
I'd originally downloaded the nogapps without su and added Magisk.zip after, this caused an instant bootloop. The one with build in gapps+su works. It's possible to disable all gapps and related services except GoogleOne (I installed OpenLauncher into /system/app then removed GoogleOne by force). After this "Google" can be removed and all notifications about Google Services end.
I recommend you take down the twrp and remove the line which mounts the firmware partition as sdcard in case this is what wiped your IMEI. I build my own without this line and IMEI survived.
Tested
Wifi hotspot is working!
Bluetooth, camera, all USB,
Stability
Not working
Thee dots button (don't think it's a big deal as you get the three icons for back etc by default).
Auto screen brightness

Categories

Resources