Tutorial  Updated

Setting up Android with EmuMMC + bigger FAT32 partition.

As the title says, here's the video; I'll do a write up later since it's a long process.



This is not possible in windows 10 due to the GPT Hybrid MBR trickery used, the android image already does this when it writes the partition tables and etc.

Don't do this in windows nor attempt it, it's not going to happen unless there's something you can use to mess with partitions like I did, L4T-Ubuntu also won't work due to the partition stuff and etc, I'm currently making something to allow this without any complications, please be patient!

Watch the entire video and you'll understand more about this, if you make simple errors from not watching the video I will simply tell you to properly watch again and listen!
TOOL ETA: Don't ask, it's a complicated tool that needs a lot of maths, safety features and etc
TOOL SO FAR:
EBa_eq9XUAMnNN5

Tool functions: Android, Custom Android user data, 8GB Android install, Ubuntu, Ubuntu Swap, EmuMMC and Lakka dynamic setup.
Planned functions: Multi EmuMMC setup, EmuMMC Backup & restore(including Nintendo folder) + More unique management stuff!


UPDATE: I'm currently setting aside the tool until I finish making & releasing my new modchip
 
Last edited by TariqSoftDev,

Boomerams

Well-Known Member
Member
Joined
Dec 16, 2016
Messages
102
Trophies
0
Age
37
XP
506
Country
United States
I was able to get all three working but my process was a little more complicated than what's in the video. I would post a vid but out of town till late Tuesday night and don't have my switch with me.

Basically...

1. i started with a freshly wiped sdcard with my stuff safety backed up.
2. Flashed the noobs Ubuntu version through etcher.
3. Used gparted to manipulate, move, and expand my switch fat32 partition
4. Then manually added the Android partions in pretty much like your video with the right hekate files.

Although, I haven't really tested to make sure everything works but things seemed to boot up just fine right before I left out of town. If things don't get sorted out here for everyone I would be happy to share what I have when I get back home.

EDIT: Let me clarify things...I got android, noobs version of Ubuntu, and then normal hekate but haven't messed around with emummc stuff since my switch is banned and having both android and Ubuntu already take up so much space on my tiny sdcard emummc is pointless to me.
 
Last edited by Boomerams,

tabzer

This place is a meme.
Member
Joined
Feb 15, 2019
Messages
5,844
Trophies
1
Age
39
XP
4,911
Country
Japan
I think I got OFW/CFW-Atmosphere/Lakka/Android/L4T working in a pentaboot situation.

I took what I learned from your guide, and at the end I created another unformated partition 9. I took the 1.img and dd'd it to partition 9. I couldn't resize it after... it gave me some sort of error. So I deleted it and recreated it using the rest of the space on the sd card.


Since L4T isn't going to be in its native location, we will have to edit the boot.scr file.

Change the partition reference in boot.scr by decrypt-> edit -> reencrypt

"dd if=boot.scr of=boot.txt bs=72 skip=1"
Decrypts

setenv bootargs 'root=/dev/mmcblk0p2 rw rootwait relative_sleep_states=1 access=m2 console=tty0 firmware_class.path=/lib/firmware/ fbcon=primary:1'

Change the partition reference to 9?

setenv bootargs 'root=/dev/mmcblk0p9 rw rootwait relative_sleep_states=1 access=m2 console=tty0 firmware_class.path=/lib/firmware/ fbcon=primary:1'

"mkimage -A arm -T script -O linux -d boot.txt boot.scr"
Encrypts

Also, when all was said and done, I needed to redo the flags for partition 1 and 8.

It seems to be working so far. I am testing it now. If you have any ideas for improvement, let us know!
 
Last edited by tabzer,

TariqSoftDev

~Zexceil
OP
Member
Joined
Sep 18, 2013
Messages
716
Trophies
1
Location
London
XP
1,018
Country
I think I got OFW/CFW-Atmosphere/Lakka/Android/L4T working in a pentaboot situation.

I took what I learned from your guide, and at the end I created another unformated partition 9. I took the 1.img and dd'd it to partition 9. I couldn't resize it after... it gave me some sort of error. So I deleted it and recreated it using the rest of the space on the sd card.


