nexus with broken file system, cannot wipe - Samsung Galaxy Nexus

Hi everybody,
I'm in deep troubles with my nexus (maguro).
Yesterday, it started to reboot after showing for about 5-10 seconds the lock screen.
the phone is rooted, Iand the last rom (cyanogenmod) was running stable in the last 6 months.
twrp 2.8.0.1 was installed, so I Rebooted to fastboot to flash the 2.8.6.0.
And then the weird part begins:
it's like every partition is read only, but from the mount command it doesn't look like it.
flashing the new recovery is a success, but after reboot the 2.8.0.1 is still there.
factory reset successful, and everything is like before.
wiping sdcard, nothing happens.
if I try to create a backup in twrp, it fails after 20 seconds or so. (I've copied everything to the pc using the pull command in adb).
Try to fix or to change the partitions filesystem in twrp doesn't change anything.
I tried also to change the file system in parted, through the adb shell,this happens:
Code:
~ # ←[6nparted /dev/block/mmcblk0p12 mkfs ext2
parted /dev/block/mmcblk0p12 mkfs ext2
Warning: The existing file system will be destroyed and all data on the
partition will be lost. Do you want to continue?
parted: invalid token: ext2
Yes/No? yes
yes
yes
Partition number? 1
1
1
File system type? [ext2]?
Error: File system was not cleanly unmounted! You should run e2fsck. Modifying
an unclean file system could cause severe corruption.
Ignore/Cancel? i
i
i
Error: File system has an incompatible feature enabled. Compatible features are
has_journal, dir_index, filetype, sparse_super and large_file. Use tune2fs or
debugfs to remove features.
You found a bug in GNU Parted! Here's what you have to do:
Don't panic! The bug has most likely not affected any of your data.
Help us to fix this bug by doing the following:
Check whether the bug has already been fixed by checking
the last version of GNU Parted that you can find at:
...
Please check this version prior to bug reporting.
If this has not been fixed yet or if you don't know how to check,
please visit the GNU Parted website:
...
for further information.
Your report should contain the version of this release (1.8.8.1.179-aef3)
along with the error message below, the output of
parted DEVICE unit co print unit s print
and the following history of commands you entered.
Also include any additional information about your setup you
consider important.
Error: SEGV_MAPERR (Address not mapped to object)
Aborted
and of course nothing changes.
so, I have access to adb in recovery and to fastboot, there is a way to wipe completely the filesystem and start from scratch, or load a different kernel, that would help?
If I send with adb push a new rom to the sdcard, twrp fails and at the next reboot the files disappear.
this is my mount result:
Code:
~ # ←[6nmount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,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)
/dev/block/mmcblk0p11 on /cache type ext4 (rw,seclabel,relatime,user_xattr,barri
er=1,data=ordered)
/dev/block/mmcblk0p12 on /data type ext4 (rw,seclabel,relatime,user_xattr,barrie
r=1,data=writeback)
/dev/block/mmcblk0p12 on /sdcard type ext4 (rw,seclabel,relatime,user_xattr,barr
ier=1,data=writeback)
/dev/block/mmcblk0p10 on /system type ext4 (rw,seclabel,relatime,user_xattr,barr
ier=1,data=ordered)
and remounting in rw the partitions has no effect.
Even the parted, e2fsck, etc files disappear from /sbin after each reboot.
thank you
edit:
Having a second nexus, I could take a look at the partitions, and the difference seems to be the data=writeback options.
I'm looking for a procedure to make them "ordered" as the other phone.
edit2:
Code:
/tmp # ←[6ntune2fs -l /dev/block/mmcblk0p12 | grep features
tune2fs -l /dev/block/mmcblk0p12 | grep features
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
Filesystem features: has_journal ext_attr resize_inode filetype needs_recov
ery extent sparse_super large_file
/tmp # ←[6ne2fsck -f /dev/block/mmcblk0p12
e2fsck -f /dev/block/mmcblk0p12
e2fsck 1.42.9 (28-Dec-2013)
/dev/block/mmcblk0p12: recovering journal
Superblock needs_recovery flag is clear, but journal has data.
Run journal anyway<y>? y
y
yes
e2fsck: unable to set superblock flags on /dev/block/mmcblk0p12
/dev/block/mmcblk0p12: ********** WARNING: Filesystem still has errors *********
*
/tmp #
/tmp # ←[6ntune2fs -O ^has_journal /dev/block/mmcblk0p12
tune2fs -O ^has_journal /dev/block/mmcblk0p12
tune2fs 1.42.9 (28-Dec-2013)
The needs_recovery flag is set. Please run e2fsck before clearing
the has_journal flag.
Stuck here at the moment, cannot set superblock flags..
edit3:
Tested every possible superblock position, no luck.
I'm starting to think that the internal memory could be dead, but the phone in fastboot and recovery mode works fine.
I forgot to say that I've tried also the fastboot -w command, it works a lot (about 270 seconds) but no effect.

Related

Phone stuck in reboot recovery... Help!

I was trying to follow the steps below to install the optical trackpad wake-up. I did the first step "adb reboot recovery". Couldn't get past there. Now my phone is stuck in reboot recovery. How do I get it out and can I do this without reformatting the phone?
zerf said:
I installed this and it worked perfect. Download the file and put the qwerty.kl file in your directory that adb is located. Then follow the commands below.
while phone is powered on plug it in and then do
Code:
adb reboot recovery
Once booted in to recovery do
Code:
adb shell
mount -a
(it will give error saying it couldnt mount curtain things. This is OK)
Looks like this
Code:
~ # mount -a
mount -a
mount: mounting /dev/block/mmcblk1 on /sdcard failed: Invalid argument
mount: mounting /dev/block/mmcblk1p2 on /sd-ext failed: No such file or directory
Now run
Code:
df
to make sure that /system is in the list that it outputs.
Should look like this.
Code:
~ # df
df
Filesystem 1K-blocks Used Available Use% Mounted
tmpfs 206848 0 206848 0% /dev
/dev/block/mmcblk0p2 198337 7453 190884 4% /cache
/dev/block/mmcblk0p1 765992 153464 612528 20% /data
/dev/block/mtdblock6 152576 122712 29864 80% /datadat
/dev/block/mtdblock3 253952 180320 73632 71% /system
then
Code:
cd /system/usr/keylayout
cp qwerty.kl qwerty.kl.old
(do this so we have a backup incase we need to go back)
now type exit and then run this
Code:
adb push qwerty.kl /system/usr/keylayout
adb reboot
once booted you should be able to power the screen on with your trackpad.
**** I have noticed that if your phone isn't waking by the trackpad try pressing a little harder or holding the button down for a little longer and then it usually works fine****
Click to expand...
Click to collapse
Sorry MODS for making this thread! I figured it out.

Can't mount /system as read-write

Hello folks,
on my HTC Desire with OpenDesire 3.5.2 I'm trying to install the dropbear ssh-deamon according to a german tutorial (I'm not allowed to put the link here... ).
It is on www and then android-hilfe.de and then, go /root-hacking-modding-fuer-motorola-milestone/14241-per-ssh-auf-den-milestone.html
I'm connected to the phone using adb and shell'd into.
Now, they say that I have to mount /system as read-write to put a file (dropbear) into /system/bin. The command is
Code:
mount -o remount,rw /dev/block/mtdblock3 /system
and results in no errors. mount then says:
Code:
rootfs on / type rootfs (ro,relatime)
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)
none on /acct type cgroup (rw,relatime,cpuacct)
tmpfs on /mnt/asec type tmpfs (rw,relatime,mode=755,gid=1000)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
/dev/block/mtdblock3 on /system type yaffs2 (rw,relatime)
/dev/block/mtdblock5 on /data type yaffs2 (rw,nosuid,nodev,relatime)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nosuid,nodev,relatime)
/sys/kernel/debug on /sys/kernel/debug type debugfs (rw,relatime)
/dev/block/vold/179:1 on /mnt/sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/vold/179:1 on /mnt/secure/asec type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /mnt/sdcard/.android_secure type tmpfs (ro,relatime,size=0k,mode=000)
so in my opinion, /system shoult be writable.
But everything I try results in an "Out of memory" error: Creating directories, copying files - anything.
Only deleting files is possible: I backed-up and then deleted some ringtones from /system/media/audio/ringtones, and I'm also not able to copy the backup of them I did before onto the sdcard back into the directory again
I read in another thread, that the error "Out of memory" itself is a bug and should mean "No permission". But why don't I have permission?
df -h gives me
Code:
Filesystem Size Used Available Use% Mounted on
tmpfs 203.4M 0 203.4M 0% /dev
tmpfs 203.4M 0 203.4M 0% /mnt/asec
/dev/block/mtdblock3 250.0M 106.4M 143.6M 43% /system
/dev/block/mtdblock5 147.6M 53.9M 93.8M 36% /data
/dev/block/mtdblock4 40.0M 1.1M 38.9M 3% /cache
/dev/block/vold/179:1
3.7G 2.9G 744.3M 80% /mnt/sdcard
/dev/block/vold/179:1
3.7G 2.9G 744.3M 80% /mnt/secure/asec
so there definitively IS enough memory for a 720kB file.
Any ideas?
You can only write to system on the desire via adb from recovery.
If above post didn't explain it enough...
There is no write access to /system partition yet, except via a overlay file system. Have a search and you'll find, like everybody else.
thank you! Yes, that is the problem. I read this also somewhere, but didn't remember it.
I still cant write files even though im in recovery?
zoltrix said:
I still cant write files even though im in recovery?
Click to expand...
Click to collapse
Type "adb remount"
(Without "")
zHk3R said:
Type "adb remount"
(Without "")
Click to expand...
Click to collapse
Im trying to relfash my recovery and i keep getting the no space issue.
If i type in adb remount, i can no longer mount my sd card that is holding my image..
http://forum.xda-developers.com/showthread.php?t=805141
EDIT: If i figure out how to s-off my phone, will that fix it?
zoltrix said:
Im trying to relfash my recovery and i keep getting the no space issue.
If i type in adb remount, i can no longer mount my sd card that is holding my image..
http://forum.xda-developers.com/showthread.php?t=805141
EDIT: If i figure out how to s-off my phone, will that fix it?
Click to expand...
Click to collapse
Just follow the thread in Desire Android Development and you'll have S-OFF easy.
PRO TIP: Use a flash drive rather than burning the .iso on a CD.
Yea but, will i need s-off to flash this recovery?
I know s-off lets you do stuff within fastboot, but im not too sure what taht really means
zoltrix said:
Yea but, will i need s-off to flash this recovery?
I know s-off lets you do stuff within fastboot, but im not too sure what taht really means
Click to expand...
Click to collapse
nevermind, ive done my research and s-off fixed my problem!
details
could you please describe in a little bit more details how you have managed to write the /system mount point ?
thanks in advance ...
btw, there are o bunch of guys that want this answer
What? and Why?
I too would like to know more about writing to /system.
adb remount appears to switch the mount point from "ro" to "rw" (as shown with mount command) but I still get the same "Read-only file system" response when I try to adb push files.
What exactly is the issue here? Is it related to S-ON / S-OFF ?
What do I have to do to be able to write to /system?
(other than reboot into recovery; when I copy files in Recovery, they are gone after a normal reboot)
Thanks

