[Q] dead mmc -- ideas?

HypoTurtle

Senior Member
May 5, 2011
1,991
1,277
0
Ooh, neat! I see that it automatically patches an initrd with a more advanced technique than I was using. I like how you replaced init with your own shell script so that you could hook into the boot process as soon as possible. Cool stuff.
I think you're referring to the Portadroid stuff (not my work), that's not working at the minute as is. The script has a couple ways of doing the multiboot, the portadroid was as you say replacing the init and looping .ext4 files, the other way which should work as is with the TF is bind mounts, with a mountfs.sh file being called in place of calling fstab.
Again the method isn't my work - just the automation provided by the script.

With the gamma script on that page (if you wanna give it a try run beta for the time being), I tried to replace the mountfs.sh with the gamma script itself, but that's currently not working, I think the problem is getting arguments passed in the *.rc file.
 

lexelby

Senior Member
Jan 6, 2012
94
81
0
I think you're referring to the Portadroid stuff (not my work), that's not working at the minute as is. The script has a couple ways of doing the multiboot, the portadroid was as you say replacing the init and looping .ext4 files, the other way which should work as is with the TF is bind mounts, with a mountfs.sh file being called in place of calling fstab.
Again the method isn't my work - just the automation provided by the script.

With the gamma script on that page (if you wanna give it a try run beta for the time being), I tried to replace the mountfs.sh with the gamma script itself, but that's currently not working, I think the problem is getting arguments passed in the *.rc file.
Oh, I see. Well, still, very cool :)
 

1Sev

New member
Sep 27, 2014
1
0
0
Android Os Install

I have come a cross these android car radios / multimeadia players. and have been noticing similar features so i purchased a Jensen vm 9224 radio that i am now attempting to install an android ROM on to. prior knowledge suggests the OS is more than likely being installed onto an SD car but haven't had any luck with finding a ROM to do so with. Any takers???

P.s: I have been using XDA forums since the touchscreen phone revolution started just lost old login info
 

Sai Ram PV

Member
Mar 15, 2015
5
5
0
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!
How did you partition the sd card please elaborate the steps
 
  • Like
Reactions: BbLaaC

lexelby

Senior Member
Jan 6, 2012
94
81
0
I'm sorry, but I don't have the free time to create a detailed tutorial with all of the steps. I purposefully gave enough detail that someone with intermediate Linux knowledge could follow along.

For the partitioning, I just used the standard Linux partitioning tool, fdisk.
 

lexelby

Senior Member
Jan 6, 2012
94
81
0
Quick tip for anyone doing this: even a class 10 UHS card like a samsung evo is going to make this tablet seem sluggish if you're using it for primary storage like I am. The reason is that it's not optimized for random access like the builtin one. I noticed long stalls that Cool Tool showed me were caused by SD card IO pegging at 100% for seconds at a time, sometimes 10-20. The tablet is usable like that, but it's a serious pain.

The problem is that by default, Linux is only willing to let writes build up in the filesystem cache for a few seconds before it blocks further writes until it flushes the cache to disk. This is so that if the system crashes suddenly, only a few seconds max worth of data can be lost.

That's a laudable goal, but it seriously gets in the way of performance. I made the decision to go the other way: trade reliability for speed. I bumped my cache settings to allow it to use 80% of system RAM for cache and to allow writes to build up for up to 5 minutes without blocking futher writes. This is risky, of course; everything's a tradeoff. I definitely wouldn't do it if I didn't have to. It really helped the performance issues I was seeing though.

To fix this, I run this shell script at boot with Tasker: https://www.lexneva.name/owncloud/public.php?service=files&t=7948a4c98cd64ec7b39756075fdf4480

There might be apps out there dedicated to this if you don't want to use tasker.
 

sbdags

Inactive Recognized Contributor
Jun 24, 2007
12,753
15,556
0
Kenilworth, Coventry
Quick tip for anyone doing this: even a class 10 UHS card like a samsung evo is going to make this tablet seem sluggish if you're using it for primary storage like I am. The reason is that it's not optimized for random access like the builtin one. I noticed long stalls that Cool Tool showed me were caused by SD card IO pegging at 100% for seconds at a time, sometimes 10-20. The tablet is usable like that, but it's a serious pain.

