1. di4b0lik

    OP di4b0lik Member
    Newcomer

    Joined:
    Jul 18, 2017
    Messages:
    25
    Country:
    Italy
    I've spent the last couple of days trying to add the Android OS to a 512GB SD Card wich was running an Emunand setup wich was compatible with both sx and atmo (the emunand was initially generated from sx payload).
    I have used Windows 10 and a GParted Live CD (VirtualBox). The whole process was far from easy because TX Emunand uses some SD sectors wich are normally occupied from the EFI Partition Header. I tried to ask for some help on the RetroNX discord at some point but i got insta-banned (???), fortunately the guys at the switchroot discord were more friendly and at the end of the day i found a solution to make it all works... unfortunately it is a very crappy solution. I hope this will help someone to find a better and more reliable way to achive this same result.
    Since this isn't by any means intented for a newbie (too many things could go wrong and corrupt the whole card) i'm not gonna give a super-detailed explanation of every step to perform, but you can refer to any other Android-related tutorial here or on XDA.

    Code:
    FROM SX+ATMO EMUNAND TO SX+ATMO EMUNAND & LINEAGE OS
    - Backup all the files from sd card to pc
    - Dump the following offsets from the sd card (use dd or do it manually with an hex editor like HxD):
    OFFSET(FROM-TO)            NAME
    0x200-0x45FF         ----> switchtosx.bin
    0x400-0x4003FF       ----> EmuBoot0.bin
    0x400400-0x8003FF    ----> EmuBoot1.bin
    0x800400-0x74840046F ----> EmuRawnand.bin
    - Merge all Emu files into 1 Emunand.bin
    - Use Etcher to flash the Android img
    - Now run GParted and do the following:
    * DELETE HOS_DATA PARTITION
    * MOVE 28GB OF UNALLOCATED SPACE FROM THE BOTTOM OF THE DRIVE TO THE TOP (MERGE WITH 2GB LEFT FROM HOS_DATA)
    * USE ALL THE REMAINING SPACE AT THE BOTTOM OF THE DRIVE TO CREATE A NEW FAT32 PARTITION
    - Close GParted, open terminal and use FDISK to re-create the Hybrid MBR
    - Now again with an Hex editor or DD dump 0x200-0x45FF and call it switchtoandroid.bin
    - Write Emunand.bin to the sd card at 0x400
    - Copy all the files back from the pc to the fat32 partition on the sd card
    
    Done, all you have to do now is to write switchtoandroid.bin or switchtosxos.bin to the sd card (offset 0x200, will need less than a second to write) before changing from one payload to another.
    ATMOSPHERE EMUNAND will work with both, so if you are like me you can keep switchtoandroid all the time and write switchtosxos only when you need to access that specific custom firmware.
    
     
    evil_santa, kickmeh, Ann0ying and 2 others like this.
  2. Draxzelex

    Draxzelex GBAtemp Legend
    Member

    Joined:
    Aug 6, 2017
    Messages:
    14,899
    Country:
    United States
    Great, maybe someone will find this useful.
     
  3. CarpaBR

    CarpaBR Newbie
    Newcomer

    Joined:
    Aug 2, 2019
    Messages:
    1
    Country:
    Brazil
    using dd, what was de command you used to dump the offsets? and to merge? and to write the bin to the sd card?
    i want to do this, but I have zero experience...
     
  4. lordelan

    lordelan GBAtemp Psycho!
    Member

    Joined:
    Jan 4, 2015
    Messages:
    4,964
    Country:
    Germany
    Finally, that's what I've been looking for.
    Thank you very much! I'm on a 400 gb (Horizon + emuMMC) and a 128 (Android) card for now but I hate to swap and I'm eventually getting a 512 card next year to try this out!
     
  5. joey656

    joey656 Advanced Member
    Newcomer

    Joined:
    Feb 22, 2019
    Messages:
    77
    Country:
    United States
    hay do u know how much gb the emunand.bin output should be
     
  6. Maupiti

    Maupiti GBAtemp Fan
    Member

    Joined:
    Sep 16, 2018
    Messages:
    363
    Country:
    France
    Close to 29-30 ( I ´m not behind my pc and can’t Check the exact size of my dump) but as it should be a 1:1 dump, it’s roughly the size of the emmc
     
    Last edited by Maupiti, Jan 2, 2020
  7. pixel_mx

    pixel_mx Newbie
    Newcomer

    Joined:
    Nov 3, 2018
    Messages:
    6
    Country:
    Mexico
    Could someone share the command? fdisk does not give the option to manipulate the gpt partition to make it hybrid
     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - SX+ATMO, Emunand, Android