[Q] What if formatting with mkfs.vfat does not complete?

As already noted here http://forum.xda-developers.com/showthread.php?p=35801278#post35801278
my KF's SD card seems to be "corrupt". When booting into recovery all I see is the TWRP boot/background screen (no menus etc). I can launch adb shell.
"df" does not complete:
#df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 228596 32 228564 0% /dev
but nothing more...
"mount" completes and shows (all?) mount points:
#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/mmcblk0p12 on /sdcard type vfat (rw,nodev,noatime,nodiratime,fmask=0000,dmask=0000 ,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
Then I tried formatting the the SD card:
#busybox1 mkfs.vfat /dev/block/mmcblk0p12
but this does not complete neither.
What else can/should I try?
I also played around with with SoupKit. To no avail.
Thx
Clemens
If this is a first gen. kindle http://forum.xda-developers.com/showthread.php?t=1949372 and http://forum.xda-developers.com/showthread.php?t=1850038 may be useful.
# umount /sdcard
umount: can't umount /sdcard: Device or resource busy
who could be using the mount point?
Side note (as mentioned in the other thread):
Switching into fastboot moe
# idme bootmode 4002
fails too... the command does not complete
Check to see if you have bad blocks on your sdcard:
Code:
adb shell
dd if =/dev/block/mmcblk0p12 of=/dev/null
It should return your ins, outs and partition size. If it freezes or doesn't do anything for more than 10 minutes, you probably have bad blocks.
And you should probably check the data and cache partitions as well.
If you run into bad blocks (the dreaded EMMC bug), you'll have to use the partition workaround found somewhere in this thread.
"That's a special kind of stupid. The kind that makes me laugh."
First of all thanks for all your help and of course: Merry Christmas!
soupmagnet said:
If it freezes or doesn't do anything for more than 10 minutes, you probably have bad blocks.
Click to expand...
Click to collapse
thats what it does ...rather...
soupmagnet said:
And you should probably check the data and cache partitions as well.
Click to expand...
Click to collapse
How? I recreated them using SoupKit several time...
soupmagnet said:
partition workaround
Click to expand...
Click to collapse
are you talking about this here? http://forum.xda-developers.com/showthread.php?t=1388996
Usually, if the sdcard is affected by the EMMC bug, so too will the data and cache partitions be affected (possibly even system). As a matter of fact, based on your description, it probably wouldn't hurt to check the recovery partition as well
Check them the same as with the sdcard:
Code:
dd if=/dev/block/mmcblk0p5 of=/dev/null <recovery>
dd if=/dev/block/mmcblk0p9 of=/dev/null <system>
dd if=/dev/block/mmcblk0p10 of=/dev/null <data>
dd if=/dev/block/mmcblk0p11 of=/dev/null <cache>
"That's a special kind of stupid. The kind that makes me laugh."
soupmagnet said:
Code:
dd if=/dev/block/mmcblk0p5 of=/dev/null <recovery>
dd if=/dev/block/mmcblk0p9 of=/dev/null <system>
dd if=/dev/block/mmcblk0p10 of=/dev/null <data>
dd if=/dev/block/mmcblk0p11 of=/dev/null <cache>
Click to expand...
Click to collapse
as expected, none of the dd's comes to an end ...
If only I could unmount the sdcard ...
I guess it's recovery "sitting" on it?
#ps
...
1291 root 19544 R /sbin/recovery
1292 root 3416 S /sbin/adbd recovery
...
How can I proceed? Having no fastboot, not being able to use parted...

