[GUIDE] Swap Partition - Galaxy S Plus I9001 Android Development

How to use Swap Partition on external sdcard
Q: Why use a swap-partition instead of a swap-file?
A: You are able to mount your first partition on computer, with swapfile you are not.
Attention
mmcblk1 = external_sdcard if you use mmcblk0 you will hardbrick your phone. Some apps like swapper 2 use mmcblk0pX as default value, if you want to use these apps make sure to change this in settings.​
Test if Kernel supports swap
Code:
$ free
Find your swappartition
Code:
$ fdisk -l /dev/block/mmcblk[COLOR="Red"]1[/COLOR]
Output:
Code:
Device Boot Start End Blocks Id System
/dev/block/mmcblk1p1 1 3849 30916015+ c Win95 Fat32 (LBA)
/dev/block/mmcblk1[COLOR="red"]p2[/COLOR] 3849 3880 250084 82 [COLOR="Red"]Linux swap[/COLOR]
Activate Swap (Linux swap)
Code:
$ swapon /dev/block/mmcblk1[COLOR="red"]p2[/COLOR]
Optional change swappiness
Code:
$ echo 10 > /proc/sys/vm/swappiness //default value is 60
Test if all works
Code:
$ free //There should be some numbers behind swap
$ cat /proc/sys/vm/swappiness //current swappiness value
init.d script
Code:
#!/system/bin/sh
swapon /dev/block/mmcblk1[COLOR="red"]p2[/COLOR]
echo 10 > /proc/sys/vm/swappiness

Faq:
1. Does my Kernel support swap?
free \\there should be on line
Code:
Swap: 0 0 0
2. What is Swappiness?
Lower values: Old cache is deleted rather than swapped
Higher vales:
Since sdcards are not that fast lower values should be better for performance.
3. Which sdcard class should i use?
the faster the better: class 10, but using class 6 (maybe 4) could speed up your phone, too. Slower sdcard == smaler swappiness.

I created linux swap partition in my extsdcard using minitools.. after using the find swap partition code I got some weird message in terminal like
- "partition 2 does not end on cylinder boundary.. why is this happening?? Any solution for this??
Please check the screenshot attached

AW: [GUIDE] Swap Partition
You can ignore this. It is a warning not an error. Did you try to partition your external SD in recovery? Before doing that save all your data, cause it will be deleted.

buffo1987 said:
You can ignore this. It is a warning not an error. Did you try to partition your external SD in recovery? Before doing that save all your data, cause it will be deleted.
Click to expand...
Click to collapse
I dont know how to partition from recovery mode so I did it from pc using minitool..!!
Im confused about what format I should used to create swap partition- ext3 or linuxSwap or someother format..??

thunderrr0 said:
I dont know how to partition from recovery mode so I did it from pc using minitool..!!
Im confused about what format I should used to create swap partition- ext3 or linuxSwap or someother format..??
Click to expand...
Click to collapse
from recovery you do not have to care about that. swap is right

buffo1987 said:
from recovery you do not have to care about that. swap is right
Click to expand...
Click to collapse
Can u help me with this recovery method??procedure?
I use galaxy s advance I9070..stock JB..custom kernel CoCore 4.4..
I guess the recovery method will be same for most o the galaxy series phones??

thunderrr0 said:
Can u help me with this recovery method??procedure?
I use galaxy s advance I9070..stock JB..custom kernel CoCore 4.4..
I guess the recovery method will be same for most o the galaxy series phones??
Click to expand...
Click to collapse
be good to your phone and dont flash anything that doesnt belong to your phone!

AW: [GUIDE] Swap Partition
Recovery should be same for all phones.

Bricked :/
Hey guys!
I used an other tutorial that I found in google. The author of the article didn't tell us to change anything in Swapper2. Everything worked fine until I tried to reboot my phone. It turned off and then nothing, not even a single sign of life. Question is, what can I do with it? Is there a way to revive it?

vricsi94 said:
Hey guys!
I used an other tutorial that I found in google. The author of the article didn't tell us to change anything in Swapper2. Everything worked fine until I tried to reboot my phone. It turned off and then nothing, not even a single sign of life. Question is, what can I do with it? Is there a way to revive it?
Click to expand...
Click to collapse
If you have a S Plus and you touched any partition bellow mmcblk0p8 such as mmcblk0p2 or 3 your device bootloader got corrupted and you won't be able to boot anything anymore (nor Download Mode, Recovery Mode or System).

vricsi94 said:
Is there a way to revive it?
Click to expand...
Click to collapse
Sorry..... No..... In case you activated swappartion in advanced options without changing the given location You formatted the third partition of Your system...... This isn't reversible.
Gr.
B.
sent from my i9001 using Tapatalk2

Thanks for the replies! However, I remembered a little wrong, I did change some of the settings, I did everything as per this tutorial: http://forum.xda-developers.com/showthread.php?t=1659231
As a last idea, I thought about buying a USB jig. Could that help me in any way?

Related

[New Solution] - Faster Virtual Ram !!!!!

