These patches add ext4 support for your sdcard (in the Nexus S - the internal card.) There are a number of reasons you might want to do this - performance (ext4 is faster, plus mounting ext4 is basically instantaneous, which is very nice on reboots...no more checking sdcard), it's more efficient, you get a bunch of file system security features (if you care...)
You should not apply them if you don't really know what you are doing. The patches are resonably benign. Converting your sdcard partition to ext4 is NOT NOT NOT benign and you can really hose yourself doing it.
I'm not going into great depth with these instructions. If you don't understand them, play around with building cyanogen, installing it, etc until they are crystal clear.
To swap your sdcard to ext4:
* Apply the patches and rebuild cyanogen. Rebuild it. They will change your recovery image and vold.
* Install vold and flash (and/or boot) the recovery image.
* Boot into recovery, mount your sdcard and back it up to your computer (i.e., not nandroid, copy the files.) Nandroid would be a good idea too.
* Format your media partition to ext4 (the one that is vfat, by-name is media, mine is partition 3) mkfs.ext4 can be found by googling, or you can use make_ext4fs from /system/bin. I used mkfs.ext4.
* You should be able to manually mount that.
* Push your files back.
* sync and reboot.
Et Voila, you should have an ext4 sdcard partition.
THIS IS VERY DANGEROUS.
YOU CAN REALLY HOSE YOURSELF DOING IT.
Here are the patches:
http://review.cyanogenmod.com/#change,1705
This one adds ext4 support to vold, thus allowing gingerbread to mount ext4 partitions for the sdcard (which on the Nexus S, is the 'media' partition.)
and:
http://review.cyanogenmod.com/#change,1716
This is a change to recovery, making it seamlessly mount ext4 partitions for /sdcard.
Code:
# mount
/dev/block/platform/s3c-sdhci.0/by-name/system on /system type ext4 (ro,noatime,barrier=1,data=ordered,noauto_da_alloc)
/dev/block/platform/s3c-sdhci.0/by-name/userdata on /data type ext4 (rw,nosuid,nodev,noatime,barrier=0,data=ordered)
[b]/dev/block/vold/179:3 on /mnt/sdcard type ext4 (rw,nosuid,nodev,noexec,noatime,barrier=1,data=ordered,noauto_da_alloc)[/b]
/dev/block/vold/179:3 on /mnt/secure/asec type ext4 (rw,nosuid,nodev,noexec,noatime,barrier=1,data=ordered,noauto_da_alloc)
tmpfs on /mnt/sdcard/.android_secure type tmpfs (ro,relatime,size=0k,mode=000)
....and if you turn on USB Storage, the sdcard shows up as an ext4 disk...
As expected, but this is going to be one for the Linux geeks.
Wow, it is VERY nice to have that sdcard mount instantly on boot. VERY nice.
oh the read/write speeds
If anyone is interested in playing with this, I submitted the change to cyanogen:
http://review.cyanogenmod.com/#change,1705
The tricky bit is getting the filesystem created. You can use:
/system/bin/make_ext4fs.
That leaves me with a recovery which will not currently mount sdcard as ext4 unless I fiddle with fstab and mount it myself. On to look at that.
...and, here's a patch to the recovery which will let it mount /sdcard as either ext4 or vfat, making this change reasonably seamless.
http://review.cyanogenmod.com/#change,1716
i would love to see a Quadrant or a benchmark after this
this is and awesome hack to use with App 2 SD
it'll be lag less
the only annoyance, is that if you want to MOUNT USB on a Windows PC, then you'll need a software to read EXT4
for anyone interested this will be handy
http://www.ext2fsd.com/?page_id=16
i'll definitely be doing this MOD, as i'll be running anything i can from the Internal SD
So this will only work on CM7?
Please some of the genius here may post a step-by-step tutorial or howto for this one? It will be very apreciated.
No, it will work with any build, but you need to rebuild vold in order to get it to mount. The easiest way to get them outside of the CM tree would be to build cm and then copy the vold out and use that. It should work with any ROM.
The latest versions - which are in CM's gerrit - include modifications to the sdcard utility to use fuse to mount the filesystem using FAT semantics (i.e. - bypass security). Frankly, this is a waste. It slows everything down, noticeably, and app problems are few and easily fixed if you know how to fire off a chmod.
I haven't provided step by step instructions since it can seriously hose your phone if you don't know what you are doing.
DebauchedSloth said:
No, it will work with any build, but you need to rebuild vold in order to get it to mount. The easiest way to get them outside of the CM tree would be to build cm and then copy the vold out and use that. It should work with any ROM.
The latest versions - which are in CM's gerrit - include modifications to the sdcard utility to use fuse to mount the filesystem using FAT semantics (i.e. - bypass security). Frankly, this is a waste. It slows everything down, noticeably, and app problems are few and easily fixed if you know how to fire off a chmod.
I haven't provided step by step instructions since it can seriously hose your phone if you don't know what you are doing.
Click to expand...
Click to collapse
Wait so it's a waste? It isn't worth using ?
Anderdroid said:
Wait so it's a waste? It isn't worth using ?
Click to expand...
Click to collapse
If done right this would increase the read/write speeds. For example, your boot up time would be much faster and ext4 is more effecient. So it's not a waste but it has to be done correctly otherwise is could do more damage than good
Using the version I posted to CM gerrit, which bounces the file system through fuse and mimics FAT security, is still better than FAT (IMO), but it's not nearly as fast as just mounting the filesystem as Ext4 - though it is more compatible.
I've been running mine mounted as straight ext4 for a couple of weeks. Probably the single best mod I've made to any of my phones. There are occasional app bits that I need to fix manually (such Dropbox resetting file ownership), but it's worth it for the quicker boot up and faster overall operation.
Here you find the ROM CyanogenMod 7 compiled for Nexus One with ext4 sdcard mount support:
- https://github.com/diegostamigni/nexus/tree/master/one
Is the only reason to pipe it through fuse to get it to mount on m$? If so I'm not going to bother - I only use linux almost exclusively these days
diego.stamigni said:
Here you find the ROM CyanogenMod 7 compiled for Nexus One with ext4 sdcard mount support:
- https://github.com/diegostamigni/nexus/tree/master/one
Click to expand...
Click to collapse
No version for Nexus S?
Looking forward to this develpoing, as the ext4 conversion (done via modaco rom beta2 in recoverymode) made a HUGE difference to the galaxy tab i have (halved the loading times of everything). ^^
Unfortunately im far to noob to help out though ...will be keeping a keen eye on it all and learning
Forgive my ignorance, but why don't phones come like this?
NicholasQ said:
Forgive my ignorance, but why don't phones come like this?
Click to expand...
Click to collapse
window$ more then likely.
window$ can't even see Linux file systems without special drivers installed.
if i mess this up would it brick my phone? i'm really wanting to try this but i don't want to turn my Nexus S into a paperweight
so if we did this, would the windows computer be able to read the mounted sd card? is there any other things that would be needed after this mod? or just format to ext4 and be done with it?
Related
I found tutorial how to use ext2 partition on SDCARD for haret.
http://android-devs.org/forum/viewtopic.php?f=56&t=194
I created this
2 GB Fat32
1 GB ext2
1 GB ext2
so i have 4 GB disk and 3 partition just as its on tutorial
But after launching haret it should asked me
Press VolDn to launch Installer (to use ext2)
just after the
Checking for partitions
but in my case it just continue with installing without asking me and its uning only fat32
Any suggestion???
our rootfs doesn't have the install function, someone must edit the rootfs to boot into EXT partitions first!
I just copy rootfs to the / of the ext2 and system to /system, and then edit the init script so it remounts properly.
When I start doing partitioned releases I'll try and make it easy, probably by distributing prebuilt images by card size (4G, 8G etc.)
Tremere said:
When I start doing partitioned releases I'll try and make it easy, probably by distributing prebuilt images by card size (4G, 8G etc.)
Click to expand...
Click to collapse
I talked to phh yesterday.. he said ext2 and NAND booting have no effect on stability, performance and battery life. (rhod nand booting has been working for one month)
Performance could change but it would be less than 20%.
So I pray that someone will find the standby killer
So i need only one ext2 partition
Tremere said:
and then edit the init script so it remounts properly.
Click to expand...
Click to collapse
if i knew how and what to edit. Nevermind its not that important. You just focus on your work.
Matzemink said:
I talked to phh yesterday.. he said ext2 and NAND booting have no effect on stability, performance and battery life. (rhod nand booting has been working for one month)
Performance could change but it would be less than 20%.
So I pray that someone will find the standby killer
Click to expand...
Click to collapse
True. I think they also had an incorrect mount option on the rootfs until recently that slowed loopback performance. I think my last (unstable) release contained the fix for that.
For my own AOSP device tree I'm determined to start fresh without the rootfs and loopback crap. Maybe not a big performance gain but easier to 'get around' system wise.
if i knew how and what to edit. Nevermind its not that important. You just focus on your work.
Click to expand...
Click to collapse
off the top of my head, init.etc/init.froyo.rc and there is a line which tries to mount root as yaffs (flash). Not too hard to find.
You might want to have another ext2 for /data though.
How do I partition my micro sd card?
please excuse my bad English
I use translator
The easyest way for me. Download a release of Ubuntu from ubuntu.com and burn it to cd or make bootable USB. Boot live cd and partition from there.
wouldn't it be easier to download a live CD of gparted?
Jonny4911 said:
wouldn't it be easier to download a live CD of gparted?
Click to expand...
Click to collapse
System Rescue CD is my favorite for partitioning tasks. Should work on your sdcard.
Over in the raph forum, e334 posted a guide on partitioning ext2 from Windows
I was hoping to be able to figure all of this out on my own (so that I could impress everybody with my brilliance, of course! ), but I've hit a brick wall, so I figured I would see whether anybody had any suggestions.
The short version: I'd like to be able to create an alternate and larger /osh partition that we can run Ubuntu off of so that we can install software more freely as well as not worry about any future software updates that might conflict with the partition contents.
My thought was that it should be possible to have an alternate partition to /osh that's used to run from (whether it's mounted on /osh or not is largely irrelevant).
However, the problem I'm hitting up against is a matter of timing. The best entry point I've found to modify behaviour is /system/bin/mountosh when it's called by /init.rc, especially since it's responsible for most of the webtop setup. The catch is that by the time mountosh is called, the only partitions mounted are through p16, meaning that internal storage (p18) isn't available and the SD card (mmcblk1) isn't available either, meaning that there's no way to use either (a loopback file on the former, a partitioned SD card for the latter). I suppose it would theoretically be possible to create a loopback file on p16 (data), but that's only 2 GB and would conflict with other uses.
Does anybody know how to force internal storage and/or the SD card to be mounted earlier? Or is this going to require hacking a kernel (and bootloader and...) that we don't have the source code to yet? If I can get past this piece, then I'll be able to help other users get a webtop that would be in much better shape (especially since this would let us start using apt without having to worry so much about space issues). Thanks!
I am not sure off hand at the moment, but you might have a look at /etc/fstab and see if you can have the sdcard mounted earlier there. While having it mounted earlier may have some unexpected side effects; I presume the driver for the sd card reader is compiled into the kernel, so I don't see a reason it can't be mounted earlier.
But, not having an atrix anymore I can't test this outright.
Fenny said:
I am not sure off hand at the moment, but you might have a look at /etc/fstab and see if you can have the sdcard mounted earlier there. While having it mounted earlier may have some unexpected side effects; I presume the driver for the sd card reader is compiled into the kernel, so I don't see a reason it can't be mounted earlier.
But, not having an atrix anymore I can't test this outright.
Click to expand...
Click to collapse
/etc/fstab is pretty meaningless, unfortunately. Most of the mounting is performed within /init.rc, and I see no entries for the external storage there. As it stands, the entry for the internal storage is more in the format of "on X, do Y" rather than the more traditional procedural format, so I'm not sure how much control I can have over that.
Also, second thoughts tell me that putting a filesystem file in /mnt/sdcard would be stupid, because it would cause all kinds of issues when attempting to USB mount the partitions from a computer.
I think the best way to attack this would be to pivot to another filesystem structure on the external sdcard. I'll take a look at init.rc later today and see what can be done.
agentdr8 said:
I think the best way to attack this would be to pivot to another filesystem structure on the external sdcard. I'll take a look at init.rc later today and see what can be done.
Click to expand...
Click to collapse
So you'd think. And that's what I did. I have a nice 2 GB ext3 partition on my SD card with the contents from the /osh partition (p13) rsync'ed over. But, only the mmcblk0 partitions are available when mountosh runs (up through p16), with no mmcblk1 partitions. Naturally, /dev/block/vold is empty as well.
I might need to poke some contacts to see if it's possible to detect mmcblk1 earlier, but in the meantime, I might just create a filesystem file in /data (p16). Hell, /data is almost 2 GB large, and I'm only using a little over 500 MB in it, so there's plenty of free space there. Why did they make it so large? Do people really download that much crap to their phone?
Grr...
So, even creating a file in /data and mounting that via loopback doesn't work, even if it's mounted on top of the existing /osh partition. I'm guessing that they have some level of verification.... So yeah. Something else is missing here.
I had two sucessful ways of overcoming this. The first way was to move /usr onto /data, and to symlink it back. But, I wanted a way of not modifying /osh, so I ended up creating a init.d script to bind a copy of /osh over /osh. I don't have access to a dock or HDMI monitor at the moment, so I can't confirm if the webtop launches with either of these methods, but full functionality worked in the command line.
shawnbuck said:
I had two sucessful ways of overcoming this. The first way was to move /usr onto /data, and to symlink it back. But, I wanted a way of not modifying /osh, so I ended up creating a init.d script to bind a copy of /osh over /osh. I don't have access to a dock or HDMI monitor at the moment, so I can't confirm if the webtop launches with either of these methods, but full functionality worked in the command line.
Click to expand...
Click to collapse
Yeah, that's the thing. Everything worked on the command line, but X itself refused to start, even after I completely disabled TOMOYO (even when running /etc/init.d/startX.sh by hand).
I might decide to poke at it another time, but I'll at least wait for the SBF situation to sort itself out first.
New! Dual Boot Flashable Zip CM10 epinter (emmc) and CM7.2 RC3 (SD) ...
At least two variants of JellyBean CM10 for Atrix are now available courtesy of xda members epinter and jokersax11. So I created a Dual Boot Flashable Zip (DBFZ) with CM10 (epinter) on emmc and CM7.2 RC3 on SD card. This is consistent with the philosophy of hosting an alpha ROM on emmc and a stable ROM on SD, thus making it easier to manage dual boot when flashing alphas.
Dual-Boot-CM10-epinter-0727-CM7.2-RC3-signed.zip: http://www.mediafire.com/?grp4adjqwuhica1
I noticed that the CM10 path to SD FAT32 is now “/storage/sdcard0”. So I updated the boot switcher: ./Boot/boot-rom.sh to automatically follow this path if it cannot locate ./Boot on the /mnt path.
I also found a bug in my previous DBFZs which this version fixes: In CM7 /system/bin/backuptool.sh, redirect the “mount /system” command to SD: “mount /dev/block/mmcblk1p2 /system”
That's it...
Instructions:
1. Boot to CWM and if necessary, partition your SD (you can use SmartPart, which is described further below):
2. Are you coming off a previous dual boot with a non-CM7 ROM on SD? You can ...
wipe SD /cache: http://www.mediafire.com/?mc881zjhl9oqr0q
wipe SD /data: http://www.mediafire.com/?4k4fey6gxe1nbn0
Both wipers assume that SD is correctly partitioned to host ROM.
3. Flash DBFZ.
4. Boot to CM10 and configure SD card ./Boot/boot-rom.sh in Script Manager to boot CM7 (Argument = 2).
Note: If for some reason the Boot directory did not make it over, you can manually extract it to /storage/sdcard0 (CM10 path).
5. Boot to CM7 and configure SD card ./Boot/boot-rom.sh in Script Manager to boot CM10 (Argument = 1).
6. Boot to CWM and flash CM10 gapps and gapps-for-CM7-20120316-sdcard: http://www.mediafire.com/?1c2br6sw6330lwn
You should be able to flash another CM10 alpha right over this one. And if the CM10 boot.img differs from current one, you can update dual boot configuration by copying boot.img to ./Boot/ROM1.
Cheers.
++++++++++++++++++++++++++++++++++++++++++++
“SmartPart” Android batch script intelligently partitions your Atrix SD card to host a second ROM in a dual boot configuration
SmartPart v1.1 accommodates larger SD card-based ROMs, simplifies tweaking and slightly refines the decision logic for repartitioning.
Dry Run (allows you to see first-hand what to expect without making any changes, since all code that modifies SD card is commented out)
http://www.mediafire.com/?81uikn7ih8brcnw
Full Up
http://www.mediafire.com/?vz2q6usm2f84j8q
SmartPart Features
Eliminates the need to swap SD card between phone and computer
Takes the guesswork out of setting partition boundaries by automatically computing them while taking measures to protect your SD card's existing FAT32 partition and all data stored on it. My (pre-shrunk) FAT32 partition actually grew after running this script, lol.
Provides a “walk-through” feel as it computes and displays useful info about your SD card and internal memory --- all in “real time” on your monitor. And the intermediate results files are all stored in the CWM /tmp directory alongside recovery.log.
Option to backup your SD card's FAT32 partition before proceeding
Several options to exit midstream before modifying SD card
Uses all stock ClockWorkMod Recovery shell commands
Can be run from any ADB-enabled machine, Windows or Linux
Preliminaries
ADB-enabled computer (“adb” tool resides in the Android SDK “platform tools” directory)
CWM Recovery 5.0.2.0
Class 4 (or higher) SD card with leading FAT32 partition. Class 2 MAY work, not sure.
Fully charged battery
Instructions
1. Download "part-sdc.sh" from link at top and move to directory where "adb" tool resides
2. Boot to CWM
3. Connect phone to computer
4. At ADB command terminal, enter:
Code:
adb devices (ensure device is listed)
adb push part-sdc.sh /tmp
adb shell (to access phone's root filesystem)
sh /tmp/part-sdc.sh (run SmartPart)
5. During execution, follow all prompts, read the displayed info and wait for SmartPart to process between interrupts. See "Timing Benchmarks" below to get a feel for how long things take.
6. Done!
7. Reboot to CWM and (if necessary) wipe /cache and /data for primary ROM and flash dual boot – or maybe clone the /system partition of a working ROM to SD card.
SmartPart Algorithm
1. Analyze memory and check for three ext3[4] partitions of adequate size behind the FAT32 partition. If they exist, exit; else continue with memory analysis.
2. Check for SD card device name: "mmcblk1"
3. Check if SD card has enough free space to hold second ROM. If not, exit.
4. Provide option to safety-backup SD card FAT32 to /emmc with a timestamped backup directory. Figure on 2+ minutes per GB using Class 6 or lower SD card.
Note: I have run SmartPart several times on my Class 6 SD without backing up and in each case, all of my data under /sdcard was preserved.
5. Option to backup SD card FAT32 to /emmc, check if /emmc has enough free space to hold this backup. If not, exit; else proceed with backup at user's request.
6. Remove any pre-existing SD card partitions beyond FAT32. If coming off a previous dual boot, this will wipe the SD card-based ROM /system, /cache and /data.
7. Proposed SD card partition design is presented for review.
8. Option to repartition SD card by resizing FAT32 and creating three new “ext” partitions for ROM /system, /cache and /data respectively.
9. Upgrade ext2 to ext3 using CWM “tune2fs” filesystem tuner.
10. Final review: Mount SD card FAT32 and ROM filesystems to show used and available space
11. Unmount filesystems and exit
Note 1: Partition sizes may not be adequately robust for all ROMs. May need to increase size of one or more partitions. But the script format allows for easy tweaking.
Note 2: I tried rolling an earlier version of SmartPart into a CWM-flashable zip, but got errors at runtime. I think it is because when CWM flashes zip files, the /sdcard filesystem is mounted and stays mounted during the entire flashing process --- and partitioning tools cannot modify a device while one or more of its filesystems are mounted.
Timing Benchmarks
Platform:
SanDisk 16GB Class 6 micro-SD
Motorola Atrix 4g running ClockWorkMod Recovery version 5.0.2.0
Running part-sdc.sh with single FAT32 partition
Start: 1:13:15 Finish: 1:19:35 (6.3 minutes)
Backup 4000MB from /sdcard (FAT32) to /emmc using CWM busybox"cp" copy command
Start: 2:14:06 Finish: 2:23:09 (9 minutes, or 2.25 minutes per GB)
Same backup with CM7 running on SD card and LCD mostly OFF
Start: 5:23:30 Finish: 5:33:28 (10 minutes, or 2.5 minutes per GB)
++++++++++++++++++++++++++++++++++++++++++++++++
Dual Boot Information Here!
PLEASE read Dual Boot Instructions first! See below.
Dual Boot Flashable Zip v1.4
Ziplink: http://www.mediafire.com/?58pxlm9qbj5e1q2
Checksum: http://www.mediafire.com/view/?rg3bozbckzq4baq
This is my first attempt at integrating dual boot with an AROMA-based installer. It worked great on my phone after flashing my wiper zip (wipe /cache and /data on both sides).
Make sure to have a solid Nandroid backup. If you previously had dual boot and want to backup your second ROM, I can provide some direction on how to do it. (CWM Recovery will not recognize the second ROM.)
Then, CWM-flash wiper zip: http://www.mediafire.com/?yguun5clck17pdx to fully wipe /data and /cache on emmc and sdcard.
Then flash dual boot zip and select all of the AROMA defaults if you want to make sure this works before customizing.
Android should boot to the Nvidia Tegra II splash screen and hang there til it's finished loading files and building cache. Longer boot times are typical after full wipe. Then look for the familiar Welcome screen.
Since the primary goal here is to get dual boot working, you can skip Google setup for, tapping “Next” to all the prompts and then “Finish”. Then configure Script Manager using the Dual Boot Flashable Zip instructions below.
In the AOKP/CM7 zip file updater-script, I pushed the kernel you selected during the AROMA install to: /sdcard/Boot/AOKP/boot.img. So theoretically, if you boot AOKP from CM7, Android should boot that same kernel. I personally haven't had much success with overclocked kernels; my Atrix usually goes into boot loop.
Now if you want to customize from here, it's better to re-flash the dual boot version of AOKP and customize from there instead of flashing the original AOKP installer zip. That's because AOKP doesn't include Script Manager which is needed to quickly boot to the other ROM.
I did a simple test by choosing Droid splash instead of Tegra II and black keyboard instead of AOKP kb. Everything seems to work fine except for the usual CM9 hiccups with rotation, camera, etc.
CM9 beta 0.6.9.1 and CM7 RC3...
Dual Boot Flashable Zip v1.3
Ziplink: http://www.mediafire.com/?b7g7i78kzr08hcd
Checksum:http://www.mediafire.com/view/?4yue8mds4sd7zxc
Features:
Joker Beta CM9 0.6.9.1 (emmc) and CM7.2.0 RC3 (sdcard)
Zip updater now automatically backs up the boot configuration directory: /sdcard/Boot (if it exists) and generates a new /sdcard/Boot.
Script Manager free (credits to devwom https://sites.google.com/site/devwom/script-manager ) is now pre-installed in both /system partitions (emmc and sdcard).
Installation/configuration instructions are now simplified as a result of these enhancements.
Dual Boot Instructions:
1.a. Create ext4 partitions on sdcard as described here and/or in my original Dual Boot Atrix thread. I prefer to use GParted with micro-SD card connected directly to computer via card adapter. This can be done on a Windows or Linux machine using GParted LIve CD: http://sourceforge.net/projects/gparted/files/gparted-live-stable/ , Here are two videos showing how to do this. The second one (better display quality but no sound) was done on Ubuntu, but the method is exactly the same.
http://www.youtube.com/watch?v=2fQIQIKeIbI
http://www.mediafire.com/?ys8b07b0vpaivg5 (opens with VLC Media Player)
1.b. Remove SD card from computer and reinsert into phone.
2. Download dual boot zip to /sdcard/Download (or wherever you keep your ROMs).
3. Flash dual boot zip via CWM 5.0.2.0. If all goes well, CM9 should be on emmc, CM7 on sdcard and boot files in new directory: /sdcard/Boot
4. Reboot. CM9 should come up, though the first boot takes longer as CM9 is building cache.
5. On CM9, go to Apps, tap SManager (SM) and browse as root (no need to install widgets). With SM running, tap Menu > More > Advanced Options > Config and set home directory to /sdcard/Boot (use the select directory button at bottom). Exit and restart SM, look for /sdcard/Boot/boot-rom.sh and tap on it. Set Arg = 2, tap "Su" then "Save" then "Run" to reboot to CM7 from CM9. The first boot takes longer as CM7 is building cache.
6. Reboot to CM7 and configure SM to run /sdcard/Boot/boot-rom.sh exactly the same way you did for CM9, except this time set Arg = 1 to reboot to CM9 from CM7.
If you want a jet clean install (e.g. after previously dual booting) here is a single CWM-flashable zip that completely (and dangerously) wipes /cache and /data (ALL user apps and related data) for both ROMs (emmc and sdcard). Link: http://www.mediafire.com/?yguun5clck17pdx . I am presently working on a companion backup/restore zip.
Note: Dual Boot Flashable Zip version 1.2 and below are now deprecated.
Video Tutorial Sneak Preview! http://www.mediafire.com/?ys8b07b0vpaivg5
This video-only clip shows how to partition your micro-SD card so it can host your second ROM. You can open the video using VLC media player (free). In this video, I have my 16 GB micro-SD card connected to my computer via card adapter, and am using GParted on Ubuntu 11.10 to shrink the existing vfat partition and create the required ext4 partitions (/system, /cache and /data) for my second ROM. Note: The sizes of these new partitions are approximately the same as the existing emmc partitions. You can also boot your Windows/Linux computer with a GParted Live CD and perform these operations. I chose to run GParted on Ubuntu so I could capture this high res video with Desktop Recorder.
Bonus! CM7 GApps flashable zip ported to sdcard: http://www.mediafire.com/?dv22qnfqzj5d3la Since this version is older than Google Play, it will initially come up as Android “Market”. And you'll probably get “Problem loading widget” at top of screen. I think it's the Google search bar trying to load. I just delete the search bar as it consumes too much real estate anyway. Let Android Market update to Google Play (takes a little while), reboot to CM7 on sdcard and enjoy.
Useful info here: http://forum.xda-developers.com/showthread.php?t=1642185 and http://forum.xda-developers.com/showthread.php?t=1645344
SD card partitions should look something like this after the install:http://www.mediafire.com/i/?qseve9gppjt2bxe
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
When you reinsert your SD card to phone, Android should recognize the partitions as:
/dev/block/mmcblk1p2 (system)
/dev/block/mmcblk1p3 (cache)
/dev/block/mmcblk1p4 (data)
Troubleshooting: Copy /sdcard/Boot/CM7/boot.img to your computer. Then with phone connected to computer with fastboot tool (e.g. under Android SDK Platform Tools) enter:
fastboot devices (make sure phone is recognized)
fastboot flash boot /path/to/boot.img
fastboot reboot
Helpful link: http://www.freeyourandroid.com/guide/fastboot-guide
If CM7 does not boot, most likely one or more of your SD card ext4 partitions does not exist or is corrupted.
Please Note: The ramdisk directory embedded in /sdcard/Boot/CM7/boot.img is custom in that the embedded script file: init.olympus.rc is modified to mount /system, /cache and /data on sdcard instead of on emmc (see code below).
Code:
on fs
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
#mount ext4 /dev/block/mmcblk0p12 /system noatime nodiratime wait ro barrier=1
#mount ext4 /dev/block/mmcblk0p16 /data nosuid nodev noatime nodiratime wait barrier=1 noauto_da_alloc
#mount ext4 /dev/block/mmcblk0p15 /cache nosuid nodev noatime nodiratime wait barrier=1 noauto_da_alloc
mount ext4 /dev/block/mmcblk1p2 /system noatime nodiratime wait ro barrier=1
mount ext4 /dev/block/mmcblk1p4 /data nosuid nodev noatime nodiratime wait barrier=1 noauto_da_alloc
mount ext4 /dev/block/mmcblk1p3 /cache nosuid nodev noatime nodiratime wait barrier=1 noauto_da_alloc
SO... if you want to swap /sdcard/Boot/CM7/boot.img for another image and keep CM7 running on your sdcard, you must first: 1) unpack the new image to kernel file and ramdisk directory, 2) modify init.olympus.rc under ramdisk to mount /system, /cache and /data on sdcard instead of on emmc as described in the code, and 3) repack boot image from kernel and modified ramdisk. Along this line, I have developed simplified, more intuitive Perl scripts to unpack and repack boot image files based on: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
I haven't yet posted these new scripts as they are still under test, but hopefully they will make it a little easier to unpack/modify/repack boot images.
Please Note: I've received several valid requests for customization, and I seek to respond to each while continuing my research. However please understand that this work is highly experimental. One BIG challenge is the lack of a recovery tool that will recognize the ext4 partitions for /system, /cache and /data on sdcard. So for example if you want to customize your secondary (sdcard) build, you won't be able to do it via standard zip flash. For now, customizations must be done manually e.g. by modifying/re-signing the customization zips or by pushing a nandroid backup of your pre-customized ROM to the respective ext4 partitions on sdcard. I'm looking at ways to automate certain methods. I've also considered developing a "Sendust Recovery" tool, but that would be a huge undertaking
Idea: A flashable zip that clones primary ROM and data to sdcard. Concept offered by XDA member Always_Jonezen (thanks!)
A future goal of this project (and a primary reason for building this zip) is to redirect user apps to sdcard per Joker's suggestion, thus allowing each ROM to access a common set of apps . For CM7, the /data partition is already on /sdcard as /dev/block/mmcblk1p4. I would still need to modify the CM9 paths.
Standard disclaimers apply. In short, I am not responsible for any harm you or your phone may incur by using any or all of this material.
Many thanks to epinter, jokersax11, leonardoaraujo, and the CM/Photon/Atrix/Android dev teams for their excellent ROMs. And of course, to Koush.
Exciting stuff man!
Downloading file, not sure if I have the balls to attempt this one just yet, but im FOR SURE going to learn some useful stuff from this thread.
So keep it up and ill be watchin, and learning as this progresses!
I have been trying for days to get this done on windows, but it just never works for me. My goal is to have nottachtrix on the sdcard and then be able to flash different roms to the internal. I've tried hatefuls guide and have been in contact with him about it...still can't get it to work. I hate to ask, because I know it is a lot of work (been messing with it for a few days).
But, if you would be so kind to make a zip that would put nottachtrix 1.3.1 on sdcard with the ability to flash other roms to the internal. That would be outstanding, because I think a lot of people are looking for the full functionality of a blur rom, and still be able to test the multiple cm9 roms available.
It would be nice when out on business and if the rom acts up.....being able to go back to a fully operational blur rom would be priceless!!
Thank you, and I hope you consider my request...not only for myself, but the whole atrix xda family?
Thank you sir!!!
---------- Post added at 03:28 AM ---------- Previous post was at 03:23 AM ----------
ATRIXXIRTA said:
Exciting stuff man!
Downloading file, not sure if I have the balls to attempt this one just yet, but im FOR SURE going to learn some useful stuff from this thread.
So keep it up and ill be watchin, and learning as this progresses!
Click to expand...
Click to collapse
Good luck! Let us know if you have success? LOL, I've been screwing with this for a few days (windows guide)...and have not bricked my phone yet. I'm sure you know,,have a nandroid backup!!
Im changing the saying "knock on wood" to "knock on nandroid" lol
ATRIXXIRTA said:
Im changing the saying "knock on wood" to "knock on nandroid" lol
Click to expand...
Click to collapse
I think it should be "knock on plastic" Alright, back on topic.
If i flash without wipe anythink (suppose keep current Faux Kernel), and boot on CM7.... AND flash CM7 RC2... and flash Kernel Faux...
Work ? Don't work ?
When switch CM7 => CM9 and CM9 => CM7 ... keep adress book, and another settings ?
Thx ... Good work !!
(For ".img" do you use "mkyaffs2image" ??)
I knew it was only a matter on time before they figured out how to dual-boot on this thing
delewer said:
If i flash without wipe anythink (suppose keep current Faux Kernel), and boot on CM7.... AND flash CM7 RC2... and flash Kernel Faux...
Work ? Don't work ?
When switch CM7 => CM9 and CM9 => CM7 ... keep adress book, and another settings ?
Thx ... Good work !!
(For ".img" do you use "mkyaffs2image" ??)
Click to expand...
Click to collapse
Presently the /sdcard/Boot/CM directories contain specific boot image fielnames. Tomorrow I will work on making these filenames more generic. But for now you can try out a different boot image file for CM7 by replacing the current one with yours. Make sure to modify the companion "boot-rom.sh" shell script to reflect your boot image filename.
95rr900 said:
I have been trying for days to get this done on windows, but it just never works for me. My goal is to have nottachtrix on the sdcard and then be able to flash different roms to the internal. I've tried hatefuls guide and have been in contact with him about it...still can't get it to work. I hate to ask, because I know it is a lot of work (been messing with it for a few days).
But, if you would be so kind to make a zip that would put nottachtrix 1.3.1 on sdcard with the ability to flash other roms to the internal. That would be outstanding, because I think a lot of people are looking for the full functionality of a blur rom, and still be able to test the multiple cm9 roms available.
It would be nice when out on business and if the rom acts up.....being able to go back to a fully operational blur rom would be priceless!!
Thank you, and I hope you consider my request...not only for myself, but the whole atrix xda family?
Thank you sir!!!
---------- Post added at 03:28 AM ---------- Previous post was at 03:23 AM ----------
Good luck! Let us know if you have success? LOL, I've been screwing with this for a few days (windows guide)...and have not bricked my phone yet. I'm sure you know,,have a nandroid backup!!
Click to expand...
Click to collapse
I haven't yet studied the emmc partition, but this is definitely worthwhile. Mine has 9GB free!
sendust7 said:
Presently the /sdcard/Boot/CM directories contain specific boot image fielnames. Tomorrow I will work on making these filenames more generic. But for now you can try out a different boot image file for CM7 by replacing the current one with yours. Make sure to modify the companion "boot-rom.sh" shell script to reflect your boot image filename.
Click to expand...
Click to collapse
Thx !
O great something new to learn. Great progress. Will be watching and learning.
Thanks for everything you do. Back to reading. Just thought I would chime in.
I've got a question... it might sound noobish. I have a 2gb sd card...will it be enough to hold the cm7 or do you suggest a bigger card. I'm going to try this as soon as my exams finish so I'd like to be prepared before I attempt this.
Anyways awesome work...this is exciting stuff. I'm looking forward to future development on this project. Keep it up.
PS. Joker usually discourages direct download links to zips. He says to link to his site since ads help to pay off for ads.
Sent from my MB860 running Jokersax's CM9
What happened to the links.... I was going to try it.
Sent from my Atrix with XDA Premium
Voelker45 said:
What happened to the links.... I was going to try it.
Sent from my Atrix with XDA Premium
Click to expand...
Click to collapse
I think I know why. The zip is 229-240MB (depending on the scale factor), and I created a public link in Dropbox. And then today I got this message...
This email is an automated notification from Dropbox that your Public links have been temporarily suspended for generating excessive traffic. Your Dropbox will continue to function normally with the exception of Public links.
This suspension is temporary (3 days for the first time).
Please visit Dropbox support if you have any questions.
- The Dropbox Team
I'm open to suggestions
sendust7 said:
I think I know why. The zip is 229-240MB (depending on the scale factor), and I created a public link in Dropbox. And then today I got this message...
This email is an automated notification from Dropbox that your Public links have been temporarily suspended for generating excessive traffic. Your Dropbox will continue to function normally with the exception of Public links.
This suspension is temporary (3 days for the first time).
Please visit Dropbox support if you have any questions.
- The Dropbox Team
I'm open to suggestions
Click to expand...
Click to collapse
Have you tried talking to joker about you somehow using his page for that dual boot zip? I will try to think of other ideas on my end. This project you have is awesome.
Sent from my Atrix with XDA Premium
Ok I think I have an idea. Well, I have a Google drive account. I could maybe hold it there with a link for xda. I have plenty of space. Do you Google will have a problem with a big zip file??? If you send the zip to me through pm, email or something... let me know.
Sent from my Atrix with XDA Premium
Voelker45 said:
Ok I think I have an idea. Well, I have a Google drive account. I could maybe hold it there with a link for xda. I have plenty of space. Do you Google will have a problem with a big zip file??? If you send the zip to me through pm, email or something... let me know.
Sent from my Atrix with XDA Premium
Click to expand...
Click to collapse
OK thanks for the info. I might use mediafire in the interim and ask Joker about getting a link on his page.
sendust7 said:
OK thanks for the info. I might use mediafire in the interim and ask Joker about getting a link on his page.
Click to expand...
Click to collapse
Ok cool. Good luck. By the way if you need me to hold it for ya through Google drive at any point, just give me a holler.
Sent from my Atrix with XDA Premium
I fixed the link and reposted it. Sorry for the inconvenience.
http://www.mediafire.com/download.php?0ik4u51shs5c1sa
sendust7 said:
I fixed the link and reposted it. Sorry for the inconvenience.
http://www.mediafire.com/download.php?0ik4u51shs5c1sa
Click to expand...
Click to collapse
I having problems with download. Anyone else managed to download?
Sent from my MB860 using XDA Premium App
I've been thinking about this for a few days now. Then, today, xda posted an article on repartitioning the Xperia to gain some advantage. So it seems like a good time to pose this question for us HD+ owners.
This a "feasibility study" question. I'm not a developer. I can hardly hack my way though Mint, let alone the HD+. I'm asking if the following possible?
(If yes, maybe a nice developer will do it for us? )
Can we shrink and repartition the /factory partition in the HD+ (as they shrink partitions in the Xperia) and use the leftover space as /swap?
Background
I've been reading leapinlar's excellent treatises on the partition structure in the HD+ (see Item 16) and how the /factory partition, meant for automatic disaster recovery, doesn't do us much good if you've installed a custom ROM and a custom recovery. (See all of Item A12.)
Among other things, the /factory partition contains an image of the stock B&N ROM. Which will cause bootloops if triggered when you're running CM.
But, if I understand it correctly, the /factory partition isn't a total waste. It duplicates some important data from the /rom partition (devconf), which could come in handy IF you put the stock recovery back on in an attempt to fix your HD+. (Then it could rebuild the /rom partition if it had become corrupted.)
So, as it stands now, /factory is 448 MB that's mostly useless to us. Can't we put it to good use? Like /swap? Or direct zRAM to it?
Leapinlar has already created some repartitioning tools, as has the Xperia dev now. So I'm hoping a lot of the hard work has been done already.
Proposal
(I apologize in advance is my terminology isn't exactly correct.)
Is it possible to:
1) remove the factory.zip from the /factory partition and then shrink the partition to accommodate only the /rom backup files. (I'm thinking that all factory zips are the same size, so once the new smaller partition is calculated, it ought to be the same for everyone's HD+);
2) create a new partition from the left over space, calling it (new) partition #11;
3) format partition #11 as swap
4) easily tell CM 10 or CM 11 to use the /swap? I'm hoping this can be done with just a init.d script. (Maybe an fstab tweak too?)
5) Or perhaps dedicate #11 for zRAM, as a kernel developer has done with useless space in the Galaxy Tab 2. In essence, we'd have almost 1.5GB of RAM.
Feasible? Yes/No? I realize that dinking with partitions can damage my HD+. It's a risk I'm willing to take.
I'm not going to get involved with this, I'm just going to add a warning. The partition structure for the HD/HD+ is different than the Nook Color and most other devices. The NC and other devices like SDs use DOS partitioning. The HD/HD+ is like the Nook Tablet that uses GPT partitioning. The two partitioning schemes are not compatible. So don't try to use my tools in the NC forum. If you want to know more about GPT partitioning on the Nook Tablet and get some tools, search the Nook Tablet forum.
Sent from my BN NookHD+ using XDA Premium HD app
leapinlar said:
The partition structure for the HD/HD+ is different than the Nook Color and most other devices. The NC and other devices like SDs use DOS partitioning. The HD/HD+ is like the Nook Tablet that uses GPT partitioning. The two partitioning schemes are not compatible.
Click to expand...
Click to collapse
Good to know! Now we have more data than we had before.
Looks like a lot of the work has been done already
So, I found this thread in the xda forums all about nook tablet partitions. They even talk about resizing! (Or at least, about making a different size /userdata partition.)
There is also this here about repartitioning Nook partitions.
Looks like parted would be easier for what I'm looking to do, shrink the /factory partition and create a new partition.
I read here that I can use a live Linux CD to mount the factory.img. From there, I presume I can delete the factory.zip and create a new image?
I'm not a linux geek, but I presume I need to be on a live Mint CD to use parted in ADB? (Update: Apparently I am to use the Android SDK for ADB in Windows. Downloaded already. Am climbing the steep learning curve.)
First half of Step 1, Done
Well, it took longer than it should have, but I made a new, smaller factory7.partition.img file. It's 1 MB.
I started by booting a Mint 16 Live CD.
Then I mounted the OEM factory partition image I made beforehand using the dd command, per leapinlar's instructions. (See his Item 16.)
Code:
sudo mount -o loop partition7.factory.img {some.folder}
That image contained 4 zips: factory,zip; fsck.zip; rombackup.zip; romrestore.zip.
Dummy me, I tried deleting the factory.zip inside the mounted image. It occurred to me later that that would be like trying to delete a file from a mounted CDROM's iso image. Can't be done.
So I copied the 4 zips to a new folder. Then I could deleted factory zip, which was 433.3 MB.
That left less than 1MB for the other 3 zips.
If there's an elegant way of modifying an .img and resaving it, I couldn't find it. (I spent a lot of time with mkfs.yaffs2. But this .img was not a yaffs.(Didn't pass a "sanity check" when I tried to mount the new .img I had made with mkfs.yaffs2.)
So I brute forced an imaging solution by copying the 3 copied zips to a 1MB ext4 partiton on a USB stick. (I made the partition with gparted and used chmod 777 to clear permissions in the partition.)
Then I made an image of the new 1MB partition using the dd command. In my case
Code:
sudo dd if=/dev/sdd2 of=new.partition7.factory.img
(I probably don't have the leading /'s right here. Am truly hacking my way through all this. I'm sure most of you could do this whole project in a few minutes.)
So now I have a shiny new 1MB custom factory image just wating to be used.
Update: I think I'll redo this, and leave 4 zips, in case the recovery mechanism is looking for a "factory.zip" I'll made a dummy file and archive it, calling it "factory.zip."
The next task is to get ADB working, delete the original large partition7 in the HD+, create a new 1MB partition7 in its place, and then restore my new image to partition 7 using the dd command in reverse.
After that, then to create partition11 out of the unallocated 432MB and format that as swap.
Update: It occurs to me that I will have to backup partitions 8, 9, and 10 with dd. Then I'll have to destroy them, recreate them in new locations, and then restore them. Fortunately, an xda developer has already written the instructions on how to do all this.
I see that CM 10 supports swapon, so I'm hoping it will be downhill after the partition work. I'm hoping CM will automagically find the new swap partition, once I enable swap.
If you know different, I'd appreciate hearing from you. Will using swap in this memory burn the memory out quickly?
Better yet, swap file instead of swap partition
So, I was thinking more about this idea and how I'd have to destroy and recreate p8, p9 and p10 to make a new swap partition at p11. Aside from that being a lot of work and more prone to errors with all those operations, a new p11 would never get TRIM'd by the OS.
So now the plan is to reduce /factory (p7) to 1MB and increase /system (p8) by 443 MB. Then I'll put a swap file in /system.
Only have to work on two partitions that way and /system gets TRIM'd. (Or at least Lagfix will trim it.)
Whatdaya think?
I suppose it's easy enough to put a swap file in /data to get a feel if there's any performance gain from swap in eMMC. Someone wanna show me the code to do this? (I've read about how to create a swap file. Not sure how to mount it at emmcblk10.) Never mind, Found it on xda! Am currently running 500MB swap on /data to see what it's like.
PMikeP said:
So, I was thinking more about this idea and how I'd have to destroy and recreate p8, p9 and p10 to make a new swap partition at p11. Aside from that being a lot of work and more prone to errors with all those operations, a new p11 would never get TRIM'd by the OS.
So now the plan is to reduce /factory (p7) to 1MB and increase /system (p8) by 443 MB. Then I'll put a swap file in /system.
Only have to work on two partitions that way and /system gets TRIM'd. (Or at least Lagfix will trim it.)
Whatdaya think?
I suppose it's easy enough to put a swap file in /data to get a feel if there's any performance gain from swap in eMMC. Someone wanna show me the code to do this? (I've read about how to create a swap file. Not sure how to mount it at emmcblk10.) Never mind, Found it on xda! Am currently running 500MB swap on /data to see what it's like.
Click to expand...
Click to collapse
I guess this is a dumb question, but if you can put a swap file in /system and /data, why can't you delete the factory.zip from /factory and put the swap there? Why create a new partition?
Sent from my BN NookHD+ using XDA Premium HD app
leapinlar said:
I guess this is a dumb question, but if you can put a swap file in /system and /data, why can't you delete the factory.zip from /factory and put the swap there? Why create a new partition?
Click to expand...
Click to collapse
First, I'm abandoning my bright idea. Turns out that swap is slow (even on eMMC) and possibly destructive to the eMMC with all the writes. (Hmmm . . . I wonder how many writes /cache gets compared to a swap file? (IOW, would a swap file be any more destructive than cache is?))
There were 1 second pauses every now and then, presumably while swapping when I had a swap file mounted in /data. Even tho I could get more free memory with a swap file than with zRAM, zRAM is much faster. And since zRAM is supported by the OS, it's the path of least resistance for me.
But to answer your question, it's not a dumb question. I'm a dumb user.
First, I don't know how to mount the /swap on the /factory partition. Can it be done? I don't see /factory in root explorer when running. Whereas I can see /system and /data. (So, to use Windows talk, it seems like /factory is "hidden" when running the OS?) By the same token, I don't know if I can delete the factory.zip from /factory in situ. If it can be done, it probably requires ADB and fastboot (?). But I haven't learned about those yet. So I'd have to use my new image trick, from my post above, to "delete" factory.zip from /factory.
Second, even if I could mount a swap in /factory, I don't think I'd want to. (Although I agree it's be a lot easier (and less dangerous) than deleting and recreating partitions.) I don't think /factory gets TRIM' by the OS. And I presume I would want it TRIM'd every now and then or else the swap would get slower over time than it already is.
I notice that Lagfix offers to trim /system and /data (and /cache). But not /factory. As above, if /factory is not visible during operation of the OS, that would be one reason why Lagfix doesn't trim it.
Or it could simply be that Lagfix doesn't see the need to trim /factory. Since /factory is supposed to be static, there wouldn't be any reason for Lagfix (or CM) to trim it.
Whether /factory can be trimmed with the fstrim command while running, I don't know.
Anyway, my idea for swap wasn't such a good idea. So I've abandoned the idea.
It still bugs me, as an engineer who compulsively tries to optimize everything, to carry that wasted 443 MB around in /factory.
I don't think we need an extra 443 MB in /system or /data. (Or /cache.) But if we ever do, we know where to find it.
/factory is not automatically mounted in stock or CM. So to get access to it you would need to mount it with a script command. And I would assume you need script commands to set up /swap so that should not be a problem. But /factory is formatted fat32 and /data and /system are ext4 so that might interfere too.
And manual trim commands can be run to trim the mounted /factory. You don't need the app lagfix to do it.
But I agree, I'm not really sure you gain anything with swap on this device.
Edit: as PMikeP pointed out to me in a PM, I was mistaken. /factory is ext4, not fat 32. Thanks for the correction. That should make it easier.
Sent from my BN NookHD+ using XDA Premium HD app
I've been having a grand old time tinkering with my new TF701t. I unlocked the bootloader, tried a few ROMs, went back to stock, and I've been busily playing with it. Earlier this evening, it spontaneously shut down. I booted it back up and it shut down again after 5 minutes. I went into recovery and flashed the xposed disabler zip just in case xposed was to blame, but it shut down from recovery. Now it won't boot at all.
I can connect via ADB in recovery, and when I run dmesg, I see all sorts of nasty mmc0-related timeouts and errors. I can't even mount /system anymore. It's pretty clearly either an issue with the internal memory card or with the bus.
Does anyone have any idea how I can fix this or get it fixed? Of course, with an unlocked bootloader, I'm sure ASUS is going to give me all manner of grief and probably refuse to repair/replace what is clearly a hardware failure. Does anyone know if there's any way at all of replacing this kind of mmc card, or is it just part of the SoC? How screwed am I?
EDIT: Not screwed at all! See my post on page 2 for a fairly simple procedure to boot and run the tf701t (and quite probably many other devices) completely off of the SD card.
lexelby said:
I've been having a grand old time tinkering with my new TF701t. I unlocked the bootloader, tried a few ROMs, went back to stock, and I've been busily playing with it. Earlier this evening, it spontaneously shut down. I booted it back up and it shut down again after 5 minutes. I went into recovery and flashed the xposed disabler zip just in case xposed was to blame, but it shut down from recovery. Now it won't boot at all.
I can connect via ADB in recovery, and when I run dmesg, I see all sorts of nasty mmc0-related timeouts and errors. I can't even mount /system anymore. It's pretty clearly either an issue with the internal memory card or with the bus.
Does anyone have any idea how I can fix this or get it fixed? Of course, with an unlocked bootloader, I'm sure ASUS is going to give me all manner of grief and probably refuse to repair/replace what is clearly a hardware failure. Does anyone know if there's any way at all of replacing this kind of mmc card, or is it just part of the SoC? How screwed am I?
Click to expand...
Click to collapse
See if you can mount /cache or /data. If you cannot then you have royally messed up your tablet. If you have replaced the recovery to something other than the original asus recovery then your best bet is to buy a logic board from ebay and replace it manually yourself.
I took mine to asus repair center and they said they will charge 200$ and 3 days to replace the logic board. I managed to buy the part for 70$ and do it myself. Just a side note, I bought and item that was AS-IS, so I am glad mine worked.
devbro said:
See if you can mount /cache or /data. If you cannot then you have royally messed up your tablet. If you have replaced the recovery to something other than the original asus recovery then your best bet is to buy a logic board from ebay and replace it manually yourself.
I took mine to asus repair center and they said they will charge 200$ and 3 days to replace the logic board. I managed to buy the part for 70$ and do it myself. Just a side note, I bought and item that was AS-IS, so I am glad mine worked.
Click to expand...
Click to collapse
Thanks for the tips!
It's quite weird. I booted it into recovery, and via adb I was able to mount /data fine and poke around. I unmounted, then mounted /system, and that worked fine too. Unmounted, rebooted, no dice; shutdown during reboot. Now I've booted back into recovery, and it locked up even trying to get into recovery, and I can't mount /data or /system (all result in long pauses and kernel errors).
You say I messed up my tablet... what do you think caused this? And yes, I've got CWM on here, although I could just fastboot the original recovery on if that would help...
Is there any way to boot this thing off of the external SD?
What was wrong with yours that required replacing the logic board?
lexelby said:
Thanks for the tips!
It's quite weird. I booted it into recovery, and via adb I was able to mount /data fine and poke around. I unmounted, then mounted /system, and that worked fine too. Unmounted, rebooted, no dice; shutdown during reboot. Now I've booted back into recovery, and it locked up even trying to get into recovery, and I can't mount /data or /system (all result in long pauses and kernel errors).
You say I messed up my tablet... what do you think caused this? And yes, I've got CWM on here, although I could just fastboot the original recovery on if that would help...
Is there any way to boot this thing off of the external SD?
What was wrong with yours that required replacing the logic board?
Click to expand...
Click to collapse
It sounds like your boot is corrupted. There may be a way for ASUS to recover it without replacing the board.
My problem was that I messed up my boot and I could no longer flash anything or even modify files on the filesystems.
devbro said:
It sounds like your boot is corrupted. There may be a way for ASUS to recover it without replacing the board.
My problem was that I messed up my boot and I could no longer flash anything or even modify files on the filesystems.
Click to expand...
Click to collapse
Powering off completely seems to restore the device's ability to mount /system. I think touching a certain place on the emmc puts the controller in a bad state. I'm going to see if I can narrow down the bad blocks and partition around them or similar.
Barring that, where did you find a logic board for so cheap?
lexelby said:
Powering off completely seems to restore the device's ability to mount /system. I think touching a certain place on the emmc puts the controller in a bad state. I'm going to see if I can narrow down the bad blocks and partition around them or similar.
Barring that, where did you find a logic board for so cheap?
Click to expand...
Click to collapse
If you can access it in adb, the first thing I would do is adb pull my data off the tablet.
Then you could run fsck on your partitions in an adb shell.
Maybe just a simple format of/system and /data would clear corruption already....
I don't know the correct fsck command for this tablet top of my head, but you have to unmount the partition you want to run it on and then something similar to this (this is for the /data partition of the TF700):
Code:
e2fsck -fvyD /dev/block/mmcblk0p8
You seem to know your way around, I'm sure you can find it.
Good luck!
berndblb said:
If you can access it in adb, the first thing I would is adb pull my data off the tablet.
Then you could run fsck on your partitions in an adb shell.
Maybe just a simple format of/system and /data would clear corruption already....
I don't know the correct fsck command for this tablet top of my head, but you have to unmount the partition you want to run it on and then
Code:
fsck /dev/target_partition_name
You seem to know your way around, I'm sure you can find it.
Good luck!
Click to expand...
Click to collapse
Nah, it's not simple fs corruption -- first thing I checked, but thanks for the suggestion Been poking at it for a few hours, and it seems like the actual mmc bus/chip is screwed, not just a bad block. I think replacing the logic board is the way to go. Anyone want to let a tf701t with a dead screen go for cheap?
And yeah, I know my way around a bit, but really only enough to sound like I know what I'm doing I recognized the problem because I lost my sgh-i777 to a very similar issue, a failing internal sd. Seems like the Achilles' heel of android devices.
lexelby said:
Seems like the Achilles' heel of android devices.
Click to expand...
Click to collapse
I've owned close to a dozen Android devices. The SD still has to fail on me...
Maybe it's not the hardware, maybe it's - you [emoji33][emoji12]
Anyway, good luck with this. Oh, and devbro found the logic board on ebay..
berndblb said:
If you can access it in adb, the first thing I would do is adb pull my data off the tablet.
Then you could run fsck on your partitions in an adb shell.
Maybe just a simple format of/system and /data would clear corruption already....
I don't know the correct fsck command for this tablet top of my head, but you have to unmount the partition you want to run it on and then something similar to this (this is for the /data partition of the TF700):
Code:
e2fsck -fvyD /dev/block/mmcblk0p8
You seem to know your way around, I'm sure you can find it.
Good luck!
Click to expand...
Click to collapse
lexelby said:
Nah, it's not simple fs corruption -- first thing I checked, but thanks for the suggestion Been poking at it for a few hours, and it seems like the actual mmc bus/chip is screwed, not just a bad block. I think replacing the logic board is the way to go. Anyone want to let a tf701t with a dead screen go for cheap?
And yeah, I know my way around a bit, but really only enough to sound like I know what I'm doing I recognized the problem because I lost my sgh-i777 to a very similar issue, a failing internal sd. Seems like the Achilles' heel of android devices.
Click to expand...
Click to collapse
berndblb said:
I've owned close to a dozen Android devices. The SD still has to fail on me...
Maybe it's not the hardware, maybe it's - you [emoji33][emoji12]
Anyway, good luck with this. Oh, and devbro found the logic board on ebay..
Click to expand...
Click to collapse
Be careful mmcblk0p8 is /data on the TF700, on the TF701 it is mmcblk0p14
Code:
name device mountpoint fs description
/dev/block/platform/sdhci-tegra.3/ADF /dev/block/mmcblk0p7 /ADF ext4 ?
/dev/block/platform/sdhci-tegra.3/APD /dev/block/mmcblk0p6 /APD ext4 ASUS Product Demo
/dev/block/platform/sdhci-tegra.3/APP /dev/block/mmcblk0p4 /system ext4 Android OS
/dev/block/platform/sdhci-tegra.3/CAC /dev/block/mmcblk0p5 /cache ext4 recovery logs
/dev/block/platform/sdhci-tegra.3/CRA /dev/block/mmcblk0p11 ?
/dev/block/platform/sdhci-tegra.3/DTB /dev/block/mmcblk0p2 ?
/dev/block/platform/sdhci-tegra.3/EKS /dev/block/mmcblk0p13 NVEKSP
/dev/block/platform/sdhci-tegra.3/LNX /dev/block/mmcblk0p3 Linux kernel (8388608 b)
/dev/block/platform/sdhci-tegra.3/MDA /dev/block/mmcblk0p12 ?
/dev/block/platform/sdhci-tegra.3/MSC /dev/block/mmcblk0p8 empty (misc, bootloader etc.)
/dev/block/platform/sdhci-tegra.3/PER /dev/block/mmcblk0p10 /persist ext4 config/calibration data
/dev/block/platform/sdhci-tegra.3/SOS /dev/block/mmcblk0p1 Recovery kernel (8388608 b)
/dev/block/platform/sdhci-tegra.3/UDA /dev/block/mmcblk0p14 /data ext4 Android user data
/dev/block/platform/sdhci-tegra.3/USP /dev/block/mmcblk0p9 Staging (blob)
sbdags said:
Be careful mmcblk0p8 is /data on the TF700, on the TF701 it is mmcblk0p14
Code:
name device mountpoint fs description
/dev/block/platform/sdhci-tegra.3/ADF /dev/block/mmcblk0p7 /ADF ext4 ?
/dev/block/platform/sdhci-tegra.3/APD /dev/block/mmcblk0p6 /APD ext4 ASUS Product Demo
/dev/block/platform/sdhci-tegra.3/APP /dev/block/mmcblk0p4 /system ext4 Android OS
/dev/block/platform/sdhci-tegra.3/CAC /dev/block/mmcblk0p5 /cache ext4 recovery logs
/dev/block/platform/sdhci-tegra.3/CRA /dev/block/mmcblk0p11 ?
/dev/block/platform/sdhci-tegra.3/DTB /dev/block/mmcblk0p2 ?
/dev/block/platform/sdhci-tegra.3/EKS /dev/block/mmcblk0p13 NVEKSP
/dev/block/platform/sdhci-tegra.3/LNX /dev/block/mmcblk0p3 Linux kernel (8388608 b)
/dev/block/platform/sdhci-tegra.3/MDA /dev/block/mmcblk0p12 ?
/dev/block/platform/sdhci-tegra.3/MSC /dev/block/mmcblk0p8 empty (misc, bootloader etc.)
/dev/block/platform/sdhci-tegra.3/PER /dev/block/mmcblk0p10 /persist ext4 config/calibration data
/dev/block/platform/sdhci-tegra.3/SOS /dev/block/mmcblk0p1 Recovery kernel (8388608 b)
/dev/block/platform/sdhci-tegra.3/UDA /dev/block/mmcblk0p14 /data ext4 Android user data
/dev/block/platform/sdhci-tegra.3/USP /dev/block/mmcblk0p9 Staging (blob)
Click to expand...
Click to collapse
Thanks sdbags, nice catch. Btw, having developed ROMs for this tablet, do you think it's possible at all to boot android off of the external sd? It'd be helpful to know if I shouldn't even bother trying to figure out how.
lexelby said:
Thanks sdbags, nice catch. Btw, having developed ROMs for this tablet, do you think it's possible at all to boot android off of the external sd? It'd be helpful to know if I shouldn't even bother trying to figure out how.
Click to expand...
Click to collapse
Yes I have it working But haven't released it maybe after CROMi-X 7 is finished I will release the flash files that allow you to run one ROM internally and one rom off the card as ROM2SD
It's just an awful lot of work to maintain that doing it for the 300, 201 and 700 transformer crowd has kind of put me off doing for the 701. Also the internal mmc is faster than most fast sdcards so we won't see the benefits that especially the 700 users get.
sbdags said:
Yes I have it working But haven't released it maybe after CROMi-X 7 is finished I will release the flash files that allow you to run one ROM internally and one rom off the card as ROM2SD
It's just an awful lot of work to maintain that doing it for the 300, 201 and 700 transformer crowd has kind of put me off doing for the 701. Also the internal mmc is faster than most fast sdcards so we won't see the benefits that especially the 700 users get.
Click to expand...
Click to collapse
Dude, that totally just made my day, knowing that this is possible Any way you'd be willing to share your development version with me? I'd be your best beta tester every -- hell, I'd be maintainer for the rom2sd part for tf701t if you'd let me. I'm rather motivated at this point, and I have years of professional Linux experience... probably about time I took up android ROM development
lexelby said:
Dude, that totally just made my day, knowing that this is possible Any way you'd be willing to share your development version with me? I'd be your best beta tester every -- hell, I'd be maintainer for the rom2sd part for tf701t if you'd let me. I'm rather motivated at this point, and I have years of professional Linux experience... probably about time I took up android ROM development
Click to expand...
Click to collapse
Hmmm Ok let me sort out the main CROMi-X release and I might take you up on that. I warn you that it is rather a lot to get ROM2SD working though! But if you are up for it ....
sbdags said:
Hmmm Ok let me sort out the main CROMi-X release and I might take you up on that. I warn you that it is rather a lot to get ROM2SD working though! But if you are up for it ....
Click to expand...
Click to collapse
I am totally up for it -- it's that or shelve my tablet until I can afford a logic board I'll be trying to port a ROM to sd from scratch anyway, so having your ROM to start from would be a huge leg up.
lexelby said:
I am totally up for it -- it's that or shelve my tablet until I can afford a logic board I'll be trying to port a ROM to sd from scratch anyway, so having your ROM to start from would be a huge leg up.
Click to expand...
Click to collapse
If your internal sd is completely dead then rom2sd won't work I'm afraid - it relies on the kernel being able to at least read some files from internal to allow it to switch to external....
sbdags said:
If your internal sd is completely dead then rom2sd won't work I'm afraid - it relies on the kernel being able to at least read some files from internal to allow it to switch to external....
Click to expand...
Click to collapse
That's the thing, it works enough to get it into recovery. My plan was to try to kexec from recovery into a modified ROM.
Victory!
I took sdbags's stock zip (4.3) and extracted it on my computer. I used unmkbootimg to extract the initramfs.gz and kernel.gz from the boot.img in the ROM. I unzipped the initramfs and un-cpio'd it, then modified macallan.fstab to refer to /dev/block/mmcblk1p1 for /data, p2 for /system, and p3 for /cache. I also modified init.macallan.rc to avoid having it try to make filesystems on the EMMC -- I want it not to try touching the EMMC at all.
Next I rebuilt the initramfs.gz. I bought a good quality class 10 microsd and partitioned it on my computer with 3 primary partitions, one for /data, one for /system, and one for /cache (about 2GB and 1GB for /system and /cache). I made ext4 filesystems on all 3 partitions, mounted p2, and copied the rom over and installed it by hand using the updater-script as a guide. Then I unmounted and popped the SD card into my TF701t.
To boot it, I put my tablet into fastboot mode. I booted the kernel and ramdisk using 'fastboot boot' -- no need for kexec from recovery. I can do this without any reliance whatsoever on the internal EMMC. It took awhile to boot up, but it booted first try. The app drawer was a bit slow to come up, but I'm pretty happy I get to use my tablet at all! This whole process turned out to be MUCH easier than I expected it would be, and I'm quite confident I could do this to boot any ROM I wanted. I only use stock because of driver issues with my bluetooth keyboard.
Still willing to try my hand at maintaining cromi's ROM2SD branch though
Thanks everyone for all of your help!
Now that it's finished booting, it's really not sluggish at all. Hooray for class 10 sd cards.
Just to make this whole thing even a bit easier, I grabbed an arm-compiled version of the fastboot tool (search for fastbootarm) and put the kernel and ramdisk on my phone, so I can jump-start the tablet using my phone (via USB OTG cable) even when I'm not near my computer.
Will this be usable only from OTG pendrive?(Moto G no sdcard slot)
I had a similar issue with my Nexus 5 and 7 (2013) where I could no longer mount or read the /data or /system partitions but I could still boot into recovery and thought I scored two brand new drink coasters, but then came across this thread where it repaired corrupted partitions and I could now read and mount all partitions normally.
Being a Transformer tablet and not a Nexus device i'm assuming one or two of the adb commands might be a bit different for the disk partitions like someone mentioned in a previous post though..?
Might not be useful to you but thought I'd post it here anyway incase it might help somehow