[Q] mount cryptfs? - Android Q&A, Help & Troubleshooting

vdc cryptfs enablecrypto/changepw exists.
Where is vdc cryptfs mount?
I.e., how can I mount the encrypted /data partition from a shell (ultimately via adb shell in recovery)?
Thanks!

By experimentation and checking the system/vold/ source code, I was able to unlock the encrypted partition using:
Code:
setprop ro.crypto.state encrypted
vdc cryptfs checkpw 'your passphrase here'
The unlocked device is then available in /dev/block/dm-0, and can be mounted directly read-only using:
Code:
mount -o ro /dev/block/dm-0 /data
If you want it to be read/write, simply remove the -o ro part (or run mount -o remount,rw /data after running the above mount command). Do not run vdc cryptfs restart in recovery, there is nothing to catch the triggers so all future vdc commands will hang.
Oh, and when done, do not forget to unmount your partition:
Code:
umount /data

Thanks a lot, that sounds great.
However, now I have big trouble getting vdc cryptfs to work in recovery It needs /dev/socket/vold but vold is not started.
I am getting a bootloop with cyanogenmod and want to disable the encryption from recovery. Any ideas how to resolve that/start vold?

dy/dx said:
Thanks a lot, that sounds great.
However, now I have big trouble getting vdc cryptfs to work in recovery It needs /dev/socket/vold but vold is not started.
I am getting a bootloop with cyanogenmod and want to disable the encryption from recovery. Any ideas how to resolve that/start vold?
Click to expand...
Click to collapse
For future readers, I have a minivold process in recovery. If you do not have (mini)vold, try upgrading recovery.

No such file or directory
Lekensteyn said:
The unlocked device is then available in /dev/block/dm-0
Click to expand...
Click to collapse
I tried the commands in clockwerkmod recovery but /dev/block/dm-0 isn't found (nexus 4 with Cyanogenmod 11):
Code:
~ # setprop ro.crypto.state encrypted
~ # vdc cryptfs checkpw '1234'
200 0 10
~ # mount /dev/block/dm-0 /data
mount /dev/block/dm-0 /data
mount: mounting /dev/block/dm-0 on /data failed: No such file or directory
Is there a way to access the encrypted data?

svengo said:
I tried the commands in clockwerkmod recovery but /dev/block/dm-0 isn't found (nexus 4 with Cyanogenmod 11):
Code:
~ # setprop ro.crypto.state encrypted
~ # vdc cryptfs checkpw '1234'
200 0 10
~ # mount /dev/block/dm-0 /data
mount /dev/block/dm-0 /data
mount: mounting /dev/block/dm-0 on /data failed: No such file or directory
Is there a way to access the encrypted data?
Click to expand...
Click to collapse
There is likely a way, but if it does not work (this is not documented, so it might change), have a look at your logs for what went wrong. Since logcat is probably nog available, you have to read logs with cat /dev/log/system and/ or (in a second shell) cat /dev/log/main.

Lekensteyn said:
There is likely a way, but if it does not work (this is not documented, so it might change), have a look at your logs for what went wrong. Since logcat is probably nog available, you have to read logs with cat /dev/log/system and/ or (in a second shell) cat /dev/log/main.
Click to expand...
Click to collapse
Don't know whether this helps, but I found that these commands work on cwm recovery while they do not on twrp. This seems to be because in cmw vold is started while in twrp it isn't.

Is there some "cryptfs clear", which wipes the crypt signature?
I am having trouble with creating a crypted data with some ROM right now and always need to override the whole device to get rid of the crypt signature (i guess in the end of the device?). So something which clears the crypt bytes, so the data can be reformatted as non-crypt partition would be useful. So the ROMS still want to mount it with password.

