Format EMMC without Adapter

Post Reply
ernieg
Posts: 7
Joined: Fri Oct 07, 2016 5:03 am
languages_spoken: english
ODROIDs: c2
Has thanked: 0
Been thanked: 0
Contact:

Format EMMC without Adapter

Unread post by ernieg » Thu Dec 22, 2016 12:23 am

Hello world!

Moderator please move this thread if I have posted this in the wrong section, or point me to the right location if this has already been asked.
I have misplaced my EMMC adapter and I would hate to spend more money to replace it. :roll:
Is there a way to boot from USB thumb drive/Micro SD first to then target format EMMC without the adapter?
Or... If it's easier..is there is a way to format/reinstall another Operating System within ANDROID? :D

In addition, does anyone know if I would be able to update to Android 6 (when the testing is done) from the ODROID tools app or would this require a format/reinstall of OS?

I'm currently Running ODROID C2 with Android 5.x and a 16gb EMMC.

Thanks for your help!

-Ernie

User avatar
odroid
Site Admin
Posts: 33398
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 409 times
Been thanked: 464 times
Contact:

Re: Format EMMC without Adapter

Unread post by odroid » Thu Dec 22, 2016 10:22 am

ODROID board has no ability to boot from USB storage.
It is not possible to boot from SD card if you plug the eMMC module.
So you must need the eMMC adapter board. Sorry about that.

rpcameron
Posts: 278
Joined: Sat Apr 30, 2016 7:24 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Format EMMC without Adapter

Unread post by rpcameron » Thu Dec 22, 2016 11:13 am

Can you presently boot the eMMC? If so, create a bootable SD card, insert it into the C2, but boot from the eMMC.

Then, modify the boot.ini on the SD card to reference /dev/mmcblk1 instead of /dev/mmcblk0. Then wipe the initial part of the eMMC with

Code: Select all

# dd if=/dev/zero of=/dev/mmcblk0 bs=1M count=1
This will wipe the partition layout and boot code from the eMMC, forcing the C2 to look to the SD card for the uboot image to load/boot.

Then you can reboot the C2, and it should boot from the SD card (which is still /dev/mmcblk1), and from that image you can then use

Code: Select all

# fdisk /dev/mmcblk0
to create a new partition on your eMMC.

User avatar
mad_ady
Posts: 7381
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 359 times
Been thanked: 258 times
Contact:

Re: Format EMMC without Adapter

Unread post by mad_ady » Thu Dec 22, 2016 3:00 pm

No, wait! I'm not sure the c2 will try to boot from sd if emmc is blank. I'll try to test this once I have a spare emmc.
What OS do you have on the emmc and can you still boot it?
If it's android and you can boot, here's what I'd try:
1. Boot from emmc
2. Plug in a usb with your desired os image
3. Go into terminal and remount /data and /cache readonly. Take note if apps start crashing...
4. Use dd to write the image to the emmc. Note that you only get one chance. Once it's written wait 30s and pull the plug

rpcameron
Posts: 278
Joined: Sat Apr 30, 2016 7:24 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Format EMMC without Adapter

Unread post by rpcameron » Fri Dec 23, 2016 9:25 am

All right, I now have a definitive answer, since I just did this on my C2 with an SD card and eMMC. This is assuming that you can boot from the eMMC.
  1. Prepare an SD card with a bootable Linux image. (Do not modify the /boot/boot.ini, this is unnecessary.)
  2. Insert the bootable SD card into the C2.
  3. Boot the C2 from its eMMC.
  4. After booting, wipe the beginning of the eMMC of U-Boot and its partition table with:

    Code: Select all

    # dd if=/dev/zero of=/dev/mmcblk0 bs=1M count=1
  5. Reboot the C2.
  6. The C2 will now reboot, and since the eMMC is wiped, it will boot from the SD card.
  7. Once booted, the SD card is now /dev/mmcblk0, and the eMMC is /dev/mmcblk1. You can now format, wipe, image or whatever the eMMC.
Hope this helps. However, I am certain that this works, because I just did it. If the C2 cannot read U-Boot from the eMMC, it will then check the SD card. And, once it boots, the SD card becomes /dev/mmcblk0 and the eMMC is /dev/mmcblk1.

So there you have it. As long as U-Boot isn't found on the eMMC, the C2 will then boot the SD card, and the eMMC will become the second device.

ernieg
Posts: 7
Joined: Fri Oct 07, 2016 5:03 am
languages_spoken: english
ODROIDs: c2
Has thanked: 0
Been thanked: 0
Contact:

Re: Format EMMC without Adapter

Unread post by ernieg » Fri Dec 23, 2016 10:34 am

Thanks for the quick replies. I will test this on my c2 when I get back from holiday. My c2 can boot from the emmc just fine, I just lost the small adapter in order to target format it from my PC. Now I will just have to figure out how to get the image of libreelec operating system installed to the emmc from the SD card once I rebuild the partition on the emmc.

Would Ubuntu be the best os to boot from the SD once the emmc boot partition is wiped?

Ok thanks everyone!! Now to find a tutorial on how to rebuild the partion table on the emmc and research how to install the image of libreelec image onto it. :/

User avatar
rooted
Posts: 7277
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 465 times
Been thanked: 129 times
Contact:

Re: Format EMMC without Adapter

Unread post by rooted » Fri Dec 23, 2016 10:47 am

rpcameron wrote:All right, I now have a definitive answer, since I just did this on my C2 with an SD card and eMMC. This is assuming that you can boot from the eMMC.
  1. Prepare an SD card with a bootable Linux image. (Do not modify the /boot/boot.ini, this is unnecessary.)
  2. Insert the bootable SD card into the C2.
  3. Boot the C2 from its eMMC.
  4. After booting, wipe the beginning of the eMMC of U-Boot and its partition table with:

    Code: Select all

    # dd if=/dev/zero of=/dev/mmcblk0 bs=1M count=1
  5. Reboot the C2.
  6. The C2 will now reboot, and since the eMMC is wiped, it will boot from the SD card.
  7. Once booted, the SD card is now /dev/mmcblk0, and the eMMC is /dev/mmcblk1. You can now format, wipe, image or whatever the eMMC.
Hope this helps. However, I am certain that this works, because I just did it. If the C2 cannot read U-Boot from the eMMC, it will then check the SD card. And, once it boots, the SD card becomes /dev/mmcblk0 and the eMMC is /dev/mmcblk1.

So there you have it. As long as U-Boot isn't found on the eMMC, the C2 will then boot the SD card, and the eMMC will become the second device.
This belongs on the wiki, I have seen this question asked several times.

Good job.

rpcameron
Posts: 278
Joined: Sat Apr 30, 2016 7:24 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Format EMMC without Adapter

Unread post by rpcameron » Fri Dec 23, 2016 10:54 am

ernieg wrote:Thanks for the quick replies. I will test this on my c2 when I get back from holiday. My c2 can boot from the emmc just fine, I just lost the small adapter in order to target format it from my PC. Now I will just have to figure out how to get the image of libreelec operating system installed to the emmc from the SD card once I rebuild the partition on the emmc.

Would Ubuntu be the best os to boot from the SD once the emmc boot partition is wiped?

Ok thanks everyone!! Now to find a tutorial on how to rebuild the partion table on the emmc and research how to install the image of libreelec image onto it. :/
You don't need to rebuild the partition, since usually installing OE/LE is done by copying the image file to the disk. If you do an install via "dd", then the image to put onto the disk will include a partition map.

Personally I prefer Arch, and that is what I tested with.

For LE, after you download/untar the image file:

Code: Select all

# dd if=LibreELEC-Odroid_C2.aarch64-7.1.1_Dec.Fixed.img of=/dev/mmcblk1

User avatar
odroid
Site Admin
Posts: 33398
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 409 times
Been thanked: 464 times
Contact:

Re: Format EMMC without Adapter

Unread post by odroid » Fri Dec 23, 2016 10:56 am

Thank you for the great guide.

But I have a concern.
If the eMMC has a working boot loader with corrupted kernel/rootfilesystem, C2 will not boot from SD card.
So the user needs to have a reader/adapter or USB-UART to erase the boot-sector of eMMC on u-boot prompt.

ernieg
Posts: 7
Joined: Fri Oct 07, 2016 5:03 am
languages_spoken: english
ODROIDs: c2
Has thanked: 0
Been thanked: 0
Contact:

Re: Format EMMC without Adapter

Unread post by ernieg » Fri Dec 23, 2016 11:03 am

odroid wrote:Thank you for the great guide.