unified storage setup on re-partitioned FP1

In reference to the new storage configuration scheme mentioned in this thread
http://forum.xda-developers.com/showpost.php?p=54537828&postcount=677
I would like to create a new discussion for people who already implemented the re-partitioning of their phones following this method
http://forum.xda-developers.com/wiki/Fairphone_Fairphone/Guides#How_to_partition_your_Fairphone
Please share your experience and confirm if the re-partitioning needs to be reverted prior to implementing the new storage scheme which uses fuse.
Donat.Callens said:
I would like to create a new discussion for people who already implemented the re-partitioning of their phones following this method
http://forum.xda-developers.com/wiki/Fairphone_Fairphone/Guides#How_to_partition_your_Fairphone
Please share your experience and confirm if the re-partitioning needs to be reverted prior to implementing the new storage scheme which uses fuse.
Click to expand...
Click to collapse
Used that method, worked like a charm. Since I'm using AOSP and there have been zero updates for it, I probably won't reformat unless Fairphone starts updating their AOSP OS as well. Will update this post when/if they do.
to repartition or not to repartition
How about people with a repartitioned phone that applied the new storage scheme? Should we revert back to 1GB for the /data partition beforehand?
Donat.Callens said:
How about people with a repartitioned phone that applied the new storage scheme? Should we revert back to 1GB for the /data partition beforehand?
Click to expand...
Click to collapse
Hello, The partition upgrader rewrites MBR/EBR1/EBR2 *after* performing the update to the /system partition. It assumes the /system partition is not altered. I have not tried modifying the partition layout using the methods discussed on this forum (modifying the extended master boot record). As a result of the upgrade EBR2 is no longer used but remains present. MBR is not altered so only EBR2 and the PMT partition are modified before the cache and data partition are formatted. If only /data and the FAT partition are modified you should be fine. These are at the "end" of the disk.
I previously tried to download the APK from the link on the WIKI bellow but ended up downloading the wrong file(addware from the hosting company?) this is where I gave up.
http://forum.xda-developers.com/wiki/Fairphone_Fairphone/Guides#How_to_partition_your_Fairphone
download the repartitioning tool
_keesj said:
I previously tried to download the APK from the link on the WIKI bellow but ended up downloading the wrong file(addware from the hosting company?) this is where I gave up.
http://forum.xda-developers.com/wiki/Fairphone_Fairphone/Guides#How_to_partition_your_Fairphone
Click to expand...
Click to collapse
Here is the original thread with the tool:
http://www.movilesdualsim.com/tema/...ilmente-data-apps-com-4gb-8gb-16gb-rom.31769/
This site refers to another download links to the same file:
http://www.china-devices.com/Thread-Tool-App-for-repartitioning-MTK-6589-Memory
As sear for Meteos MTK6589 will pop up many sites where it is to be found.
Donat.Callens said:
Here is the original thread with the tool:
http://www.movilesdualsim.com/tema/...ilmente-data-apps-com-4gb-8gb-16gb-rom.31769/
Click to expand...
Click to collapse
The original thread explains that you should perform a backup of EBR1 and EBR2 for safety. I assume this means only those two are modified. Could this mean we can apply the new cherry partitioning scheme on a re-partitioned phone without prior modification?
Note: hereby the mentionned commands for the backup
su
dd if=/dev/ebr1 of=/sdcard/EBR1 bs=512 count=1
dd if=/dev/ebr2 of=/sdcard/EBR2 bs=512 count=1
Donat.Callens said:
The original thread explains that you should perform a backup of EBR1 and EBR2 for safety. I assume this means only those two are modified. Could this mean we can apply the new cherry partitioning scheme on a re-partitioned phone without prior modification?
Note: hereby the mentionned commands for the backup
su
dd if=/dev/ebr1 of=/sdcard/EBR1 bs=512 count=1
dd if=/dev/ebr2 of=/sdcard/EBR2 bs=512 count=1
Click to expand...
Click to collapse
I changed my partition using the above tool and was able to perform a 1.3 -> 1.6 -> 1.6 FUSE update afterwards. This is not an endorsement but it does seam to work.
it did not seem to work for me
_keesj said:
I changed my partition using the above tool and was able to perform a 1.3 -> 1.6 -> 1.6 FUSE update afterwards. This is not an endorsement but it does seam to work.
Click to expand...
Click to collapse
I'm afraid I must report otherwise from my personal experience. I had previously re-partitioned my phone with a 4GB internal space storage. When applying the new FP partitioning schema, I did not loose my data as I should have. I am now stuck with bizarre values for the partition sizes. I will post the output of these commands here in my next post: df and mount. Please inform me if other information is required or if an official FP support request is preferable.
Donat.Callens said:
I will post the output of these commands here in my next post: df and mount.
Click to expand...
Click to collapse
$ df
Filesystem Size Used Free Blksize
/dev 487M 52K 487M 4096
/mnt/secure 487M 0K 487M 4096
/mnt/asec 487M 0K 487M 4096
/mnt/asec/com.camsam.plus-1 22M 19M 2M 4096
/mnt/asec/com.nuance.swype.dtc-1 36M 32M 3M 4096
/mnt/asec/com.koushikdutta.backup.license-1 1M 280K 1M 4096
/mnt/asec/ginlemon.flowerpro-1 5M 3M 1M 4096
/mnt/obb 487M 0K 487M 4096
/system 639M 351M 288M 4096
/data 3G 1G 2G 4096
/cache 124M 4M 119M 4096
/mnt/cd-rom 1M 1M 0K 2048
/protect_f 8M 4M 4M 4096
/protect_s 8M 4M 4M 4096
/storage/emulated 487M 0K 487M 4096
/storage/sdcard1 7G 6G 425M 32768
/storage/emulated/0 3G 1G 2G 4096
/storage/emulated/0/Android/obb 3G 1G 2G 4096
/storage/emulated/legacy 3G 1G 2G 4096
/storage/emulated/legacy/Android/obb 3G 1G 2G 4096
$ mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/secure tmpfs rw,relatime,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
/dev/block/dm-0 /mnt/asec/com.camsam.plus-1 ext4 ro,dirsync,nosuid,nodev,noatime 0 0
/dev/block/dm-1 /mnt/asec/com.nuance.swype.dtc-1 ext4 ro,dirsync,nosuid,nodev,noatime 0 0
/dev/block/dm-2 /mnt/asec/com.koushikdutta.backup.license-1 ext4 ro,dirsync,nosuid,nodev,noatime 0 0
/dev/block/dm-3 /mnt/asec/ginlemon.flowerpro-1 ext4 ro,dirsync,nosuid,nodev,noatime 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
/[email protected] /system ext4 ro,noatime,noauto_da_alloc,commit=1,data=ordered 0 0
/[email protected] /data ext4 rw,nosuid,nodev,noatime,discard,noauto_da_alloc,data=ordered 0 0
/[email protected] /cache ext4 rw,nosuid,nodev,noatime,discard,noauto_da_alloc,data=ordered 0 0
/dev/block/loop0 /mnt/cd-rom iso9660 ro,relatime 0 0
/[email protected]_f /protect_f ext4 rw,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered 0 0
/[email protected]_s /protect_s ext4 rw,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
tmpfs /storage/emulated tmpfs rw,nosuid,nodev,relatime,mode=050,gid=1028 0 0
/dev/block/vold/179:97 /storage/sdcard1 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/fuse /storage/emulated/0 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/emulated/0/Android/obb fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/emulated/legacy fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/emulated/legacy/Android/obb fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
Donat.Callens said:
I'm afraid I must report otherwise from my personal experience. I had previously re-partitioned my phone with a 4GB internal space storage. When applying the new FP partitioning schema, I did not loose my data as I should have. I am now stuck with bizarre values for the partition sizes. I will post the output of these commands here in my next post: df and mount. Please inform me if other information is required or if an official FP support request is preferable.
Click to expand...
Click to collapse
Can you please execute the following (as root e.g. adb shell ; su) and paste the result?
/system/bin/fp_part -r -f /dev/pmt | grep FAT; echo $?
_keesj said:
/system/bin/fp_part -r -f /dev/pmt | grep FAT; echo $?
Click to expand...
Click to collapse
__NODL_FAT,0x74F80000,0x33F3A0000,0x00000000
0
Donat.Callens said:
__NODL_FAT,0x74F80000,0x33F3A0000,0x00000000
0
Click to expand...
Click to collapse
Only the first part of the uprade has happend. The first part replaces the root file system, recovery and some other system partitions.
The second part of the upgrade is launched on the next boot in /system/etc/install-recovery.sh (itself copied from /system/bin/fp1_partition_upgrade ).
It checks if the partition upgrade has happened and if not perform the upgrade.
This step is not working on your phone/layout and to understand why you need to get the kernel messages (dmesg or logcat) while doing the upgrade.
/system/bin/fp1_partition_upgrade
Code:
#!/system/bin/sh
#
# Upgrade the partition layout from FP1 to FP1U
#
#
# dump pmt to see if the upgrade has happend
if /system/bin/fp_part -r -f /dev/pmt | grep FAT > /dev/null
then
echo Starting partition upgrade
cp /system/bin/fs_upgrade.bin /proc/sd_upgrade
echo "--wipe_data" > /cache/recovery/command
reboot recovery
fi
logcat
_keesj said:
This step is not working on your phone/layout and to understand why you need to get the kernel messages (dmesg or logcat) while doing the upgrade.
Click to expand...
Click to collapse
I restarted the partition updater and attach the corresponding logcat
$ logcat -v long
Donat.Callens said:
I restarted the partition updater and attach the corresponding logcat
$ logcat -v long
Click to expand...
Click to collapse
Can you please also provide the dmesg output, possibly using a private message? (the logcat does contains the info I am looking for an might contain private data)
custom recovery might be the source of the problem
_keesj said:
Donat.Callens said:
_keesj said:
The partition upgrdate is not happening, there should be lines containins SD_UPGRADE something like
Click to expand...
Click to collapse
could it be because I have a custom recovery installed?
Click to expand...
Click to collapse
This is an interesting idea.
-The sd_upgrade command is executed when not on the recovery so this is not probable.
-I think the recovery will also be replace back to "original" because we need a diifferent kernel.
Did you run the command and does the device reboot afterwards? A different recovery might not perform the factory reset?
Click to expand...
Click to collapse
I did not run the command, I merely started the FairPhone updater's partition upgrade tool. It displays a progress window like the first time, so I guess it is at least trying.
After the progress window, I get
ROM may flash stock recovery on boot. Fix?
Click to expand...
Click to collapse
I then reply
Yes - Disable recovery flash
Click to expand...
Click to collapse
I can try to let it install the stock recovery and run the partition updater after that to see if it solves the problem.
Donat.Callens said:
I did not run the command, I merely started the FairPhone updater's partition upgrade tool. It displays a progress window like the first time, so I guess it is at least trying.
After the progress window, I getI then replyI can try to let it install the stock recovery and run the partition updater after that to see if it solves the problem.
Click to expand...
Click to collapse
Post partition upgrade:
-The zip files downloaded have a different scattter file (a file describing the partition layout) that gets checked by the normal recovery.
-The zip are signed with a different key
This does not apply to the partition upgrader itself but might impact custom recovery users. The upgrader also replaces the recovery.
_keesj said:
Post partition upgrade:
-The zip files downloaded have a different scattter file (a file describing the partition layout) that gets checked by the normal recovery.
-The zip are signed with a different key
This does not apply to the partition upgrader itself but might impact custom recovery users. The upgrader also replaces the recovery.
Click to expand...
Click to collapse
I replied No to the question: ROM may flash stock recovery on boot. Fix?
This solved the issue. The installer completed and now my phone is back to factory default. I have 13.37 GB total space . I will restore my backups. Thank you for your support _keesj.
Please ensure user are informed they have to let the installer replace the existing custom recovery with the factory one for the partition upgrader to work correctly. You can always restore your custom recovery afterwards
I hereby confirm that, in my case, the partition upgrader worked with a modified partition scheme. For reference, I had changed the internal storage space to 4GB in the past.
Awesome guys!
This is why I like xda-developers and Fairphone and its community accompanied development so much. Not only I can follow the rapid conversations on problems and solutions that I could even run into, I also learn a lot about related techniques, background and the challenges in throwing a fair phone on the market.
I definitely appreciate the work of the xda developers, keejs and joemier - and of course all the others that stand behind that all. KUDOS!
But will all my apps still work, if I do backup the two partitions and then after the upgrade put everything on the one remaining partition? I guess quite a few apps might still "look" for their data on the no longer existing second partition, won't they?
Steps for "fiixing" your upgrade
Some user have repartitioned the partition of their FP1U using tool mentioned in on this forum. FP1U does not need this as the new layout is perfectly fine.
I think the following steps *should* work to get their phone back to "normal"
#get the partition upgrader
wget http://storage.googleapis.com/updat...G13G_partitionUpgrade_v1_6_OTA_2014-07-31.zip
#unzip it
unzip FP1_Fairphone_OS_1G13G_partitionUpgrade_v1_6_OTA_2014-07-31.zip
#attach your device to your pc and make sure adb works
#after that push the new partition layout to your device
adb push system/bin/fs_upgrade.bin /mnt/sdcard/
#the rest of the command need to run as root
adb shell
su.
# tell the kernel to perform the upgrade
cp /system/bin/fs_upgrade.bin /proc/sd_upgrade
#reboot and wipe the data
echo "--wipe_data" > /cache/recovery/command
reboot recovery