Hi,
I'm not a developer but I think my idea is great.
1. Using CACHE partition (50Mb) as virtual ram​
- I see that we are using swap ext partition to increase virtual ram, but access data speed of sdcard is not fast enough (for class2 or class4 sdcard),
- And I see that we have 50Mb free in cache partition which are only used when we use OTA update. But if we use a moded rom, why do we use OTA update ? access data speed of internal memory is really good, why don't we use cache partition as virtual ram ???
2. Runing faster with dalvik-cache on internal memory.​
- As you know, after install an application, we will have apk file in data/app or data/app-private and some odex file in dalvik-cache.
- If we only use app2sd with data/app and data/app-private, our application will run faster.
There was already an idea like that.
You mean using CACHE as swap partition.
At the moment this isn't possible because we would have to format this partitions and recovery wouldnt work then.
maxisma said:
There was already an idea like that.
You mean using CACHE as swap partition.
At the moment this isn't possible because we would have to format this partitions and recovery wouldnt work then.
Click to expand...
Click to collapse
What are the partitions formatted as now?
ivanmmj said:
What are the partitions formatted as now?
Click to expand...
Click to collapse
YAFFS2
Swapfiles aren't compatible with it.
Only 1 solution:
Create a loop-ext-file and loop mount it, put a swapfile on it and you're set.
But thats slow.
The partition wouldn't have to be formatted, you can use zeroed images for swap space, I've done it in Solaris before and I'm sure some of the memory techniques for Android have implemented this before, don't quote me!
maxisma said:
There was already an idea like that.
You mean using CACHE as swap partition.
At the moment this isn't possible because we would have to format this partitions and recovery wouldnt work then.
Click to expand...
Click to collapse
Is it not possible to use something like a swap file on the cache partition? I'm not familiar enough with the workings of Android, but I know that swap files are supported in Linux and I've seen it mentioned for Android, so is there any reason this wouldn't work? It would be an amazing improvement. I see you answered while I was typing this post, thanks.
I do wish people would stop putting their ideas as [new solution] and stuff and just put it forward as an [idea] or [concept] until there's a working implementation.
maxisma said:
YAFFS2
Swapfiles aren't compatible with it.
Only 1 solution:
Create a loop-ext-file and loop mount it, put a swapfile on it and you're set.
But thats slow.
Click to expand...
Click to collapse
Would the loop mounting be slow to create or slow for performance? I wouldn't mind a bit more boot time if it meant onboard swap, but obviously if it's a slowdown vs SD or none at all, it's probably not worth it.
How would u format a folder like that??? We could elimate the recovery and instead of useing it for 50 mb swap. Let's use it on the system folder. And then we could than drag eclair in our phones but then we would have to be stuck have just one rom. We could also ask rom devs to make us img instead of .zip roms so we could just flash the images
What about Nandroid etc?
This is a must-have.
Also I think the formation of the partition would be overwritten with every reboot..
But idk.
Won't try it out.
there's an issue for using /cache as swap or compcache like maxisma said.. recovery uses a small portion of /cache to write it's files to temporarily so this wouldn't be an easy work around. this idea was already started a long time ago by shafty and well, it never turned out.
maxisma said:
YAFFS2
Swapfiles aren't compatible with it.
Only 1 solution:
Create a loop-ext-file and loop mount it, put a swapfile on it and you're set.
But thats slow.
Click to expand...
Click to collapse
You don't need a swap partition, neither real nor looped
Code:
# dd if=/dev/zero of=/cache/swapfile bs=1M count=XX
# mkswap /cache/swapfile
# swapon /cache/swapfile
Ooops, forget about it: swapon (as a busybox internal) can't do that on my CM. It does work on my machines :/
But remember guys we also have the spl as backup. We could make the nandro-backup into a .nbh file to flash but it takes a longer time to do it. We could make an app or script that does it for as. I tried to customize the init.rc, build.prop, and fstab but it changes everytime - reboot. What should I do? These files were rewriten when I rebooted. If you guys want to talk this over with me and some of my friends on gtalk, I'll create a group for us to talk more in depth. My email address is [email protected].
jroid said:
there's an issue for using /cache as swap or compcache like maxisma said.. recovery uses a small portion of /cache to write it's files to temporarily so this wouldn't be an easy work around. this idea was already started a long time ago by shafty and well, it never turned out.
Click to expand...
Click to collapse
How much code do we have for recovery? I know there are modified recovery images, I have used Cyano and RA. It seems like it would be possible to create a small ramdisk or loop mount for recovery to use and recover this RAM for use by our applications. Or a mod to the init script to format that device properly for recovery when it boots and run mkswap on it when we boot to normal mode. I'm not real familiar with Android at this level, so perhaps I'm way off base here.
Do you know how to put a custom init.rc on to the g1? When I reboot it is gone and goes back to the orginal init.rc
mohsinkhan47 said:
Do you know how to put a custom init.rc on to the g1? When I reboot it is gone and goes back to the orginal init.rc
Click to expand...
Click to collapse
You have to change the one in the initial ram disk.
1) unpack boot.img
2) change initrc
3) repack boot.img
4) flash
farmatito said:
You have to change the one in the initial ram disk.
1) unpack boot.img
2) change initrc
3) repack boot.img
4) flash
Click to expand...
Click to collapse
I did that but got " broken image file ". What do I do now?
If the 50MB on the cache partition is never used, would it be possible to re-map it to /system? Probably something akin to what the "Death" SPL did.
That is what I said but then I guess you would have to reformat the phone to accept a different amount of info in this case megabytes. We would have to reformat the system folder to hold more info on it.
rgawenda said:
You don't need a swap partition, neither real nor looped
Code:
# dd if=/dev/zero of=/cache/swapfile bs=1M count=XX
# mkswap /cache/swapfile
# swapon /cache/swapfile
Ooops, forget about it: swapon (as a busybox internal) can't do that on my CM. It does work on my machines :/
Click to expand...
Click to collapse
YAFFS2 doesn't support swapfiles.
Thats why would need a loop mounted ext-image.
Placing a swap file/partition in internal memory is risky business. Flash memory has a limited number of write cycles, and swap does many writes per second. Whereas an SD card can be replaced if worn out, internal memory cannot, so the phone becomes a brick if the flash memory is damaged by swapping.

[Utility] ext4 data2sd for Froyo ROMs