But I have a concern.
If the eMMC has a working boot loader with corrupted kernel/rootfilesystem, C2 will not boot from SD card.
So the user needs to have a reader/adapter or USB-UART to erase the boot-sector of eMMC on u-boot prompt.
My c2 boots android from the emmc just fine, I just want to install libreelec over it. Are you saying by wiping the beginning of the eMMC of U-Boot and its partition table i t will corrupt my kernel/rootfilesystem ?? Or are you just saying you can't do the above if you have a corrupt kernel/filesystem?? Thanks!!

User avatar
odroid
Site Admin
Posts: 33398
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 409 times
Been thanked: 464 times
Contact:

Re: Format EMMC without Adapter

Unread post by odroid » Fri Dec 23, 2016 12:06 pm

If the eMMC has working bootloader/Android, C2 will not boot from SD card.

Erase the eMMC boot sector on Android terminal with DD command and try to boot from Ubunut SD card.
And write the LibreElect image in the SD-Card to the eMMC.

rpcameron
Posts: 278
Joined: Sat Apr 30, 2016 7:24 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Format EMMC without Adapter

Unread post by rpcameron » Fri Dec 23, 2016 3:35 pm

odroid wrote:Thank you for the great guide.

But I have a concern.
If the eMMC has a working boot loader with corrupted kernel/rootfilesystem, C2 will not boot from SD card.
So the user needs to have a reader/adapter or USB-UART to erase the boot-sector of eMMC on u-boot prompt.
Correct. If the eMMC has U-Boot installed, it will not boot from the SD card. That was why in my example the first thing I did was zero out the first MB of the eMMC; that includes not just the partition table, but U-Boot, too.

The partition table is actually the first 8kb of the eMMC (assuming MBR). I'm not exactly certain how big it is, but you could probably do something like:

Code: Select all

# dd if=/dev/zero of=/dev/mmcblk1 bs=1024 seek=8 count=1016
This would wipe the first MB, except for the first 8kb which hold the partition table.

In reference to corrupted kernel/rootfs: The original question was not about repairing a corrupted rootfs. It was about being able to format the eMMC while installed in the C2. What I have done is shown how to wipe the boot loader from the eMMC to allow booting from the SD card while the eMMC is still installed in the C2, using the SD card as the new rootfs. Yes, a reader/adapter is needed to write the SD card, but the OP seemed to indicate that they had such a device; the problem was the eMMC, and the OP was missing the eMMC->SD card adapter.

rpcameron
Posts: 278
Joined: Sat Apr 30, 2016 7:24 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Format EMMC without Adapter

Unread post by rpcameron » Fri Dec 23, 2016 3:38 pm

odroid wrote:If the eMMC has working bootloader/Android, C2 will not boot from SD card.

Erase the eMMC boot sector on Android terminal with DD command and try to boot from Ubunut SD card.
And write the LibreElect image in the SD-Card to the eMMC.
Or, if you would rather use the kernel/rootfs from the SD card, but keep the boot loader on the eMMC, you could boot the eMMC, and then modify its /boot/boot.ini, such that the command line for the kernel will reference /dev/mmcblk1 for its rootfs instead of mmcblk0. Also, the "load mmc 0:1" statements would need to be changed to "load mmc 1:1" to reference the second device's first partition, which would be SD card if using the eMMC's U-Boot.

rpcameron
Posts: 278
Joined: Sat Apr 30, 2016 7:24 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Format EMMC without Adapter

Unread post by rpcameron » Fri Dec 23, 2016 3:44 pm

ernieg wrote:
odroid wrote:Thank you for the great guide.

But I have a concern.
If the eMMC has a working boot loader with corrupted kernel/rootfilesystem, C2 will not boot from SD card.
So the user needs to have a reader/adapter or USB-UART to erase the boot-sector of eMMC on u-boot prompt.
My c2 boots android from the emmc just fine, I just want to install libreelec over it. Are you saying by wiping the beginning of the eMMC of U-Boot and its partition table i t will corrupt my kernel/rootfilesystem ?? Or are you just saying you can't do the above if you have a corrupt kernel/filesystem?? Thanks!!
Technically, you will be wiping the bootloader and partition table, but the filesystems will technically still be there.

Regardless, if you have an SD card you can boot if you remove the eMMC, then after wiping the bootloader from the eMMC you can use that same SD card to boot the C2 without modification. Then you can use that rootfs to manipulate the eMMC.

I did not realize that your eMMC was Android, so I am uncertain if you have root access and dd available under Android; if not then I am not sure what you want is possible. However, if you do have root access and can use dd from Android, then this should work without problem. The only difference may be the device names of the eMMC and SD card; I am not certain how the kernel will reference them under Android if it differs.

