SD card corruption issue on Lineage OS 14.1 on Harpia Moto G4 Play XT1602 - LineageOS Questions & Answers

It's been a while since I had been using Lineage OS on my Moto G4 Play and apart from losing VoLTE, everything seemed to work fine EXCEPT my external SD card. On my stock ROM, i had my Sandisk 32 GB Class 10 card formatted as internal storage and it worked flawlessly.
I did the same in Lineage OS but everytime, after a month or even few weeks, the SD card gets permanently corrupted. First time it happened, I thought it was the SD card issue, got a brand new one on RMA. Happened the second time, again got a new one and this is the third time it has happened. I find it really hard to believe that cards which were brand new got totally fried up 3 times as a coincidence or fate.
I think, there is either some problem with the OS itself or the phone. XDA folks, help me out. I feel ashamed sending the card for a third RMA.

sng_shivang said:
It's been a while since I had been using Lineage OS on my Moto G4 Play and apart from losing VoLTE, everything seemed to work fine EXCEPT my external SD card. On my stock ROM, i had my Sandisk 32 GB Class 10 card formatted as internal storage and it worked flawlessly.
I did the same in Lineage OS but everytime, after a month or even few weeks, the SD card gets permanently corrupted. First time it happened, I thought it was the SD card issue, got a brand new one on RMA. Happened the second time, again got a new one and this is the third time it has happened. I find it really hard to believe that cards which were brand new got totally fried up 3 times as a coincidence or fate.
I think, there is either some problem with the OS itself or the phone. XDA folks, help me out. I feel ashamed sending the card for a third RMA.
Click to expand...
Click to collapse
To my experience we have better stability when using SD as portable storage. And it's easier to repair using a PC.

The solution I found is.
1- have rooted phone 2- enable usb debugging 3- format sd card from Android options as portable . 4- format sdcard as fat32 or ext4. (Fat32 preferably- most recommended) 5) Check sdcard current format with app called disk info . Avoid NTFS format ( this could be the reason it's not formatting as internal storage, Android doesn't support NTFS as internal , and works bad with it as portable) Inside the app check the path of your sdcard.
Download app2sd from somewhere.
use the Partition tool ( as adoptable) inside to create 2nd partitions as vext4
Choose adoptable option and create 2nd Partition as ext4 ( it will actually create a virtual ext4 partition)
choose how much size in each Partition Partition 1 will be internal . Partiion 2 will be external.
So give more than 50% size to 1st Partition this way you might avoid more problems
Press create, you're done.
This method persists for me after reboots.
Thank me from your prayers if it helps.
Details --> go check storage & usb or use disk info to see your new expanded storage size with your new unmounted virtual disk and smile. This new Partition can only use installed apps, but you can't browse it's contents through your Android usb & storage options ( since it's virtual and we're tricking the fuse encryption config) If you actually want to browse this new virtual internal Partition and access it's contents you will have to see the path through disk info APK and access it with root file manager like Total Commander.
Also Do a chkdsk /f from Windows on the sdcard or chkdsk /r to see if the problem is the sdcard or try it in another Android Phone as internal. If it doesn't work in other phones then you know it's the card malfunctioning and not the phone.
This is the dumb error preventing you/us from having persistent storage.
{
"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 how it looks after applying solution.
That phone came with 16gb storage. Now I added 16gb more with this method , for 32gb total
- Partition 1 with 13gb as virtual internal and Partition 2 as portable with 3 gb remaining. (The virtual Partition cannot be seen, it says 3gb/16gb when actually it should say 0gb/13gb) It's cause I managed to bypassed this encryption

Related

[Q] Corrupt SD Card during Gold Card process

After my "kefuffle" with http://forum.xda-developers.com/showthread.php?p=8484070#post8484070
I had to play around with making multiple gold cards. Unfortunately one of the cards I had to use was my 32gb SanDisk microSD. After editing the hex code during the gold card process my computer failed to read the card. I then proceeded to format the card.
Windows explorer can't format the card in quick or full format mode. I downloaded a third party SD formatter (Philips or something) and ran both a quick format, and a full format on it. After running the SD formatter windows explorer was able to recognise the SD card as having 31gb of spare space. I was able to copy files to the SD card.
As soon as I put it in my Desire, it said random errors like "SD card ready to dismount" and "SD card damaged please format". After formatting the card with the Desire's format tool, the card is recognised and it says there is 31gb free space. I am then able to plug the Desire into the computer and enable "HTC Sync" or "Disk Drive" mode. HTC sync doesn't recognise the SD card, but windows explorer does when it is in disk mode. I am able to copy files to the SD card, although as soon as I eject the phone, the Desire attempts to check the SD card for errors and says the card is damaged.
Surely there is a tool out there I can use? It has the functionality to store files some of the time, surely not all hope is lost? 32GB microSD cards are freakin expensive and I don't want to throw it out...
Get a linux live cd, start GParted and delete every partition on the SD Card. Create a new FAT32 partition and try it again.
Sorry I'm nub, what the hell does that mean?
http://gparted.sourceforge.net/livecd.php
Grab that and burn it to CD/USB/whatever, and use that to delete all of the partitions on your card (plenty of guides online for GParted)
I got that problem too but my 16gb microsd read only 8mb. Can't format. Gparted can read as well.. :'(
Sent from my HTC Desire using Tapatalk
I had the same problems with my SD card on my HTC hero... don't panic I solved it with this software...
http://download.cnet.com/Partition-Wizard-Home-Edition/3000-2094_4-10962200.html
This is the instruction video that I used to understand what to do and create an ext2 as well...
http://www.youtube.com/watch?v=oyO6DOS1leQ
For me worked like like a charm!
yukinok25 said:
I had the same problems with my SD card on my HTC hero... don't panic I solved it with this software...
http://download.cnet.com/Partition-Wizard-Home-Edition/3000-2094_4-10962200.html
This is the instruction video that I used to understand what to do and create an ext2 as well...
http://www.youtube.com/watch?v=oyO6DOS1leQ
For me worked like like a charm!
Click to expand...
Click to collapse
I tried that but it didn't work. I was able to partition it, however once the software had applied the partitions, it showed up as "Unformatted", "Other" and "other". Whereas in the video it showed up as "Fat32", "ext2" and "linux swap".
I tried it in my Desire anyway, and it recognised it, but if you took a picture then connected the SD to the computer as a disk drive, the image taken becomes jumbled (literally). Once ejected from the computer the Desire is unable to mount the SD card properly and says it is in "Read-only" mode. In that state I am unable to eject/format the card.
I haven't tried Gparted yet. Wouldn't that be the same as deleting and creating the partitions?
lordmitchell14 said:
I tried that but it didn't work. I was able to partition it, however once the software had applied the partitions, it showed up as "Unformatted", "Other" and "other". Whereas in the video it showed up as "Fat32", "ext2" and "linux swap".
I tried it in my Desire anyway, and it recognised it, but if you took a picture then connected the SD to the computer as a disk drive, the image taken becomes jumbled (literally). Once ejected from the computer the Desire is unable to mount the SD card properly and says it is in "Read-only" mode. In that state I am unable to eject/format the card.
I haven't tried Gparted yet. Wouldn't that be the same as deleting and creating the partitions?
Click to expand...
Click to collapse
I see.... I don't know about Gparted, but now that u remind me, also for me it didn't work immediately..
I don't remember what I did exactly but I formatted the sd card 3 or 4 times, after I use the video's method, and I also formatted once with win7 and at the end I formatted it again with the phone..
I did it and suddenly the SD started to work properly..
Now is working perfectly since I've done it and that was 3 weeks ago..
it doesnt work with my MicroSD.. it still shows as 8mb when it should be 16GB!! guess its corrupted like hell..
{
"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"
}
Tried Gparted...I was able to create a fat32 and ext2 partition (wasn't able to do ext3 or ext4 or linux swap - kept saying "sd possibly corrupt") However still had issues with phone reading it.
I'm just going to take the card back. I've had it a month, but worth a try.
ShiDi said:
it doesnt work with my MicroSD.. it still shows as 8mb when it should be 16GB!! guess its corrupted like hell..
Click to expand...
Click to collapse
Could be... did you try to format the SD with windows first?

[Q] how to move files from ext2 partition from one SD card to another ?

I just recently bought a new 16GB SD card. I previously had a 8GB which I had partitioned. So how to transfer my apps from the ext2 partition of my old SD card to my new SD card ? Please help it's urgent...
And also I have about 1.80GB left on my old SD card. But look at the screenshot below. When I am using root explorer it says i can't overwrite apps(.apks) as I am out of storage (520KB left). But I had already partitioned this SD card dedicating 1GB for internal. Is this because my partition is full ? My internal memory from system/app in settings says I still have 164MB left. So how come root explorer is finding only 520KB free. See screenshot below. I need help guys
{
"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"
}
Would really appreciate any help
Any help guys ? My question is very simple: How to transfer my apps and data which is on my partition on my 8GB SD card to my new one ?
Use a windows app like partition wizard, it's free just Google it. Use an adapter for one card, put the new one in your phone and connect to your pc. There's a function to copy a partition, use that.
Can anyone tell me if I can use Titanium back-up or do a nandroid back-up and restore it in my new SD card for this operation ? Which method is the best ?
Teshand said:
Can anyone tell me if I can use Titanium back-up or do a nandroid back-up and restore it in my new SD card for this operation ? Which method is the best ?
Click to expand...
Click to collapse
i just love it when i can help someone:
ok here is the deal
i had the stock 8GB card with 2GB for 2nd partition so i bought a new 32GB and i needed to move the old 2nd partition's data to the new sd's
all you have to do is to do a nananroid to your old sd so that it will backup your 2nd partition
now move your /clockworkmod folder to PC and then partition the new sdcard with any size you wont (2gb is very typical)
move the /clockworkmod folder to the new sd and go to recovery>>backup and restore>>advanced restore and select "sd-ext"
and now you have you 2nd partition data as they were:angel::angel::angel:
pm me if you need help with that or more detail:angel:
omtay2311995 said:
i just love it when i can help someone:
ok here is the deal
i had the stock 8GB card with 2GB for 2nd partition so i bought a new 32GB and i needed to move the old 2nd partition's data to the new sd's
all you have to do is to do a nananroid to your old sd so that it will backup your 2nd partition
now move your /clockworkmod folder to PC and then partition the new sdcard with any size you wont (2gb is very typical)
move the /clockworkmod folder to the new sd and go to recovery>>backup and restore>>advanced restore and select "sd-ext"
and now you have you 2nd partition data as they were:angel::angel::angel:
pm me if you need help with that or more detail:angel:
Click to expand...
Click to collapse
uve alot of stuff that i couldnt understad im slow learner and mad as i need away to move apps to sd card ive just installed ics which is driving me crazy any thoughts about this
Mr.Doc said:
uve alot of stuff that i couldnt understad im slow learner and mad as i need away to move apps to sd card ive just installed ics which is driving me crazy any thoughts about this
Click to expand...
Click to collapse
here is a step by step detail:
1-your device need to be rooted and bootloader unlocked
2-bacup the contents of your sd to your pc
3-go to your clockworkmod recovery
4-go to advanced>>partion sd card>> and chose the size that suit you(2GB is perfect even for an app addict) and after that it will tell you to choose the swamp partition choose 128MB (not more)
5-now install a free app from the market called link2sd and when you open it choose all your user apps and choose (create link) and link every thing
6-now all your apps will be on the 2nd sd partition
pm me if you need more help i will be glad
I think you may have missed a step... don't you need to copy the nandroid backup to the new SD card and the restore it from there, after it has been set up with the partitions?
You can copy partitions easily with MiniTool Drive Copy tool.
use 2 card-readers
same issue
great help man!
If you want to know how to move files from one hard drive to another you can try the freeware of AOMEI Partition Assistant. Within only several clicks you can finish the transfer. Meanwhile, this software is free from bundleware and popup ads.

[How To Fix] Micro SD Card UHS1 Bad Unmount

after several days using XZL, i think i need to enlarge my storage in my phone and i buy microSD Sandisk 32GB Class 10 UHS1 but after received my card im facing some issue with my card it always bad unmount when i play game or opening camera, it happen to me for a month and very annoying.
i tried several tools in XDA Forum (i read this thread) and install exFat support for my phone but unfortunattely it always happen again and again :crying:
when i tried to copy a file or several file to my microSD its very slow, but this is class 10 UHS1 card and after formatted with this tool its very amazing the speed copying file is more faster.
how to solved it ?
1. put your card from the phone
2. Backup your Data first! it must!
3. Download SD Formatter 4.0 where support SDXC Card
4. install the software SD Formatter 4.0
5. then format your card, Format Type choose Full Erase, Format size adjustment choose Off
{
"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"
}
7. and now restore your backup and you can use it in your phone.
# bad unmount sometime happen when mediascan running, you cant disable media scan with this tool Rescan Media ROOT.
# you can put .nomedia file in folder (microSD), where you want skip that folder when mediascan run.
*sorry for my bad english.
hope it will help everyone where facing this issue :good:
Hi, Kick.
It's a great and clear tutorial. Congratulations!
Maybe I'm wrong but I think you need Android 4.2.2+ for full SDXC support, and you can also format your card directly in your mobile.
Andre Verissimo said:
Hi, Kick.
It's a great and clear tutorial. Congratulations!
Maybe I'm wrong but I think you need Android 4.2.2+ for full SDXC support, and you can also format your card directly in your mobile.
Click to expand...
Click to collapse
No mate, it happen too with my friend phone where on 4.2.2
I've tried formatted from the phone but when bad unmount happen it take to long to remount,
But after formatted with this tool its look fix my card.
kickthefreak said:
No mate, it happen too with my friend phone where on 4.2.2
I've tried formatted from the phone but when bad unmount happen it take to long to remount,
But after formatted with this tool its look fix my card.
Click to expand...
Click to collapse
I've installed a Sandisk SDXC 64 Gb and the mobile keeps unmounting it when I copy a great volume of files, even after formatting the disc with this utility. Really don't know how to solve this (and I'm in Stock 423).
Andre Verissimo said:
I've installed a Sandisk SDXC 64 Gb and the mobile keeps unmounting it when I copy a great volume of files, even after formatting the disc with this utility. Really don't know how to solve this (and I'm in Stock 423).
Click to expand...
Click to collapse
copy from internal to microSD ? some thread said if 4.2.2 have support exFat, how many GB your file ? more than 4GB your card must be in exFat system.
kickthefreak said:
copy from internal to microSD ? some thread said if 4.2.2 have support exFat, how many GB your file ? more than 4GB your card must be in exFat system.
Click to expand...
Click to collapse
The problem happens when I copy many (400+) little (< 400 Kb) files at once from the computer to the exFAT formatted SDXC SD Card, either in MTP or in MSC USB mode.
Andre Verissimo said:
The problem happens when I copy many (400+) little (< 400 Kb) files at once from the computer to the exFAT formatted SDXC SD Card, either in MTP or in MSC USB mode.
Click to expand...
Click to collapse
oh, i always take my SD card (unmount first from my phone, if not it will damage the card) and put to my pc when i need copying many file, it more faster than using USB connection
if you using usb connection, phone will run media scanner when you copying the file.
kickthefreak said:
oh, i always take my SD card (unmount first from my phone, if not it will damage the card) and put to my pc when i need copying many file, it more faster than using USB connection
if you using usb connection, phone will run media scanner when you copying the file.
Click to expand...
Click to collapse
EDIT:
I tested carefully now, and discovered that the problem occurs even when I copy files between the SD Card and the internal memory, even if I disable Media Scanner with Rescan Media.
It seems you're right about the computer. I removed my SD Card, inserted in the computer, and could copy a whole universe of files without problem. It proves that the problem isn't in the SD Card. But I need a better solution than remove the SD Card every time I want to use it (to avoid wearing the socket, the card etc).
It should work faultless from factory. It's a sad thing that we are having this trouble.
Andre Verissimo said:
EDIT:
I tested carefully now, and discovered that the problem occurs even when I copy files between the SD Card and the internal memory.
It seems you're right again. I removed my SD Card, inserted in the computer, and copy a whole universe of files without problem. It proves that the problem isn't in the SD Card. But I need a better solution than remove the SD Card every time I want to use it (avoiding wearing the socket, the card etc).
It should work faultless from factory. It's a sad thing that we are having this trouble.
Click to expand...
Click to collapse
yes problem occur when we copied file (many) from internal to ext-card, i think thats defect from the product or system, have you tried another microSD class 10 (not UHS) ?
try this --> put .nomedia file in folder (microSD), where you want skip that folder when mediascan run.
kickthefreak said:
yes problem occur when we copied file (many) from internal to ext-card, i think thats defect from the product or system, have you tried another microSD class 10 (not UHS) ?
try this --> put .nomedia file in folder (microSD), where you want skip that folder when mediascan run.
Click to expand...
Click to collapse
No luck with .nomedia here, nor when I disable Media Scanner with Rescan Media.

Sd card problem on mm custom rom

So I recently flashed the marshmallow resurrection remix ROM on my M8 and it was cool...been using it for some time now...no bugs whatsoever...until I decided to insert an SD card for the first time ever since the flash...as usual upon first insertion it tells you to format it into either internal storage or the other option (forgotten the main terms they used)..now I already know that there's an SD card bug on all CM powered Roms..but the way the error occurs on my device is abnormal...after I select how I want it to be formated and start the formatting process it immediately crashes in like 2 seconds and returns to my home screen leaving this error code
{
"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"
}
Most people with the SD card problems complain of the formatting process being stuck or moving forward to a certain level and then crushing or something...but non of them complains of this kind of error...can someone please look at this and help me?
Sent from my m8 using XDA-Developers mobile app
I haven't seen that particular error. When I've had problems with CM13 reading the SD card, what sometimes works for me: insert the SD card into a card reader attached to my Windows PC. Then Windows pops up a dialog box, which indicates there is a problem with the card, and you can pick whether to fix it. I forget the choices, but there is a quick one, and a slower one. I pick the quick one, which just takes a couple minutes; and also preserves the data on the SD. Then re-insert SD into device, and CM13 seems to read it fine. This doesn't always work, but often does to fix the problem with CM13 reading the SD.
May or may not work in your situation, but just throwing it out there, as its worth a try.
redpoint73 said:
I haven't seen that particular error. When I've had problems with CM13 reading the SD card, what sometimes works for me: insert the SD card into a card reader attached to my Windows PC. Then Windows pops up a dialog box, which indicates there is a problem with the card, and you can pick whether to fix it. I forget the choices, but there is a quick one, and a slower one. I pick the quick one, which just takes a couple minutes; and also preserves the data on the SD. Then re-insert SD into device, and CM13 seems to read it fine. This doesn't always work, but often does to fix the problem with CM13 reading the SD.
May or may not work in your situation, but just throwing it out there, as its worth a try.
Click to expand...
Click to collapse
But here's the thing...I placed that same SD card in another M8 using the ViperOme lollipop ROM and it seemed to format and most as internal memory or external storage just fine...so I'm sure it isn't a hardware problem
Sent from my m8 using XDA-Developers mobile app
drickles said:
But here's the thing...I placed that same SD card in another M8 using the ViperOme lollipop ROM and it seemed to format and most as internal memory or external storage just fine...so I'm sure it isn't a hardware problem
Click to expand...
Click to collapse
Removable storage is what you want. I'm pretty sure you'll run into problems if you try to format as internal storage (it becomes a part of the internal storage associated with the other M8) and swap the SD to another phone.
Why not try what I suggested, just to see if it works or not? It just takes a couple minutes, so it couldn't hurt. That is, unless you don't have a card reader connected to your PC.
Just tried your way...still giving me the same error...it crashes immediately when the formatting process starts...don't even think it even gets time to initiate the process..could it be that this particular ROM is bugged?
Sent from my m8 using XDA-Developers mobile app
drickles said:
Just tried your way...still giving me the same error...it crashes immediately when the formatting process starts...don't even think it even gets time to initiate the process..could it be that this particular ROM is bugged?
Click to expand...
Click to collapse
If you try another ROM, and don't get the problem; than its pretty likely a bug in the ROM. But on the other hand, if its a problem with the ROM, I would think that others would have reported it in the ROM thread.
Is your firmware up to date?

Is Lineage's adoptive storage a Link2SD rehash?

Does LineageOS's adoptive storage run on Link2SD? I ask because I was looking to get around Lineage's habit of formatting the entire SD card for adoptive storage, so I thought to try to resize the partition using 'gparted' on a Linux box. gparted was unable because it doesn't recognize the partition's format, but more importantly it reports that the label for the partition is "link2sd." Why would it do that if Lineage hadn't name it that itself?
I am aware there is a method for partitioning using ADB and dedicating only a limited portion of the SD card to adoptive storage but as yet I haven't got that process to work. But what's the point beating myself up figuring that out if all I'm ending up with is link2sd, exactly as I have been with pre-adoptive storage Android phones.
So basically it comes down to this. Is adoptive storage simply a convenience so you don't have to install any 3rd-party storage manager apps, or does it have material advantages over the 3rd-party add-ons (in addition to the fact that it is 'native')?
DrWu said:
Does LineageOS's adoptive storage run on Link2SD? I ask because I was looking to get around Lineage's habit of formatting the entire SD card for adoptive storage,
Click to expand...
Click to collapse
That's not a LineageOS habit, but original Android functionality as designed by Google. And no, it's not related in any way to Link2SD.
so I thought to try to resize the partition using 'gparted' on a Linux box. gparted was unable because it doesn't recognize the partition's format, but more importantly it reports that the label for the partition is "link2sd." Why would it do that if Lineage hadn't name it that itself?
Click to expand...
Click to collapse
The contents of the adoptive storage partition are encrypted. I doubt gparted is able to read a label from that, let alone apply changes to it.
Likely, the shown label is only a (wrong) guess based on the 1byte partition type code.
So basically it comes down to this. Is adoptive storage simply a convenience so you don't have to install any 3rd-party storage manager apps, or does it have material advantages over the 3rd-party add-ons (in addition to the fact that it is 'native')?
Click to expand...
Click to collapse
The idea behind adoptive storage is, that the SD card acts as a memory expansion for the internal storage. The user is not supposed to think about which data goes where. and is not allowed to ever remove the card without losing data.
If you want to put data explicitly in a certain space and/or want to use the card for data exchange with a PC, then adoptive storage is not made for you.
hergen66 said:
...If you want to put data explicitly in a certain space and/or want to use the card for data exchange with a PC, then adoptive storage is not made for you.
Click to expand...
Click to collapse
Thank you for clearing that up for me, hergen66.
The references I was referring to in the OP stated that it was possible to format an BD card for adoptive storage using ADB but splitting it into multiple partitions like so:
"adb shell sm partition disk:179,64 mixed 60"
I gather from what you're saying that this either is incorrect or outdated?
Then again, maybe it can be done.
For reasons I have yet to determine, I still can't get my Nook connected to ADB via USB (which is why I didn't try this earlier). However, I have found I can get it to connect by TCP/IP. And I was able to split-partition the SD card through ADB (with 'ADB over network' enabled and 'USB configuration' set to MTP) with the one-liner I posted above. I created a 12gb "adoptable" partition (with it's companion 16mb metadata partition) and a 47gb "portable" storage partition. LineageOS recognizes them as adoptable storage and portable storage and they appear to be functioning accordingly.
Apparently all Lineage cares about to initiate adoptable storage is that the SD card has the two partitions it creates (metadata and encrypted storage) when it formats for adoptable storage. Whatever else is on the card doesn't seem to matter. The process of ADB formatting causes the OS to see the reformatted card as new and asks how you want it used. When I answered 'portable storage,' it apparently did nothing to alter the card but still mounted and recognized and accepted the 12gb partition as adoptable storage, while also accepting the 47gb patition as 'portable.'
To make sure it was operating as adoptable storage I installed 34 new apps and it definitely is writing to the adoptable partition on the external SD card. I don't have Link2SD or anything of the sort installed, this was all the LineageOS' doing:
So just for giggles I removed the SD card, stuck it in a Linux PC, used gparted to shrink the portable storage partition a bit, and added a fourth partition in the freed-up space, 256mb formatted in swap. Put it back in the Nook, selected portable storage (again) and Lineage remounted it as per usual, with adoptable storage still working. I did the 'mkswap/swapon' thing to activate the new swap slice so now I've also got "overflow" VM on the SD card.
{
"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"
}
So now I've got adoptable storage, portable storage and swap space, all functional and coexisting on the same SD card. I only ever intend apps and data going to adoptable storage because I do most of my mods and management via Airdroid because it allows me the convenience of a PC's full size keyboard. So consequently it's also more convenient for me to add video, music and ebook files via USB connection to a PC (from Linux Nemo or Windows Explorer), which I couldn't have done if the entire SD card had been dedicated to adoptable storage. Which is why I couldn't/wouldn't stop picking at this until I'd found a solution. I don't know that I won't eventually switch to Link2SD anyway, but I like the idea of using a native app versus a 3rd-party add-on, so for the timebeing I'm test-driving the adoptable storage solution.

Categories

Resources