Since L4T isn't going to be in its native location, we will have to edit the boot.scr file.

Change the partition reference in boot.scr by decrypt-> edit -> reencrypt

"dd if=boot.scr of=boot.txt bs=72 skip=1"
Decrypts

setenv bootargs 'root=/dev/mmcblk0p2 rw rootwait relative_sleep_states=1 access=m2 console=tty0 firmware_class.path=/lib/firmware/ fbcon=primary:1'

Change the partition reference to 9?

setenv bootargs 'root=/dev/mmcblk0p9 rw rootwait relative_sleep_states=1 access=m2 console=tty0 firmware_class.path=/lib/firmware/ fbcon=primary:1'

"mkimage -A arm -T script -O linux -d boot.txt boot.scr"
Encrypts

Also, when all was said and done, I needed to redo the flags for partition 1 and 8.

It seems to be working so far. I am testing it now. If you have any ideas for improvement, let us know!
I'm working on scrapping that entire system and allowing rEFInd to fully function so it'll just find the installs rather than manual config.
 

Boomerams

Well-Known Member
Member
Joined
Dec 16, 2016
Messages
102
Trophies
0
Age
37
XP
506
Country
United States
I think I got OFW/CFW-Atmosphere/Lakka/Android/L4T working in a pentaboot situation.

I took what I learned from your guide, and at the end I created another unformated partition 9. I took the 1.img and dd'd it to partition 9. I couldn't resize it after... it gave me some sort of error. So I deleted it and recreated it using the rest of the space on the sd card.


Since L4T isn't going to be in its native location, we will have to edit the boot.scr file.

Change the partition reference in boot.scr by decrypt-> edit -> reencrypt

"dd if=boot.scr of=boot.txt bs=72 skip=1"
Decrypts

setenv bootargs 'root=/dev/mmcblk0p2 rw rootwait relative_sleep_states=1 access=m2 console=tty0 firmware_class.path=/lib/firmware/ fbcon=primary:1'

Change the partition reference to 9?

setenv bootargs 'root=/dev/mmcblk0p9 rw rootwait relative_sleep_states=1 access=m2 console=tty0 firmware_class.path=/lib/firmware/ fbcon=primary:1'

"mkimage -A arm -T script -O linux -d boot.txt boot.scr"
Encrypts

Also, when all was said and done, I needed to redo the flags for partition 1 and 8.

It seems to be working so far. I am testing it now. If you have any ideas for improvement, let us know!

Oh yeah, I got lakka too but didn't include it since doesn't required a separate partition and runs straight from switch sd partition easily. Would love a tool to do all this with less complications though.
 

PhiZero

Well-Known Member
Member
Joined
Jul 14, 2007
Messages
122
Trophies
1
Age
33
XP
527
Country
Netherlands
Hi, I've been racking my head for the past few hours but I just can't figure this out.

I've been out of the Switch loop for 6+ months, and the arrival of Android seemed very interesting to me. So I've set up my Switch exactly as yours, with android booting absolutely fine and everything working. Stock HorizonOS also works completely fine. However, the issue lies with emuMMC and booting it. Hekate saw the partitions fine (exactly as you had them), and even installed properly to the correct partition, or so it said. However, when trying to boot it, it just gets stuck on the "HEKATE - IPL" splash screen. I've tried restoring 2 different NAND backups and re-installing emuMMC twice. I've redone all the partitions twice. I just come to the same conclusion every time. Stock/Android work fine, emuMMC doesn't.

For the record, I'm on an original Switch with 6.1.0 on it.

EDIT: Restored an even older NAND backup of 4.0 to the emuMMC, and for some reason this works right away. I'm too tired to figure out why, but whatever. It's working.


Thanks for the guide, triple boot working! :)
 
Last edited by PhiZero,

tabzer

This place is a meme.
Member
Joined
Feb 15, 2019
Messages
5,844
Trophies
1
Age
39
XP
4,911
Country
Japan
Funny story. After I did my installation, I found out that the space I left over for L4T was too small for a meaningful L4T experience... so I redid everything, shrinking the first FAT32, and reflashing the 6 Android partitions to redefining the placement of the Emummc and L4T partitions (9 total). When I booted up to recreate my emummc, I forgot that I had previously set it up for automatic CFW boot, and it booted off of my old emummc flash perfectly, even though the first few GiB were supposedly apart of my Android userdata. I didn't think about it, until then, but the definition of the partition for emummc might be unnecessary as long as we have a way to DD at starting sector (and we don't bother that space with other partitions/data).