ernieg
Posts: 7
Joined: Fri Oct 07, 2016 5:03 am
languages_spoken: english
ODROIDs: c2
Has thanked: 0
Been thanked: 0
Contact:

Re: Format EMMC without Adapter

Unread post by ernieg » Fri Dec 23, 2016 4:22 pm

odroid wrote:If the eMMC has working bootloader/Android, C2 will not boot from SD card.

Erase the eMMC boot sector on Android terminal with DD command and try to boot from Ubunut SD card.
And write the LibreElect image in the SD-Card to the eMMC.
Thank you all for your support and time invested into my questions!!

Are you able to tell me if the terminal commands and names of the devices are the same on android that rpcameron so kindly referenced for arch linux?

So from what I gathered so far and correct me if I am wrong.. In order to accomplish what I am trying to do...

1. I will first install the Ubuntu Linux image on the SD card
2. Boot the android 5.x from the emmc card with the SD card on the c2 as well.
3. Open the terminal from android and since it is rooted I will then have to remove the emmc uboot boot sector.
4. Reboot the c2, cross fingers and pray that it boots from the ubuntu image on the SD card.
5. If booted into Ubuntu sucessfully, then I will have to just install the image onto the emmc.
6. Turn off c2 and remove SD card and pray that c2 boots libreelec image off emmc.

Now.. I just need the correct commands and names of the devices and the system commands by under the android system and ubuntu.

User avatar
mad_ady
Posts: 7381
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 359 times
Been thanked: 258 times
Contact:

Re: Format EMMC without Adapter

Unread post by mad_ady » Fri Dec 23, 2016 4:47 pm

That's correct, only that I would insert the sd card after step 3 to save you from confusion in android

boggn
Posts: 7
Joined: Tue Jul 05, 2016 2:51 am
languages_spoken: english
ODROIDs: XU4, C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Format EMMC without Adapter

Unread post by boggn » Sun Jan 08, 2017 6:07 am

There is actually another, risky way.
I did this because none of my devices would read the eMMC adaptor.

Install something usefull on the mSD (like the ubuntu image).
Put it in the C2, the C2 should be powerless at the moment.
The eMMC in your fingers and power the C2.
After about 1 second, put the eMMC on the C2.
***warning, this could damage the C2 and the eMMC!!!***
If you were successful, the C2 boots from the mSD and the eMMC is also mountable/read- and writeable.

I was lucky a few times, nothing was damaged.

User avatar
mad_ady
Posts: 7381
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 359 times
Been thanked: 258 times
Contact:

Re: Format EMMC without Adapter

Unread post by mad_ady » Sun Jan 08, 2017 4:16 pm

So you need to plug the emmc after uboot and before kernel boot? Is it seen if you plug it after os start?

User avatar
rooted
Posts: 7277
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 465 times
Been thanked: 129 times
Contact:

Re: Format EMMC without Adapter

Unread post by rooted » Mon Jan 09, 2017 12:14 am

Is booting from eMMC/SD controlled by uboot or BL1/2?

rpcameron
Posts: 278
Joined: Sat Apr 30, 2016 7:24 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Format EMMC without Adapter

Unread post by rpcameron » Wed Jan 11, 2017 8:22 am

The uboot is first looked for on the eMMC. If it is not found there, it is looked for on the microSD card. Whichever device has uboot becomes /dev/mmcblk0 and the other becomes /dev/mmcblk1.

So if your eMMC does not have uboot, it does not matter if it is attached before boot. If it does, make sure you have a bootable microSD card, and then erase the first kilobyte or so of the eMMC to wipe uboot from it, ensuring that uboot from the microSD is read at the next boot.

Manikandan
Posts: 52
Joined: Tue Feb 28, 2017 2:51 pm
languages_spoken: english
ODROIDs: ODROID C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Format EMMC without Adapter

Unread post by Manikandan » Fri May 04, 2018 4:50 pm

odroid wrote:Thank you for the great guide.

But I have a concern.
If the eMMC has a working boot loader with corrupted kernel/rootfilesystem, C2 will not boot from SD card.
So the user needs to have a reader/adapter or USB-UART to erase the boot-sector of eMMC on u-boot prompt.
So Boot loader and kernel/rootfilesystem needs to working fine otherwise we need to have a reader/adapter or USB-UART for formating eMMC, right?

User avatar
odroid
Site Admin
Posts: 33398
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 409 times
Been thanked: 464 times
Contact:

Re: Format EMMC without Adapter

