[QUESTION] External SD card as usrdata - Samsung Galaxy J5 Questions & Answers
i'm using adoptable storage patch (found here on xda) to expand internal data storage on my J500FN with Android 6.0.1, but i'm not so satisfied, increment in space for app is very limited also with adoptable storage.
i found this discussion on xda, in which the author had changes fstab to use sdcard as /data partition.
he said that SD card must be partitioned before run the modded kernel, it must have a small FAT32 partition at begin, and EXT4 partition for the main size.
how can i do the same on J500FN ?
my fstab is:
Code:
# Android fstab file.
# 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
#TODO: Add 'check' as fs_mgr_flags with data partition.
# Currently we dont have e2fsck compiled. So fs check would failed.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/bootdevice/by-name/system /system ext4 ro,errors=panic,noload,block_validity wait,verify
/dev/block/bootdevice/by-name/userdata /data ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check,encryptable=footer
/dev/block/bootdevice/by-name/efs /efs ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check
/dev/block/bootdevice/by-name/cache /cache ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check
/dev/block/platform/7824900.sdhci/by-name/persistent /persistent emmc defaults defaults
# VOLD
/dev/block/bootdevice/by-name/hidden /preload ext4 defaults voldmanaged=preload:auto
/devices/soc.0/7864900.sdhci/mmc_host/mmc* auto vfat defaults voldmanaged=sdcard:auto,encryptable=userdata
/devices/platform/msm_hsusb_host/usb* auto auto defaults voldmanaged=usb:auto
fstab made by the author of the post is:
Code:
# Android fstab file.
# 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
#TODO: Add 'check' as fs_mgr_flags with data partition.
# Currently we dont have e2fsck compiled. So fs check would failed.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/7864900.sdhci/mmcblk1p2 /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc,discard,errors=panic wait,check,encryptable=/dev/block/bootdevice/by-name/extra
/dev/block/bootdevice/by-name/frp /persistent emmc defaults defaults
/devices/soc.0/7864900.sdhci/mmc_host auto vfat defaults voldmanaged=ext_sd:auto,noemulatedsd
if i patch my fstab as follow:
Code:
# Android fstab file.
# 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
#TODO: Add 'check' as fs_mgr_flags with data partition.
# Currently we dont have e2fsck compiled. So fs check would failed.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/bootdevice/by-name/system /system ext4 ro,errors=panic,noload,block_validity wait,verify
/dev/block/platform/7864900.sdhci/mmcblk1p2 /data ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check,encryptable=footer
/dev/block/bootdevice/by-name/efs /efs ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check
/dev/block/bootdevice/by-name/cache /cache ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check
/dev/block/platform/7824900.sdhci/by-name/persistent /persistent emmc defaults defaults
# VOLD
/dev/block/bootdevice/by-name/hidden /preload ext4 defaults voldmanaged=preload:auto
/devices/soc.0/7864900.sdhci/mmc_host/mmc* auto vfat defaults voldmanaged=sdcard:auto
/devices/platform/msm_hsusb_host/usb* auto auto defaults voldmanaged=usb:auto
do you think i will obtain the same result on my J500FN ?
i reply by myself
i tried with this modified fstab.qcom:
Code:
# Android fstab file.
# 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
#TODO: Add 'check' as fs_mgr_flags with data partition.
# Currently we dont have e2fsck compiled. So fs check would failed.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/bootdevice/by-name/system /system ext4 ro,errors=panic,noload,block_validity wait,verify
/dev/block/mmcblk1p2 /data ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check,encryptable=footer
/dev/block/bootdevice/by-name/efs /efs ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check
/dev/block/bootdevice/by-name/cache /cache ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check
/dev/block/platform/7824900.sdhci/by-name/persistent /persistent emmc defaults defaults
# VOLD
/dev/block/bootdevice/by-name/hidden /preload ext4 defaults voldmanaged=preload:auto
/devices/soc.0/7864900.sdhci/mmc_host/mmc* auto vfat defaults voldmanaged=sdcard:auto
/devices/platform/msm_hsusb_host/usb* auto auto defaults voldmanaged=usb:auto
and also with these lines changed in init.rc:
Code:
on charger
mount ext4 /dev/block/bootdevice/by-name/system /system wait ro
wait /dev/block/mmcblk1p2
check_fs /dev/block/mmcblk1p2 ext4
mount ext4 /dev/block/mmcblk1p2 /data nosuid nodev noatime noauto_da_alloc,discard,journal_async_commit,errors=panic
chown system system /data
it works!!!
in attach you will find the boot.img for rom J500FNXXS1BQG1, last MM for J500FNITV1BPL1
How to use:
1- you need a PC tools like MiniToolPartitionWizard to create 2 partitions on your SD card. The first MUST BE FAT32, the second MUST BE EXT4. Use the size you wish, i suggest to use a 32GB SD card U3 type, with 8GB for FAT32, 24GB for EXT4.
2- insert SD into Phone
3- power up phone into download mode: Volume DN + Home + Power, and then Volume UP to confirm the question on screen.
4- connect Phone to PC, run Odin, load my KERNEL.TAR file as "AP", and flash.
5- Phone reboot and this first reboot is very long, wait and don't turn off phone.
6- Now you will have first setup wizard.
Note:
A- every boot is slower than normal, also when you connect the cable to charge phone while is off.
B- if you use TWRP or other custom recovery, what the recovery do related to /DATA partition is still on old /Data on internal memory, new /DATA partition on SD is not visible in recovery mode.
C- executing a Factory Reset by phone setup, don't reset the new /DATA partition on SD card, but it clear the old /DATA on internal memory
D- if you don't do any Factory reset, wipe Dalvik, or other operation on /DATA from recovery, your old phone status remain in memory like a nandroid backup, so you can return back to previous state simply flashing again the original Kernel.
just an update.
in attach new boot.img with Magisk 15.3 installed, to enable root.
to load on phone, follow this steps:
1- reboot in recovery (i use TWRP 3.0.2.0)
2- from PC run this command from folder where you downloaded my "boot.img":
Code:
adb push boot.img /dev/block/mmcblk0p16
3- reboot normally
4- install MagiskManager follow instructions from this topic on XDA
here is the result:
{
"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"
}
this is memory performance with a microSD type SanDisk Extreme PRO 64GB
and this is memory performance before the mod:
Final:
remember this boot.img is for stock rom J500FNXXS1BQG1, last MM for J500FNITV1BPL1
Related
[fix new sdcard] little Solution (Partitioning)
hi I have two 8GB class4 memory card but when I'm just a partition're doing very bad work Android is reset apps are broken High and low speed is And ... But when a 2GB partition, I just work very well Benchmarking partition is much better! no more problem in android! So I decided two partitions 2 and 6 GB and the second partition so I just do mount Method: 1- Memory partitioning (first partition 2gb fat32) 2- copy android in first partition & run it 3- in android terminal type: Code: ls /dev/block/m* or adb Code: adb shell ls /dev/block/m* result like this: Code: /dev/block/mmcblk0 /dev/block/mmcblk0p1 /dev/block/mmcblk0p2 /dev/block/mmcblk0p3 Partition testing can be yours for the mount 1- make a folder (not in /sdcard & /mnt/sdcard) Code: mkdir /mnt/sd2 now test (for fat32): (just change mmcblk0p2) Code: mount -t vfat -o fmask=0000,dmask=0000,rw,flush,noatime,nodiratime /dev/block/mmcblk0p2 /mnt/sd2 (for ext2) Code: mount -t ext2 -o noatime,nodiratime /dev/block/mmcblk0p2 /mnt/sd2 Now the partition should be on the /mnt/sd2 mounted and you can mount in boot backup /init open init and past mount cammand below this line : Code: PATH=/sbin:/system/sbin:/system/bin:/bin:/system/xbin:/system/xbin/bb:/data/local/bin now we have auto mount partition but we have one problem! we should link /mnt/sd2 > /mnt/sdcard Who s the solution?
interesting idea. will try out.
[GUIDE] Make sd-ext as data partition (easy way)
You can find some thread for you to move data partition to sd-ext. But there is a easier way to do that: Modify the mount point of sd-ext and data in ramdisk. The basic step is: 0. Make a nandroid backup 1. Make an ext4 partition on your sdcard (I used gparted in ubuntu, very fast and not lost data) 2. Download your kernel as boot.img 3. Unpack you boot.img (you can find many thread said how to do, and I think the most completly tool you can get from http://forum.xda-developers.com/showthread.php?t=1241005. You can find the example to unpack boot.img, extract ramdisk, repack ramdisk, repack boot.img from the README.txt file of this tool) 4. Extract ramdisk: Code: gzip -dc ../unpack/boot.img-ramdisk.gz | cpio -i If you find ramdisk.cpio file, you need to extract it by Code: cpio -i -F ramdisk.cpio 5. Modify the mount point of data and sd-ext - File fstab: + Find the line Code: /data yaffs2 userdata , and change to Code: /data ext4 /dev/block/mmcblk0p2 - File init.semc.rc + Find the line Code: mount yaffs2 [email protected] /data nosuid nodev and change to Code: mount ext4 /dev/block/mmcblk0p2 /data nosuid nodev - File recovery.fstab: + Find the line Code: /data yaffs2 userdata and change to Code: /data ext4 /dev/block/mmcblk0p2 6. Repack the ramdisk If you extracted from ramdisk.cpio file, you need to pack to ramdisk.cpio first Code: find . | cpio -o -H newc -O <target path>/ramdisk.cpio Then repack you ramdisk: At the ramdisk folder: Code: mkbootfs <ramdisk folder> | gzip > <target path>/boot.img-ramdisk-new.gz 7. Repack boot.img Code: mkbootimg --kernel <path to>/boot.img-zImage --ramdisk <path to>/boot.img-ramdisk-new.gz -o <path to>/boot_new.img --base `cat <path to>/boot.img-base` 8. Flash boot_new.img 9. Enter CWM, wipe phone and restore from your backup --> Done
Thanks for the info. Or you can go on cmw and create sd-ext from there.
Will it Work with an ext3 partition too? Gesendet von meinem LT15i
lol i dont understand at all...
ARip Kenpachi said: i dont understand at all... Click to expand... Click to collapse It's because the title is wrong.. it's not the "easy way" .. it's a little bit more 'medium - adv user' way.. If it's so hard for you, I think it's better u to search 'script/app' for doing this. There's a lot available like link2sd, cronmod script, etc
Excellent, it worked on Vengeance Kernel, actually that was the only kernel that I was able to extract the ramdisk. Lupus kernel has is ramdisk in another format (not gzip), and KTG is in a elf file. The boot took a little bit longer, but i think is more stable than using init.d scripts. EDIT: Make the backup from an old CWM (like the one on the recoveryARC.img file), newer versions will check for the correct filesystem, and as we are changing it, It will not work. For restore, use any version of CWM (the one included on Vengeance works great). Also, if you have an LT15i, backup your /system/vendor folder, otherwise, it will be not longer available (and a lot of apps will crash), I copied it into the data folder and made a symlink into /system/vendor (and as your data folder will be bigger, thats no issue).
I can't manage to do the trick on my Arc S with DoomKernel_v22. When I flash the modified .img the phone doesn't start and i can't go into CWM. I have two partitions on SD, the second one is the ext4 i want to use. These are the files extracted from Doomkernel: fstab: Code: /data yaffs2 userdata /cache yaffs2 cache init.semc.rc: Code: on fs # mount mtd partitions # Mount /system rw first to give the filesystem a chance to save a checkpoint mount yaffs2 [email protected] /system mount yaffs2 [email protected] /system rw remount mount yaffs2 [email protected] /data nosuid nodev mount yaffs2 [email protected] /cache nosuid nodev recovery.fstab: Code: /cache yaffs2 cache /data yaffs2 userdata /system yaffs2 system /sdcard vfat /dev/block/mmcblk0p1 /sd-ext auto /dev/block/mmcblk0p2 Can anyone help me please?
[How-To] [Link2SD] Solve "mount: No such file or directory" error on stock ROM
[How-To] [Link2SD] Solve "mount: No such file or directory" error on stock ROM I rooted my Galaxy S3 Mini (GT-i8190) (following seedrom193's tutorial), but I'm still on the stock Android ROM. I was trying to use Link2SD with a correctly partitioned SD card (10GB primary FAT32 + 4GB primary ext2), but got the following error, which showed every time I tried to recreate mount scripts: "Mount script cannot be created. mount: No such file or directory" Also, on every reboot, I would get a "Mount warning" from Link2SD, requiring me to "quick reboot" my phone. After that (second) reboot, Link2SD would work correctly, but shortcuts on my home screen to linked apps were missing. After much googling I figured that maybe the problem was caused by my (stock) ROM not having init.d support. So I used this method to add init.d: http://forum.xda-developers.com/showthread.php?t=1933849 Init.d worked properly, but I still got the same error in Link2SD. Then, I used Root Explorer to look at my file system (any other root browser would work too I guess) and found the cause. Here's the contents of /data/data/com.buak.Link2SD/files/init-link2sd.sh, which I *guess* is a copy of the script Link2SD is trying to get to run at boot: Code: set +e echo "$(date) mounting..." > $LOG sleep 4 mount -t ext2 -o rw [COLOR="Red"][B]/dev/block/vold/179:98[/B][/COLOR] /data/sdext2 1>>$LOG 2>>$LOG mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2 1>>$LOG 2>>$LOG mount >> $LOG echo "$(date) mount finished" >> $LOG Apparently, the device node /dev/block/vold/179:98 does not exist, because Android's vold mounting system doesn't automatically mount the second partition of the SD card. This causes the "mount: No such file or directory" error on the first mount command. However, the second mount command (from /dev/block/mmcblk1p2) should work. For some reason, this error seems to keep Link2SD from installing the boot script. So, I decided to create an init.d script of my own. Using Root Explorer, I created and edited a file named "11link2sd" in /system/etc/init.d/ and inserted the following text: Code: #!/system/bin/sh sleep 4 mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2 This solved the problem for me, and I can now use Link2SD without needing the extra quick reboot. I figured I'd share my solution in case anybody else had the same problem. I do suggest that anybody who tries to do the same thing first check the init-link2sd.sh file for that /dev/block/mmcblk1p2 bit, to make sure it''s the same.
Link2SD 2nd Partition getting full Hi, I saw that you are using Link2SD and seems to have a good understanding of the subject. I am new to using Android! Maybe you could help. I think I properly installed Link2SD and that it is working correctly (I don't know of any way to check that). When I go into the menu and ask for storage, I get the following: it is in french, but "libres" means "free". Interne (85% Libres) /data Total: 4,37 Go Utilisés: 658 Mo Libres: 3,73 Go Carte SD (85% Libres) /storage/emulated/legacy Total: 4,37 Go Utilisés: 658 Mo Libres: 3,73 Go Externe SD (98% Libres) /storage/external_SD Total: 27,42 Go Utilisés: 516 Mo Libres: 26,92 Go Carte SD 2nde Partition (9% Libres) /data/sdext2 Total: 2,34 Go Utilisés: 2,12 Go Libres: 230 Mo Système (23% Libres) /system Total: 1,67 Go Utilisés: 1,28 Go Libres: 407 Mo Cache (98% Libres) /cache Total: 787 Mo Utilisés: 12,58 Mo Libres: 774 Mo As you can see the 2nd partition is almost full. Is it possible to remove the SD card, resize the 2nd partition and put it back in the phone without loosing everything? I am not sure if that can be done with link2sd installed. Thanks for your help. Jacques
Hello Jacques, Your Link2SD seems to be working just fine. Here's how I can tell: jacques_xda said: Carte SD (85% Libres) /storage/emulated/legacy Total: 4,37 Go Utilisés: 658 Mo Libres: 3,73 Go Click to expand... Click to collapse This is your internal memory, and plenty of it is now empty, probably thanks to Link2SD. jacques_xda said: Carte SD 2nde Partition (9% Libres) /data/sdext2 Total: 2,34 Go Utilisés: 2,12 Go Libres: 230 Mo Click to expand... Click to collapse This is the second partition which you created and which is indeed almost full. Unless you intentionally put other files there (which I assume you didn't, or you'd have known about it ), this partition was filled by Link2SD, with over 2 Gb of data. So Link2SD is working as it should, freeing your internal memory by moving stuff to that second partition. Now, as for your second question: jacques_xda said: Is it possible to remove the SD card, resize the 2nd partition and put it back in the phone without loosing everything? I am not sure if that can be done with link2sd installed. Click to expand... Click to collapse Yes, but I recommend taking a backup of your SD card first, just to be safe. If your power fails or your card reader is disconnected during re-partitioning, you might lose data. Assuming you're using Windows, you will need to make sure that MiniTool Partition Wizard is installed first (link can be found here). Also, you will need to have a way to back up the second SD card partition (which I assume contains an ext file system) over to Windows. You can copy over the files using Ext2Fsd, DiskInternals Linux Reader or Ext2explore, or find some program for creating an image of an ext partition in windows. Then, take these steps: 1. Turn off your phone (and do not turn it on again!) 2. Take your SD card out of your phone and connect it to your computer using a card reader 3. To make a backup, copy everything on both partitions of your SD card to your computer 4. Use Partition Wizard to shrink the first partition on your SD card, and use the resulting unallocated space to expand the second partition (don't forget to press the "Apply" button!) 5. Safe-remove your SD card and put it back in your phone 6. Turn your phone on again This should enlarge your extra partition without causing any problems with Link2SD. If you really want to be safe, you could use Link2SD to unlink all of your apps before step 1, and re-link them after step 6. Based on the information you provided, you should have just enough internal memory to do so. Bonne chance!
link2SD resize ext partition Warre101 said: Hello Jacques, Your Link2SD seems to be working just fine. Here's how I can tell: This is your internal memory, and plenty of it is now empty, probably thanks to Link2SD. This is the second partition which you created and which is indeed almost full. Unless you intentionally put other files there (which I assume you didn't, or you'd have known about it ), this partition was filled by Link2SD, with over 2 Gb of data. So Link2SD is working as it should, freeing your internal memory by moving stuff to that second partition. Now, as for your second question: Yes, but I recommend taking a backup of your SD card first, just to be safe. If your power fails or your card reader is disconnected during re-partitioning, you might lose data. Assuming you're using Windows, you will need to make sure that MiniTool Partition Wizard is installed first (link can be found here). Also, you will need to have a way to back up the second SD card partition (which I assume contains an ext file system) over to Windows. You can copy over the files using Ext2Fsd, DiskInternals Linux Reader or Ext2explore, or find some program for creating an image of an ext partition in windows. Then, take these steps: 1. Turn off your phone (and do not turn it on again!) 2. Take your SD card out of your phone and connect it to your computer using a card reader 3. To make a backup, copy everything on both partitions of your SD card to your computer 4. Use Partition Wizard to shrink the first partition on your SD card, and use the resulting unallocated space to expand the second partition (don't forget to press the "Apply" button!) 5. Safe-remove your SD card and put it back in your phone 6. Turn your phone on again This should enlarge your extra partition without causing any problems with Link2SD. If you really want to be safe, you could use Link2SD to unlink all of your apps before step 1, and re-link them after step 6. Based on the information you provided, you should have just enough internal memory to do so. Bonne chance! Click to expand... Click to collapse Hi, Thanks for your response. I have a question: do I need to unmount the SD card before closing the phone and pulling it out? If the answer is yes, when I put it back and open the phone, will it mount automatically? Jacques
Hello Jacques, I think it will re-mount automatically, but don't have any similar experience with my own phone. With my own device, the micro-SD expansion slot is underneath the battery, so I have no choice but to turn off the phone before removing the SD. By consequence, the OS offers no option to unmount the SD card (that I know of at least). However, once you turn your phone on again, your SD card should be mounted automatically. Have you rebooted (or turned your phone off and then on again) since using Link2SD? If yes, then it's probably fine. I would recommend that you don't unmount your SD card while the phone is running and apps are still linked; your linked apps would probably stop working.
Warre101 said: Hello Jacques, I think it will re-mount automatically, but don't have any similar experience with my own phone. With my own device, the micro-SD expansion slot is underneath the battery, so I have no choice but to turn off the phone before removing the SD. By consequence, the OS offers no option to unmount the SD card (that I know of at least). However, once you turn your phone on again, your SD card should be mounted automatically. Have you rebooted (or turned your phone off and then on again) since using Link2SD? If yes, then it's probably fine. I would recommend that you don't unmount your SD card while the phone is running and apps are still linked; your linked apps would probably stop working. Click to expand... Click to collapse Hi, I closed the phone and took off the SD card without any problem. I made an image of the content with ext2explore. I then use MiniTool Partiton to try to extend the ext4 partition. The problem is there: MiniTool Partition cannot handle the job! On the SD card, I have one FAT32 Partition and one ext4 linux patition. MiniTool can resize the FAT32 partition, leaving an unallocated space between the FAT32 and the ext4 partition, but it cannot resize the ext4 partition to take advantage of the unallocated space! I can move the ext4 partition closer to the FAT32, leaving the unallocated space at the end; that is all I can do with MiniTool. Of course I could delete the ext4 partition and create a new one, using all the unallocated space. But then , will I be able to load the ext4 image I created before in that new partition, since it is not the same size? When ext2explore create an image, does it make a clone of the partition (content, size, etc...) there is no explanation or help on that product! I will try with Gparted to see what it does and try to simply copy the content of the ext4 partition instead of creating an image. Thank again for helping. Jacques
Hello Jacques, That's odd. I did almost exactly the same thing you described here (except for using ext2 rather than ext4) and was able to resize my ext2 partition using Partition Wizard. I first shrunk the FAT32 partition, then moved and resized the ext2 to use all the unallocated space. Have you tried first pressing apply after you shrink the fat32 and move the ext4? In any case, GParted should also work. I can't help you with ext2explore as I have no direct experience with that program. You might be able to get some help in other parts of this forum. If you want to try deleting that ext4 partition and creating a new one, you may be able to do this by first unlinking your apps back to your internal memory in Link2SD (as I suggested in an earlier post), re-partitioning and then re-linking with Link2SD.
Warre101 said: Hello Jacques, That's odd. I did almost exactly the same thing you described here (except for using ext2 rather than ext4) and was able to resize my ext2 partition using Partition Wizard. I first shrunk the FAT32 partition, then moved and resized the ext2 to use all the unallocated space. Have you tried first pressing apply after you shrink the fat32 and move the ext4? In any case, GParted should also work. I can't help you with ext2explore as I have no direct experience with that program. You might be able to get some help in other parts of this forum. If you want to try deleting that ext4 partition and creating a new one, you may be able to do this by first unlinking your apps back to your internal memory in Link2SD (as I suggested in an earlier post), re-partitioning and then re-linking with Link2SD. Click to expand... Click to collapse Hi, It is realy odd! I created that ext partition with the same tool! Now I can move it, but not resize it....I will try with Gparted with my old computer running Linux (Ubuntu)...later on, expecting it will work fine. Thanks again, Jacques
I rooted my moto e 2nd gen 4g phone and made partition on my 16gb sd card using ext4 FAT32. After partioning sd card then i inserted it in my phone to use link2sd but when i try to recreate mount script an error pop up every time showing " mount script cannot be created. No such file or directory" please help me. If any solution you know.
ankit gaur said: I rooted my moto e 2nd gen 4g phone and made partition on my 16gb sd card using ext4 FAT32. After partioning sd card then i inserted it in my phone to use link2sd but when i try to recreate mount script an error pop up every time showing " mount script cannot be created. No such file or directory" please help me. If any solution you know. Click to expand... Click to collapse Hi, Try to mount with ext2 instead of ext4. I had the same problem trying to mount with ext2; I then try with ext4 and it worked| Regards, Jacques
ankit gaur said: I rooted my moto e 2nd gen 4g phone and made partition on my 16gb sd card using ext4 FAT32. After partioning sd card then i inserted it in my phone to use link2sd but when i try to recreate mount script an error pop up every time showing " mount script cannot be created. No such file or directory" please help me. If any solution you know. Click to expand... Click to collapse jacques_xda said: Hi, Try to mount with ext2 instead of ext4. I had the same problem trying to mount with ext2; I then try with ext4 and it worked| Regards, Jacques Click to expand... Click to collapse That looks exactly like the problem I had. I suggest you first try Jacques' idea (changing ext2 into ext4 or vice versa) and if that doesn't work, use the method I put in the very first post. Let us know if you have any problems with that...
Been trying to get link2sd to work for awhile now My init-link2sd.sh file looks a bit different though. For me, it looks like: set +e echo "$(date) mounting..." >$LOG sleep4 mount-t vfat-o rw,uid=1000,gid=1000,unmask=133,dmask=0002 / dev/block/vold/179:34/data/sdext2 1>>$LOG 2>> $LOG mount -t vfat-o rw,uid=1000,gid=1000,unmask=133,dmask=0002 / dev/block/mmcblk1p2 /data/ sdext2 1>>$LOG 2>> $LOG Mount >> $LOG echo "$(date) mount finished" >> $LOG chmod 773 /data/dalvik-cache Whenever I try to use Link2SD, it gies me the "mount: No such file or directory error," would you be able to help me?
A couple of things stand out to me; I'll go through the script you posted step by step: FinalFreeze said: set +e echo "$(date) mounting..." >$LOG sleep4 Click to expand... Click to collapse A space is missing between "sleep" and "4". Was it lost in copy-pasting? FinalFreeze said: mount-t vfat-o rw,uid=1000,gid=1000,unmask=133,dmask=0002 / dev/block/vold/179:34/data/sdext2 1>>$LOG 2>> $LOG Click to expand... Click to collapse I expected this to be on a single line like this: Code: mount-t [B]vfat[/B]-o rw,uid=1000,gid=1000,unmask=133,dmask=0002 /dev/block/vold/179:34/data/sdext2 1>>$LOG 2>>$LOG Is it like that in your file? Anyway, I notice the second argument in the mount command is "vfat". If you use the "recreate mount scripts" in Link2SD, which option do you use for the file system? Does it correspond to the way your SD card is partitioned? I used EXT2. FinalFreeze said: mount -t vfat-o rw,uid=1000,gid=1000,unmask=133,dmask=0002 / dev/block/mmcblk1p2 /data/ sdext2 1>>$LOG 2>> $LOG Click to expand... Click to collapse This is the information you would need to follow the tutorial that I posted. You could try putting the following in an init.d script: Code: #!/system/bin/sh sleep 4 mount -t [B]ext2[/B] -o rw,uid=1000,gid=1000,unmask=133,dmask=0002 /dev/block/mmcblk1p2 /data/sdext2 Note that I'm assuming here that your SD card uses an EXT2 partition, as shown in bold. FinalFreeze said: Mount >> $LOG echo "$(date) mount finished" >> $LOG chmod 773 /data/dalvik-cache Click to expand... Click to collapse The last line (starting with chmod) is something I haven't seen before. If you create your own init.d script, you may need to add the same line.
Warre101 said: I rooted my Galaxy S3 Mini (GT-i8190) (following seedrom193's tutorial), but I'm still on the stock Android ROM. I was trying to use Link2SD with a correctly partitioned SD card (10GB primary FAT32 + 4GB primary ext2), but got the following error, which showed every time I tried to recreate mount scripts: "Mount script cannot be created. mount: No such file or directory" Also, on every reboot, I would get a "Mount warning" from Link2SD, requiring me to "quick reboot" my phone. After that (second) reboot, Link2SD would work correctly, but shortcuts on my home screen to linked apps were missing. After much googling I figured that maybe the problem was caused by my (stock) ROM not having init.d support. So I used this method to add init.d: http://forum.xda-developers.com/showthread.php?t=1933849 Init.d worked properly, but I still got the same error in Link2SD. Then, I used Root Explorer to look at my file system (any other root browser would work too I guess) and found the cause. Here's the contents of /data/data/com.buak.Link2SD/files/init-link2sd.sh, which I *guess* is a copy of the script Link2SD is trying to get to run at boot: Code: set +e echo "$(date) mounting..." > $LOG sleep 4 mount -t ext2 -o rw [COLOR="Red"][B]/dev/block/vold/179:98[/B][/COLOR] /data/sdext2 1>>$LOG 2>>$LOG mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2 1>>$LOG 2>>$LOG mount >> $LOG echo "$(date) mount finished" >> $LOG Apparently, the device node /dev/block/vold/179:98 does not exist, because Android's vold mounting system doesn't automatically mount the second partition of the SD card. This causes the "mount: No such file or directory" error on the first mount command. However, the second mount command (from /dev/block/mmcblk1p2) should work. For some reason, this error seems to keep Link2SD from installing the boot script. So, I decided to create an init.d script of my own. Using Root Explorer, I created and edited a file named "11link2sd" in /system/etc/init.d/ and inserted the following text: Code: #!/system/bin/sh sleep 4 mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2 This solved the problem for me, and I can now use Link2SD without needing the extra quick reboot. I figured I'd share my solution in case anybody else had the same problem. I do suggest that anybody who tries to do the same thing first check the init-link2sd.sh file for that /dev/block/mmcblk1p2 bit, to make sure it''s the same. Click to expand... Click to collapse Mount script error Mount Script cannot be created Moun Invalid arguement I've been at this every day for a week i inserted the txt file with ur script rebooted and nothing same old bs script error. PLEASE tell me som1 knows A REAL WORKING FIX. I've tried fat32/ext2 fat32/ext4 fat32/fat32 The mount DOES NOT EXIST. i have int.d support How do I create the mount? Not just a file directory?
Hi, I have tried the script, but at restart seems not to run because no mount is done, so no partition. I use CM13. Any ideas? Thank you.
mikeroku said: Hi, I have tried the script, but at restart seems not to run because no mount is done, so no partition. I use CM13. Any ideas? Thank you. Click to expand... Click to collapse That's difficult to tell based on the information you provided. Can you look for this file: Code: /data/data/com.buak.Link2SD/files/init-link2sd.sh and post the contents please?
Hey...my problem is mounting the second partition...I've been literally trying since yesterday....no luck using the mini tool to format any of the ext's and lost a lot of time trying different fixes....typing in "cannot mount 2nd partition" on google leaves me with so many results that don't have actual fixes...any help?
Stabbey said: Mount script error Mount Script cannot be created Moun Invalid arguement Click to expand... Click to collapse psantos1091 said: Hey...my problem is mounting the second partition...I've been literally trying since yesterday....no luck using the mini tool to format any of the ext's and lost a lot of time trying different fixes....typing in "cannot mount 2nd partition" on google leaves me with so many results that don't have actual fixes...any help? Click to expand... Click to collapse Hey guys, Some time ago my phone started having the exact same problem that Stabbey describes: mounting the second partition no longer works, manually mounting the second partition results in the "Invalid argument" error when running this command in a terminal emulator: Code: mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2 This started happening after I installed an update for busybox and some other apps and then rebooted. Something might have changed in the mount applet of busybox with that update, and that might have broken the mount command. Right now I don't know for sure if this is the case; I haven't figured out how to roll back the busybox update yet. In any case, if I can't manually mount, it certainly won't work on startup with init.d, so I'm stuck for now. I'm sorry I can't give any of you a solution right now. If anyone else wants to take a crack at it, my problems started after installing busybox 1.25.1, so a version *before* that might work.
大神你好: 这是个非常厉害的好办法!您帮我解决了这个疑难杂症!让我手机重新获得新生,而且问题分析得非常准确。 致敬! 机油
Hi Warre101 thank you so much for your solution! However, I still have a small issue: When I created a file in the init.d folder, I ended with a .txt file while the others in that folder have no extension. I wrote the code you mentioned. Then with Universal init.d app, I executed the file, and it worked -> the partition get mounted. But, when I reboot my phone, it is not done automatically: I have the error message on Link2sd, then I have to come back to Universal init.d, execute the script, and come back to Link2sd to see it is mounted. Do you have an idea to have it done automatically? the init-link2sd.sh file is like this (when the partition in mounted) : Code: set +e echo "$(date)mounting..." > $LOG sleep 2 mount -t ext4 -o rw /dev/block/vold/public:179_130 /data/sdext2 1>>$LOG 2>>$LOG mount -t ext4 -o rw /dev/block/mmcblk1p2 /data/sdext2 1>>$LOG 2>>$LOG mount >> $LOG echo "$(date) mount finished" >> $LOG chmod 773 /data/dalvik-cache The partition I created using minitool is in ext4 The 11link2sd.txt file is: Code: #!/system/bin/sh sleep 2 mount -t ext4 -o rw /dev/block/mmcblk1p2 /data/sdext2 Then in /data I got a new file link2sd-boot-receiver-mount.log: Code: Tue Oct 24 09:47:50 CEST 2017 mounting... mount: No such file or directory rootfs / rootfs ro,seclabel 0 0 tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0 devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0 proc /proc proc rw,relatime 0 0 sysfs /sys sysfs rw,seclabel,relatime 0 0 selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0 debugfs /sys/kernel/debug debugfs rw,seclabel,relatime 0 0 none /acct cgroup rw,relatime,cpuacct 0 0 none /sys/fs/cgroup tmpfs rw,seclabel,relatime,mode=750,gid=1000 0 0 tmpfs /mnt tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0 none /dev/cpuctl cgroup rw,relatime,cpu 0 0 pstore /sys/fs/pstore pstore rw,seclabel,relatime 0 0 /dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0 /dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,noatime,discard,noauto_da_alloc,resuid=10010,data=ordered 0 0 /dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,discard,noauto_da_alloc,data=ordered 0 0 /dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/protect1 /protect_f ext4 rw,seclabel,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered 0 0 /dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/protect2 /protect_s ext4 rw,seclabel,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered 0 0 /dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/nvdata /nvdata ext4 rw,seclabel,nosuid,nodev,noatime,discard,noauto_da_alloc,data=ordered 0 0 adb /dev/usb-ffs/adb functionfs rw,relatime 0 0 tmpfs /storage tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0 /dev/block/loop1 /su ext4 rw,seclabel,noatime,data=ordered 0 0 /dev/fuse /mnt/runtime/default/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0 /dev/fuse /storage/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0 /dev/fuse /mnt/runtime/read/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0 /dev/fuse /mnt/runtime/write/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0 /dev/block/vold/public:179,129 /mnt/media_rw/319C-76D0 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0 /dev/fuse /mnt/runtime/default/319C-76D0 fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0 /dev/fuse /storage/319C-76D0 fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0 /dev/fuse /mnt/runtime/read/319C-76D0 fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0 /dev/fuse /mnt/runtime/write/319C-76D0 fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0 /dev/block/mmcblk1p2 /data/sdext2 ext4 rw,seclabel,relatime,data=ordered 0 0 Tue Oct 24 09:47:50 CEST 2017 mount finished I used MiXplorer that I found on thi forum as a file explorer and to create the script file. I am on Android 6.0, stock ROM but not original (eg when I bought the phone the stock ROM was on Android 5, then I discovered they changed to Android 6 so I downloaded the new stock ROM from the official website and flashed it). Thank you for your help !
A500 dead internal SD card?
Hi guys, I'm a new poster but long time reader of these boards, which helped me a lot since I got my A500 and an Android phone years ago. So far I've always found a ready solution for my 'droid needs and wants here but this time I think I've hit a bricked (tablet) wall! :laugh::crying: My A500 has Skrilax_CZ's bootloader v9 with CWM v6.0.4.5 on the secondary partition and for more than a year has been running HenrikE's Android 4.4.4 (OmniROM unofficial) from this thread: http://forum.xda-developers.com/showthread.php?t=2705989 The ROM has been going fine apart from a few random freezes but overall I like it. Yesterday I was using the tablet to read a book and it started running Play store auto updates, I went to look at the store app to check which apps etc, then switched back to my book and the tablet froze. Normally I'd just long press the power button and then press it again to turn it on, so I did, only this time the ROM would not boot anymore and the tablet got stuck at the bootloader screen. I went into recovery and wiped cache and dalvik, no change. I went back to recovery and then I realized the partitions aren't mounting nor can be formatted! /system, /data, /cache, nothing: E: format_volume: make_extf4fs failed on /dev/block/mmcblk0p3 Without much hope I reinstalled the ROM with a data/factory reset and that of course didn't fix it. Tried to erase userdata and cache with fastboot, no change. It looks like either my internal SD card is broken/not found or my partitions are horribly corrupted? mmcblk0 isn't showing on /dev, see below from adb shell: /dev/block # ls loop0 loop2 loop4 loop6 mmcblk0p5 zram0 loop1 loop3 loop5 loop7 vold /dev/block # fdisk /dev/block/mmcblk0 fdisk: can't open '/dev/block/mmcblk0' /dev/block # parted Error: No device found Retry/Cancel? c c /dev/block # /etc # cat fstab /dev/block/mmcblk0p4 /cache ext4 rw /dev/block/mmcblk0p8 /data ext4 rw /dev/block/mmcblk0p3 /system ext4 rw /etc # mount -t ext4 /dev/block/mmcblk0p8 /data mount: mounting /dev/block/mmcblk0p8 on /data failed: No such file or directory /etc # Looking at other threads I guess the next step would be to try an APX reinstall however I use Linux and don't have a Windows machine around. While I can certainly spend my Easter break setting up a Windows Virtualbox :crying: do you guys think this is a hardware fault or something that can be fixed? Many thanks for any input. Oh and yeah I do have the tablet's SBK number. Edit: I forgot to paste this: /etc # cat recovery.fstab # Android fstab file. #<src> <mnt_point> <type> <mnt_flags> <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 /dev/block/mmcblk0p3 /system ext4 ro,noatime wait /dev/block/mmcblk0p4 /cache ext4 noatime,nosuid,nodev,errors=panic wait,check /dev/block/mmcblk0p8 /data ext4 noatime,nosuid,nodev,errors=panic,discard,noauto_da_alloc wait,check /dev/block/mmcblk0p2 /boot emmc defaults recoveryonly /dev/block/mmcblk0p1 /recovery emmc defaults recoveryonly /dev/block/mmcblk0p5 /misc emmc defaults recoveryonly /dev/block/mmcblk0p3 /system ext4 defaults recoveryonly /dev/block/mmcblk0p4 /cache ext4 defaults recoveryonly /dev/block/mmcblk0p6 /flexrom ext4 defaults recoveryonly /dev/block/mmcblk0p8 /data auto defaults recoveryonly /dev/block/mmcblk1p1 /mnt/sdcard vfat defaults recoveryonly # vold-managed volumes ("block device" is actually a sysfs devpath) /devices/platform/sdhci-tegra.2/mmc_host/mmc1 /storage/sdcard1 auto defaults voldmanaged=sdcard:auto /devices/platform/tegra-ehci.2 /storage/usbdisk0 auto defaults voldmanaged=sda:auto /etc #
Hi all, I've narrowed it down to a bad sector on the tablet's internal storage and posted on this older thread about the same problem http://forum.xda-developers.com/showthread.php?t=1691729&page=5
i-tec USBOTG device with HDMI and storage devices (SCSI HDD/SSD, SDcard, USB-3 + USB-C connector)
Hi everybody, I am looking for ways to mount storage devices with more than one partitions via usbotg and my i-tec 'docking station'. That worked on my old MOTO G5 on LINEAGEOS17.1 with an USB Stick for vfat and ext4 partitions out of the box, but the luks partitions were not mounted. WIth my LGV20 and LINEAGEOS18.1 only the first partitions are showing up. The 2nd and 3rd partition are not mounted. -> I would like to mount an USB Stick with vfat, ext4 (boot) and a luks partition. -> I would like to mount an HDD with a vfat and luks partition I somehow feel and know that this should be an easy task, if you know how to mount partitions in android. I am thinking about trying to mount the partitions in the TWRP terminal and then copy the command in /fstab.elsa /fstab.elsa content: # Android fstab file. # 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 #TODO: Add 'check' as fs_mgr_flags with data partition. # Currently we dont have e2fsck compiled. So fs check would failed. #<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags> /dev/block/bootdevice/by-name/boot /boot emmc defaults recoveryonly /dev/block/bootdevice/by-name/recovery /recovery emmc defaults recoveryonly /dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1,noatime wait /dev/block/bootdevice/by-name/userdata /data ext4 discard,nosuid,nodev,barrier=1,noatime,noauto_da_alloc,errors=continue wait,check,encryptable=/dev/block/bootdevice/by-name/encrypt /dev/block/bootdevice/by-name/cache /cache ext4 discard,nosuid,nodev,barrier=1,noatime,noauto_da_alloc,errors=continue wait,check /dev/block/bootdevice/by-name/modem /firmware vfat ro,nosuid,nodev,context=u:object_r:firmware_file:s0 wait /dev/block/bootdevice/by-name/misc /misc emmc defaults defaults /devices/soc/74a4900.sdhci/mmc_host* auto auto nosuid,nodev wait,encryptable=/dev/block/bootdevice/by-name/encrypt /devices/soc/6a00000.ssusb/6a00000.dwc3/xhci-hcd.0.auto/usb* auto auto defaults defaults /devices/soc/6a00000.ssusb/6a00000.dwc3/xhci-hcd.1.auto/usb* auto auto defaults defaults /dev/block/bootdevice/by-name/persist /persist ext4 nosuid,nodev,barrier=1,noatime,noauto_da_alloc,errors=continue wait /etc/fstab content: /dev/block/bootdevice/by-name/system /system_root ext4 rw 0 0 /dev/block/bootdevice/by-name/userdata /data ext4 rw 0 0 /dev/block/bootdevice/by-name/cache /cache ext4 rw 0 0 /dev/block/bootdevice/by-name/modem /firmware vfat rw 0 0 /dev/block/bootdevice/by-name/persist /persist ext4 rw 0 0 /external_sd vfat rw 0 0 /vendor ext4 rw 0 0 For the terminal mount /dev/sda1 didn't work. Any ideas how I have to adress the USB device?