[Setup-Guide]Setting up Android with EmuMMC + bigger FAT32 partition.

Discussion in 'Switch - Tutorials' started by TariqSoftDev, Aug 2, 2019.

  1. TariqSoftDev
    OP

    TariqSoftDev ~Zexceil

    Member
    5
    Sep 18, 2013
    London
    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:
    [​IMG]

    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, Aug 18, 2019 at 9:53 PM
    Broduskii, Bst22322, imedox and 7 others like this.
  2. TariqSoftDev
    OP

    TariqSoftDev ~Zexceil

    Member
    5
    Sep 18, 2013
    London
    [RESERVED]
     
  3. tabzer

    tabzer GBAtemp Fan

    Member
    3
    Feb 15, 2019
    Japan
    Wahoo, I knew you'd be doing this.
     
    TariqSoftDev likes this.
  4. TariqSoftDev
    OP

    TariqSoftDev ~Zexceil

    Member
    5
    Sep 18, 2013
    London
    Just wait when I get Ubuntu working with this ;) , that'll be a nice thing.
     
    tabzer likes this.
  5. Boomerams

    Boomerams Advanced Member

    Newcomer
    3
    Dec 16, 2016
    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, Aug 2, 2019
  6. tabzer

    tabzer GBAtemp Fan

    Member
    3
    Feb 15, 2019
    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, Aug 2, 2019
  7. TariqSoftDev
    OP

    TariqSoftDev ~Zexceil

    Member
    5
    Sep 18, 2013
    London
    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.
     
    ~~Tito~~ and tabzer like this.
  8. tabzer

    tabzer GBAtemp Fan

    Member
    3
    Feb 15, 2019
    Japan
    Cool. I'll be following you.
     
  9. Boomerams

    Boomerams Advanced Member

    Newcomer
    3
    Dec 16, 2016
    United States
    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.
     
  10. tabzer

    tabzer GBAtemp Fan

    Member
    3
    Feb 15, 2019
    Japan
    Lakka and OFW are pretty much automatically usable once you get emummc working.
     
  11. [S]aber

    [S]aber GBAtemp Regular

    Member
    4
    Jul 14, 2007
    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 [S]aber, Aug 3, 2019
  12. tabzer

    tabzer GBAtemp Fan

    Member
    3
    Feb 15, 2019
    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.
     
  13. tabzer

    tabzer GBAtemp Fan

    Member
    3
    Feb 15, 2019
    Japan
    I'm including this boot.scr file to the thread that will boot L4T 1.3.1 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: Added L4T 1.5.0 boot.scr for partition 9.
     

    Attached Files:

    Last edited by tabzer, Aug 19, 2019 at 5:15 AM
    switchisfun and TariqSoftDev like this.
  14. TariqSoftDev
    OP

    TariqSoftDev ~Zexceil

    Member
    5
    Sep 18, 2013
    London
    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.
     
    tabzer likes this.
  15. tabzer

    tabzer GBAtemp Fan

    Member
    3
    Feb 15, 2019
    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?
     
    TariqSoftDev likes this.
  16. TariqSoftDev
    OP

    TariqSoftDev ~Zexceil

    Member
    5
    Sep 18, 2013
    London
    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
     
    tabzer likes this.
  17. LucasM3

    LucasM3 GBAtemp Regular

    Member
    1
    Jun 22, 2019
    Canada
    It will be great to see the write up. Good work.
     
  18. stoffer666

    stoffer666 Advanced Member

    Newcomer
    4
    May 21, 2018
    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.
     
  19. lordelan

    lordelan GBAtemp Psycho!

    Member
    11
    Jan 4, 2015
    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).
     
  20. Bst22322

    Bst22322 Member

    Newcomer
    3
    Jul 24, 2018
    United States
    thank you for your contribution. working great on my system
     
    TariqSoftDev likes this.
Loading...