Project

General

Profile

Actions

Issue #1864

closed

after installation of replicant 4.2, sdcard is invisible

Added by Fil Lupin over 6 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
01/16/2018
Due date:
% Done:

0%

Estimated time:
Resolution:
wontfix
Device:
Galaxy S 2 (I9100)
Grant:
Type of work:

Description

Hi,
after installing Replicant 4.2 on my i9100, my sdcard is not visible.
Formerly, I installed Replicant 6 with an encrypted partition and did not unencrypted this partition. Then I did not succeed into accessing SDcard from recovery. Perhaps is it linked (see https://redmine.replicant.us/boards/3/topics/14711).

However, since android seems not to encrypt sdcard, it should not.

Currently, I do not have some crash si I'm not sure that adb logcat would be useful bute here are some informations I gathered:

root@android:/ # ls -la /dev/block/vold/                                       
brw------- root     root     179,   0 2018-01-16 00:17 179:0
brw------- root     root     179,   1 2018-01-16 00:17 179:1
brw------- root     root     179,   2 2018-01-16 00:17 179:2
brw------- root     root     179,   3 2018-01-16 00:17 179:3
brw------- root     root     179,   4 2018-01-16 00:17 179:4
brw------- root     root     179,   5 2018-01-16 00:17 179:5
brw------- root     root     179,   6 2018-01-16 00:17 179:6
brw------- root     root     179,   7 2018-01-16 00:17 179:7
brw------- root     root     259,   0 2018-01-16 00:17 259:0
brw------- root     root     259,   1 2018-01-16 00:17 259:1
brw------- root     root     259,   2 2018-01-16 00:17 259:2
brw------- root     root     259,   3 2018-01-16 00:17 259:3
brw------- root     root     259,   4 2018-01-16 00:17 259:4
1|root@android:/ # df
Filesystem               Size     Used     Free   Blksize
/dev                   395.5M    48K   395.5M   4096
/mnt/secure            395.5M     0K   395.5M   4096
/mnt/asec              395.5M     0K   395.5M   4096
/mnt/obb               395.5M     0K   395.5M   4096
/mnt/fuse              395.5M     0K   395.5M   4096
/system                503.9M   242.5M   261.4M   4096
/cache                  98.4M    54.9M    43.5M   4096
/efs                    19.7M     8.1M    11.5M   4096
/data                    2G   342M     1.6G   4096
/preload               503.9M    96.1M   407.8M   4096
root@android:/ # 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
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
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/fuse tmpfs rw,relatime,mode=775,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p9 /system ext4 ro,noatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p7 /cache ext4 rw,nosuid,nodev,noatime,errors=panic,user_xattr,barrier=1,journal_async_commit,data=ordered 0 0
/dev/block/mmcblk0p1 /efs ext4 rw,nosuid,nodev,noatime,user_xattr,barrier=1,journal_async_commit,data=ordered 0 0
/dev/block/mmcblk0p10 /data ext4 rw,nosuid,nodev,noatime,errors=panic,user_xattr,barrier=1,journal_async_commit,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/mmcblk0p12 /preload ext4 ro,nosuid,nodev,noatime,user_xattr,barrier=1,data=ordered 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
root@android:/ # echo $EXTERNAL_STORAGE
/storage/sdcard0
root@android:/ # cat fstab.smdk4210                                            
# Android fstab file.
#<src>                  <mnt_point>         <type>    <mnt_flags and options>                               <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
# data partition must be located at the bottom for supporting device encryption

/dev/block/mmcblk0p9    /system             ext4      ro,noatime    wait
/dev/block/mmcblk0p7    /cache              ext4      noatime,nosuid,nodev,journal_async_commit,errors=panic    wait,check_spo
/dev/block/mmcblk0p1    /efs                ext4      noatime,nosuid,nodev,journal_async_commit,errors=panic    wait,check_spo
/dev/block/mmcblk0p10   /data               ext4      noatime,nosuid,nodev,discard,noauto_da_alloc,journal_async_commit,errors=panic    wait,check_spo,encryptable=/efs/metadata
/dev/block/mmcblk0p12   /preload            ext4      ro,nosuid,nodev,noatime    wait

Thank you for your help.

Actions #1

Updated by Fil Lupin about 6 years ago

For information, I tried to mount the partition which seems to be sdcard but it does not succeed:

root@android:/ # mount -o rw -t f2fs /dev/block/mmcblk0p11 /storage/sdcard0
mount: No such device

Did I miss something?
Perhaps identifying sdcard could help but since /dev/block/mmcblk0p11 fails and /dev/block/vold/public:179_11 does not appear, I really do not know how to solve this... :(

replicant 6 fstab (https://git.replicant.us/replicant/device_samsung_galaxys2-common/tree/rootdir/fstab.smdk4210) include more informations than replicant 4.2 fstab (https://git.replicant.us/replicant/device_samsung_galaxys2-common/tree/rootdir/fstab.smdk4210?h=replicant-4.2)
I am not familiar with vold but could this be linked?

Actions #2

Updated by Joonas Kylmälä almost 6 years ago

What you could try is a) format the sdcard (ext4 or fat32 I guess) b) would you be able to use Replicant 6 as the 4.2 version has not been worked on in 4 years meanwhile there has been stuff going on with 6.0 more recently?

Actions #3

Updated by Fil Lupin almost 6 years ago

Thank you for your time.

Joonas Kylmälä wrote:

What you could try is a) format the sdcard (ext4 or fat32 I guess)