The problem is that by default, Linux is only willing to let writes build up in the filesystem cache for a few seconds before it blocks further writes until it flushes the cache to disk. This is so that if the system crashes suddenly, only a few seconds max worth of data can be lost.

That's a laudable goal, but it seriously gets in the way of performance. I made the decision to go the other way: trade reliability for speed. I bumped my cache settings to allow it to use 80% of system RAM for cache and to allow writes to build up for up to 5 minutes without blocking futher writes. This is risky, of course; everything's a tradeoff. I definitely wouldn't do it if I didn't have to. It really helped the performance issues I was seeing though.

To fix this, I run this shell script at boot with Tasker: https://www.lexneva.name/owncloud/public.php?service=files&t=7948a4c98cd64ec7b39756075fdf4480

There might be apps out there dedicated to this if you don't want to use tasker.
Cannot decrypt this file, which is probably a shared file. Please ask the file owner to reshare the file with you.
 

lexelby

Senior Member
Jan 6, 2012
94
81
0
Wtf owncloud? Apparently encryption is incompatible with sharing, but they sure don't make that obvious.

Code:
# up to 80% of RAM can be used for FS cache
echo 80 > /proc/sys/vm/dirty_ratio

# items can remain in FS cache for 5 minutes
echo 30000 > /proc/sys/vm/dirty_expire_centisecs
 
Last edited:

thebaumster

New member
Feb 28, 2016
1
1
0
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!
I am a bit of a noob for these things can you give me a step by step method i really screwed up my phone.
 
  • Like
Reactions: BbLaaC

RealVaVa

Member
Mar 16, 2016
10
1
0
Detailed tutorial isn't nessary. But can you talking about steps? Like - step1 - patching ROM or making recovery image.
I'm not understand when and how I can start. I have no time to learning of android developming and low level technologies, but I want to move OS to SD card because any ROM on my Lenovo P780 have many errors with system and 3rd party apps after clearly install.
 

electrocute

New member
Jul 9, 2015
4
1
0
Can you guys help the noobs please ? Or atleast give steps
I am a windows user. Is there any tool or anything to partition sd card, make it bootable and install rom in it ?
 
  • Like
Reactions: BbLaaC

VALERYRAMIREZ

Member
Nov 22, 2016
16
0
0
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!
Thank you @lexelby, I will learn enough in linux to recover my tablet in case the emmc memory is death.
 

mirfatif

Senior Member
Oct 18, 2016
635
347
63
[HOW TO] BOOT FROM SD CARD [SUCCESSFULLY] on QMobile Z8 with BRICKED/DEAD eMMC

I have been successfully able to boot from SD card on QMobile Z8 by partitioning SD card on a Ubuntu machine using 'parted' and 'fdisk' commands, replicating eMMC partition table and then flashing factory firmware images to these newly created partitions using 'dd' command. Then I modified "fstab.qcom" & "init.tegra.rc" files in kernel (boot.img) and "recovery.fstab" and "uneventd.rc" files in twrp recovery to initiate mounting and booting from sd card instead of internal memory. It was successful after some experiments. Details can be found here:
https://forum.xda-developers.com/android/help/how-to-boot-sd-card-qmobile-z8-bricked-t3712171
But I have still a few queries to be answered. Please have a look. Any help, comments, information or suggestions will be appreciated.
 

kurokirasama

Senior Member
Jun 19, 2012
302
21
38
huawei pra-lx3 with RR rom 5.8.5

Hello,

I fixed int sdcard problems with this method:

Full description of the problem here: https://forum.xda-developers.com/ge...3-lineageos-14-1-sudden-t3869109#post78204652

My steps:

1.- Rebooted to recovery
2.- Connect to pc
3.-
Code:
adb shell
4.-
Code:
e2fsck /dev/block/platform/hi _mci.0/by-name/userdata
5.- If no error,
Code:
mount /dev/block/platform/hi_ mci.0/by-name/userdata /data
6.- To check if everything is there:
Code:
cd /data/media/0
7.- reboot