Script to set up SD card for switchroot android, l4t ubuntu, emummc etc. - Nintendo Switch Questions & Answers

Hello,
i made a script that sets up the SD card for switchroot android, l4t ubuntu, emummc etc.
Creates and formats the necessary partitions, lets you increase the size of each partition (if there is space left), flashes l4t ubuntu and android images automatically (if provided), SD card still usable in horizon OS.
See readme in git repo for more information.
github.com/lulle2007200/SwitchSDSetup/releases

Just want to make sure I'm understanding this post correctly. So this will format the micro sd card into three partitions (atmosphere emummc, l4t ubuntu, and android) in one single micro sd card so that there isn't a need to have each os installed on multiple sd cards?

gsharpshooter said:
Just want to make sure I'm understanding this post correctly. So this will format the micro sd card into three partitions (atmosphere emummc, l4t ubuntu, and android) in one single micro sd card so that there isn't a need to have each os installed on multiple sd cards?
Click to expand...
Click to collapse
Correct. This has been a thing since android for switch came out. There's actually a script that does the same thing, hidden in the main android thread.

Can you update this for the Android 10 lineage image that's out?

Guess that's a no

Hekate has built in support to install Android 10. That being said, check out SDSetup V2. Haven't used this in a few months, but should still work. You may have to rename the switchroot android zip since the naming scheme changed in the meantime.

Related

[HOW TO] Get a smaller wp7 partition/bigger FAT partition

After a few questions I decided to write a TUT how to get a smaller wp7 partition.
Better: I tried to write a TUT
What you need: your sd card, a SECOND SD CARD with less storage, partition app for pc(I used EASEUS Partition Master 6.5.2 Home Edition), usb cardreader
1st step: flash wp7 with magldr when the SMALL sd card is in your phone or perform a hard reset with the smaller card when you have already flashed wp7.
2nd step: connect both sd cards to your pc and run the partition app.
Delete the filesystem of your BIGGER sd card.
3rd step: copy the wp7 partition from the small sd into the unallocated space of your big sd.
Now create a new partition(FAT32) of the rest unallocated space and convert from logical into primary partition. The drive letter must be set on your fat32 partition! Otherwise your pc will not find it. In front of your wp7 partition should be a “ * “.
I used 4gb and 16gb sd cards so I got 3.5gb wp7 partition and 11.5gb fat32 left on my 16gb card .
Sorry for my English
Hope it can help anyone of you guys and don’t forget to thank DFT for LEO70
Wouldn't it work to have 2 sd cards?... 1 for wp7 and 1 for android. Just make sure the phone is off when you switch them and make sure the wp7 card is in when you boot into wp7. I want to try that... have my 16gb for wp7 and my 32gb for android. Has anyone been able to boot android off sd with magldr yet?
EDIT: Oops, I actually posted this in the wrong thread. Sorry.
Hmmmm tried doing this but failed, I think it's due to my card reader only being able to read Micro SD and not Micro SDHC, tried doing it through magdlr usb was a no go, could change the partition but not wipe it, nice idea though, I'm sure many will find it helpful

[Q] MICRO SD FORMAT/PARTITION? OR TWO Cards?

I have watched and read for some time here and been putting the android switch off because of time. Now I would like to try to run a build or two from my MicroSD. I have seen several places that a formatted SD is best. I have tons of WM's apps stored there so I reluctant to format over them.
I would like to be able to dual boot with my current WM6.5 and android.
I thought about getting a second Micro SD to mess with but if I had to swap sd card it would be a real pain. I have a Otter box for my HD2 and just getting the cover off to reset it is terrible.
Can I partition my Micro SD for wm and android? or does it have to be two cards?
Since you are staying with winmo and running android from SD, there's no need for partitioning the card,,, the android build simply lives in a folder called android on the SD card.
Partitioning the SD card is for nand android that uses apps2sd.
If you want to format the card,(or if you decide to partition) just copy everything off onto the PC, format (or partition) it, then copy everything back.
I have all my winmo files and folders still on my card, with no issues (running nand build with partitioned card,,, the android stuff and winmo stuff all sit quite happily together with no interference)
Samsamuel,
Thanks for the reply. That is good news. I know that the class of the card makes a different in performance but should I even try it on the class 2 16gb card what came with the phone?
I'm using a 7 or 8 year old 2gbsandisk, no idea what class it is but can't be that great, and I have no problems, no lags, nothing to indicate any performance issues.