I have another problem: SDCard is not recognised on android. When I try to access it through adb, I got an error

adb shell
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: device '(null)' not found

Do you know how to format sdcard with a CLI (mksdcard is not found)?

b) would you be able to use Replicant 6 as the 4.2 version has not been worked on in 4 years meanwhile there has been stuff going on with 6.0 more recently?

This is the goal, as soon as I can access my phone, save the content of my phone, and export it to replicant 6.

Actions #4

Updated by Joonas Kylmälä almost 6 years ago

Regarding the ADB problem: sometimes killing the adb fixes such issues "adb kill-server". Or try another USB cable.

Do you have a sdcard reader on your computer or could you get hold of one? The problem could be just a corrupt or broken sdcard and trying it with another sdcard reader would save probably some time debugging this.

Also I'm pretty sure /dev/block/mmcblk0p11 is just the internal eMMC (the internal flash chip in the phone) or a non-existent partition so mounting that won't help.

Anyways if you don't have external sdcard reader do the following when the phone is powered on:

1. When the device is running pull the sdcard out of the phone and then put it back
2. Use "adb shell" and run "dmesg" which will print the kernel messages and tell us what name the kernel gave to the sdcard you just put in. If there is no mentioning of new device plugged in then it means (most likely) the sdcard reader on the phone is dead or the sdcard is dead.

If you got the device name then try to mount it somewhere:

mount -t <fs-name-you-think-it-is> -o rw /dev/block/<name-of-the-device> /mnt

e.g.

mount -t vfat -o rw /dev/block/mmcblk1p1 /mnt

if it mounts then just go ahead with saving the content of the phone to the sdcard and install Replicant 6 with Heimdall.