KF2 Soft brick - /data and /sdcard read-only

My mom has a Kindle 2nd Generation running 10.5.1 stock.
The other day, it started rebooting, but not in the traditional bootloop sense. The OS would load to the lock screen, you could swipe and use it (albeit sluggishly) for approximately 30 seconds before it rebooted again. So, it made it impossible to access the device via ADB.
I made a factory cable, accessed fastboot, and did the following:
fastboot -i 0x1949 flash bootloader otter2-u-boot-prod-10.2.4.bin
fastboot -i 0x1949 flash recovery otter2-twrp-2.6.3.1-recovery.img
fastboot -i 0x1949 flash boot otter2-freedom-boot-10.4.6.img
(if using a fastboot USB cable, swap to a normal USB cable before entering the next command)
fastboot -i 0x1949 oem recovery
Click to expand...
Click to collapse
This worked fine. I was able to get into recovery mode with TWRP and access ADB. I pulled all the data off the /sdcard partition. This was a big concern since my mom has been using this thing for a couple years now and she's collected quite a bit. Originally, my directive was to factory reset and reflash the stock firmware from Amazon: update-kindle-10.5.1_user_5174820.bin. It would be nice if they supplied a checksum, but they don't apparently.
Anyway, the more I thought about it, I thought I could clear some caches, uninstall some apks and that would resolve the issue without a new system image. Then I started to notice the problem:
~ # df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 336.6M 136.0K 336.5M 0% /dev
/dev/block/mmcblk0p13
5.6G 4.8G 755.9M 87% /data
/dev/block/mmcblk0p13
5.6G 4.8G 755.9M 87% /sdcard
/dev/block/mmcblk0p12
639.8M 11.0M 628.8M 2% /cache
~ # mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,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)
/dev/block/mmcblk0p13 on /data type ext4 (ro,seclabel,relatime,user_xattr,barrier=1,data=ordered)
/dev/block/mmcblk0p13 on /sdcard type ext4 (ro,seclabel,relatime,user_xattr,barrier=1,data=ordered)
/dev/block/mmcblk0p12 on /cache type ext4 (rw,seclabel,relatime,user_xattr,barrier=1,data=ordered)
~ #
Click to expand...
Click to collapse
Both /data and /sdcard are read-only. They also use the same block device. Maybe that's normal? I've already tried remounting the partitions read-write to no avail.
mount -o rw,remount /sdcard
mount -o rw,remount /data
Click to expand...
Click to collapse
Both commands execute as if they were accepted successfully (ala no output). However, rechecking mount's output, shows no change. It's still read-only.
I've tried sideloading in TWRP, but that resulted in a protocol fault. Also through TWRP, the factory reset succeeds, but actually does nothing. All of the data is still there. My other idea is to push the image onto the /cache partition (there's just enough room), and try to install that way, but I have a feeling that 1) won't work and 2) may exacerbate problems.
I'm stuck. Anyone have any ideas?
Solved
I was able to free the partitions.
fastboot -i 0x1949 erase userdata
Click to expand...
Click to collapse
It must have been some sort of corruption in userspace. I had previously tried a wipe through TWRP which was claimed to be successful. I still can't determine if TWRP doesn't check all their syscalls and handle the return codes or the Linux subsystem in Android is the root of the bugs. Either way, upon reboot, the device returned to factory "out of box" state.

Categories

Resources