Unread post by odroid » Fri May 04, 2018 6:05 pm

Yes.

Manikandan
Posts: 52
Joined: Tue Feb 28, 2017 2:51 pm
languages_spoken: english
ODROIDs: ODROID C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Format EMMC without Adapter

Unread post by Manikandan » Fri May 04, 2018 6:29 pm

odroid wrote:Yes.
Thanks for your response.

Manikandan
Posts: 52
Joined: Tue Feb 28, 2017 2:51 pm
languages_spoken: english
ODROIDs: ODROID C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Format EMMC without Adapter

Unread post by Manikandan » Fri May 04, 2018 7:40 pm

Manikandan wrote:
odroid wrote:Yes.
Thanks for your response.Is there any possibility to put OS through OTG Port in Odroid C2
Last edited by Manikandan on Fri May 04, 2018 7:52 pm, edited 1 time in total.

User avatar
odroid
Site Admin
Posts: 33398
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 409 times
Been thanked: 464 times
Contact:

Re: Format EMMC without Adapter

Unread post by odroid » Fri May 04, 2018 7:50 pm

No way.

Manikandan
Posts: 52
Joined: Tue Feb 28, 2017 2:51 pm
languages_spoken: english
ODROIDs: ODROID C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Format EMMC without Adapter

Unread post by Manikandan » Fri May 04, 2018 7:59 pm

Thanks for your suggestion.

ickam
Posts: 19
Joined: Mon Oct 08, 2018 5:46 pm
languages_spoken: english, polish
ODROIDs: C2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Format EMMC without Adapter

Unread post by ickam » Wed Feb 12, 2020 8:42 pm

rpcameron wrote:
Fri Dec 23, 2016 9:25 am
All right, I now have a definitive answer, since I just did this on my C2 with an SD card and eMMC. This is assuming that you can boot from the eMMC.
  1. Prepare an SD card with a bootable Linux image. (Do not modify the /boot/boot.ini, this is unnecessary.)
  2. Insert the bootable SD card into the C2.
  3. Boot the C2 from its eMMC.
  4. After booting, wipe the beginning of the eMMC of U-Boot and its partition table with:

    Code: Select all

    # dd if=/dev/zero of=/dev/mmcblk0 bs=1M count=1
  5. Reboot the C2.
  6. The C2 will now reboot, and since the eMMC is wiped, it will boot from the SD card.
  7. Once booted, the SD card is now /dev/mmcblk0, and the eMMC is /dev/mmcblk1. You can now format, wipe, image or whatever the eMMC.
I take it, the wiping command requires root privilidges? I'm asking because I had to remove my su binaries for one of the apps to work.

User avatar
mad_ady
Posts: 7381
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 359 times
Been thanked: 258 times
Contact:

Re: Format EMMC without Adapter

Unread post by mad_ady » Wed Feb 12, 2020 9:00 pm

Yes, you'll need to be root to wipe it.

ickam
Posts: 19
Joined: Mon Oct 08, 2018 5:46 pm
languages_spoken: english, polish
ODROIDs: C2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Format EMMC without Adapter

Unread post by ickam » Wed Feb 12, 2020 10:24 pm

mad_ady wrote:
Wed Feb 12, 2020 9:00 pm
Yes, you'll need to be root to wipe it.
Would you know of a way to reroot the C2?

User avatar
mad_ady
Posts: 7381
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 359 times
Been thanked: 258 times
Contact:

Re: Format EMMC without Adapter

Unread post by mad_ady » Wed Feb 12, 2020 10:55 pm

You can't attach the C2's storage to an external system, right? Because you don't have the adapter?

ickam
Posts: 19
Joined: Mon Oct 08, 2018 5:46 pm
languages_spoken: english, polish
ODROIDs: C2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Format EMMC without Adapter

Unread post by ickam » Thu Feb 13, 2020 12:01 am

mad_ady wrote:
Wed Feb 12, 2020 10:55 pm
You can't attach the C2's storage to an external system, right? Because you don't have the adapter?
That is right.

User avatar
mad_ady
Posts: 7381
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 359 times
Been thanked: 258 times
Contact:

Re: Format EMMC without Adapter

Unread post by mad_ady » Thu Feb 13, 2020 1:12 am

Not sure how you can root it, but if you connect through adb/microusb you should get a root shell.

ickam
Posts: 19
Joined: Mon Oct 08, 2018 5:46 pm
languages_spoken: english, polish
ODROIDs: C2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Format EMMC without Adapter