Anyway, since we already established a tried and functioning system (pentaboot works great btw!), this probably doesn't contribute anything immediately meaningful... but it might be nice to keep in mind if we face limitations in the future... this could save us from defining one extra partition.
 

tabzer

This place is a meme.
Member
Joined
Feb 15, 2019
Messages
5,844
Trophies
1
Age
39
XP
4,911
Country
Japan
I'm including this boot.scr file to the thread that will boot *L4T 3.0.0 from the 9th partition if anybody decides to do it the way I did it, though I have greater hopes for Tariq's solution whenever he decides to deliver it.

*Edit: Updated for L4T 3.0.0 release (3/22)
 

Attachments

  • 3.0.0bootscr9thPartition.zip
    416 bytes · Views: 257
Last edited by tabzer,

TariqSoftDev

~Zexceil
OP
Member
Joined
Sep 18, 2013
Messages
716
Trophies
1
Location
London
XP
1,018
Country
I'm including this boot.scr file to the thread that will boot L4T from the 9th partition if anybody decides to do it the way I did it, though I have greater hopes for Tariq's solution whenever he decides to deliver it.
My Solution will take a very long while, I'm going to make my own port of EDK2 for the Switch allowing UEFI boot which allows rEFInd, that means flash OS's to any sd card partition, GPT or MBR and It'll detect it, cutsa out having to have all these boot.scr stuff and seperate coreboots; this is a big project for me since it's a massive learning curve.

I leave no promises except that I will try my hardest to reimplement this for easy booting.
 
  • Like
Reactions: tabzer

tabzer

This place is a meme.
Member
Joined
Feb 15, 2019
Messages
5,844
Trophies
1
Age
39
XP
4,911
Country
Japan
Don't stress too much over it. These breakthroughs are nice and these contributions you make are great. Anybody who needs for this setup to work has enough information on how to do it thanks to you.

I do have one question. You chose E0 as a header for the second FAT32 partition. Is there a specific reason why it has to be "E0" or was it kind of an arbitrary choice made to help you recognize it in hekate's emummc creation process?
 
  • Like
Reactions: TariqSoftDev

TariqSoftDev

~Zexceil
OP
Member
Joined
Sep 18, 2013
Messages
716
Trophies
1
Location
London
XP
1,018
Country
Don't stress too much over it. These breakthroughs are nice and these contributions you make are great. Anybody who needs for this setup to work has enough information on how to do it thanks to you.

I do have one question. You chose E0 as a header for the second FAT32 partition. Is there a specific reason why it has to be "E0" or was it kind of an arbitrary choice made to help you recognize it in hekate's emummc creation process?

EE is typically used by GRUB and etc for boot stuff which is why hekate won't write to partitions that are P0 marked EE since it'd think it's the FAT32 that's why we shove the first 1-2047 sectors with EE to the last part of the MBR then move the FAT32 partition to the start, after that we make it E0 since that's what Hekate by default marks it and yep makes it easier for hekate to make the EmuMMC
 
  • Like
Reactions: tabzer

stoffer666

Well-Known Member
Newcomer
Joined
May 21, 2018
Messages
62
Trophies
0
Age
42
XP
869
Country
Denmark
Hi i have a 400 GB sd card where i have my emunand in files not a hidden partion. I only have a Windows machine. Can i backup everything and make a android partion on 32gb and some how expand the fat32 partion so i can boot both on the same card on windows.
 

lordelan

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
5,788
Trophies
1
Age
44
XP
6,519
Country
Germany
This guide is really amazing. Gladly you worked it out @TariqSoftDev
Only sad thing is that it doesn't support SX OS emuNAND as I created mine from there (and am using SX OS to launch games from HDD from time to time).
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: @Psionic Roshambo, I always see this dude's shorts, he sounds pretty annoying.