Hacking The only way i've found to setup SX+ATMO Emunand and Android on the same sd card

di4b0lik

Active Member
OP
Newcomer
Joined
Jul 18, 2017
Messages
25
Trophies
0
Age
31
XP
465
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.
 

CarpaBR

New Member
Newbie
Joined
Aug 2, 2019
Messages
1
Trophies
0
Age
35
XP
63
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...
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: 24,000 hmmmm lol