problem with mounting /data
Hi, Guys... please, give me advice. I try to mount encrypted /data.
Samsung Galaxy Note 2 (N7100), CWM 6.0.4.7 / root(SU) / Android 4.4.2 stock / busybox 50 / USB Debugging ON:
Code:
C:\Users\SDK\platform-tools>adb devices
List of devices attached
4df749af12f330b7 recovery
Next:
Code:
C:\Users\SDK\platform-tools>adb shell
~ # setprop ro.crypto.state encrypted
~ # vdc cryptfs checkpw "njjm.0mk."
200 0 -1
~ # mount /dev/block/dm-0 /data
mount: mounting /dev/block/dm-0 on /data failed: No such file or directory
Logcat (system):
Code:
~ # cat /dev/log/system
' З З э├*NД╫↨Vold Vold 2.1 (the revenge) firing up F З З э├*NД╫↨Vold
Volume sdcard1 state changing -1 (Initializing) -> 0 (No-Media) G З З э├*N
Д╫↨Vold Volume usbdisk0 state changing -1 (Initializing) -> 0 (No-Media) @ З
Л э├*NБGб↓Vold Volume sdcard1 state changing 0 (No-Media) -> 2 (Pending) R
З Л э├*NБGб↓DirectVolume DirectVolume::handlePartitionAdded -> MAJOR 179, MIN
OR 17, PARTN 1
F З Л э├*NБGб↓Vold Volume sdcard1 state changing 2 (Pending) -> 1 (Idle-Un
Cryptfs Bad magic for real block device /dev/block/mmcblk0p16
Cryptfs Error getting crypt footer and key
@ З ╕ р┼*N?6р0Cryptfs Bad magic for real block device /dev/block/mmcblk0p1
6
- З ╕ р┼*N?6р0Cryptfs Error getting crypt footer and key
@ З ╕ е╔*N╖▀[$Cryptfs Bad magic for real block device /dev/block/mmcblk0p1
6
- З ╕ е╔*N╖▀[$Cryptfs Error getting crypt footer and key
Logcat (main):
Code:
~ # cat /dev/log/main
В Д Д э├*N┴а¶!ARMAssembler generated scanline__00000077:03545405_00000A02_0
0000000 [ 37 ipp] (59 ins) at [0x4176c1f0:0x4176c2dc] in 133083 ns
Б Д Д э├*NБcя'ARMAssembler generated scanline__00000077:03545405_00000A01_
00000000 [ 37 ipp] (58 ins) at [0x4176c2e0:0x4176c3c8] in 54625 ns
Б Д Д э├*NБcя'ARMAssembler generated scanline__00000077:03545405_00000A08_
00000000 [ 37 ipp] (59 ins) at [0x4176c3d0:0x4176c4bc] in 38041 ns
Б Д Д э├*NA∙Ш-ARMAssembler generated scanline__00000077:03545405_00000000_
00000000 [ 36 ipp] (50 ins) at [0x4176c4c0:0x4176c588] in 64708 ns
FSTab:
Code:
~ # cat /etc/fstab
/dev/block/mmcblk0p12 /cache ext4 rw
/dev/block/mmcblk0p16 /data ext4 rw
/dev/block/mmcblk0p13 /system ext4 rw
/dev/block/mmcblk0p14 /preload ext4 rw
/dev/null /sdcard datamedia rw
/dev/block/mmcblk1p2 /sd-ext ext4 rw
/dev/block/mmcblk1p1 /external_sd auto rw
~ #
MOUNT -A:
Code:
~ # mount -a
mount: mounting /dev/block/mmcblk0p16 on /data failed: Invalid argument
I try to mount encrypted /data and delete the file *.key which contains Android SCREENLOCK password. My Xposed SecureSettings module reset my password and I can't access my Android Desktop Screen.
Please help. What can I do without FORMATting DATA..?

Related

first adb action

Hi to all. I'm Abe Wayer.
I'm dreaming to start changing at first my own mobile OS end maybe going to develop a day.
Today it's just all the afternoon that i google....
I became root, I partitioned my sd and installing sdk & adb tools in a couple of days.
something goes quickly something not.
I have a galaxy ace with 2.3.6
I thought to start my develop time using adb.
first at all adb push.
So i made:
adb push test.txt /sdcard/test.txt
And i have: permission denied
I googled a lot and nothing worked:
Debug usb is on.
I umounted sdcard from /media (I use linux)
I've tried this as well:
mount -o remount , rw /dev/block/void/179:9 /sdcard
or
mount -r -w -o remount -t vfat /dev/block/void/179:9 /sdcard
But nothing work!
If im not able to push a file on a sd what i dream for?
My sdcard has two partition linux call them sdc1 & sdc2 first is 1500 Mib second 400
Thanks for your help
No Links too?
Please give me a hand!:crying:
Dont you have a guide ive not fought?
Please.....
News:
I've tried:
adb shel => su =>fdisk -l
and i've got the device name but if do:
# mount rw -o remount, rw -t fat32 /dev/stl10 /sdcard
I always have:
Usage: mount [-r] [-w] [-o options] [-t type] device directory
But is there somewhere on the web an adb shel man complete with examples?
How do i obtain -w permission on my sd card?
adb pull works so i can read....
if i try ls -l /sdcard i got: lrwxrwxrwx root root 2012-12-18 02:01 sdcard -> /mnt/sdcard
So root can write.
Have i to change owner to the card?
Or simply with adb i'd say i'm root?
have i to umount sdcard?
Please!
Abe Wayer said:
# mount rw -o remount, rw -t fat32 /dev/stl10 /sdcard
Click to expand...
Click to collapse
Wrong usage, correct usage (provided that the device is correct):
Code:
mount -o rw, remount -t fat32 /dev/stl10 /sdcard
RoberGalarga said:
Wrong usage, correct usage (provided that the device is correct):
Code:
mount -o rw, remount -t fat32 /dev/stl10 /sdcard
Click to expand...
Click to collapse
Doesn't work as well.
my fdisk -l output is this:
# fdisk -l
Disk /dev/bml10: 41 MB, 41943040 bytes
255 heads, 63 sectors/track, 5 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/bml10 doesn't contain a valid partition table
Disk /dev/stl10: 37 MB, 37748736 bytes
255 heads, 63 sectors/track, 4 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Abe Wayer said:
if i try ls -l /sdcard i got: lrwxrwxrwx root root 2012-12-18 02:01 sdcard -> /mnt/sdcard
So root can write.
Click to expand...
Click to collapse
You don't know that. This is just a symbolic link, not the volume itself. Do:
$ ls -l /mnt/sdcard
This will show you if the card is mounted properly. Also issue a "mount" command, no parameter. But you should not need to remount it, the sdcard is handled by magic via the vold daemon. As soon as you remove it from the GNU/Linux machine, vold will mount it in Android.
kuisma said:
Y
Do: $ ls -l /mnt/sdcard
.
Click to expand...
Click to collapse
With ls - /mnt I have:
# ls -l /mnt/
drwxr-xr-x root system 2012-12-18 02:01 obb
drwxr-xr-x root system 2012-12-19 14:27 asec
drwx------ root root 2012-12-18 02:01 secure
d--------- system system 2012-12-18 02:01 sdcard
So sdcar has not permissions?
mount about sdcard says
/dev/block/vold/179:9 /mnt/sdcard 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/block/vold/179:9 /mnt/secure/asec 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
tmpfs /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
It goes to be mounted rw but for some errors it came to be remounted ro?
I've proved with:
mount -o rw, remount -t vfat /dev/block/vold/179:9 /sdcard , And
mount -o rw, remount -t vfat /dev/block/vold/179:9 /mnt/sdcard
but the answer's always:
Usage: mount [-r] [-w] [-o options] [-t type] device directory
any ideas?
/dev/block/vold/179:9 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,g id=1015,fmask=0702,dmask=0702,allow_utime=0020,cod epage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
Click to expand...
Click to collapse
Your sdcard is mounted just fine, no need to try to change anything there. Don't confuse the sdcard with its mount point, different things.
Make sure you've got read access to your test file, and push it to some place you know you are allowed to write. And use the full path /mnt/sdcard/file.name just to be sure.
Also, again, do a "ls - l /mnt/sdcard" to see its really there.
I had the same problem when I didn't root correctly, check if you have root correctly by using a root app. (like root checker or root explorer)

[Q] How to change SDCARD automount options?

I converted my card to ext4 and need to change the default mount options. Right now they are:
Code:
/dev/block/vold/179:33 /mnt/media_rw/sdcard1 ext4 rw,dirsync,context=u:object_r:sdcard_external:s0,nosuid,nodev,noexec,noatime 0 0
/dev/fuse /storage/sdcard1 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
But I need to replace it with
Code:
/dev/block/vold/179:33 /storage/sdcard1 ext4 rw,noatime,nosuid,nodev wait
So far, everything I tried failed:
- Editing fstab.qcom is useless because it is being recreated at each boot.
- adding a umount/mount init script
Code:
#!/system/bin/sh
VOLD="$(mount | grep -E -o -m 1 ".{0,0}179:.{0,2}")"
sleep 8
su
umount /storage/sdcard1
umount /mnt/media_rw/sdcard1
mount -rw -t ext4 -o noatime,nosuid,nodev /dev/block/vold/$VOLD /storage/sdcard1
is also useless, because although it works, it only kicks in AFTER the system is already on the desktop, which is too late.
This is all on Android 4.3.1 (but it's the same story with 4.4)
Why I want to do it?
Because although ext4 sdcard is mounted fine with read and write, the system does not see it as external anymore. As a result, many, many apps just won't work claiming there is no sdcard in the system. Even DiskUsage app does not see it.
I suppose this is because it is mounted either with FUSE or remounted directly as ext4 too late (after the system completed boot).
Any ideas?

[Q] nexus with broken file system, cannot wipe

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.
I forgot to say that I've tried also the fastboot -w command, it works a lot (about 270 seconds) but no effect.
ghirux said:
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.
I forgot to say that I've tried also the fastboot -w command, it works a lot (about 270 seconds) but no effect.
Click to expand...
Click to collapse
have you tried repairing system via twrp?
toolhas4degrees said:
have you tried repairing system via twrp?
Click to expand...
Click to collapse
yes, I forgot to say it but yes. On /data and /sdcard the procedure fails, i think for the same reason that makes e2fsck fail too.
I'm almost sure that the memory is gone, I need to find a tool to test its functionality.
Whatever I write on there it gets deleted at the next reboot, I don't think it's normal.
thank you.

z5c e5823 - Fixing Boot Loop after doing mkswap on mmcblk0p*

First, I apologize if I am writing a duplicate thread. If so, please link it.
As part of my Android-hobby-experiments with a rooted Sony Xperia Z5 Compact e5823 with Android MarshMallow, I attempted to use a partition of my external microSD card as swap area but ended up in a boot loop after reboot.
I have two partitions on the microSD card. One is fat32 and the other one is linux-swap. Both partitions were made under Debian using GParted, at different timepoints.
If I remember well, I did the following on a terminal emulator:
Code:
$ su
# mkswap /dev/block/mmcblk0p2
# swapon /dev/block/mmcblk0p2
(here I got an error. something like "Invalid argument".)
# free -m
I saw no improvement, so then I did:
Code:
$ su
# mkswap /dev/block/mmcblk0p3
# swapon /dev/block/mmcblk0p3
(here I got the same error.)
# free -m
(no improvement)
# exit
$ exit
Device was working normal after this.
Hours later, I reboot the phone (the camera sometimes crashes/freezes after taking a pic, so I took a pic, screen froze, took a screenshot, and rebooted). Then I reached a boot loop.
The screen showes the Sony Xperia logo, then the screen attempts to load the "powered-by.-ndroid-animation" but instead there is a black screen and a blinking red LED (4 times). The screen is then gray and the show repeats. I turned off the phone by opening it and disconnecting the battery
Then I took the microSD card out and the SIM card aswell. I swiched on the phone and the bootloop continued. :silly:
I can enter fastboot-mode (volume up + USB connection). Which I now use to switch off the phone instead of opening and disconnecting the battery :cyclops:.
Luckily, the device on fastboot-mode is listed the under Debian by the command
Code:
$ fastboot devices -l
, so I believe in hope to fix this boot loop w/o (re)flashing a ROM
It is also possible to run a custom recovery. I have run TWRP3.0 from this post and nilezon's version from this posts using the command
Code:
$ fastboot boot recovery.img
At the very beginning of the console of the recoveries there is an error:
Code:
Updating partition details . . .
Failed to mount '/lta-label' (No such device)
. . . done
Full SELinux support is present.
MTP Enabled
--- Update ---
I used the terminal using TWRP3.0 to read the file
Code:
/etc/fstab
and it looks as follows
Code:
/dev/block/mmcblk0p43 /system ext4 rw 0 0
/dev/block/mmcblk0p42 /data ext4 rw 0 0
/dev/block/mmcblk0p41 /cache ext4 rw 0 0
/external_sd vfat rw 0 0
/usb-otg vfat rw 0 0
/dev/block/mmcblk0p3 /firmware vfat rw 0 0
/dev/block/mmcblk0p38 /appslog ext4 rw 0 0
/dev/block/mmcblk0p40 /oem ext4 rw 0 0
/dev/block/mmcblk0p31 /persist ext4 rw 0 0
/dev/block/mmcblk0p2 /lta-label swap rw 0 0
/dev/block/mmcblk0p39 /diag ext4 rw 0 0
I decided to comment out
Code:
/dev/block/mmcblk0p2 /lta-label swap rw 0 0
and reboot. Boot loop persists in the same way and at the console of the recovery there is still, at the very beginning,
Code:
Failed to mount '/lta-label' (No such device)
I rechecked the
Code:
/etc/fstab
file and my modification was gone.
--- Update 2 ---
Today After connecting the SD card with a microSD-USB-adapter Debian shows the following error:
Code:
Error mounting /dev/sdb1 at /media/user/4C25-AD09: Command-line `mount -t "vfat" -o
"uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush" "/dev/sdb1"
"/media/jk/4C25-AD09"' exited with non-zero exit status 32: mount: /dev/sdb1: can't read superblock
Still, both partitions are recognized by GParted. "/dev/sdb1" is the fat32-partition. "/dev/sdb2" is the swap-partition. I can't access the first . . .
so I am stuck. dou you guys have any suggestion about what to try next?

apps crashing -> soft reboot loop

Hi, I've got a problem.
I plugged my phone in to charge and left it alone for a while. When I came back it was already soft rebooting in a loop, and I've got at most only 20seconds on my screen to do anything. Before it reboots Trebuchet crashes. Going into Settings -> Apps -> All -> Trebuchet -> Clear Chache / Data is impossible because of this small timeframe available, also the settings-app crashes after Trebuchet has crashed.
How can I try to fix this WITHOUT wiping all data?
Btw: I'm using a Moto G 2014 dual sim xt168, with a CM13 stable release from around a year ago.
EDIT: I'm currently trying to backup my relevant app data with adb backup <app>, my problem is that as soon as trebuchet crashes, the backup process gets cancelled. I already tried deleting trebuchets data and rebooting but with no result.
EDIT2: I tried checking the filesystem with e2fsck and some errors came up. I'm pretty unfamiliar with this. Is a new rom flash inevitable or ist my phone even dying?
Code:
E:\Android\minimal adb fastboot 1.4>adb shell
[email protected]_umtsds:/ #
[email protected]_umtsds:/ # mount /system
[email protected]_umtsds:/ # mount /data
mount: '/dev/block/platform/msm_sdcc.1/by-name/userdata'->'/data': Invalid argument
1|[email protected]_umtsds:/ # df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 444656 36 444620 1% /dev
tmpfs 444656 12 444644 1% /tmp
tmpfs 444656 0 444656 0% /storage
/dev/block/mmcblk0p36 1112708 761072 351636 69% /system
/dev/block/mmcblk0p38 5773168 4973376 799792 87% /data
[email protected]_umtsds:/ # umount /system
[email protected]_umtsds:/ # umount /data
[email protected]_umtsds:/ # e2fsck -n /dev/block/mmcblk0p36
e2fsck 1.42.9 (28-Dec-2013)
system: clean, 2211/70704 files, 194715/282624 blocks
[email protected]_umtsds:/ # e2fsck -n /dev/block/mmcblk0p38
e2fsck 1.42.9 (28-Dec-2013)
ext2fs_open2: Bad magic number in super-block
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/block/mmcblk0p38
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
8|[email protected]_umtsds:/ #
Same here,but with CM12.1
Trebutchet crashes 5 seconds after bootup ,however you can reboot to safe mode,there trebutchet doesn't crash,so maybe you are able to backup some data.
Still waiting for a fix
Found a Fix!
1. Turn on your phone and reboot to safe mode.
(Hold the power button until Power Menu appears and hold "Power Off" until "Reboot to Safe Mode" is displayed)
2. Open your Terminal and type:
Code:
su
pm disable com.cyanogenmod.trebuchet
Your phone will freak out but eventually you'll be able to access the Terminal again (I think I used the Overview Button)
3. Enable Trebuchet with this code:
Code:
pm enable com.cyanogenmod.trebuchet
4. Reboot your phone normally and there you go!

Categories

Resources