If you are always low on program memory, this data2sd might be for you. It works with any Froyo for the G3.
Note: This won't wipe your data, but you should have a backup, just in case. First backup the phone to the SD card, then the SD card to your computer. Be cautious. I give no guarantee whatsoever. If your phone behaves funny, even eats your cat afterwards, I take no responsibility.
Note: starting with version 3, the new storage size will NOT be reflected in the Task Manager or in Titanium Backup. I'll see what I can do about it.
You need a rooted phone and an SD card, preferably 2 GB or more and class 6 or better (higher). data2sd doesn't make your phone faster. Much to the contrary: it extends your memory at the cost of speed. That said, if your SD card is of a class smaller than 6, this will work too. The slowdown, however, will be noticeable in some situations.
Three steps are needed. First, we need a kernel with built-in ext4 if you don't have one. Second, we bring the data2sd into its place. And third, we create an ext 4 partition with the desired size. Now follows a detailed description of these steps.
Step 1: Check your kernel
You need a kernel with built-in ext4 capability. The custom ROMs mostly have one. If you are running a stock kernel, you must install one, e.g. from http://forum.xda-developers.com/showthread.php?t=978823 . Follow the installation steps detailed there. (Changing the kernel does not wipe your phone).
Step 2: Install data2sd
You now must install data2sd onto your phone. As long as you didn't modify your SD card (as long as partition #2 is not ext4), this will have no further impact on your phone.
Download data2sd.zip from below and unzip it. There's a single file in there: data2sd.sh. Use the tool that suits you best to transfer it to the SD card of your phone. With adb, you would do
Code:
adb push data2sd.sh /mnt/sdcard
Now either start a terminal emulator with a root shell or use adb again. With adb, you would execute
Code:
adb shell
Make sure you are root (the prompt reads '#'), else run "su". Now type in:
Code:
# sh /mnt/sdcard/data2sd.sh
You will see some lines about what is happening and a final confirmation.
That's it. Again, your phone will continue to behave as usual.
Step 3: Prepare your SD card
You can use any amount of program memory up to the size of your SD card, but be sure to leave some room for application data on the normal (#1, vfat) partition. As a rule of thumb, 0.5 GB of program memory will satisfy most needs, 1 GB is plenty.
If you're running Linux, prepare a second partition (must be partition #2) with the desired size. Use the usual utilities to do so. This includes gparted, but there are also other means. If you use gparted, you can follow the description for Parted Magic below.
If you have no access to a Linux computer, even not your friend's, your (probably) best choice is to run Parted Magic from a live CD. For this, go to http://partedmagic.com, and burn your CD. Instructions on how to do it with different burning tools are also there.
Step 3.1: Partition and format your SD card with Parted Magic (also applies to gparted)
The following describes the steps to partition your SD card with Parted Magic. You don't need to use this method - use the tool that suits you best.
I assume you have gparted or Parted Magic running and your SD card inserted into the card reader of your PC. Now select your card from the drop-down menu of available drives in the upper right corner. You better double check that you're on the correct drive (card). It will happily erase your system disk if told to do so.
Right click near top into the block designating your current partition #1. Select "resize". (I assume that your partition #1 is the only one. If not, delete the other partition(s)). Change the size to the total size of your SD card minus the desired size for program storage (/data). Confirm your selection.
There is now a gray block designating free space to the right of your first partition. Right click it and select "New". In the following window, leave the sizes as they are. Leave "create as" to be a primary partition, and change "file system" to ext4. Confirm your selection ("Add").
The gray block at the right has changed to a colored frame. Right click it again and select "Format as". Select "ext4".
If everything went well, you can now click on the green check mark in the icon bar near the top, confirm, and watch Parted Magic resizing your normal (#1, VFAT) partition and creating the new ext4 one.
4. Finale furioso
Now insert the SD card and reboot your phone. The Task Manager will report the new size in its rightmost tab, as do the other utilities like Titanium. All user apps and data should be in place. All will look like you have soldered in an extra chunk of internal memory. Despite not being directly visible, your program memory is resized to be the new partition. You see its size and its usage (in percent) by running
Code:
df
from adb or from a terminal emulator. Have a look at the subdirectories of /data displayed there.
As a final step, you can safely remove data2sd.sh from your SD card (/sdcard). It is not needed any more.
Q&A
* How can I remove my SD card while the phone is on?
You can't. Don't try. Always switch your phone off before you remove the SD card.​* How can I return to the state before data2sd?
Remove the SD card. All user data and apps will be there in the state you left them before you installed data2sd. The data2sd script you have installed simply does nothing as long as there is no ext4 #2 SD partition.
If you want to reuse the SD card, remove partition #2. This can be done with each partitioning tool, you don't need Linux.​• What about app2sd from Kyrillos 3.0? Is it compatible?
Yes. But "no" for the "no wipe" version which was offered for a short period of time. In the latter case, clear out the ext4 partition (important: do not forget the hidden .data2sd_initialized file) or simply reformat it before reusing it.​* It doesn't work. What can I do to help diagnose the problem?
See if the file /mnt/asec/data2sd/log.txt exists. If it does, have a look at it and try to make sense of it. If it doesn't tell you anything useful, add it to your error description in the forum here. If there is none, mention that in the description.​* What things must be considered if I flash a new ROM?
As always with such actions, make sure you have a backup. That said, just flash the new ROM and then install data2sd. When you reboot with the SD card in place, all user Apps and all data should be there. No restore from backup required.
Only in the rare case that the new ROM explicitly requires you to NOT restore your old data, e.g., from Titanium, you should reformat your ext4 partition (to clear it out) and proceed as advised by the ROM makers.​Versions:
2011-03-19 Initial release
2011-03-21 Version 2
- Updated for ROMs without /system/etc/init.d
- Simplified installation of the core parts
2011-03-23 Version 3
- Vibration bug fixed
- App2SD mode added: If the ext4 partition bears the volume label "app2sd" on a new blank SD, only /data/app is moved. This greatly reduces size benefits, but results in nearly no speed loss.
- Just run the data2sd.sh file (as described in step 2) to upgrade without data loss.
- Note: the actual size will NOT be reflected as described in the Task Manager or in Titanium.
Gosh this sounds so complex and risky! Isn't there a easier way?
☞★sent from my Galaxy3!!
♪drajax!! ♬♂ツ
drajax said:
Gosh this sounds so complex and risky! Isn't there a easier way?
☞★sent from my Galaxy3!!
♪drajax!! ♬♂ツ
Click to expand...
Click to collapse
Flash Kyrillos' v3.1 where's the script's allready built in...
It is less complex than it sounds. The description is just really very detailed. The details may sound confusing until you try it. And if you have access to Linux, it is really simple. We Linux users also have to use a different operating system when we flash our phones.
Alternative: Install Kyrillos 3.1. It contains the same data2sd and comes with a partitioning tool. But, as far as I can tell, you need to reformat the SD card's vfat part on the phone and lose the data there (not sure, however).
when i try to set permissions it says permission denied . Any help?
http://www.appbrain.com/app/move2sd-enabler-(root-only)/com.leinardi.setinstalllocation
Just one quick question....
I am having the stock JPM ROM... in that case do i need to have some new Kernel to use your data2sd???
I'll be using this!
Sent from my ACID Lestatious v1.4.5.5 Galaxy 3 FROYO
When i write down "/ # cd /system/etc/init.d/"
it says "sh: cd: can't cd /system/etc/init.d/"
What am i doing wrong???
Pinak.ahuja said:
when i try to set permissions it says permission denied . Any help?
Click to expand...
Click to collapse
You're not in a root shell. Enter "su" as your first command.
next2devil said:
When i write down "/ # cd /system/etc/init.d/"
it says "sh: cd: can't cd /system/etc/init.d/"
What am i doing wrong???
Click to expand...
Click to collapse
Don't know. Try this:
cd /system
cd etc
cd init.d
and report where it fails and if you are using adb or a terminal emulator. If it doesn't fail, continue with the line after the cd command.
Awesome work mizch!
We can refer to below link for partitioning of sd card to ext4 using adb
http://forum.xda-developers.com/showthread.php?t=534714
Hi Mizch,
Thanks for the script. have few questions; requesting for an answer:
1. Once data2sd is done, will sd card be auto mounted on reboot?
2. I am running JPM with Apollo's data2sd (ext2 partition for apps 1.1GB). What will be the benefit of ext4 over ext2?
3. I understand that i have to remove apollo's lagfix and then apply ext4 data2sd. Is there a way, i can also apply lagfix?
Thanks
jaskiratsingh said:
Hi Mizch,
Thanks for the script. have few questions; requesting for an answer:
1. Once data2sd is done, will sd card be auto mounted on reboot?
Click to expand...
Click to collapse
Yes. And for the first boot, it gets initialized too.
2. I am running JPM with Apollo's data2sd (ext2 partition for apps 1.1GB). What will be the benefit of ext4 over ext2?
Click to expand...
Click to collapse
Reliability, especially in crash cases and generally when the phone is shut down without a clean unmount. Ext 4, being a journaling file system, tries to keep the file system in a consistent state whenever possible. ext2 does nothing like that. So, when you forcible switch off your phone by long pressing the power button, most likely you are continuing with a damaged file system whose errors accumulate from now on and will eventually become visible at some time later.
There's one drawback, however: ext4 has to write more data than ext2. ext4 must always write the information needed to reconstruct a consistent file system to its journal.
3. I understand that i have to remove apollo's lagfix and then apply ext4 data2sd. Is there a way, i can also apply lagfix?
Click to expand...
Click to collapse
If I'm correct, the lagfix converts /data (your program storage) to ext2. Since /data is now handled by data2sd and converted to eyt4 anyway, you cannot use lagfix any more. You need to remove it.
mizch said:
If I'm correct, the lagfix converts /data (your program storage) to ext2. Since /data is now handled by data2sd and converted to eyt4 anyway, you cannot use lagfix any more. You need to remove it.
Click to expand...
Click to collapse
Thanks for the quick reply mizch. If i have to check apart from data, if anything else is converted into ext2, how can i do that?
jaskiratsingh said:
Thanks for the quick reply mizch. If i have to check apart from data, if anything else is converted into ext2, how can i do that?
Click to expand...
Click to collapse
have a look at the output of 'mount' or 'busybox mount'.
rm 02-app2sd for who use kyrillos ROM...i didn't do that command..but it seems works fine...what does it change if i use that command???
mizch said:
Don't know. Try this:
cd /system
cd etc
cd init.d
and report where it fails and if you are using adb or a terminal emulator. If it doesn't fail, continue with the line after the cd command.
Click to expand...
Click to collapse
I tried what you mentioned.... but again it shows the same error. It works well till "cd etc". Then, for init.d it shows out the error.
It seems the location for init.d is different in my device
next2devil said:
I tried what you mentioned.... but again it shows the same error. It works well till "cd etc". Then, for init.d it shows out the error.
It seems the location for init.d is different in my device
Click to expand...
Click to collapse
Yes. Probably there is none. What ROM are you using? Is it a Froyo ROM and from where?

[Q} Terminal commands - partitions

Hi.
I had ext4 partition on my sd card and i want to change it to ext2. I found that i can use commands to delete it and than create new.
First i used
#parted /dev/block/mmcblk0
Click to expand...
Click to collapse
than
(parted)rm 2
Click to expand...
Click to collapse
to delete ext4 (t was second partition). Now i want to make new ext2 partition using this command:
(parted)mkpartfs primary ext2 X X
Click to expand...
Click to collapse
but i dont know some things:
1. it must be primary partition?
2. what should i give under X? deleted partition had START: 15.3GB and END: 15.8GB, but im not sure if i need to give it in GB, MB or maybe KB or i dont know.
3. and last: how to move apps from sdcard fat32 partition to new ext2,3,4 without uninstalling them? and which file system is the best for apps?

Dual-Boot: SD Card & Internal ROM by Modifying Initramfs

HI there! Just wanna share about things I've done some time ago..
Background... :fingers-crossed:
I'm interested with ROM development & testing, but.. Ace 2 is my only primary phone which I really need for school things, poking friends *woah* and.. etc. Actually, I can make a CWM backup, flash the ROM and restore the backup after testing. But... seriously! It takes quite lot of time and... yeah.. since I'm testing ROM, I'll keep flashing & reflashing my phone and I get a little worried about its internal memory if I do it too often. So, I decided to make something that let me boot new ROM which I flash on the SD card & switch back to the previous ROM with just a simple reboot.. Yeay!
How it works?
I accomplished my goal by using modified initramfs which run after the kernel initialization and before any of Android system get loaded. It will mount 2nd partition of the SD card. If it find a file named enable_sdboot inside, it will decompress SD ROM's ramdisk.cpio which is stored in that partition, then boot the SD ROM. It will also delete enable_sdboot file immediately after checking, so internal ROM will get booted in next reboot.
Important notes:
SD ROM's ramdisk.cpio must contains modified fstab & some of .rc files, so it won't touch the internal ROM.
Kernel modules are placed on initramfs (/lib/modules), so it'll be easier to change ROMs or the kernel itself.
Limitations: because initramfs is compiled with the kernel, so internal & SD ROM will boot using same kernel.
Preparations
Prepare the Kernel
If you want to use stock ROM (codina) as ur internal ROM & CWM as ur recovery, you can use my precompiled kernel: codina-ace2nutzer-sdboot-stock-unsigned.zip which you can flash via CWM. If you use other internal ROM, you have to compile the kernel by yourself. If you're building Android ROMs, you can add my repo: nieltg/codina-initramfs-sdboot to your local manifest and read this guide. You can also take a look at this repo: nieltg/android_device_samsung_codina as an example.
If you build an out-of-tree kernel, you can follow these steps:
Create a folder named codinaramfs_dir in your kernel source.
Extract my initramfs intermediate: codina-sdboot-intermediates.zip to folder you've just created.
Replace boot.cpio with ur internal ROM ramdisk, so you can boot into it. You can also replace recovery.cpio with recovery system you would like to use.
Configure ur kernel & execute scripts/config --file .config --set-str CONFIG_INITRAMFS_SOURCE codinaramfs_dir/initramfs.list.
NOTE: .config is generated in output directory after configuring. If you change the output directory, you should modify the command before executing.
Compile and execute make INSTALL_MOD_PATH=codinaramfs_dir/modules modules_install to put modules in codinaramfs_dir/modules.
Modify codinaramfs_dir/initramfs.list to include all kernel modules in codinaramfs_dir/modules.
NOTE: I've specified the details in codinaramfs_dir/initramfs.list itself.
Then, recompile ur kernel.
Prepare an SD ROM & ur Device
You have to repartition ur SD card to store ur SD ROM. You also have to modify any ROM you want to install into ur SD card. ROM in SD card should not touch internal ROM. It should work independently. So, there are some modifications you must apply. There are things which you must ensure:
Any flashable zip you apply for the SD ROM extracts to SD partitions instead of internal.
Kernel is not going to be replaced after flashing any flashable zip.
SD ROM mounts appropriate SD partitions instead of internal partitions.
SD & internal ROM look for kernel modules in /lib/modules.
You can read this guide to prepare an SD ROM & ur device, to be exact, ur SD card.
----------
Well.. this is not good enough. You have to understand Linux, shell commands, compilation process, etc to apply this idea correctly. But of course if you're interested, you can help me improve this. Sorry for my English, I'm still studying. And like usual, I'm not responsible if you brick your phone, void your warranty, or any other pain or suffering you may feel as result of applying my idea. You do it all at your own risk!
Thanks to: @ace2nutzer for ur kernel, @Rox & @jereksel for the CWM I took from ur repo, @ishtiaque9 for ur support, everyone who interested with my idea & everyone..
So, anyone interested with my idea?
Seems great to run cm11 and cm12 at the same time
Very grateful idea !! :good:
Good that i've a sd 32gb Class 10 card.. so i can test finally CM12 from sdcard ... very nice job ! :good:
I'm glad to know my idea is being helpful!
@ace2nutzer woow! that's really big!
Actually, I'm using 2 Gb SD card which speed is 2x slower than the internal memory.. (tested using dd)
Quite slow.. but at least, it works.. but now i'm confused.. Is it slow because of the SD or because of my build? hahahaha
nieltg said:
I'm glad to know my idea is being helpful!
@ace2nutzer woow! that's really big!
Actually, I'm using 2 Gb SD card which speed is 2x slower than the internal memory.. (tested using dd)
Quite slow.. but at least, it works.. but now i'm confused.. Is it slow because of the SD or because of my build? hahahaha
Click to expand...
Click to collapse
Depends on class of sdcard.. Mine is class 10 = 10mb/s write speed. Read is as usual faster.. For me: 15 - 20 mb/s.
So u've probably only class 4 or 6.
The emmc in the Phone is class 10.
But of course a kernel can make it a bit faster or slower.. Depends on used config.
With my latest build + read_ahead_kb @ 512kb (writed on ramdisk on device_tunables) i've on ext. Sd card + emmc approxx. 12mb/s write speed
BTW: our Phone supports also 64gb cards.. And maybe even more...
This is a great idea ! I also need a dual boot stock / carbon (stock ROM includes eap sim and some other things I need)
What changes have to be made to use it on codinap (NFC) ?
Sent from my GT-I8160P using XDA Free mobile app
Really good idea, i think need to make an app, which can switch roms.
Maybe this sources will be usefull.
ace2nutzer said:
Depends on class of sdcard.. Mine is class 10 = 10mb/s write speed. Read is as usual faster.. For me: 15 - 20 mb/s.
So u've probably only class 4 or 6.
The emmc in the Phone is class 10.
But of course a kernel can make it a bit faster or slower.. Depends on used config.
With my latest build + read_ahead_kb @ 512kb (writed on ramdisk on device_tunables) i've on ext. Sd card + emmc approxx. 12mb/s write speed
BTW: our Phone supports also 64gb cards.. And maybe even more...
Click to expand...
Click to collapse
Hey.. I found something weird! I'm testing my storage with dd if=/dev/full of=tmp.file bs=1024576 count=10 in my cm-12 (sdboot) & I get:
7.5 Mb/s in /storage/sdcard1 (SD card)
27.55 Mb/s in mmcblk1p3 (SD card data partition)
85.47 Mb/s in mmcblk0p5 (internal data partition)
Hmm.. maybe the kernel caching mechanism that make it really fast?
Btw: I'm using ur kernel (commit d67aa9f) with audit enabled & sdboot modification
Mavireck said:
This is a great idea ! I also need a dual boot stock / carbon (stock ROM includes eap sim and some other things I need)
What changes have to be made to use it on codinap (NFC) ?
Click to expand...
Click to collapse
You should compile a kernel by yourself..
If you develop ROMs, you can include my repo in ur local manifests, modify boot.img (you can extract files from ur stock ROM) & compile to get an sdboot kernel.
If you're building out-of-tree kernel, I'm going to write a guide for it in the first post..
Kirya12347 said:
Really good idea, i think need to make an app, which can switch roms.
Maybe this sources will be usefull.
Click to expand...
Click to collapse
Hmm.. actually, I'm not really sure about that..
If you use this sdboot idea, all you have to do is write a file named enable_sdboot in 2nd partition of ur SD card to switch ROM.
For now, I'm using Terminal Emulator for that.. but it'll be nice to have a simple app which can do that in a single tap..
@nieltg
Why modified kernel not in archive. I download it without any expansion.
P.S. Sorry for bad eng.
Kirya12347 said:
@nieltg
Why modified kernel not in archive. I download it without any expansion.
P.S. Sorry for bad eng.
Click to expand...
Click to collapse
Actually, I just need to modify its initramfs, but initramfs is compiled with the kernel in codina.
So, I have to recompile the kernel to modify the initramfs.. Hmm.. what archive? Could you tell me more specific, please?
nieltg said:
Actually, I just need to modify its initramfs, but initramfs is compiled with the kernel in codina.
So, I have to recompile the kernel to modify the initramfs.. Hmm.. what archive? Could you tell me more specific, please?
Click to expand...
Click to collapse
I mean kernel isn't in flashable zip. It look , for exapmple, like init.d script, without any expansion
Kirya12347 said:
I mean kernel isn't in flashable zip. It look , for exapmple, like init.d script, without any expansion
Click to expand...
Click to collapse
Ohh I see! Actually, that is a raw kernel which you can install by dd-ing to /dev/block/mmcblk0p15..
I haven't thought about flashable zip before, since my idea isn't mature enough for me, I think.. Anyway, thank you for ur idea!
nieltg said:
Hey.. I found something weird! I'm testing my storage with dd if=/dev/full of=tmp.file bs=1024576 count=10 in my cm-12 (sdboot) & I get:
7.5 Mb/s in /storage/sdcard1 (SD card)
27.55 Mb/s in mmcblk1p3 (SD card data partition)
85.47 Mb/s in mmcblk0p5 (internal data partition)
Hmm.. maybe the kernel caching mechanism that make it really fast?
Btw: I'm using ur kernel (commit d67aa9f) with audit enabled & sdboot modification
Click to expand...
Click to collapse
This is a bit weird.. but maybe only achieved by dd ... But i mean with 12mb/s write speed when u're using the Phone .... Tested with:
https://play.google.com/store/apps/details?id=com.a1dev.sdbench&hl=en
As u can see in the Screeshots: only 7.57mb/s .. write speed even on internal SD .. .. if i remove all my kernel tweaks then it's the same ..
btw: u should update your sources from my repo .. that commit is of course great .. but actually since that commit i did some optimizations.. for more speed .. .. approx. + 400 Points on Antutu
ace2nutzer said:
This is a bit weird.. but maybe only achieved by dd ... But i mean with 12mb/s write speed when u're using the Phone .... Tested with:
https://play.google.com/store/apps/details?id=com.a1dev.sdbench&hl=en
As u can see in the Screeshots: only 7.57mb/s .. write speed even on internal SD .. .. if i remove all my kernel tweaks then it's the same ..
btw: u should update your sources from my repo .. that commit is of course great .. but actually since that commit i did some optimizations.. for more speed .. .. approx. + 400 Points on Antutu
Click to expand...
Click to collapse
Thank you! I've tested my SD card with that app in stock ROM and the result of internal & external SD are similar.. So, now I wonder, is my SD class 10? Hmm...
Btw, thank you for ur info! I'm going to recompile soon after finishing my final test.. :crying:
nieltg said:
Thank you! I've tested my SD card with that app in stock ROM and the result of internal & external SD are similar.. So, now I wonder, is my SD class 10? Hmm...
Btw, thank you for ur info! I'm going to recompile soon after finishing my final test.. :crying:
Click to expand...
Click to collapse
I hope you'll make flashable zip also
nieltg said:
Thank you! I've tested my SD card with that app in stock ROM and the result of internal & external SD are similar.. So, now I wonder, is my SD class 10? Hmm...
Btw, thank you for ur info! I'm going to recompile soon after finishing my final test.. :crying:
Click to expand...
Click to collapse
As i said, with a bad configured kernel u can reach only 7mb/s write speed even with class 10.
With read_aehead_kb 512 + good kernel u should have at least 10mb/s write speed with class 10.
personally i've 12mb/s write speed. on internal and ext-sd
Some ideas regarding the subj:
1. mount an images instead of repartition external sdcard
2. (1) can allow to use multiple ROMs.
1) it was just test, but it's quite possible. Right now I use an image file instead of /dev/block/mmcblk0p4 !
Before the all we need to create an image:
Code:
mkdir /storage/sdcard1/ROM
touch /storage/sdcard1/ROM/cache.bin
dd if=/dev/zero of=/storage/sdcard1/ROM/cache.bin bs=1024768 count=10
mke2fs -t ext4 -m 0 /storage/sdcard1/ROM/cache.bin
although, dd from original /dev/block/mmcblk0p4 is also possible.
2) secondly, init.samsungcodina.rc should be edited as follows
Code:
(init.samsungcodina.rc listing)
...
on property:sys.boot_completed=1
write /sys/class/misc/backlightnotification/enabled 0
write /sys/kernel/mm/uksm/run 1
exec /system/xbin/mknod /dev/block/loop250 b 7 250
exec /system/xbin/sleep 5
exec /system/xbin/losetup /dev/block/loop250 /storage/sdcard1/ROM/cache.bin
exec /system/xbin/mount -t ext4 /dev/block/loop250 /cache
3) line with /cache should be commented in fstab
4) now you can check it:
Code:
mount
and get output like:
...
/dev/block/loop250 /cache ext4 rw,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
Click to expand...
Click to collapse
Maybe later I'll continue to work on it.
Any chance that this would be a feature in your kernel @ChronoMonochrome @ace2nutzer?
Sent from my GT-I8160 using Tapatalk
shaqman89 said:
Any chance that this would be a feature in your kernel @ChronoMonochrome @ace2nutzer?
Sent from my GT-I8160 using Tapatalk
Click to expand...
Click to collapse
Actually, repartition extsdcard is too painful for me, I simply don't have enough space on hard drive(not that it's small, but it's always nearly full ) to backup those ~30 Gb data on extsdcard :/ I can add multirom support only if I'll finish my idea, that I posted here.
Kirya12347 said:
I hope you'll make flashable zip also
Click to expand...
Click to collapse
Sure.. I'm going to create that after my final exam...
ace2nutzer said:
As i said, with a bad configured kernel u can reach only 7mb/s write speed even with class 10.
With read_aehead_kb 512 + good kernel u should have at least 10mb/s write speed with class 10.
personally i've 12mb/s write speed. on internal and ext-sd
Click to expand...
Click to collapse
Ohh.. I see.. really sorry for my misunderstanding!
Okay, the fact is I've compiled ur updated kernel source (commit: e59fb17) before my final exam.. hahaha.. n I get better read speed: ~25 Mb/s on internal & ~17 Mb/s on external.. thx!
dunno why.. I still don't get much improvement about the write speed.. because they're nearly full maybe? or because I'm testing on stock ROM.. hmm...
ChronoMonochrome said:
Some ideas regarding the subj:
1. mount an images instead of repartition external sdcard
2. (1) can allow to use multiple ROMs.
Click to expand...
Click to collapse
Thank you very much for ur brilliant idea! If I read this post before, I wouldn't just return my friend's card reader this morning to clean up partitions I've made in my SD.. hahaha
Okay.. just wanna write down my idea that popped from my mind after reading ur post..
How about place all ROMs in directories, like this:
/storage/extSdCard/ROMs
/storage/extSdCard/ROMs/slot1 contains system, data n ramdisk.cpio for ROM 1
/storage/extSdCard/ROMs/slot2 contains system, data n ramdisk.cpio for ROM 2
/storage/extSdCard/ROMs/slotN...
and create symlink to the appropriate slot directory to boot SD ROM, for example: to boot ROM 1, create symlink /storage/extSdCard/.sdboot_slot to ROMs/slot1, etc? Much better than typing this long command: cd /tmp; mkdir l; mount -t ext4 /dev/block/mmcblk1p2 l; cd l; echo > enable_sdboot; cd ..; umount l; each time when I want to boot the SD ROM..
Okay.. time to study again.. I'm going to think about this idea after my exam..