Unread post by ickam » Thu Feb 13, 2020 4:59 am

mad_ady wrote:
Thu Feb 13, 2020 1:12 am
Not sure how you can root it, but if you connect through adb/microusb you should get a root shell.
Even when my su binaries have actually been removed?

User avatar
mad_ady
Posts: 7381
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 359 times
Been thanked: 258 times
Contact:

Re: Format EMMC without Adapter

Unread post by mad_ady » Thu Feb 13, 2020 5:30 am

I think so, yes. It runs as uid 0

User avatar
tobetter
Posts: 4589
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 84 times
Been thanked: 327 times
Contact:

Re: Format EMMC without Adapter

Unread post by tobetter » Thu Feb 13, 2020 7:43 am

FYI, if you are able to get into U-boot shell, you can run ums 0 mmc 0 or ums 0 mmc 1. This command will attach the C2 to your desktop as a USB Storage when both are connected through USB cable.

ickam
Posts: 19
Joined: Mon Oct 08, 2018 5:46 pm
languages_spoken: english, polish
ODROIDs: C2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Format EMMC without Adapter

Unread post by ickam » Thu Feb 13, 2020 10:45 pm

mad_ady wrote:
Thu Feb 13, 2020 5:30 am
I think so, yes. It runs as uid 0
I think I was able to perform the command, but my question is: should I still be able to see my Android's internal storage from Windows Explorer while C2 is plugged into my laptop?
Also tobetter, while I imagine it's too late to get into the uboot shell, I'll still ask out of curiosity: how do I get into the uboot shell?

ickam
Posts: 19
Joined: Mon Oct 08, 2018 5:46 pm
languages_spoken: english, polish
ODROIDs: C2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Format EMMC without Adapter

Unread post by ickam » Fri Feb 14, 2020 10:15 pm

Nope, my odroid is still booting to Android
@tobetter could you instruct me on how to get into u-boot shell?

User avatar
tobetter
Posts: 4589
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 84 times
Been thanked: 327 times
Contact:

Re: Format EMMC without Adapter

Unread post by tobetter » Fri Feb 14, 2020 11:28 pm

ickam wrote:
Fri Feb 14, 2020 10:15 pm
Nope, my odroid is still booting to Android
@tobetter could you instruct me on how to get into u-boot shell?
You can get into U-boot shell easily if you have USB-to-serial cable.

Sorry, I've read you post a couple of times but not sure exactly what you are going to do. Since what you said is that I'm asking because I had to remove my su binaries for one of the apps to work, this means that you still want to boot Android...right? Then why do you want to wipe or format your eMMC? Or do you want to install another OS to eMMC?

ickam
Posts: 19
Joined: Mon Oct 08, 2018 5:46 pm
languages_spoken: english, polish
ODROIDs: C2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Format EMMC without Adapter

Unread post by ickam » Sat Feb 15, 2020 12:54 am

I want to install another os on it now.
I take it serial is my only option then?

User avatar
tobetter
Posts: 4589
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 84 times
Been thanked: 327 times
Contact:

Re: Format EMMC without Adapter

Unread post by tobetter » Sat Feb 15, 2020 1:28 am

ickam wrote:
Sat Feb 15, 2020 12:54 am
I want to install another os on it now.
I take it serial is my only option then?
Ok, this is the way to connect your eMMC to PC using a micro USB cable and assuming that you can boot to Android. Please do this at your own risk.

1. Open "Terminal Emulator" in the Android launcher
2. Do run su in the terminal and edit boot.ini to add ums mmc 0 using vi and save it. So eventually the first 3 lines in the file must look like this.

Code: Select all

ODROIDC2-UBOOT-CONFIG

ums mmc 0

blahblah...blahblah...
3. If you are not familiar to use vi, alternatively you can run the commands in the terminal.

Code: Select all

# cat>/internal/boot.ini<<EOF
ODROIDC2-UBOOT-CONFIG

ums mmc 0
EOF
4. Once you made a change in /internal/boot.ini, make sure that you have the change.

Code: Select all

# cat /internal/boot.ini
5. If you are sure, reboot your Android and attach the micro USB cable to your PC.
6. After rebooting, you C2 will stuck at the Hardkernel logo on your display but actually your C2 must be connected to your PC as a USB storage device.

If you are able to see USB storage devices, you must be having 4 new volumes from C2, you can flash an OS image to your eMMC using Ether.

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 4 guests