Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Building my own 64GB memory card with a $6 eMMC chip (2016) (ripitapart.com)
170 points by nfriedly on March 28, 2018 | hide | past | favorite | 50 comments


Given the compatibility between SD/MMC, one thing I'd like to see on the market, but haven't, is an Android phone which has no "internal storage" to speak of, but instead replaces the soldered-in eMMC with a microSD socket. That would make expanding, brick-recovery, as well as backing up and controlling access to the data very easy; like taking the hard drive out of a computer before giving it to someone else.

It's not difficult at all to do from the hardware perspective, but no one seems to have produced such a thing on the mass market.


You dont need a hw mod, all you need is an Android phone with a sdcard slot and the option to do raw read/write to the embedded flash from the bootloader as you WILL fuck up many times during experimentation. Havent tried with qualcomm stuff, but successfully converted my Mediatek-based CAT B15Q to sdcard-only.

All you need to modify is /etc/fstab, /init.rc (or, in some cases, /init.XYZ.rc), split the sdcard into three partitions (OS, /data, /sdcard), copy the existing partitions from flash to the sdcard et voila.


Actually, now that I think about it, there was an Android Tablet that had some common mods to do this. The ASUS TF101 had incredibly slow internal storage.

A number of ROMs supported "inverted storage" that put the main OS onto the SD card for performance reasons.


To a lesser extent there is Link2SD:

https://play.google.com/store/apps/details?id=com.buak.Link2...

If you have rooted your device, and partition your SD card, it can mount one such partition so that it supplies the app storage.


and the option to do raw read/write to the embedded flash

To use PC bootloader terminology, that's chainloading. The SoC still starts from internal storage first, then switches to SD. My comment was about making a phone without internal storage at all, i.e. SoC boots directly from SD.


To continue that analogy, you still need a BIOS


All ARM SoCs to my knowledge know enough about their peripherals to get a bootloader off an SD card, so the BIOS/first-user-replacable-code-to-run could easily come from there instead of the storage that's soldered to the motherboard.


It's not magic -- the SoCs have code stored in ROM or some external peripheral for initialization.


Aha! Surely this turtle is the bottom!


I would love to read more about your experiments! any chance for a blog post?


If you have root, just replace init with something like that:

    #!/bin/sh
    mount /dev/mmcblk1p1 /root
    exec chroot /root /bin/init


although you probably want `|| sh`


It's spread somewhere either on xda or some obscure german board. Let me see if I can find it in the evening, I'll reply here when I find it.


Any idea if this could work on any of the hardware CopperheadOS supports (Nexus Pixel) in order to support dual booting easily with vanilla Android?


eMMC is actually really different than SD in ways that matter for mobile devices. For example, eMMC supports a very low level hardware booting sequence (boot ROMs on SoCs can clock in data without needing a driver to initialize the eMMC device). Software drivers for MMC and SD add a lot of complexity. They need to query the device determine if it is eMMC, MMC, SD and then query the card status and properties and support quirky cards. MMC and SD have different specifications and initialization state machines (even though there is some overlap). I am not even going to mention secure boot. This is way much more complex than you might think.


For example, eMMC supports a very low level hardware booting sequence (boot ROMs on SoCs can clock in data without needing a driver to initialize the eMMC device).

I know about that feature but the SoCs that use it are usually very primitive and not those in smartphones and the like, which have a much more featureful boot ROM. Keep in mind that even the Raspberry Pi can boot from SD, and that's not even a very powerful SoC. The MTK SoCs which I'm more familiar with have a boot ROM that supports booting from (e)MMC/SD, NAND, and USB/UART (for recovery). TI's OMAP series are similar:

http://processors.wiki.ti.com/index.php/OMAP-L138_Preparing_...


Freescale/NXP i.MX can too. The Novena has no soldered storage at all.


even if you get past all the issues that spicymaki mentioned, you'd still run into the issue that most sd cards have absolutely atrocious performance for being used as something like the boot drive for a computer. even the good micro sd cards are pretty terrible compared to the internal storage in your average smartphone.

if using a really slow tablet or phone appeals to you, roll your own tablet with a raspberry pi, touchscreen, battery, and micro sd card.


The problem is solved if you just put a signed verifying bootloader (incl. TPM) on one and use full disk encryption and the real disk for the rest.

Put in some normal install too and here you have a device that can be cursory checked by TSA.


The problem with this approach is that the flash chips that get used in SD / microSD cards are really bottom of the barrel stuff. It's going to be painfully slow and is practically guaranteed to crap out on you eventually if you use it as a primary volume for long enough. They're built to be as cheap as possible, and last a few hundred cycles of getting filled with images and erased, not thousands/millions of tiny writes.

Raspberry Pi users can probably attest to this.


I had a phone that (almost) worked like this way back in 2010. It wasn't an Android phone though, Dell Venue Pro running Windows Phone 7. All the user-facing storage was in the form of an SD card but there was actually a smallish amount of onboard storage that was used to flash the OS image when you inserted a blank card. There was also some sort of device-specific encryption key preventing you from moving cards between phones without reformatting.


That would solve the TSA search issue. Just carry two microsd cards.


I would happily buy such a device with cold hard cash, phone or tablet (or both!). I wonder how much more likely this would make devices easier to install alternate OS' on top of?


Funny to read this, as the original scheme for Android was the OS and apps on emmc, user data on SD card.

But then later some OEMs came up with partitioning the emmc and mounting one part in place of the SD card.

Later still Google codified this hack by mounting a vfat union mount on top of a directory in /data as if it was the SD card.

All in all Android storage is a tire fire of hacks.


The Dell Streak had an internal SD card. I've also seen some cheap Android tablets which do the same.


I would purchase one of these without hesitation.

On smaller or older computers I do all work in RAM via tmpfs and mfs. I only use removable external storage for storing bootloaders, kernels with embedded filesystem and a small archive of custom software.

If I have enough RAM I can chroot and install some distribution from the internet or from some larger capacity external media, but thats optional.


This is so gloriously horrible. Please note that if you want to get the maximum speed out of an eMMC device, you need proper PCB layout: ground and power planes, decoupling caps right under the appropriate BGA balls, traces length matched and impedance controlled, etc.


A single chip will forgive a lot of mess. A big array though will not.


Maybe a dumb question: If 64GB chips are $6, why aren't we seeing terabyte-sized tablets and netbooks for $100 more than the baseline version? I would imagine the idle power draw is negligible and the extra size and weight well worth it.

Producers take the exact opposite approach, and use storage size as a price discriminator: a 64GB version might cost $300, while the 128GB is "only" $499, pure profit margin an order of magnitude higher than the cost of the actual storage.


> Maybe a dumb question: If 64GB chips are $6, why aren't we seeing terabyte-sized tablets and netbooks for $100 more than the baseline version? I would imagine the idle power draw is negligible and the extra size and weight well worth it.

> Producers take the exact opposite approach, and use storage size as a price discriminator

You're answering your own question, storage is an easy way to do price discrimination, you can provide what is essentially the same device at two different price points, play to price sensitivity and better capture income.

Same with airlines, premium is usually ~2x coach, and business is ~2.5x premium. Is there a twofold difference in airline cost? I don't think so. But it serves to capture the less price-sensitive customers (as well as those with real needs which get fucked over by economy seating).


Yes, the appeal of price discrimination on storage is evident, but a 1TB tablet has such fundamental customer value it's impossible some producers will not break ranks and offer them on the cheap - if only it's technically possible. Instead, they are priced at thousands, as specialty, low volume products.


> Yes, the appeal of price discrimination on storage is evident, but a 1TB tablet has such fundamental customer value it's impossible some producers will not break ranks and offer them on the cheap

1. 1TB tablets have no fundamental value for the vast majority of customers

2. offering 1TB tablets at storage cost would be self-defeating, the producers who would do that get significantly more money by offering tiered and price-discriminated storage just a bit below competition


These chips were low performance and limited number of write cycles. Even with a great controller (which would be expensive) you're looking at slow transfer rates. If it reaches USB 2 capabilities, you're lucky. This guy kinda was.


SD cards and eMMC chips[0] do have controller inside. Usually not a great one (tens to hundred-ish MB/s), but that's good enough - overwhelming majority of smartphones/tablets use eMMC for internal storage.

UFS/eUFS cards keep (sort of) same form-factor [1] but bring significant speed boost. [2]

[0] Technically, it is incorrect to say "eMMC chip", as there are typically two (or more) silicon chips inside the same plastic BGA package. One of them is controller.

[1] https://www.dpreview.com/news/6387181333/samsung-launches-fi...

[2] https://en.wikipedia.org/wiki/Universal_Flash_Storage#Versio...


I would love to see a 1TB iPad Pro. I'm really surprised that they haven't offered one yet.


so you could technically upgrade an ipad?



You can technically replace any chip on any device with a better, pin- and voltage- compatible chip. But you need soldering equipment easily tens of thousands of dollars.

For example, a Dell desktop I had a while back was the lowest-end SKU, and therefore they left the AGP connector off of the board, even though the BIOS knew about AGP and there were the AGP solder points/vias on the motherboard. Had I had the ability to solder the dozens of points at the same time, I could have added my own AGP slot.


I was thinking you could have a laptop company that uses the same board for a few years (for it's whole range) everything would be soldered on but could be sent back for generously priced upgrades.


There are ready-made boards for this being sold for less than $2. Just search "eMMC Adapter 153 without flash" on ebay.

153 is number of balls on the eMMC chip OP is using. You might need a different adapter for different eMMC chip.


Are there cost effective ways for hobbyists to solder BGAs? I remember back in the day, it wasn't that expensive to get an etching kit and create some single layer prototype boards but they all used through hole components. Now-a-days it doesn't seem like that kind of stuff is possible anymore.


You can get perfectly acceptable results on everything except large BGA layouts with only a toaster oven, or for smaller jobs even a hot air gun is enough.

A lot of people will insist you absolutely need a massive multi-thousand dollar peice of kit, but its nonsense, and gear of that grade is only of much use if you are doing large batch jobs and you want to minimize your failure rate, for one off projects a few percentage points either way in terms of failure rates is completely irrelivant, especially considering you can just rework it anyways.

if you want to go the full 9 yards though, you could spring for something like this and get real professional level results, for around $300ish USD + a little DIY.

http://www.whizoo.com/

And in regaurds to the boards themselves, its true you cant very easily make 4 layer PCBs with Vias and other sensitive alignment constraints at home, however the good news is that they can be ordered even cheaper than it would typically cost a home maker in materials for even single sided boards!.

https://dirtypcbs.com/store/pcbs

https://pcbshopper.com/


The very popular 858D temperature controlled hot air stations only run about 50usd. Performance is much better than a hardware store heat gun.


And it saves you having to deal with a lot of nasty chemicals, which I think is the biggest advantage.


I love seeing that kind of crazy soldering. I would have had to make an SD-shaped PCB and heat gun the part on.

Also (2016)


Thanks, we've updated the title.


We used eMMC in a design recently: I learned that the unused balls are essential for breakout on low layer count boards.


This actually might be worthwhile for ODROID or Pine owners because both of those companies demand premiums for their eMMC boards.


A lot of the bandwidth of a 'proper' SSD device comes from running a bunch of operations in parallel.


I love how these (assuming they are not fake) have at least half a billion addressable bits.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: