Related
I got a shiny new class 6 16GB sd card. I partitioned it at about 15.5GB fat32 and 512 ext2, using the info in cyanogen's wiki: http://wiki.cyanogenmod.com/index.php/Apps2SD_On_CyanogenMod
From there I did the ext3 and then the ext4 updates.
Although I've searched for answers for a few hours now, I've been unable to determine why the device slows to a crawl at each point of user interaction at this point. Even unlocking the screen can time out...
I backed out the changes and copied the apps back over to internal storage and everything is zippy again, so at this point I am looking for suggestions. One thing I noticed was that when I used parted to delete the ext partition so the apps wouldn't go back to the card on the next boot, it still listed the ext partition as ext2. Can someone running ext3 or 4 let me know whether parted lists their partitions as such or if they are always reported as ext2?
What other techniques should I try? I would very much like to make this work as I get constant low-space warnings in my current setup. Thanks.
jasper1 said:
I got a shiny new class 6 16GB sd card. I partitioned it at about 15.5GB fat32 and 512 ext2, using the info in cyanogen's wiki: http://wiki.cyanogenmod.com/index.php/Apps2SD_On_CyanogenMod
From there I did the ext3 and then the ext4 updates.
Although I've searched for answers for a few hours now, I've been unable to determine why the device slows to a crawl at each point of user interaction at this point. Even unlocking the screen can time out...
I backed out the changes and copied the apps back over to internal storage and everything is zippy again, so at this point I am looking for suggestions. One thing I noticed was that when I used parted to delete the ext partition so the apps wouldn't go back to the card on the next boot, it still listed the ext partition as ext2. Can someone running ext3 or 4 let me know whether parted lists their partitions as such or if they are always reported as ext2?
What other techniques should I try? I would very much like to make this work as I get constant low-space warnings in my current setup. Thanks.
Click to expand...
Click to collapse
just used parted to check and it says ext4 .... try using this guide .. worked really well for me to partition my sd ... also if you're having all these problems try wiping dalvik-cache and even data and your ext* partition if it comes down to it
What recovery image are you using?
jndd333 said:
What recovery image are you using?
Click to expand...
Click to collapse
amon ra's 1.2.3
EDIT: lol thought you were the OP
A more careful walk through the partitioning process and I can confirm that everything works as expected, as well as confirming that if upgrade_fs fails, then ext2 is a total dog. One particularly confusing thing was tracking down whether a swap partition was needed or not, but on the latest cyan roms it isn't so I skipped that one.
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?
Can somebody explain what is MTD, and non MTD.. Something that normal beings can understand..
Sent from my GT-P1000 using XDA
Sure, here you go, a nice story for all humans to understand :-D
Think about Windows 95 which was running on the Fat32 filesystem. Back then files rarely reached 2GB in size and hard drives were really small. Later came Windows 7, for example. Windows 7 uses NTFS, which is also a filesystem but adapted to be more suited to the times of today. We now have DVD images which regularly exceed 2GB, so the Fat32 filesystem would be pretty useless today.
MTD is like NTFS and BML is like Fat32. Like Windows 95 can't run on NTFS, so Gingerbread cannot run on MTD. As Windows 7 runs crappy on Fat32, so does ICS run worse on BML than MTD.
MTD means storing data in a completely different and more flexible way. This is why it is better to use it.
To understand why you can go from BML to MTD and not the other way around here you go:
MTD is newer and smarter. Therefore, it can take BML into account and convert it correctly as it can understand it. BML on the other hand is older and MTD did not exist back then. Therefore BML cannot convert MTD back.
Now, when you need to change MTD partition sizes, you have to erase everything. Resizing partitions complicates things because there is a high risk of corrupting data in the process. Normally you would need special tools to resize partitions (even on your PC you need special tools). Also, the partition type must support resizing. So, to avoid complications, it is safer, faster and simpler for everyone to just erase everything and start fresh because this way we have a higher degree of control. That means less chances to brick the device and unfortunately a lot of data restores if you want to run the latest and greatest versions of Android.
I hope this sheds some light on the MTD matter to everyone and why some things are impossible as well as why some requirements must be met.
Peace,
C.
Wow that counts a million thanks m8.. But I could just click one in here.. This explains why everybody running behind MTD now...
Thank you superbeing...lol
Sent from my GT-P1000 using XDA
how can i find out which one is mne?
do u know any way to find out what type is it?
king-heart said:
how can i find out which one is mne?
do u know any way to find out what type is it?
Click to expand...
Click to collapse
usually cyanogenmod 9 & 10 are mtd. older versions are bml
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