corrupted SD-card - adoptable storage

My adoptable SD-card took a crap.
I'd like to think that I can recover the password/key (with a rooted phone), use ddrescue to make an image of the card, use the password/key to decrypt the image of the card, use fsck to fix the file-system (it's ext4, right?) then copy the repaired image back to the card and have a nice day.
Or maybe there's way to fsck the card in the phone? (after making a backup image)
Is this possible? Is there another way to un-screw a corrupted SD-card that's used as adoptable storage?
go vegan said:
My adoptable SD-card took a crap.
I'd like to think that I can recover the password/key (with a rooted phone), use ddrescue to make an image of the card, use the password/key to decrypt the image of the card, use fsck to fix the file-system (it's ext4, right?) then copy the repaired image back to the card and have a nice day.
Or maybe there's way to fsck the card in the phone? (after making a backup image)
Is this possible? Is there another way to un-screw a corrupted SD-card that's used as adoptable storage?
Click to expand...
Click to collapse
If you're trying to fix it so that it works "as-is" again, I wouldn't put too much faith in that.
You can recover the data on the sdcard by various methods, there are many methods and tools, such as these:
http://www.rescuedigitalmedia.com/retrieve-files-from-sd-card-formatted-as-internal-storage
There are more in depth and technical methods/tools also.
Once you have your data safely recovered, format the card and try replacing your data and setting up adoptable storage again the way you did originally.
Sent from my LGL84VL using Tapatalk
Using this as a guide for key recovery and data decryption - https://nelenkov.blogspot.com/2015/06/decrypting-android-m-adopted-storage.html
1- Make a backup of the card
Code:
ddrescue -n /dev/sdc bad-card.img bad-card.log
ddrescue completed in one pass with zero errors. Nice. From here, I'm working with a BACKUP of the card, NOT the card itself.
2- See what's on the card
Code:
fdisk -l bad-card.img
Output:
Code:
Disk bad-card.img: 120.3 GiB, 129116405760 bytes, 252180480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Device Start End Sectors Size Type
bad-card.img1 2048 34815 32768 16M unknown
bad-card.img2 34816 252180446 252145631 120.2G unknown
3- Copy the 2nd partition to a file
Code:
dd bs=512 skip=34816 if=bad-card.img of=bad-card-p2.img
* Your numbers may be different
4- Using the encryption key I found using the link, above, mount (read-only) this (2nd) copy of the card
Code:
losetup -r -f --show bad-card-fs-p2.img
cryptsetup luksOpen /dev/loop0 bad-card-fs-p2.img
dmsetup create crypt1 --table "0 252145631 crypt aes-cbc-essiv:sha256 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 0 /dev/loop0 0"
mkdir /tmp/mount1
mount -o ro -t ext4 /dev/dm-4 /tmp/mount1
* Your numbers may be different
nb, the "4" in "/dev/dm-4" can be identified by the minor device-number here:
Code:
dmsetup info crypt1
Name: crypt1
State: ACTIVE
Read Ahead: 256
Tables present: LIVE
Open count: 1
Event number: 0
Major, minor: 252, 4
Number of targets: 1
Boom! My files are there!
From here, I used dd to make an unencrypted copy (as a disk-image file) and ran fsck on it. It fixed a few things, apparently nothing catastrophic.
Yeah, recovering pictures and music and that stuff wasn't too bad (since the device is rooted and I was able to recover the encryption key) but getting back the apps and getting the phone back to the state it was in a few hours earlier is not so straightforward.
Lesson learned: Keep a backup copy of the encryption key (in a safe place) so that data can be recovered from an "adopted" SD-card even if the phone gets smashed by a rock.
Too bad there isn't a way to do a "bare metal" backup of an android.
go vegan said:
Using this as a guide for key recovery and data decryption - https://nelenkov.blogspot.com/2015/06/decrypting-android-m-adopted-storage.html
1- Make a backup of the card
Code:
ddrescue -n /dev/sdc bad-card.img bad-card.log
ddrescue completed in one pass with zero errors. Nice. From here, I'm working with a BACKUP of the card, NOT the card itself.
2- See what's on the card
Code:
fdisk -l bad-card.img
Output:
Code:
Disk bad-card.img: 120.3 GiB, 129116405760 bytes, 252180480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Device Start End Sectors Size Type
bad-card.img1 2048 34815 32768 16M unknown
bad-card.img2 34816 252180446 252145631 120.2G unknown
3- Copy the 2nd partition to a file
Code:
dd bs=512 skip=34816 if=bad-card.img of=bad-card-p2.img
* Your numbers may be different
4- Using the encryption key I found using the link, above, mount (read-only) this (2nd) copy of the card
Code:
losetup -r -f --show bad-card-fs-p2.img
cryptsetup luksOpen /dev/loop0 bad-card-fs-p2.img
dmsetup create crypt1 --table "0 252145631 crypt aes-cbc-essiv:sha256 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 0 /dev/loop0 0"
mkdir /tmp/mount1
mount -o ro -t ext4 /dev/dm-4 /tmp/mount1
* Your numbers may be different
nb, the "4" in "/dev/dm-4" can be identified by the minor device-number here:
Code:
dmsetup info crypt1
Name: crypt1
State: ACTIVE
Read Ahead: 256
Tables present: LIVE
Open count: 1
Event number: 0
Major, minor: 252, 4
Number of targets: 1
Boom! My files are there!
From here, I used dd to make an unencrypted copy (as a disk-image file) and ran fsck on it. It fixed a few things, apparently nothing catastrophic.
Yeah, recovering pictures and music and that stuff wasn't too bad (since the device is rooted and I was able to recover the encryption key) but getting back the apps and getting the phone back to the state it was in a few hours earlier is not so straightforward.
Lesson learned: Keep a backup copy of the encryption key (in a safe place) so that data can be recovered from an "adopted" SD-card even if the phone gets smashed by a rock.
Too bad there isn't a way to do a "bare metal" backup of an android.
Click to expand...
Click to collapse
Very nice.
Sent from my LGL84VL using Tapatalk
Same thing happened again. I knew I'd left a how-to here, so using this as a guide I fixed it much quicker, this time.
1- Power-down and remove the "corrupt" SD-card.
2- Use ddrescue to make a backup copy of the card
Code:
ddrescue -n /dev/sdg bad-card.img bad-card.log
That ran with no errors.
3- While that was backing up, I booted into TWRP and copied expand_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.key to a flash drive via OTG. That's "/data/misc/vold/expand_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.key", as per - https://nelenkov.blogspot.com/2015/06/decrypting-android-m-adopted-storage.html
4- After ddrescue was finished, I decrypted the SD-card.
Code:
blockdev --getsize /dev/sdg2
249702367
od -t x1 expand_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.key
0000000 yy yy yy yy yy yy yy yy yy yy yy yy yy yy yy yy
0000020
dmsetup create crypt1 --table "0 249702367 crypt aes-cbc-essiv:sha256 yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy 0 /dev/sdg2 0"
5- Find out what "crypt1" links to, and what it is.
Code:
file -s /dev/mapper/crypt1
/dev/mapper/crypt1: symbolic link to ../dm-5
file -s /dev/dm-5
/dev/dm-5: Linux rev 1.0 ext2 filesystem data, UUID=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa (extents) (large files)
6- fsck /dev/dm-5.
Code:
fsck /dev/dm-5
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
/dev/mapper/crypt1: clean, 14314/7806976 files, 21089519/31212795 blocks (check after next mount)
7 - "Remove" the SD-card.
Code:
dmsetup remove crypt1
8- Put the card back in the Android, and it's all good.
nb - Turned out that I didn't need a copy of the card, but it's still good practice to make a backup.
go vegan said:
My adoptable SD-card took a crap.
I'd like to think that I can recover the password/key (with a rooted phone), use ddrescue to make an image of the card, use the password/key to decrypt the image of the card, use fsck to fix the file-system (it's ext4, right?) then copy the repaired image back to the card and have a nice day.
Or maybe there's way to fsck the card in the phone? (after making a backup image)
Is this possible? Is there another way to un-screw a corrupted SD-card that's used as adoptable storage?
Click to expand...
Click to collapse
You are going to big trouble if the card is not recovered.
nyckwilliams said:
You are going to big trouble if the card is not recovered.
Click to expand...
Click to collapse
Did you even read the thread? This member not only posted how they solved the issue but has had to do it twice and posted about it a second time just above the post you made.
Learn to read more than just the first few posts or first few pages of a thread.
Sent from my LGL84VL using Tapatalk
Note to self (and everyone else who finds this) to make it easier to work with image-files from SD-cards. Make use of losetup's "-P" flag to automatically create partitions.
Code:
losetup -r -f --show [B]-P[/B] bad-card.img
/dev/loop0
ls -lh /dev/loop*
brw-rw---- 1 root disk 7, 0 Aug 30 09:31 /dev/loop0
brw-rw---- 1 root disk 259, 0 Aug 30 09:31 /dev/loop0p1
brw-rw---- 1 root disk 259, 1 Aug 30 09:31 /dev/loop0p2
...
Now, the partition of interest is set up as "/dev/loop0p2" with minimum fuss.
Easy, sure and fast solution!
Hello everyone!
I'm going to give you a wonderful news!
You do not need to follow these complicated instructions that are still useful to know in case of need and thanks for this.
The solution is much easy and that's it:
Without turning off the smartphone, remove the micro SD card and reinsert it again.
That's all!
This solves your problem!
Good Android to everyone.
Android 8.1 with Lineage OS on Samsung Galaxy S5 klte and micro SD 128 GB extreme SanDisk A2 U3 V30
Future Technation said:
Without turning off the smartphone, remove the micro SD card and reinsert it again.
Click to expand...
Click to collapse
1- First, make a backup.
2- Good luck.
3- Does that work if the SD card was not unmounted/ejected properly, and the file-system is marked dirty?
go vegan said:
1- First, make a backup.
2- Good luck.
3- Does that work if the SD card was not unmounted/ejected properly, and the file-system is marked dirty?
Click to expand...
Click to collapse
Hello Vegan,
the problem mentioned is created precisely because the system has failed to mount the micro SD and identifies it as corrupt, but it is not really so.
Simply the system has not mounted it and is therefore inaccessible! (Of course, at this stage everyone takes the panic for their data :crying: ).
In my specific case the micro SD is the main memory and obviously also has all the data.
Since it is not yet mounted in the system (due to a reading error), you can not back up your data on the micro SD card.
Furthermore, since it has not yet been mounted (due to a reading error), it can be safely removed and reinserted without restarting the smartphone.
Once this is done, everything is fine.
I hope I was clear in the explanation.
Future Technation said:
Hello everyone!
I'm going to give you a wonderful news!
You do not need to follow these complicated instructions that are still useful to know in case of need and thanks for this.
The solution is much easy and that's it:
Without turning off the smartphone, remove the micro SD card and reinsert it again.
That's all!
This solves your problem!
Good Android to everyone.
Android 8.1 with Lineage OS on Samsung Galaxy S5 klte and micro SD 128 GB extreme SanDisk A2 U3 V30
Click to expand...
Click to collapse
I'm not sure this applies to the specific situation that the OP posted about.
Sent from my LGL84VL using Tapatalk
In my case, the file-system was marked "dirty" and thus could not be mounted by the OS until after it was fsck'd.
Droidriven said:
I'm not sure this applies to the specific situation that the OP posted about.
Sent from my LGL84VL using Tapatalk
Click to expand...
Click to collapse
Hi Droidriven,
it's exactly the same situation, I confirm it.
---------- Post added at 12:02 PM ---------- Previous post was at 11:06 AM ----------
go vegan said:
In my case, the file-system was marked "dirty" and thus could not be mounted by the OS until after it was fsck'd.
Click to expand...
Click to collapse
Hi Vegan,
I had exactly the same problem, the filesystem was corrupt, I explained it well on my post. The micro SD works only after removal and re-insertion. There is no need for check disk. What you did was your option and choice, but in this specific case it is not necessary. You probably did not do as I described but you immediately removed the SD card for a check disk. This post can help many people. Why complicate things when the solution is so easy? Less experienced people can panic. Our job is to help and simplify the work, not to complicate it. However, I'm sure you did your best to solve your problem, but this solution has to admit that it's much easier for everyone.
Have a nice day.
Future Technation said:
Hi Droidriven,
it's exactly the same situation, I confirm it.
---------- Post added at 12:02 PM ---------- Previous post was at 11:06 AM ----------
Hi Vegan,
I had exactly the same problem, the filesystem was corrupt, I explained it well on my post. The micro SD works only after removal and re-insertion. There is no need for check disk. What you did was your option and choice, but in this specific case it is not necessary. You probably did not do as I described but you immediately removed the SD card for a check disk. This post can help many people. Why complicate things when the solution is so easy? Less experienced people can panic. Our job is to help and simplify the work, not to complicate it. However, I'm sure you did your best to solve your problem, but this solution has to admit that it's much easier for everyone.
Have a nice day.
Click to expand...
Click to collapse
Well...
You see...
I'm willing to bet that they tried that first, since it IS the first and simplest troubleshooting step for the scenario, even a noob would know to try that and they seem to be a bit more advanced than a noob. You post as if they did not try that kindergarten level troubleshooting step first, which I'm sure they probably did. But I could be wrong.
Sent from my LGL84VL using Tapatalk
Droidriven said:
Well...
You see...
I'm willing to bet that they tried that first, since it IS the first and simplest troubleshooting step for the scenario, even a noob would know to try that and they seem to be a bit more advanced than a noob. You post as if they did not try that kindergarten level troubleshooting step first, which I'm sure they probably did. But I could be wrong.
Click to expand...
Click to collapse
Hi Droidriven,
This proves that he did not do it.
go vegan said:
In my case, the file-system was marked "dirty" and thus could not be mounted by the OS until after it was fsck'd.
Click to expand...
Click to collapse
The fear factor can always affect one's choices.
Please, review my posts well, I gave a technical and exhaustive explanation of what happened and why I did it that way.
In any case my solution is valid and working. Those who present the same problem can take advantage of this information.
Have a nice day!
Future Technation said:
Hi Droidriven,
This proves that he did not do it.
The fear factor can always affect one's choices.
Please, review my posts well, I gave a technical and exhaustive explanation of what happened and why I did it that way.
In any case my solution is valid and working. Those who present the same problem can take advantage of this information.
Have a nice day!
Click to expand...
Click to collapse
That doesn't prove that they didn't remove and reinsert the sdcard, though. That just proves that their sdcard wasn't working. Nothing in what they posted says that they didn't remove and re-insert the sdcard, you're assuming they didn't because removing and reinserting worked for you. This assumes that their sdcard was "corrupted" for the same reason that yours was and in the same way.
I'm not disagreeing that your method worked for you, I'm just saying that your scenario and their scenario are not necessarily the same.
Sent from my LGL84VL using Tapatalk
Droidriven said:
That doesn't prove that they didn't remove and reinsert the sdcard, though. That just proves that their sdcard wasn't working. Nothing in what they posted says that they didn't remove and re-insert the sdcard, you're assuming they didn't because removing and reinserting worked for you. This assumes that their sdcard was "corrupted" for the same reason that yours was and in the same way.
I'm not disagreeing that your method worked for you, I'm just saying that your scenario and their scenario are not necessarily the same.
Click to expand...
Click to collapse
Excuse me but how old are you? You are a child? This would explain all these controversies. You always want to have the reason anyway. Even if you were an adult, you behave like a child! I have no time to waste with you, but willingly with those who really need to solve the same problem! Those who are truly experts will appreciate this solution. You are spamming here. I will not answer you again. Goodbye!
--------------------------------------------------------------------------------
Hi Go Vegan,
I want to apologize with you for this little discussion, because I started quoting you. My intent is always to share something useful for others. Thank you for your intervention, because obviously if my first approach to this problem does not work for someone, yours becomes indispensable, as obviously it has already been certainly for many others.
This words are for everyone: "We must learn to really listen to others before answering".
Have a nice day!
Might also depend on the phone, the ROM, the version, etc. Might also depend on whether the card is "internal" or "external" storage.
Future Technation said:
Excuse me but how old are you? You are a child? This would explain all these controversies. You always want to have the reason anyway. Even if you were an adult, you behave like a child! I have no time to waste with you, but willingly with those who really need to solve the same problem! Those who are truly experts will appreciate this solution. You are spamming here. I will not answer you again. Goodbye!
--------------------------------------------------------------------------------
Hi Go Vegan,
I want to apologize with you for this little discussion, because I started quoting you. My intent is always to share something useful for others. Thank you for your intervention, because obviously if my first approach to this problem does not work for someone, yours becomes indispensable, as obviously it has already been certainly for many others.
This words are for everyone: "We must learn to really listen to others before answering".
Have a nice day!
Click to expand...
Click to collapse
Actually, with the way you are defending yourself when I'm just telling you the truth, that makes you appear as the child.
You have only 5 posts here and just joined a few days ago. This tells me that you probably haven't dealt with android devices enough to know there can be many different causes for the exact same issue, even on two identical devices that show the same symptoms and that what works in "this" situation on "that" device, doesn't always work the same for another device with the exact same issues.
I was just saying that there are many different details that make all the difference in the world. It's obvious, from everything that you have posted here, that you are unaware of those facts. I was just trying to tell you that you can't be so certain that what you posted is the fix for every user and every device that has this issue. Dont take it so personal.
Sent from my LGL84VL using Tapatalk

Categories

Resources