If you come by on IRC I will be probably able to help you better (my nick on the #replicant channel is Putti).

Actions #5

Updated by Fil Lupin almost 6 years ago

Joonas Kylmälä wrote:

Regarding the ADB problem: sometimes killing the adb fixes such issues "adb kill-server". Or try another USB cable.

Strange, it do not work, and I currently do not have other cable, but I already had this issue and a change of cable does not solve this issue (see https://redmine.replicant.us/boards/3/topics/14711).

Do you have a sdcard reader on your computer or could you get hold of one? The problem could be just a corrupt or broken sdcard and trying it with another sdcard reader would save probably some time debugging this.

This is the internal sdcard of the Samsung Galaxy SII. :s

Also I'm pretty sure /dev/block/mmcblk0p11 is just the internal eMMC (the internal flash chip in the phone) or a non-existent partition so mounting that won't help.

Anyways if you don't have external sdcard reader do the following when the phone is powered on:

1. When the device is running pull the sdcard out of the phone and then put it back

I did not say it before but this is an internal sdcard..

2. Use "adb shell" and run "dmesg" which will print the kernel messages and tell us what name the kernel gave to the sdcard you just put in. If there is no mentioning of new device plugged in then it means (most likely) the sdcard reader on the phone is dead or the sdcard is dead.

Since I can't access to adb, I can't access to dmesg.
However, I can access a terminal on my phone with su...

If you got the device name then try to mount it somewhere:

mount -t <fs-name-you-think-it-is> -o rw /dev/block/<name-of-the-device> /mnt

e.g.

mount -t vfat -o rw /dev/block/mmcblk1p1 /mnt

I do not find mount, I imagine I have a PATH issue also (PATH=/system/bin:/system/xbin).
My phone is such a mess currently...

if it mounts then just go ahead with saving the content of the phone to the sdcard and install Replicant 6 with Heimdall.

If you come by on IRC I will be probably able to help you better (my nick on the #replicant channel is Putti).

I'll try, but I can't before a few days. Thank you in any case. :)

Actions #6

Updated by Joonas Kylmälä almost 6 years ago

Fil Lupin wrote:

This is the internal sdcard of the Samsung Galaxy SII. :s

Then you are in luck! It is already mounted on /data as your df output shows. Just do "adb pull /data" (if you get adb working) and you should be done with it.

If adb doesn't work for some reason then you can of course transfer files over the network or plug in an external microSD card.

Actions #7

Updated by Fil Lupin almost 6 years ago

Joonas Kylmälä wrote:

Fil Lupin wrote:

This is the internal sdcard of the Samsung Galaxy SII. :s

Then you are in luck! It is already mounted on /data as your df output shows. Just do "adb pull /data" (if you get adb working) and you should be done with it.

If adb doesn't work for some reason then you can of course transfer files over the network or plug in an external microSD card.

Currently, adb does not work andI can't access through the network. :(
adb refuse to work exactly the same way described into https://redmine.replicant.us/boards/9/topics/14343

Actions #8

Updated by Joonas Kylmälä almost 6 years ago

so what is your "adb device" output? Have you enabled adb in Replicant settings and allowed the connection for you computer when it asked for it?

Actions #9

Updated by Joonas Kylmälä almost 6 years ago

aha, I just noticed that 10h ago message from you in the forum. So you have tried toggling "Android debugging" (I'm not sure if the "debug mode" you said is the same)? And so at no point it does ask for authorization?

In the last forum message you said lsusb doesn't print anything related to the device but before it has printed: "Bus 001 Device 027: ID 04e8:xxxx Samsung Electronics Co., Ltd GT-I9250 Phone [Galaxy Nexus] (Mass storage mode)". Is that correct?

I'm getting a bit confused by the messages being scattered in two different issues and a forum post so could we keep the discussion just here?

Actions #10

Updated by Joonas Kylmälä almost 6 years ago

That "Android debugging" I said (and mentioned in the documentation) could actually be "USB debugging". I don't have the phone currently at my hand so I cannot confirm.

Actions #11

Updated by Fil Lupin almost 6 years ago

You're right, I'll keep my answers here. (in fact, I often had more answers on the forum so I keep a trace of the issue with the ticket and I get my solutions on the forum, even if I know this is not optimal ;)).

Since my issue seemed a lot like the one I got 1 year ago, I tried to access via adb but I do not get any answer.
However, since lsusb does not get any answer related to my phone, I tried to change my usb cable and I can now access to my device!

Then I get back to your suggestions to test them: since /data seems to be the sdcard, I tried to export contacts on SDCard but I got an error message "No SD card was found"
I launched "adb pull /data" to get all the data.

As a first step, I will install again Replicant 4.2 to check if I can test hardware correctly (without this invisible sdcard issue).
Then I will make some tests to import SMS/MMS on Replicant 6.
For this, I am interested into documentation/tutorials about android simulator...

Thank your for your help, it helped me to clarify this usb cable issue!

Actions #12

Updated by Joonas Kylmälä almost 6 years ago

Glad to know changing the USB cable fixed your ADB problems! :)

I still don't quite understand what is the problem here with "sdcard" being invisible. You don't have an external microSD card plugged in to the device, right? If that is the case it is normal for an Android app to say "No SD card was found" as there is no external microSD card.

So to sum up this, there are two places where the user data on the phone can go: /dev/block/mmcblk0p10 AKA /data (the internal SII flash) and the external microSD card (/dev/block/mmcblk1 or mmcblk2 most likely) if you have put one into the device.

Actions #13

Updated by Fil Lupin almost 6 years ago

Joonas Kylmälä wrote:

I still don't quite understand what is the problem here with "sdcard" being invisible. You don't have an external microSD card plugged in to the device, right? If that is the case it is normal for an Android app to say "No SD card was found" as there is no external microSD card.

It is not logical, but yet I used a replicant on a Samsung Galaxy S3 since several years and I noticed that without any external sd card, I had access to some sdcard or so-called (exporting contacts was done on this, I think this was /data).

When I try to export my contacts on my Galaxy S2, I get this error. Do you think this is normal? Then isn't it possible to choose to export contacts on internal memory?

So to sum up this, there are two places where the user data on the phone can go: /dev/block/mmcblk0p10 AKA /data (the internal SII flash) and the external microSD card (/dev/block/mmcblk1 or mmcblk2 most likely) if you have put one into the device.

This is what I waited for, bit it seems internal flash is not accessible for a reason.
I wonder if something went wrong during installation due to a former installation with encryption of internal flash. Do you think of any idea I could use to remount it the right way?

Actions #14

Updated by Kurtis Hanna over 4 years ago

  • Resolution set to wontfix

This issue has been closed because Replicant 4.2 is no longer supported or maintained.

Actions #15

Updated by Kurtis Hanna over 4 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF