Tutorial  Updated

SXOS and atmosphere sharing emunand + android 10 accessing FAT32

In a the tutorial thread https://gbatemp.net/threads/quickes...emunand-to-sxos-style-microsd-emunand.586474/, fellow user @lordelan explained the problems leading to the impossibility of having SXOS and atmosphere share the same emunand when using them on a switch which also has android 10 installed.

Basically, the problem is the combination of these three facts:
  • android 10 requires a GPT partition layout, which uses sectors 1,2,… to describe the partitions.
  • SXOS hidden partition style emunand is stored in the fixed sectors 1 ( TX NAND mark ) and starting on sector 2 ( actual emunand contents ).
  • Atmosphere can describe SXOS hidden partition style emunands and use them, but it needs the contents to be contiguous and it doesn’t support referencing a file based SXOS emunand ( of course some modifications to atmosphere could give this support and maybe some FAT32 file descriptor trickery would also do the trick, but that would be more work, I think ).
So, the trick that turned out to be possible was: what if…
  • We create an SXOS file based style emunand STRUCTURE and arrange file data in the FAT32 partition so that the file entries are describing data for each file, yes, as it would be the case for a file based SXOS emunand, BUT we also make sure that data is contiguous on disk.
  • We create a hekate+atmosphere emummc.ini to use a hidden partition style emunand that uses sector=<sector where the “Ordered and Contiguous” file based SXOS emunand contents start>.
And, after some research and testing, we got it working :)
_____________________

Updated document to version 1.1:

// Changed backing up and restoring procedures.
// Added Tools & Software: section before Steps: section and removed Tools: section at the end.
// Fixed credits.
 

Attachments

  • AndroidSXOSAndAtmosphereWithSharedEmunand11.pdf.pdf
    2.8 MB · Views: 522
Last edited by Inaki,

lordelan

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
5,817
Trophies
1
Age
44
XP
6,587
Country
Germany
This creates an emunand on files in the fat32 partition so 0, you don't need to create an emunand when partitioning the SD card. The file based 29GB emunand will be used by both sxos and atmosphere. You won't have an emunand partition.

I may need to update the document to give more background info and explain this... it seems it is a bit cryptic, maybe ?
Don't think it's too cryptical.
To answer his question: This guide will take 29 GB of space but only once just like it would if you create a partition based emuNAND with SX OS, migrate it with hekate and use that with both -> SX OS and Atmosphère.
The only difference is, that a partition based emuNAND created by SX OS won't allow for Android to be installed to the very same SD card so this guide creates a filebased emuNAND with SX OS instead which is treated like a partition based emuNAND by Atmosphère so it's still usable by both custom firmwares at the same time but allows Android to be on the same SD card too.
 
  • Like
Reactions: Inaki

XxBakasuraxX

Member
Newcomer
Joined
Apr 8, 2021
Messages
7
Trophies
0
Age
21
XP
51
Country
Argentina
This creates an emunand on files in the fat32 partition so 0, you don't need to create an emunand when partitioning the SD card. The file based 29GB emunand will be used by both sxos and atmosphere. You won't have an emunand partition.

I may need to update the document to give more background info and explain this... it seems it is a bit cryptic, maybe ?
And does this work with atmosphere emuMMC hidden partition or should i format all the sd card and migrate it into an sd file emunand? I have a 64gb sd card so my capacity is limited. I´m thinking of uploading it to 128gb but I´ll be able to do that in september XD.
 

Inaki

Well-Known Member
OP
Member
Joined
Jan 23, 2014
Messages
278
Trophies
0
Age
42
XP
603
Country
And does this work with atmosphere emuMMC hidden partition or should i format all the sd card and migrate it into an sd file emunand? I have a 64gb sd card so my capacity is limited. I´m thinking of uploading it to 128gb but I´ll be able to do that in september XD.
you need to follow the guide, I am telling you this because creating this file based emunand needs to be done when the fat32 partition is still in a virgin state so that the trick works... if you do it otherwise atmosphere won't be able to use the same emunand. Read the document, step 3.

<<NOTE: Formatting and using only the minimal files when creating this file based SXOS
emunand is vital. I have done some testing here and the risk of getting a physically
non-contiguous file set is way bigger ( almost certain ) when not using a
clean/”unoperated” FAT32 partition. While we don’t have a program to create this or
rearrange these files on the partition we must do this this way.>>
 
Last edited by Inaki,
  • Like
Reactions: iLL wiLL

XxBakasuraxX

Member
Newcomer
Joined
Apr 8, 2021
Messages
7
Trophies
0
Age
21
XP
51
Country
Argentina
Okay I´ve been reading. I like the idea of resized atmosphere and sx os in differents partitions.

--------------------- MERGED ---------------------------

I saw that someones had already achieved. I don't know how to do it properly. Can anyone help me. I have the sd card formatted and sysnand with 10.2.0.
 

Inaki

Well-Known Member
OP
Member
Joined
Jan 23, 2014
Messages
278
Trophies
0
Age
42
XP
603
Country
  • Like
Reactions: DbGt and lordelan

lordelan

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
5,817
Trophies
1
Age
44
XP
6,587
Country
Germany
Dunno if I'm the first one here but I followed the full guide (v1.1) including taking my old partition based emuNAND over from my old card to the new one and it indeed all worked out like a charm.

I now have a filebased SX OS emuNAND which Atmosphère treats like a partition based (yes I can boot into it from both CFWs) on 11.0.0 + Android 10 on the same 512 GB card. The latter is rooted with Magisk, passes the SafetyNet checks (I can play Nintendo games) and has the Horizon FAT32 partition mounted on boot to a directory that all apps like RetroArch can reach thanks to Tasker.

Thank you so much, Inaki! You made me an even happier Switch owner. :)
 
  • Like
Reactions: stüssy and Inaki

Inaki

Well-Known Member
OP
Member
Joined
Jan 23, 2014
Messages
278
Trophies
0
Age
42
XP
603
Country
Dunno if I'm the first one here but I followed the full guide (v1.1) including taking my old partition based emuNAND over from my old card to the new one and it indeed all worked out like a charm.

I now have a filebased SX OS emuNAND which Atmosphère treats like a partition based (yes I can boot into it from both CFWs) on 11.0.0 + Android 10 on the same 512 GB card. The latter is rooted with Magisk, passes the SafetyNet checks (I can play Nintendo games) and has the Horizon FAT32 partition mounted on boot to a directory that all apps like RetroArch can reach thanks to Tasker.

Thank you so much, Inaki! You made me an even happier Switch owner. :)
Glad you got it working :)
I am almost done programming a windows app that will do steps 3 and 4 automatically. It will also make it possible to create the shared emunand without needing a clean FAT32 partition. Future additions may include options for automatic current emunand migration from sx/atmos, multiple shared emunand creation ( this will very probably be there in the first version ).
 
Last edited by Inaki,

lordelan

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
5,817
Trophies
1
Age
44
XP
6,587
Country
Germany
Is there any way to make all the apps recognize the FAT partition? The mothod on the pdf is not working.
Sure, you just need to create a folder on your Android user partition (beside "Downloads", "Music" and so on) and then use Root (Magisk) and Tasker to automount the FAT32 partition to that folder.
 

cobjak

Well-Known Member
Member
Joined
Jan 16, 2019
Messages
278
Trophies
0
Age
31
XP
552
Country
France
Maybe I am a noob but if I unzip your file in my SD car I would be able to launch android or I need to do a lot of things?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://gfuel.com/products/goth-gf-collectors-box?utm_source=Klaviyo_campaign&utm_medium=email&ut...