[Q] Upgrading from 4gb sd to 8th sd?

So all i want to do is take everything off my 4gb sd card and use an 8gb sd card so that I have more storage space. Everything works great as is, and I wanted to keep everything as is. Just need more storage space. I've looked through the forums and haven't found anything that addresses this process. I am running CyanogenMod 7.0.3 w/a 4gb sandisk micro sd card. How do I copy so that it boots just like my 4gb card???? Thanks ahead of time for any help.
Bambam01 said:
So all i want to do is take everything off my 4gb sd card and use an 8gb sd card so that I have more storage space. Everything works great as is, and I wanted to keep everything as is. Just need more storage space. I've looked through the forums and haven't found anything that addresses this process. I am running CyanogenMod 7.0.3 w/a 4gb sandisk micro sd card. How do I copy so that it boots just like my 4gb card???? Thanks ahead of time for any help.
Click to expand...
Click to collapse
I recommend just writing an image file with winimage. Then writing it to a 8gb card, then using Easeus Partition manager to expand the last partition to full 8 gb.'
Do you boot from the SD card or eMMC?
If it's the latter, just copy the contents of the old card to the new one.
If it's the former, I recommend a fresh install; use a backup program (MyBackup, Titanium Backup) to back up your Apps and Data and then restore when you're done with the fresh install.
I'd like to do this as well.. in response to previous reply.. there are 4 partitions (boot, 2 other and last one with your data) do I have to create 4 different images with winimage or just for the first boot partition or does the winimage creates the image of the whole msd card?
The winimage will create a 4 gb image of your card on the 8 gb cards including existing partitions. What you'll need to do is get the largest partition to expand to the whole card. Assuming that the 4gb install on SD is the same as an 8 gb install if you did it fresh.
If the partitions are set different for 8 gb on a fresh install, you're better off just doing a fresh install and use titanium backup as the other guy said.
Phatdawg said:
If the partitions are set different for 8 gb on a fresh install, you're better off just doing a fresh install and use titanium backup as the other guy said.
Click to expand...
Click to collapse
That's a good point, the Size-agnostic SD installer uses different partition sizes for everything except the boot partition depending on the size of the card.
I tried winimage first to see if it even worked. Which it didn't. I didn't try to expand the existing partition. It just booted as a normal nook. You would think this would be a easy process but.... Lol, always new challenges. Guess that's why I enjoy doing this.
Well I tried yet again w image, expanded the partition. Still. Didn't work. I must be missing something. How hard can it be to make a copy of a bootable card? Must b brain dead today! Any other thoughts? Thanks!
Bambam01 said:
Well I tried yet again w image, expanded the partition. Still. Didn't work. I must be missing something. How hard can it be to make a copy of a bootable card? Must b brain dead today! Any other thoughts? Thanks!
Click to expand...
Click to collapse
I have done this several times, and I recommend downloading easus todo backup free. Then place both sdcards in a card reader, run todo backup and just copy the 4g to the 8g and expand the fourth partition right there in todo.
This applies especially if you want to copy to same size sd's, as you will not run into the usual image sizing issues.
Hope this helps
I don't know what you're doing wrong. before expanding the partition, make sure the sd boots, if it doesn't, then there's a problem with image being read or written as opposed to the partition.
I also had a problem with a new SD card not booting that I fixed by using the nook (that is the core nook OS) to reformat the card, then put the image onto the SDcard (shouldn't have changed anything as far as I know, but it did anyway).
Ok I tried this and it worked flawlessly. Used win32diskimager to "read" my 4gb sd with cm7 image. and then used "write" to 8gb sd card. It cloned 4 gb original image with 4 partitions and one unused partition of 4 gb. After that used easeus partition manager(latest version) to format unused pattition to fat32 and then merged with last partition of 2gb (move/resize) ..so now I have 6 gb of data partition which i can use to transfer files or move apps from nook's internal drive. The new 8gb card with cm7 image booted without any issues keeping my original settings of 4gb. One thing to mention that somehow it did not work on one pc with windows xp (kept getting write error on win32diskimager program)but worked on my laptop with windows 7.
That is exactly how I have done it in the past as I described in my first post. I don't know why a person would have trouble with it unless there was a format issue (i.e. ntsf, etc).

Dual Boot SD Card Problem

Please forgive me for reposting this but I cannot find the answer and it's driving me crazy.
I am running a dual boot HTC HD2 with Windows Mobile 7 in NAND and Android on the SD card.
Windows Mobile 7 creates a dedicated and non-standard partition on the back half of the card.
Android is booting from a FAT-32 partition on the front of the card.
The partition table looks something like this for the 16GB Class 10 card I am using:
FAT-32 Partition from 0 to approx 7.3 GB set as primary.
Type 4 Partition from 7.3GB to the end of the card.
When running Android from a dedicated SD card the SD card can be found at /mnt/sdcard and everthing is hunky dorey.
However, when the Windows 7 partition is also on the card /mnt/sdcard is empty (there is nothing mounted there). All of the applications that look for an SD card cannot find it. I did find the entire contents of the SD card in /bootsdcard.
I tried creating a soft link between from /bootsdcard to /mnt/sdcard and that did not work.
Does anybody have any ideas how to fix this?
Thanks,
Mike
RE: SD Partitioning
ChitownWingMan said:
Please forgive me for reposting this but I cannot find the answer and it's driving me crazy.
I am running a dual boot HTC HD2 with Windows Mobile 7 in NAND and Android on the SD card.
Windows Mobile 7 creates a dedicated and non-standard partition on the back half of the card.
Android is booting from a FAT-32 partition on the front of the card.
The partition table looks something like this for the 16GB Class 10 card I am using:
FAT-32 Partition from 0 to approx 7.3 GB set as primary.
Type 4 Partition from 7.3GB to the end of the card.
When running Android from a dedicated SD card the SD card can be found at /mnt/sdcard and everthing is hunky dorey.
However, when the Windows 7 partition is also on the card /mnt/sdcard is empty (there is nothing mounted there). All of the applications that look for an SD card cannot find it. I did find the entire contents of the SD card in /bootsdcard.
I tried creating a soft link between from /bootsdcard to /mnt/sdcard and that did not work.
Does anybody have any ideas how to fix this?
Thanks,
Mike
Click to expand...
Click to collapse
Hello...first save all data from FAT32 format. Then:
How to dual boot Windows Phone 7 and Android on HTC HD2 with 1 SD card?
1. In WP7, go to ‘Settings’.
2. Then ‘about’.
3. Click on ‘reset your phone’.
4. Double confirm with ‘yes’ and ‘yes’.
5. Once phone restart, hold on power button. MAGLDR bootloader will be loaded.
6. Take out your SD card from phone and put it into SD card reader at PC.
7. Load Partition Wizard Home Edition.
8. There should be 2 partitions on your SD card (200MB on the left and another larger one on the right).
9. Delete the larger one.
10. Create a partition as ‘Logical’ with ‘Unformatted’ file system.
11. Make sure that the ‘Unallocated Space After’ is 0 MB and some space at ‘Unallocated Space Before’.
12. Apply the changes for pending operations.
13. Close Partition Wizard Home Edition.
14. Put your SD card back to phone.
15. Power on your phone.
16. Setup WP7 for the first time usage.
17. Power off it.
18. Take out your SD card from phone and put it into SD card reader at PC.
19. Load Partition Wizard Home Edition.
20. The ‘Unformatted’ partition should turn into ‘Other’ file system.
21. Delete the 200MB ‘Other’ partition.
22. Create a partition as ‘Primary’ with ‘FAT32′ file system.
23. Right click on the ‘Other’ partition and select ‘Modify’ and then ‘Set Partition As Primary’.
24. Apply the changes for pending operations. You should have 2 primary partitions (FAT32 and Other).
25. Close Partition Wizard Home Edition.
26. Copy SD MAGLDR Android into your SD card. Follow the guide here.
27. That’s all.
http://forum.xda-developers.com/showthread.php?t=913815
Important: Make sure to make window phone 7 memory bigger than android (Partition Bigger)
Dual Boot SD Card Issue
Jerome.Ramos said:
Hello...first save all data from FAT32 format. Then:
How to dual boot Windows Phone 7 and Android on HTC HD2 with 1 SD card?
1. In WP7, go to ‘Settings’.
2. Then ‘about’.
3. Click on ‘reset your phone’.
4. Double confirm with ‘yes’ and ‘yes’.
5. Once phone restart, hold on power button. MAGLDR bootloader will be loaded.
6. Take out your SD card from phone and put it into SD card reader at PC.
7. Load Partition Wizard Home Edition.
8. There should be 2 partitions on your SD card (200MB on the left and another larger one on the right).
9. Delete the larger one.
10. Create a partition as ‘Logical’ with ‘Unformatted’ file system.
11. Make sure that the ‘Unallocated Space After’ is 0 MB and some space at ‘Unallocated Space Before’.
12. Apply the changes for pending operations.
13. Close Partition Wizard Home Edition.
14. Put your SD card back to phone.
15. Power on your phone.
16. Setup WP7 for the first time usage.
17. Power off it.
18. Take out your SD card from phone and put it into SD card reader at PC.
19. Load Partition Wizard Home Edition.
20. The ‘Unformatted’ partition should turn into ‘Other’ file system.
21. Delete the 200MB ‘Other’ partition.
22. Create a partition as ‘Primary’ with ‘FAT32′ file system.
23. Right click on the ‘Other’ partition and select ‘Modify’ and then ‘Set Partition As Primary’.
24. Apply the changes for pending operations. You should have 2 primary partitions (FAT32 and Other).
25. Close Partition Wizard Home Edition.
26. Copy SD MAGLDR Android into your SD card. Follow the guide here.
27. That’s all.
http://forum.xda-developers.com/showthread.php?t=913815
Important: Make sure to make window phone 7 memory bigger than android (Partition Bigger)
Click to expand...
Click to collapse
That is exactly the procedure I followed to get the dual boot to work at all on 1 SD card. That is how I got the two partitions.
Android boots from the SD card and works (I am using it every day). Android just doesn't think that there is an SD card installed for A2SD or any other SD card function.
Should I reduce the size of the FAT-32 partition and create another FAT-32 or EXT partition?
Help please, this is driving me crazy.
You have to start all over. Just save your data on both OS's. You should have only 2 partitions in the end FAT 32 for android and Other for Window 7. Make sure that Window 7 partition has a larger partition size than android, otherwise you will have a lot of errors. Hope this helps you out. J
I've done that twice. Everything works in Windows 7 the only issue is for some reason Android doesn't see the SD card that it is booting from.
What SD card are you using? I am using 32g Sandisk Class2. Everything works perfect on mine with the HD2. Perhaps it's the SD Card?
Jerome.Ramos said:
What SD card are you using? I am using 32g Sandisk Class2. Everything works perfect on mine with the HD2. Perhaps it's the SD Card?
Click to expand...
Click to collapse
The card works fine for Windows 7 with or without the Android FAT-32 partition.
If the FAT-32 partition is the only partition on the card then Android sees the card correctly.
With both partitions Android (MCCMBoxmax V8.0) boots and runs from the card just fine with the exception that Android doesn't see the SD card that is was booted from. However, the card is mounted on /bootsdcard.
I even tried splitting the FAT-32 partition into a smaller FAT-32 partition and an EXT2 partition. That also did not work.
I have tried the following cards:
Samsung 16 GB Class 2 - MMB3R16GUACA-GE (replacement supplied by HTC)
Patriot 16 GB class 10 - PSFGMCSDHD10-BC
And like I said, both OS's work except for this one android glitch.
same problem for me...
Same problem for me too!
Additional info:
If i browse back to /sdcard i can see everything on my memory card. But there is nothing on /mnt/sdcard
Any help suggestions are much appreciated...
hemyl said:
Additional info:
If i browse back to /sdcard i can see everything on my memory card. But there is nothing on /mnt/sdcard
Any help suggestions are much appreciated...
Click to expand...
Click to collapse
I had exact same issue on my previous dual boot setup on various cards and various roms. Prior to this I had no problems setting up a dual boot with WP/Android.
Okay, so this is probably not helpful, since I am very limited in my understanding, but others out there chime in if you know... I may be wrong but it seems that back when we only had Windows Mobile 6.5 with the ability to run Android from the sd card, it seems that there was this same limitation. I think that it is the case, because I remember in January when the ability to run Android from NAND first was released, I was all excited because we would finally be able to use our SD cards in Android correctly. In summary, I think it is due to running Android from SD... it doesn't recognize the SD card as an sd card because it treats it like the internal memory. Someone correct me if I am wrong, but I seem to remember that.
ealex134 said:
Okay, so this is probably not helpful, since I am very limited in my understanding, but others out there chime in if you know... I may be wrong but it seems that back when we only had Windows Mobile 6.5 with the ability to run Android from the sd card, it seems that there was this same limitation. I think that it is the case, because I remember in January when the ability to run Android from NAND first was released, I was all excited because we would finally be able to use our SD cards in Android correctly. In summary, I think it is due to running Android from SD... it doesn't recognize the SD card as an sd card because it treats it like the internal memory. Someone correct me if I am wrong, but I seem to remember that.
Click to expand...
Click to collapse
However, the SD card works properly if there isn't a Windows Mobile 7 partition even when booting from the SD card.
Something about the Windows partition is messing up with the mounting of the SD card. I just don't know enough to figure it out.
load up a partition program and make sure both partitions are set to primary.
orangekid said:
load up a partition program and make sure both partitions are set to primary.
Click to expand...
Click to collapse
I don't believe that the windows partition can be set to primary and still work.
However, I will try it. Thanks.
I got it working!!!
Here is what I now have on a 16 GB Class 10 SD Card
Partition # File System Capacity Type
1 FAT-32 3.91GB Primary (Android Boot Parition)
2 EXT-2 3.52GB Primary (Android A2SD partition)
3 Other 7.32GB Logical (Windows Mobile 7 partition)
Android boots and sees the SD card. Windows Mobile 7 boots and sees the SD card!!!!
For just two partitions make the WM7 partition primary.
Thanks thanks thanks....
ChitownWingMan said:
Here is what I now have on a 16 GB Class 10 SD Card
Partition # File System Capacity Type
1 FAT-32 3.91GB Primary (Android Boot Parition)
2 EXT-2 3.52GB Primary (Android A2SD partition)
3 Other 7.32GB Logical (Windows Mobile 7 partition)
Android boots and sees the SD card. Windows Mobile 7 boots and sees the SD card!!!!
For just two partitions make the WM7 partition primary.
Thanks thanks thanks....
Click to expand...
Click to collapse
glad you got it working
ChitownWingMan said:
Here is what I now have on a 16 GB Class 10 SD Card
Partition # File System Capacity Type
1 FAT-32 3.91GB Primary (Android Boot Parition)
2 EXT-2 3.52GB Primary (Android A2SD partition)
3 Other 7.32GB Logical (Windows Mobile 7 partition)
Android boots and sees the SD card. Windows Mobile 7 boots and sees the SD card!!!!
For just two partitions make the WM7 partition primary.
Thanks thanks thanks....
Click to expand...
Click to collapse
I installed WM7 on NAND, and Android 2.3.4 on SD Card. I followed the original steps as mentioned in this thread above, and have run into the same issue. That is, android is not able to recognize the SD Card. Now, my question is that can I just format (and delete) the first half of the sd card (the one that has android) .. and then create one Fat-32 and one ext-2 partition on that .. Will that work? I am trying to understand if I need to upset my windows installation at all ..
Also, I need to understand the role of Partition 1 and partition 2 above. I was of the understanding that the "Android" folder (ROM Files) should be loaded to the Fat32 partition. However, in this case it seems that the ROM files are kept in ext2 partition instead?
Thanks in advance, for your help
Can't get WP7 partitions created on reset
I have the US T-mobile HD2 loaded with WP7 7592 Green Mango with market place ROM and it runs fine on a 2GB Samsung card. I also have a class 4 Adata 32 GB card that I have a 14.4 GB FAT32 partition created for Android, and that runs without issue. I have tried a bunch of different ways to get it to dual boot but have had no success. I tried lots of ways including these:
http://forum.xda-developers.com/showthread.php?t=1167659
and
http://forum.xda-developers.com/showthread.php?t=913815
and
http://www.engadget.com/2011/01/24/h...roid-promises/
and
http://www.youtube.com/watch?v=JTHRAUHZHlo
The main issue is that when I have tried doing the phone reset on WP7 NAND it doesn't seem to create the necessary partitions on the 32 GB card any way I try, and I've tried loading WP7 ROM with the 32GB card in the phone. But whenever I boot up WP7 with the 32GB card in the phone it says: storage card not working, so I boot up with 2GB card in phone, select reset and right before I click the the last confirmation I switch the cards, but after going into Magldr on boot up and putting card into PC the new partitions haven't been created. I also tried splitting the last part of the drive into a 203 MB Fat 16 drive located just right of FAT32 partition and then creating unformatted partition with remaining space. I have 2 card readers and 2 2GB cards and the 32GB card. Please tell me what I should try next. Thanks so much!
PHONE: T-Mobile US HTC HD2 (1024 Mb)
HSPL: 2.08.HSPL RADIO: Radio 2.15.50.xx
MAGLDR: MAGLDR 1.13 CWM v3.0.2.4 170MB recovery
WP7 ROM (NAND[http://forum.xda-developers.com/showthread.php?t=1157535])
Android version I'm using[Copes_AOSP_SD_HD2_GB232-CM7_A2SD_(04-02-2011)]
Android version I'd like to use[miuiandroid-1.8.5_HD2-EN-PACK1_2.3.5]
if i have read this right, this is not a dual boot problem, but a "I can't get WP7 to work with my 32GB sd card" problem.
It may be your card is not compatible with WP7
32 GB WP7 Compatible Cards
I guess that's right, but I have looked through posts and not found any list of 32GB class 4 or higher cards that are compatible. It seems that a lot of people are recommending sandisk cards. If that is the brand I need to go with I can. Thanks for the correction.

move files to sd card via symbolic links

Hello,
for quite some time now I have been trying to move data from my internal memory to the sd card, as my internal memory is always filled to the brim.
As apps like Link2SD have either not worked or randomly stopped working, I want to take the same approach as I would on a Linux machine; Just making symbolic links.
The problem I am having is that I seemingly cannot make a symbolic link to my FAT32 formatted sd card. When formating the sd card to something else, like EXT4, the system doesn't mount it automatically anymore.
There is of course also the option to change the mountpoint of the sd card to /data/, but that of course doesn't work on a running system.
Long story short: How would I go about changing the mountpoints? On normal Linux systems you could edit the "fstab" file, but on my android system there is multiple fstab files which all have different rules inside; None of which fit the actual mountoptions that are seen in "mount".
I would like to keep to the official rom, as I have gotten quite used to it over the years and don't want to wipe my data to install something else.
Of course I have full access to all partitions. (at least as far as I know). I know my way around systems like debian and ubuntu, but have fairly little idea about android.
Well it is not possible to do that i think, FAT32 with ext4? No not possible, also a SD card can't be formatted to ext4 easily (Only works on some models of SD cards), but you can do a few things here:
1. Get a EMMC upgrade from local repair shops with all the data backed up from the old EMMC
2. Try other apps to link SD cards
3. Get a better/compatible SD card
4. You can actually use the built-in tool to do that, take a look: https://mobiletrans.wondershare.com/xiaomi/move-apps-to-sd-card-xiaomi.html
Hope this helps! If it doesn't, get back to us with some more details.
Happy Hacking!

Categories

Resources