Workaround for "read-only mode" - install to SD card - Dell Streak 7

Here's a rough guide to how I got the official T-Mobile Froyo release running from the external SD card. Booting is done via fastboot tethered to a PC, but after that you can disconnect and keep running off the SD (provided you don't reboot.) If there's interest I can provide more info/files.
My tablet is stuck with stock recovery, and Android bootloops when I try to boot normally. I can "fastboot boot" CWM 3.0.2.0 (no success with anything else really -- still not sure why), so I've got root adb.
Get the official T-Mobile Froyo release, decrypt it with the matching recovery (also fastbooted), unzip it. Recompile both the recovery kernel and the Froyo OS kernel, hacking the SD devices to be swapped (external SD card becomes mmcblk3 and internal MMC memory is mmcblk2.) This is so you won't have to fiddle with references to device IDs in config files, installation scripts, etc.
Partition and format the SD card roughly according to the MMC partition layout for the partitions that show up in Linux, using GPT. Here're the commands I used from the recovery (shell, parted commands, shell):
Code:
umount /cache
umount /system
umount /data
umount /sdcard
parted /dev/block/mmcblk3
mklabel gpt
unit s
mkpart logical 34 35
mkpart logical 36 37
mkpart logical ext3 38 688166
mkpart logical ext3 688167 917543
mkpart logical ext3 917544 950312
mkpart logical ext2 950313 954409
mkpart logical ext3 954410 3051562
mkpart logical 3051563 3084331
mkpart logical 3084332 3117100
mkpart logical 3117101 3149869
mkpart logical 3149870 3182638
mkpart logical 3182639 3215407
mkpart logical ext3 3215408 3248176
mkpart logical fat32 3248177 7798552
mkpart logical 7798553 7831321
mkpart logical 7831322 7864090
name 1 SOS
name 2 LNX
name 3 APP
name 4 CAC
name 5 MSC
name 6 FDR
name 7 UDA
name 8 OLG
name 9 LGF
name 10 RES
name 11 RGN
name 12 VAR
name 13 USP
name 14 SDC
name 15 WP1
name 16 WP2
mke2fs /dev/block/mmcblk3p3; tune2fs -j /dev/block/mmcblk3p3
mke2fs /dev/block/mmcblk3p4; tune2fs -j /dev/block/mmcblk3p4
mke2fs /dev/block/mmcblk3p5; tune2fs -j /dev/block/mmcblk3p5
mke2fs /dev/block/mmcblk3p6
mke2fs /dev/block/mmcblk3p7; tune2fs -j /dev/block/mmcblk3p7
mke2fs /dev/block/mmcblk3p13; tune2fs -j /dev/block/mmcblk3p13
dd if=/dev/block/mmcblk2p15 of=/dev/block/mmcblk3p15 bs=1M
dd if=/dev/block/mmcblk2p16 of=/dev/block/mmcblk3p16 bs=1M
Note the dd for p15 and p16 -- these contain data like your device IDs and MAC addresses. I'm not sure if they are actually needed in Android (the bootloader can read the "real" read-only ones and passes them on the kernel command line), but to be safe we'll copy them.
The partition table then looks like this:
Code:
Model: SD SD04G (sd/mmc)
Disk /dev/block/mmcblk3: 4027MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 18.4kB 1024B SOS
2 18.4kB 19.5kB 1024B LNX
3 19.5kB 352MB 352MB ext4 APP
4 352MB 470MB 117MB ext3 CAC
5 470MB 487MB 16.8MB ext3 MSC
6 487MB 489MB 2098kB ext2 FDR
7 489MB 1562MB 1074MB ext3 UDA
8 1562MB 1579MB 16.8MB OLG
9 1579MB 1596MB 16.8MB LGF
10 1596MB 1613MB 16.8MB RES
11 1613MB 1630MB 16.8MB RGN
12 1630MB 1646MB 16.8MB VAR
13 1646MB 1663MB 16.8MB ext3 USP
14 1663MB 3993MB 2330MB fat32 SDC msftres
15 3993MB 4010MB 16.8MB WP1
16 4010MB 4026MB 16.8MB WP2
I shrunk data partitions down to fit my small SD card, and some are tiny because they aren't needed for anything but preserving the numbering.
Remove references to blob and boot.img from the update.pkg scripts (since they won't need to be flashed), rezip it, adb push it to the device, and install it using the CWM menu item.
Replace the kernel in boot.img (for SD device ID swap I mentioned above), and "fastboot boot" it. Mine looks like it's hung during the T-Mobile boot animation, but eventually gets through. Android should come up as normal, and you can disconnect from the PC and use it until you reboot. Mine's a little laggy on this first boot -- not sure if it's a slow SD card to blame, or if it's just how the first boot goes on this tablet. My 4G modem is not working right now, but everything else seems to work.
Superuser.zip can be installed with the same hacked CWM recovery.
I'm working on Honeycomb, but seem to be having early boot problems, and I'm wondering if "fastboot boot" is different enough from a regular flash boot that some kernels can't handle it.
P.S. If you're happy with what you're stuck with on /system etc, you could potentially use that from the built-in memory, and put only your read/write stuff on SD. You'd probably have to patch more initscripts etc to do that though.

There is no gingerbread reelase.

giveen said:
There is no gingerbread reelase.
Click to expand...
Click to collapse
Oops, meant froyo. My point was that the vold service in pre-HC releases might be easier to work with. I've booted my GB-based phone off of an SD card via fastboot before.

joeyhewitt said:
Oops, meant froyo. My point was that the vold service in pre-HC releases might be easier to work with. I've booted my GB-based phone off of an SD card via fastboot before.
Click to expand...
Click to collapse
have you seen the method used in general involving the holding of all buttons for 2min then performing a wipe of dalvik cache?

Nocturnal_50 said:
have you seen the method used in general involving the holding of all buttons for 2min then performing a wipe of dalvik cache?
Click to expand...
Click to collapse
Tried (minus removing capacitive cover -- maybe if I get more desperate I'll try) and it didn't work for me. Although I tried wiping the cache first, since that's what you said here. I guess I'll try the other order. I've already verified that formatting /cache has no effect (contents are still there), so unless it has unexplained side-effects I'm not very optimistic.
P.S. Wait, 2 minutes?! You said 15 seconds before. Edit: saw your new instructions, I'll try that.

joeyhewitt said:
Tried (minus removing capacitive cover -- maybe if I get more desperate I'll try) and it didn't work for me. Although I tried wiping the cache first, since that's what you said here. I guess I'll try the other order. I've already verified that formatting /cache has no effect (contents are still there), so unless it has unexplained side-effects I'm not very optimistic.
P.S. Wait, 2 minutes?! You said 15 seconds before. Edit: saw your new instructions, I'll try that.
Click to expand...
Click to collapse
to be honest I was drinking the night I got it resolved on mine so 2min would have seemed extremely short, so stick with the 2min for now... if it some how happens to fix it then I will be looking into alternative measures to get this thing back to RW (it will probably involve acquiring a RO streak)

I think my problems booting the kernels in newer ROMs and recoveries are because I'm stuck using the old bootloader. Can anyone confirm that there are in fact incompatibilities? Since I can't just flash the new one, anyone know how to boot an nvflash-pushed bootloader image into fastboot mode, so I can then hopefully push a kernel image and boot that? Or perhaps can I patch the new kernel to work with the old bootloader?
Thanks.

joeyhewitt said:
I think my problems booting the kernels in newer ROMs and recoveries are because I'm stuck using the old bootloader. Can anyone confirm that there are in fact incompatibilities? Since I can't just flash the new one, anyone know how to boot an nvflash-pushed bootloader image into fastboot mode, so I can then hopefully push a kernel image and boot that? Or perhaps can I patch the new kernel to work with the old bootloader?
Thanks.
Click to expand...
Click to collapse
any change to the bootloader is included in the kernel, unless you mean recovery then you are just running in circles making everyone wonder what you are going on about

Nocturnal_50 said:
any change to the bootloader is included in the kernel, unless you mean recovery then you are just running in circles making everyone wonder what you are going on about
Click to expand...
Click to collapse
Sorry, I'm talking about the Tegra low-level bootloader, "bootloader.bin", which is flashed to the EBT partition (and it or possibly a variant is used for nvflash; I'm not sure if they are interchangeable.) I see the official Froyo release has one with a date March 2011 (shown on-screen when in fastboot mode), and looking at the one from the HC release in a hex editor (buried in the "blob" file from the update pkg), it says December 2011. This doesn't necessarily prove there are changes, but given the usual requirements to flash the official HC release before the third-party ROMs or recoveries, I think this is what's going on -- the HC release flashes in the new boot loader that the ROM/recovery needs.
Edit: The NVC partition may also be involved, don't know much about this yet. On all of this, anyone feel free to correct me if you know more; I'm just explaining it as far as I've been able to cobble together from scraps of information and hex dumps.

Related

[Proof of concept] Everything2SD

The basic idea of this mod is moving all partitions to the SD card, and running the full OS from the SD card.
There are many reasons why not to do this and probably is a bad idea, but the main reason behind this mod is just a proof of concept that can potentially result in a better internal and external memory utilization and speed improvements.
Reasons I can think of for not doing this:
- Reduced responsiveness and overall speed.
- Over stress on the SD card that can potentially leed to permanent damage to the card.
- The need to use modified boot and recovery images, thus leading to an install incompatible with any rom update (as it is) out there.
- Reduced battery autonomy.
- Many more I can't think of right now.
Reasons to do this:
- Because we can.
- As a proof of concept.
- For developing purposes.
- We get the ability to switch between 2 installations just by switching the SD card (of the same rom or roms with compatible boot images: kernel+ramdisk).
Don't do any of this if you don't know what you are doing!!!
Simplified steps (I've only tested this with Mik's CM7 (betas 6.2 and 6.3) + ClockWorkMod recovery on a Ubuntu machine):
- Download and flash ClockWorkMod recovery.
- Download and flash Mik's CM7.
- Do a full backup from recovery.
- Turn the phone off.
- Take out the SD card and put it on a Card reader on your PC.
- Backup the SD Card contents (including the full backup).
- Use Gparted (or any partition manager that has support for ext4 partition creation) to create the following partition structure:
Code:
num mount point size type
1: /sdcard REST fat32
2: /data 500M ext4
3: /system 190M ext4
4: /cache 64M ext4
The partition number is important, so you should calculate the fat32 partition beforehand or resize the existing one.
- Put new boot and recovery images on the fat32 partition. *
- Put the card on the phone and boot into recovery.
- Mount the sdcard trough menu.
- Connect the phone to your pc and start adb shell.
- Flash custom boot and recovery images:
Code:
flash_image boot /sdcard/boot-everything2sd.img
flash_image recovery /sdcard/recovery-everything2sd.img
- Reboot recovery.
- Through menu, mount all partitions.
- Connect trough adb shell and copy your data:
Code:
adb shell
cp -a /int-cache/* /cache/
cp -a /int-system/* /system/
cp -a /int-data/* /data/
- In adb shell, remove the sd_ext mount script:
Code:
rm /system/etc/init.d/05mountsd
- Reboot the phone.
Off course, no other method of storing the apps on the SD is desired as they are already there.
* I've attached custom boot and recovery images for Mik's CWM and CM7 beta 6.2 (updated boot images to Mik's CM7.02 beta 6.3 in post #3), but, the steps for creating them are next:
- Extract the original images (boot.img and recovery.img) from the root of the downloaded zips (signed-recovery.zip and cyanogen_thunderg-ota-eng.mik.zip).
- Unpack the images following this guide: HOWTO: Unpack, Edit, and Re-Pack Boot Images: Alternative Method (Perl scripts are attached, you'll need compiled mkbootfs and mkbootimg for your OS).
- On recovery ramdisk, change the etc/recovery.fstab file as follows:
Code:
# mnt pnt fstype device [device2] [fstype2]
/boot mtd boot
/cache ext4 /dev/block/mmcblk0p4
/data ext4 /dev/block/mmcblk0p2
/misc mtd misc
/recovery mtd recovery
/sdcard vfat /dev/block/mmcblk0p1 /dev/block/mmcblk0 ext4
/system ext4 /dev/block/mmcblk0p3
/int-cache yaffs2 cache
/int-data yaffs2 userdata
/int-system yaffs2 system
- On boot ramdisk, change the init.rc file as follows (diff output):
Code:
[email protected]:~/Descargas/bootimages$ diff boot.img-orig_ramdisk/init.rc boot.img-ramdisk/init.rc
22d21
< export SD_EXT_DIRECTORY /sd-ext
68,69d66
< mkdir /sd-ext 0771 system system
<
100,103c97,100
< mount yaffs2 [email protected] /system
< mount yaffs2 [email protected] /system ro remount
< mount yaffs2 [email protected] /data nosuid nodev
< mount yaffs2 [email protected] /cache nosuid nodev
---
> mount ext4 /dev/block/mmcblk0p3 /system
> mount ext4 /dev/block/mmcblk0p3 /system ro remount
> mount ext4 /dev/block/mmcblk0p2 /data nosuid nodev
> mount ext4 /dev/block/mmcblk0p4 /cache nosuid nodev
- Recreate the ramdisks and images following the guide posted above, changing the mkbootimg command line to (notice the base and cmdline parameters; for recovery, change boot to recovery on all instances):
Code:
mkbootimg --base 0x12800000 --cmdline 'mem=471M console=ttyMSM2,115200n8 androidboot.hardware=thunderg' --kernel boot.img-kernel --ramdisk boot.img-ramdisk.gz -o boot-new.img
Ahaha another sleepless night ahead to test this out. Any Quadrant Advanced I/O score for comparison?
I've updated boot images to Mik's CM7.02 beta 6.3, attached below.
I'm going to run a Quadrant Advanced and let you know. Anyway, I don't think I will get good results, as my SD card is cheap and buggy, half the time it doesn't get mounted, with or without this mod. Also, I think we'll get better scores with your tweaks, especially with the modded libsqlite.so.
The idea behind this is not to get impressive results or leave it as a definitive mod (as it is right now). Instead, the idea I have is to start moving some things back to the internal memory, for instance, mounting [email protected] as /data/dalvik-cache (just an idea). Basically, leaving the things that need fast reading times, but infrequent writes in the SD, and the things that are constantly being written to, in the internal memory.
Seems awesome. I already booted up perfectly with the modded .imgs, no issues.
so what class of sd card do you preffer?
still class 4 above?
well, sorry about what im going to say , but if **** happened and luckily sd card got corrupted, then the phone does as well?
ive not read all of your first post,
but if ever we are changing sd cards, like example upgrading from 4g-8g,
is it necessary to repeat the whole process or copy paste is enough?(i bet not due to ext)
cmangalos said:
so what class of sd card do you preffer?
still class 4 above?
well, sorry about what im going to say , but if **** happened and luckily sd card got corrupted, then the phone does as well?
ive not read all of your first post,
but if ever we are changing sd cards, like example upgrading from 4g-8g,
is it necessary to repeat the whole process or copy paste is enough?(i bet not due to ext)
Click to expand...
Click to collapse
If **** happened you could mount it in a computer with a card reader and perform a disk check + recovery. If the sd card broke, well.. I think there's still hope, since you may boot in recovery and replace the mount points back to the internal memory ( right ? )
As for the storage upgrade, well, it's not exactly copy-paste but you should be able to duplicate the partitions without much hassle..
I really like this idea,we could get 3000+ quadrant score
But can be potentially dangerous. If anything goes wrong i think that Phone can't boot anymore.
how abt two separate roms in 6 separate partitions ???? is the bootloader cracked ??? Can we have a grub like menu to select two roms ???Way 2: Maybe somebody cud mod android's initramfs and add options there to select two different fstabs ...just a thought
a dual boot would be cool... one rom on the internal nand memory and the other on SD card...
Having fastboot disabled is such a pain in the ass...
ciaox said:
I really like this idea,we could get 3000+ quadrant score
Click to expand...
Click to collapse
Not me, because my SD card is very buggy. Anyway, it depends very much on the card, the card reader and the kernel. Anyway, it's just a proof of concept and it opens a great window for experimentation.
ciaox said:
But can be potentially dangerous. If anything goes wrong i think that Phone can't boot anymore.
Click to expand...
Click to collapse
Not at all, recovery can boot even if the SD card is damaged or not present. Then you can flash the original recovery, boot it and flash any ROM without this mod.
Steps:
- Extract recovery.img from your desired custom recovery.
- Boot recovery.
- Mount /int-cache from mounts and storage menu.
Code:
adb push recovery.img /int-cache/recovery.img
adb shell
flash_image recovery /int-cache/recovery.img
- Reboot recovery
- Flash desired ROM from any SD card.
OR: Just flash an original (released by LG) ROM through emergency mode.
sarfaraz1989 said:
how abt two separate roms in 6 separate partitions ???? is the bootloader cracked ??? Can we have a grub like menu to select two roms ???Way 2: Maybe somebody cud mod android's initramfs and add options there to select two different fstabs ...just a thought
Click to expand...
Click to collapse
Bootloader isn't cracked yet, so it would have to be implemented on the boot.img (kernel and/or ramdisk), and I don't know how. Right now is easier to swith SD cards. Anyway, ROMs should be able to share boot.img (kernel + ramdisk).
ciaox said:
Having fastboot disabled is such a pain in the ass...
Click to expand...
Click to collapse
+1. But bootloader isn't cracked yet.
Just a little heads up, but if anyone is paying attention to the Nook Color development, this is exactly how the boot process on that device works, I am running one os off the sd card and if I remove it I am back to stock. The main point of my brining this up is you create the sd card with all it's partitions by flashing an image of the sd card with the WinImage application on windows. Might at least save you some steps. Hope this helps.
tsukisan said:
Just a little heads up, but if anyone is paying attention to the Nook Color development, this is exactly how the boot process on that device works, I am running one os off the sd card and if I remove it I am back to stock. The main point of my brining this up is you create the sd card with all it's partitions by flashing an image of the sd card with the WinImage application on windows. Might at least save you some steps. Hope this helps.
Click to expand...
Click to collapse
Possibilities seem to be limitless.
Sent from my LG-P500 using Tapatalk

[i9000] System UIDs Inconsistent + sdcard corrupt

First of all sorry about my english
I have SGS GT I9000 i got the error "System UIDs Inconsistent" so i started to read on internet and try to fixit by my own but i cant solved it, the problem is i have internal sdcard with 6GB fat32 and 2GB rfs (fat32 + journal) and this 2GB have a corrupts blocks, the internal sdcard it's ok i dont recive I/O errors or something like that, so i try to fixit following this steps:
i redirect the internal sdcard to the usb port so on my mac i use the disk utility to fix this blocks, i repair the disk and make new partitions and everythings looks right but when i restart the phone all be like i dont do anythings :S
i give privileges 777 to /dev/block/mmcblok0
echo /dev/block/mmcblk0 > /sys/devices/platform/s3c-usbgadget/gadget/lun1/file
repair the disk and make partitions on "macosx disk utility"
I installed diferents roms like JVK JVO or CM7 with CM7 the phone works fine because this rom dont use rfs so dont read the 2GB with problems, but the problem became when i restart with this room the /data partition is mount over mmcblk0p1 => 6GB and when i restart the phone all the data will overwrite with my old data so CM7 launch again the start assistent and lost my wifi confg, etc...
I trie to use diferrents .pit files 512 513 812 but this doesnot work.
Maybe i can redirect /data to /system/data over CM7 but how can i made this change permanet?
What's the problem? maybe is the sdcard on readonly mode? i dont have priveliges? i cant work over rfs file system without their special tools?
Thanks to everyone...
I Found this user and he have the same problem maybe he english is better than mine and you can understand him better:
I have a similiar problem with my internal SD on my I9000. Somehow I am unable to change anything on my sd...be it copying new files to it, deleting existing files or formating it.
It actually tells me that it did those actions and I can use programs that I copy on to my sd, but after every reboot my sd is like I never touched it(which obviously is a bad thing).
I'm using Clockwork for Recovery.
Using the print command from parted I get:
Model: MMC M8G4DD (sd/mmc)
Disk /dev/block/mmcblk0: 8221MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.8kB 6208MB 6208MB primary fat32 lba
2 6208MB 8221MB 2013MB primary lba
It seems my 2nd partition is broken.
I then tried to repair the partition with mkfs on partition 1 and 2 using ext2.
In both cases I get:
Error: Invalid superblock. Are you sure this is an ext2 file system?
{random useless information from parted concerning potential bugs}
Error: SEGV_MAPERR (Address not mapped to object)
[1] Aborted parted /dev/block/mmcblk0
I read somewhere that I should try using e2fsck to repair the partition and I tried that too.
And I got this:
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/block/mmcblk0p2
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
Deleting Partitions via parted doesn't do anything. No errors but the partitions remain.
I can still flash any firmware on my I9000 and I can even install updates via recovery.
But no matter what I do no changes to my data partition stay after I reboot my mobile.
Anyone got an idea what else I could try?
Click to expand...
Click to collapse
I have the same problem. did you look inside /dev/block/ ?
A normal phone has mmcblk0, mmcblk0p1 and mmcblk0p2.
Mine has only mmcblk0 and partition table looks broken.
Probably the internal storage is broken, this covers /data and /sdcard.
On froyo i was able to tweak /system/etc/vold.fstab to mount /sdcard from external sd, but no luck with mounting /data from external sd.
im sure you already found the solution to the problem, or perhaps you reinstalled fresh, but I just ran into the problem myself and was able to fix it by going into cwm and restoring permissions under the advanced tab. hope this helps anyone who has this same issue, it took me a while to find a solution
Hey there...!
lordscipio said:
im sure you already found the solution to the problem, or perhaps you reinstalled fresh, but I just ran into the problem myself and was able to fix it by going into cwm and restoring permissions under the advanced tab. hope this helps anyone who has this same issue, it took me a while to find a solution
Click to expand...
Click to collapse
Fixing permissions by CWM does´nt solve the problem in my case...! Ext-SD ist stil r/o and not r/w as it should be. Flashing different Fw´s, CWM´s etc. all about useless to get the UID´s persistant again. Any idea what i can try to do next...?
Regards Ede

Clone ROM To SD Card [10 Jul 2012]

This project is intended mainly for those interested in trading the near plug-and-play convenience of a dual boot flashable zip for increased flexibility when experimenting with different ROMs.
Users may also be interested in comparing the performance of identical ROMs hosted on different physical devices. Others may want to configure their emmc-based ROM, clone to SD and then flush emmc to host their entire system on removable media.
Preliminaries
Unlocked phone with fully charged, healthy battery and ClockWorkMod (CWM) Recovery 5.0.2.0 installed.
Instructions
1. Boot to primary ROM to ensure that correct boot image is flashed, though it is not necessary with the initial release of clone ROM zip.
2. Boot to CWM and connect phone to computer.
3. Partition SD card to host ROM. There are many ways to do this, but the most convenient is “SmartPart”: http://forum.xda-developers.com/showthread.php?t=1651356 .
If you're already dual booted, this step shouldn't be necessary unless you are cloning a “heavy” ROM that doesn't quite fit. If so, you can modify SmartPart to increase the size of your SD ext partitions at the expense of further downsizing FAT32. I did this when porting NottachTrix 1.3.1 to SD.
4. Flash Clone-ROM-to-SD-Card-signed.zip : http://www.mediafire.com/?ara2r3174cb9yir
This will, in sequence: a) Backup any existing SD card-based ROM, b) wipe all three ROM partitions on SD card (it does not touch your FAT32), c) push primary ROM /system, /cache and /data to SD card and d) push ROM boot image to /tmp/boot.img. That's all for now --- see Note below. The entire process can take 15-20 minutes depending mainly on prior existence of SD ROM partitions, ROM size and performance of SD card.
Faster (no SD ROM backup) Clone-ROM-to-SD-Card-No-BK-signed.zip: http://www.mediafire.com/?kbaowagqmnu6k5o
Note: In the clone zip “updater-script”, there is a block of source code commented out. I was trying to modify the boot image, but CWM does not appear to support the "unpackbootimg" and "mkbootimg" executables. And CWM's “busybox awk” does not include the gawk extensions required to adequately support binary file processing. Another (smaller) problem is that the user has no direct knowledge as to which boot image is being modified unless that image is manually inserted into the zip prior to flash, or user boots to primary ROM before cloning. So, for now I am content with modifying boot image ramdisks offline using Perl on my Ubuntu 12.04 laptop.
5. User modifies ROM boot image offline to redirect /system, /cache and /data mounts from emmc to sdcard (just three lines of code in “init.olympus.rc”). For example if ROM = Neutrino V2.8 GT, modify Neutrino GT boot image to create “boot-Neutrino-V2.8-GT-sdcard.img”. See my Auto-Modify Boot Image thread here: http://forum.xda-developers.com/showthread.php?t=1766939
Here are sample boot images ported to SD card:
boot-Neutrino-V2.8-GT-sdcard.img: http://www.mediafire.com/?oudm9qm5a0d7glh
boot-NottachTrix-1.3.1-att-sd-ext.img: http://www.mediafire.com/?nok6hp4rl5e92h6
Faux-CM7-1.00GHz-026b1boot-sdcard.img: http://www.mediafire.com/?fesm0hff58pnv28
6. Power down, enter fastboot and flash modified boot image, for example:
[email protected]:~/Desktop# fastboot flash boot boot-Neutrino-V2.8-GT-sdcard.img
sending 'boot' (2963 KB)...
OKAY [ 0.210s]
writing 'boot'...
OKAY [ 0.266s]
finished. total time: 0.476s
[email protected]:~/Desktop# fastboot reboot
rebooting...
finished. total time: 0.000s
[email protected]:~/Desktop#
After boot-up to SD, you can cross-verify that Neutrino-V2.8 was indeed cloned to sdcard by entering the android “mount” command via ADB or on phone using Terminal Emulator:
Code:
rootfs on / type rootfs (ro,noatime,nodiratime)
tmpfs on /dev type tmpfs (rw,noatime,nodiratime,mode=755)
devpts on /dev/pts type devpts (rw,noatime,nodiratime,mode=600)
proc on /proc type proc (rw,noatime,nodiratime)
sysfs on /sys type sysfs (rw,noatime,nodiratime)
tmpfs on /mnt/asec type tmpfs (rw,noatime,nodiratime,mode=755,gid=1000)
tmpfs on /mnt/obb type tmpfs (rw,noatime,nodiratime,mode=755,gid=1000)
[COLOR="Blue"]/dev/block/mmcblk1p2 on /system type ext4 (rw,noatime,nodiratime,errors=continue,barrier=0,nobh,data=writeback,noauto_da_alloc,discard)
/dev/block/mmcblk1p4 on /data type ext4 (rw,nosuid,nodev,noatime,nodiratime,barrier=0,nobh,data=writeback,noauto_da_alloc,discard)
/dev/block/mmcblk1p3 on /cache type ext4 [/COLOR](rw,nosuid,nodev,noatime,nodiratime,errors=continue,barrier=0,nobh,data=writeback,noauto_da_alloc,discard)
/dev/block/mmcblk0p13 on /osh type ext4 (rw,nodev,noatime,nodiratime,barrier=1,data=ordered,noauto_da_alloc)
/dev/block/loop0 on /pds type ext3 (rw,noatime,nodiratime,data=ordered)
/dev/block/vold/179:33 on /mnt/sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0602,dmask=0602,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/vold/179:33 on /mnt/secure/asec type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0602,dmask=0602,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /mnt/sdcard/.android_secure type tmpfs (ro,relatime,size=0k,mode=000)
/dev/block/vold/179:18 on /mnt/emmc type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0602,dmask=0602,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
Benchmarks (CF Bench)
Identical ROMs (Neutrino V2.8 GT) hosted on emmc and Class 6 SD card. Guess which one is SD ROM...
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 Notorious544d and CM/Photon/Atrix/Android dev teams for their excellent ROMs, hatefuel19 for porting NottachTrix to SD, Koush (CWM and AnyKernelUpdater) and Always_Jonezen for offering the clone-to-SD concept.
Thanks man and it's definitely worth the leg work.
Sent from my MB860 using Tapatalk 2
Nice job... :>)
downloading...
Thanks for the tips!
AWWWWWESOME!!!
Thank you for your work - man I´ve been waiting for something like this.:laugh:
I think more interesting tool would be one which changes partitions installation in zip files to one which is preferred by user with all symlinks etc.
Adam
greenwitch said:
I think more interesting tool would be one which changes partitions installation in zip files to one which is preferred by user with all symlinks etc.
Adam
Click to expand...
Click to collapse
All of the partitioning tools I have used to date perform auto-numbering.
Also, any partitions added beyond the first four primary partitions (e.g. beyond FAT32 and three primary "ext"s for dual boot) must be extended, not primary.
One interesting experiment would be to try adding a fourth "ext" for webtop2sd.
Hope this helps.
I finally got this working however the cloned version shows "Wifi error" and cannot turn on Wifi. I think this is similar to the Data error that someone posted. I am guessing this is due to permissions. I am going to try re-cloning with all of the Radios turned on at the time of cloning to see if this makes a difference. I will post back if successful.
[Update: Wifi not working even when cloned with all radios turned on prior to cloning. BTW, my ROM which shows this issue on ext-SD only is Notatrix 1.3.1. I might try a CM7 based ROM if I can get a system.img of it - right now I don't want to wipe Notatrix without getting it to fully work off ext-SD.]
If someone can create a flashable zip that fixes permissions on ext-SD card (just like CWM does for int SD), that would solve a lot of such issues easily and would be appreciated.
In order get the cloning done successfully, I did have to modify SmartPart a bit since I am using a 32GB SD card and it appears that the last 6 MB on a 32GB SD card are reserved or cannot be allocated for some reason. I already PMd sendust7 on this and am posting in case someone else also has the same issue with 32GB SD cards. Again, I am not sure if this is something to do with the specific SD card that I am using (Samsung Class10 32GB micros SD). This is the change I made to the part-sd script to get it working (reduce the size of the last created partition by 6):
After this line:
parted /dev/block/mmcblk1 mkpartfs primary ext2" $val7" "$val8"
added this block:
if [ $? -ne 0 ]
then
val8=`expr $val8 - 6`
echo "Partition 3 create failed. Retrying with a slightly smaller size to account for some large SD cards(New last sector=$val8).."
parted /dev/block/mmcblk1 mkpartfs primary ext2" $val7" "$val8"
fi
shenoyh said:
I finally got this working however the cloned version shows "Wifi error" and cannot turn on Wifi. I think this is similar to the Data error that someone posted. I am guessing this is due to permissions. I am going to try re-cloning with all of the Radios turned on at the time of cloning to see if this makes a difference. I will post back if successful.
[Update: Wifi not working even when cloned with all radios turned on prior to cloning. BTW, my ROM which shows this issue on ext-SD only is Notatrix 1.3.1. I might try a CM7 based ROM if I can get a system.img of it - right now I don't want to wipe Notatrix without getting it to fully work off ext-SD.]
If someone can create a flashable zip that fixes permissions on ext-SD card (just like CWM does for int SD), that would solve a lot of such issues easily and would be appreciated.
In order get the cloning done successfully, I did have to modify SmartPart a bit since I am using a 32GB SD card and it appears that the last 6 MB on a 32GB SD card are reserved or cannot be allocated for some reason. I already PMd sendust7 on this and am posting in case someone else also has the same issue with 32GB SD cards. Again, I am not sure if this is something to do with the specific SD card that I am using (Samsung Class10 32GB micros SD). This is the change I made to the part-sd script to get it working (reduce the size of the last created partition by 6):
After this line:
parted /dev/block/mmcblk1 mkpartfs primary ext2" $val7" "$val8"
added this block:
if [ $? -ne 0 ]
then
val8=`expr $val8 - 6`
echo "Partition 3 create failed. Retrying with a slightly smaller size to account for some large SD cards(New last sector=$val8).."
parted /dev/block/mmcblk1 mkpartfs primary ext2" $val7" "$val8"
fi
Click to expand...
Click to collapse
Since you're having problems with Nott 1.3.1 on SD-ext and I need a stable ROM for my business trip to Europe tomorrow, I thought it would be helpful to go through the entire process of cloning Nott 1.3.1.
Here's what I did today:
Install NottachTrix 1.3.1 using CWM 5.0.2.0 and select all defaults.
At MotoBlur welcome screen, go to Settings > Set up Wifi to configure wireless.
Set up MotoBlur and Google. This should not be necessary, but we want to reduce duplication of effort after cloning.
Accept all updates to existing apps.
Clone: http://forum.xda-developers.com/showthread.php?t=1764680
Configure dual boot: http://forum.xda-developers.com/showthread.php?t=1645344
Modify ROM2 boot.img: http://forum.xda-developers.com/showthread.php?t=1766939 Call it “boot-repack.img”.
Then...
Code:
adb shell mount sdcard (may not be necessary)
adb push boot-repack.img /sdcard/Boot/ROM2/boot.img
Boot to fastboot and reboot to ROM2:
Code:
fastboot flash boot boot-repack.img
fastboot reboot
Use Android mount command to verify ROM2 mounts for /system, /cache and /data.
System can now dual boot Nott 1.3.1 on internal (/sdcard) and external (/sdcard-ext) . And wifi comes right up on both sides.
I'm not sure why ROM2 would misbehave for you since it is an exact replica of ROM1...
sendust7 said:
Install NottachTrix 1.3.1 using CWM 5.0.2.0 and select all defaults.
I'm not sure why ROM2 would misbehave for you since it is an exact replica of ROM1...
Click to expand...
Click to collapse
Thanks, works now - I think (but cannot be certain) that it was the faux 1.0G kernel that I had installed on Notta earlier that seems to be the reason. (Maybe the faux 1.0G kernel in Nottachtrix Aroma installer may have some paths set that refer to internalSD and are not changed during the cloning process?)
I didn't do all that you mentioned (mainly because I wanted to preserve the Nottachtrix install in the state it was in on the internal SD), but you pointed me in the right direction by saying "defaults" and that helped.
I reinstalled Nottachtrix, without deleting existing data, directly to SD using hatefuel19's Nottachtrix1.3.1.sd-ext.zip http://forum.xda-developers.com/showpost.php?p=27543308&postcount=1 from the other thread selecting the default ATT kernel and now the Wifi is working!.
Thanks for taking the time to experiment with this and respond to me.
Now that Nottachtrix has been successfully cloned to ext-SD, I can now proceed to do more experimental work by using my internal SD for CM7, CM9 or related ROMs.
CF-bench results from Nottachtrix 1.3.1 ROM on ext-SD versus int-SD. The better one is int-SD. However, despite the gap in the benchmarks, I didn't feel much of a difference during regular usage between the two and I think I can confidently say that the ext-SD version is going to be my primary now that its fully working. I plan to use the int-SD for experimental ROMs.
[Note the ext-SD version benchmark is uising the stock ATT kernel while the internal-SD version is using the Faux1G kernel. So not necessarily a good comparison, but realized that only after posting].

[MOD] Get more usable space with smaller custom roms

Hello
scroll to the bottom of this post for an update
So, i've been searching now for a while for a guide on how to get more internal space and reduce the /system partition of my sgs3,
since many custom roms are much smaller in size compared to stock.
Since i haven't found any, i've figured i'll try doing it myself.
This requires some linux/unix shell knowledge, so unless you used linux shell and/or adb before, i don't recommend trying this.
Also, i have done this on GT-I9300, the international version. If yours is not the same, the partition layout will probably differ
Requirements:
* parted ( can't post links yet.. )
* adb ( android sdk, platform tools )
* CWM recovery installed
* Custom ROM zip on your PC to upload after the operation.
Alright, so here goes. ( since i already mentioned this is an advanced operation, i'll keep it pretty basic )
1. Reboot into CWM recovery
2. Unmount everything possible (either in CWM or 'adb shell', i used the latter - more reliable i would guess)
3. adb push X:\xx\xx\parted /
4. adb shell
5. chmod +x parted
Now the real fun begins.
6. /parted /dev/block/mmcblk0
This will launch parted. type 'p' and press 'enter', you'll see something like this:
Code:
Number Start End Size File system Name Flags
1 4194kB 8389kB 4194kB BOTA0
2 8389kB 12.6MB 4194kB BOTA1
3 12.6MB 33.6MB 21.0MB ext4 EFS
4 33.6MB 41.9MB 8389kB PARAM
5 41.9MB 50.3MB 8389kB BOOT
6 50.3MB 58.7MB 8389kB RECOVERY
7 58.7MB 92.3MB 33.6MB RADIO
8 92.3MB 1166MB 1074MB ext4 CACHE
9 1166MB 2777MB 1611MB ext4 SYSTEM
10 2777MB 3364MB 587MB ext4 HIDDEN
11 3364MB 3372MB 8389kB OTA
12 3372MB 15.8GB 12.4GB ext4 USERDATA
Now you need to calculate the partition sizes you actually need. Ignoring first partitions up to CACHE not to mess things up.
As far as i know, the CACHE partition is used for OTA, hence it's size - to fit ~ size of the rom. Personally i have no intention of using OTA, so i made the partition 100mb. I'm definitelly no expert in hacking android yet, but personally i haven't noticed myself using /cache more than that.
HIDDEN contains some preloaded apps - not valid in case of custom roms. I made it 1mb.
Not sure what OTA partition is used for, but again, i don't use OTA so i don't really care. 1mb.
As for SYSTEM, this depends how big is your custom rom. I currently use SlimBean which is ~100mb together with gapps, but just in case i've set the size to 300mb.
and the rest goes for USERDATA. I think you can already forsee a few more GBs for internal storage
So, just remove all the partitions that need to be resized and recreate them:
Code:
(in parted)
rm 8
rm 9
rm 10
rm 11
rm 12
then issue 'mkpart' 5 times to recreate the partitions.
When asked for a name, just press enter (we'll set the names later, since mkpart didn't change the names for me anyway)
When asked for type, you can either enter ext4 or simply press enter. We'll format partitions afterwards anyway.
When asked for start, enter the value from last partition's 'End'. For CACHE that would be the end of RADIO, so 92.3MB
For End enter the size you want. 10KB, 20MB, 1GB - annotations accepted.
After you create a partition, issue 'p' to check it's End for the next partition's start.
For USERDATA End just enter what you saw in the beggining, 15.8GB in my case.
exit parted, 'q'
7. format new partitions (except OTA)
Code:
mke2fs -T ext4 /dev/block/mmcblk0p8
mke2fs -T ext4 /dev/block/mmcblk0p9
mke2fs -T ext4 /dev/block/mmcblk0p10
mke2fs -T ext4 /dev/block/mmcblk0p12
For USERDATA i also used an option '-m 0.2' to get those extra 300mb from ext4 reserve.
8. mount /data/ ; mkdir /data/media
9. exit adb ; adb push X:\xx\customRom.zip /data/media
10. Flash new rom in CWM and reboot.
That's pretty much it. At least it was for me.
I may have missed something, but i'm now assured that this is possible.
For reference:
Code:
Before:
Number Start End Size File system Name Flags
1 4194kB 8389kB 4194kB BOTA0
2 8389kB 12.6MB 4194kB BOTA1
3 12.6MB 33.6MB 21.0MB ext4 EFS
4 33.6MB 41.9MB 8389kB PARAM
5 41.9MB 50.3MB 8389kB BOOT
6 50.3MB 58.7MB 8389kB RECOVERY
7 58.7MB 92.3MB 33.6MB RADIO
8 92.3MB 1166MB 1074MB ext4 CACHE
9 1166MB 2777MB 1611MB ext4 SYSTEM
10 2777MB 3364MB 587MB ext4 HIDDEN
11 3364MB 3372MB 8389kB OTA
12 3372MB 15.8GB 12.4GB ext4 USERDATA
After:
Code:
Number Start End Size File system Name Flags
1 4194kB 8389kB 4194kB BOTA0
2 8389kB 12.6MB 4194kB BOTA1
3 12.6MB 33.6MB 21.0MB ext4 EFS
4 33.6MB 41.9MB 8389kB PARAM
5 41.9MB 50.3MB 8389kB BOOT
6 50.3MB 58.7MB 8389kB RECOVERY
7 58.7MB 92.3MB 33.6MB RADIO
8 92.3MB 192MB 99.7MB ext4 CACHE
9 192MB 500MB 308MB ext4 SYSTEM
10 500MB 501MB 1000kB ext2 HIDDEN
11 501MB 502MB 1000kB OTA
12 502MB 15.8GB 15.3GB ext4 USERDATA
So now i have 13.8Gb of usable space on my sgs3 and i'm pretty happy about it.. No need to convert user apps to system apps in titanium any more..
Since i'm not sure about the effects of this for the long term, please provide me feedback if it went ok for you or not.
And if you have any points to make why this is not good i would also appreciate that.
UPDATE:
First of all, parted seems to be included in CMW, at least the cwm-touch-6.0.1.2 version has it ( noticed only after a while )
So no need to look for parted binaries if you're using that.
Second - as mentioned by sorg, this does mess up the partition table and anything that needs odin will not work. Tried myself, messed up the whole thing, but recovery was still half operational.
Anyway, using .pit ( GT-I9300_mx_20120329.pit ) the partition table was restored on my I9300 while flashing official stock, LH8.
So that's all fine. In case you don't want to try .pit method, you could simply restore the partition table using parted. Basically resize the partitions using same method to the original sizes. haven't tried this myself, but i imagine it should work
One last note, since i was too eager to do this all, i didn't notice the 'unit' command in parted. basically you can use 'unit kib', 'unit mib' to get the 'computer' values for sizes, which actually make more sense looking at parted output. the OTA partition is for example exactly 8mb (mib).
To get the 1000s units, use 'unit kb', 'unit 'mb' or 'unit compact' which selects the unit automatically based on partition size.
Alright,you've got some balls dude.I got to give you that!Bravo,really nice work.I don't need it atm (32gb version rocks hard),but I may do it for the fun of it.
Love it!... but there will be someone posting here, crying their eyes out before long (no sympathy from me however).
So much for the 'xda-downloaders.com' mentality and moar powah to the developer!
I salute you.
Very useful man. Thanks!
Sent from my GT-I9300 using xda app-developers app
Nice mod man!
You've got balls of steel trying to do that,i really admire you...
Anyway,excuse me if i'm wrong but i think applications you get form market get downloaded in cache first?
If you shrink that partition won't you have issues with apps?
1024Kb is one MB not 1000. it is 2^10 for a full MB. Great guide though, and VERY nice detailed instructions. Thank you, and you might wanna put a "I am NOT responsible" banner at the top!!!
nfsmw_gr said:
Nice mod man!
You've got balls of steel trying to do that,i really admire you...
Anyway,excuse me if i'm wrong but i think applications you get form market get downloaded in cache first?
If you shrink that partition won't you have issues with apps?
Click to expand...
Click to collapse
You might have issues if you try to download apps that the apk is bigger than the cache partition. Otherwise i don't think there's an issue. And since i don't download anything above 100mb, that's why i made it so. and even then, you can just symlink some folder in /data to /cache and you'll have all the space in the world for you cache..
b-eock said:
1024Kb is one MB not 1000. it is 2^10 for a full MB. Great guide though, and VERY nice detailed instructions. Thank you, and you might wanna put a "I am NOT responsible" banner at the top!!!
Click to expand...
Click to collapse
That's how parted displays it.
Ok, so 1000KB in parted equals 1024KBs or 1MB? Just trying to get this right...
Sent from my GT-I9300 using xda premium
b-eock said:
Ok, so 1000KB in parted equals 1024KBs or 1MB? Just trying to get this right...
Sent from my GT-I9300 using xda premium
Click to expand...
Click to collapse
1MB. In the guide above i have put 501MB for start and 502MB for end for OTA partition for example. That's 1MB in size, but gets displayed as 1000Kb. And 1000MB would be 1GB there.
I guess parted calculates in 10s and actually all of the hard drives are calculated like that on label. So in reality there's 16000000000 of bytes in my SGS3. divide that by 1024 a couple of times and you get lower 'actual' size. then file system format reduces usable space even more, but that's another subject...
Does this not qualify as Original Development .
OP i would PM a mod to ask for inclusion in Original i have .
jje
Well yes i guess. Just didn't have permissions to post there
If a mod reads this, feel free to move the thread. Otherwise i'll pm someone when i get home
Sent from my GT-I9300 using xda app
Hardware uses the industry-standard 10^3=1000 (according to sni: KiB) while software tends to use 2^10=1024 (according to sni: KB)
Sent from my GT-I9300 using xda premium
i made similar changes to my I9000 before, no problems at all
edit forgot to mention that the only thing you have to take care of is how to install newer roms with the new layouts in the future, but i bet with your knowledge in linux it wont be a problem to you at all
Will these changes in parted be saved into PIT structure?
Otherwise ODIN may repartition this if u will flash anything through it. Probably it won't touch data outside flashed part, so in this case it's still possible to flash for example recovery partition (in case if it get corrupted). If ODIN write some marks in all partitions every time then you may corrupt data on later partitions.
Btw, to make this thread useful, here is parted i've found on http://forum.cyanogenmod.com/topic/6433-solved-messed-up-partitions-on-internal-storage/ :
http://www.sendspace.com/file/w6hi6x
sorg said:
Will these changes in parted be saved into PIT structure?
Otherwise ODIN may repartition this if u will flash anything through it. Probably it won't touch data outside flashed part, so in this case it's still possible to flash for example recovery partition (in case if it get corrupted). If ODIN write some marks in all partitions every time then you may corrupt data on later partitions.
Btw, to make this thread useful, here is parted i've found on http://forum.cyanogenmod.com/topic/6433-solved-messed-up-partitions-on-internal-storage/ :
http://www.sendspace.com/file/w6hi6x
Click to expand...
Click to collapse
As far as I know Odin only repartitions the device if you include the correct pit for the device and check repartition.
L
9Lukas5 said:
As far as I know Odin only repartitions the device if you include the correct pit for the device and check repartition.
Click to expand...
Click to collapse
ODIN always read PIT file from device if you don't provide such. You can check ODIN logs. I believe, ODIN does following things:
1) if PIT file not provided, then read it from device
2) check file names assigned to every partition and pick them from supplied TAR file
3) write files directly (after un-sparse img files if required) to flash addresses taken from PIT.
so, if PIT structure in I9300 is not the same as GPT partition table, then you may mess data if you will accidentally flash parts beyond CACHE partition through ODIN.
A little update:
First of all, parted seems to be included in CMW, at least the cwm-touch-6.0.1.2 version has it ( noticed only after a while )
So no need to look for parted binaries if you're using that.
Second - as mentioned by sorg, this does mess up the partition table and anything that needs odin will not work. Tried myself, messed up the whole thing, but recovery was still half operational.
Anyway, using .pit ( GT-I9300_mx_20120329.pit ) the partition table was restored on my I9300 while flashing official stock, LH8.
So that's all fine. In case you don't want to try .pit method, you could simply restore the partition table using parted. Basically resize the partitions using same method to the original sizes. haven't tried this myself, but i imagine it should work
One last note, since i was too eager to do this all, i didn't notice the 'unit' command in parted. basically you can use 'unit kib', 'unit mib' to get the 'computer' values for sizes, which actually make more sense looking at parted output. the OTA partition is for example exactly 8mb (mib).
To get the 1000s units, use 'unit kb', 'unit 'mb' or 'unit compact' which selects the unit automatically based on partition size.
where can i get this "GT-I9300_mx_20120329.pit" if something went wrong ?
fuflo said:
[...] Second - as mentioned by sorg, this does mess up the partition table and anything that needs odin will not work. Tried myself, messed up the whole thing, but recovery was still half operational.
Anyway, using .pit ( GT-I9300_mx_20120329.pit ) the partition table was restored on my I9300 while flashing official stock, LH8. [...]
Click to expand...
Click to collapse
Do you mean that after repartitioning that way, you weren't able to flash e.g. a modem with Odin? Because I tried it just now, and for me it's working fine.
From my understanding about the .pit file, the pit gives informtion about the start and end point for the partitions. After we have repartitioned the device partially, for the changed partitoins the information in the pit file doesn't match anymore, but as kernel, modem, recovery, etc. are stored on the partitons 1-7 and we haven't changed them, Odin pulls the pit from our device and flash to modem e.g. to the place the information in the pit file says. So all flashing actions which only go to the partitions 1-7 shouldn't be problematic, only if you want to flash a whole samsung firmware with Odin you have to tick repartitioning and select the correct pit file in Odin.
And then I have a question regarding doing the same on the S4. The S4 has a protected bootloader as you maybe has heard of. Do you think this method is also usable on the S4 without the danger of a hard-brick? From the recovery all the partitions I want to change ( cache, system, data, ...) are also flashable, only those before are protected, so could/should it work? Invisiblek has written it would brick my phone :
invisiblek said:
DO NOT DO THIS
that link is for an exynos sgs3
our pit is signed. This will brick your device.
Click to expand...
Click to collapse
L
You are most likely correct with the first part of your post. I haven't tried flashing separate parts of a rom at that time, but it would most likely work.
Regarding S4, to be honest i have no knowledge of it. Even more so about signed stuff. From general knowledge, if the signature isn't connected the things you want to modify, it would probably work, but don't take my word for it. You'd better off discussing this in the S4 forums
Regarding GT-I9300_mx_20120329.pit, i later read that it's for 64gb version of i9300. Although it worked fine for me. As for where to get it, just google it.. there are zips all around the net with various versions, including this one.

[Q] Internal Memory FUBAR? ADB help

Hi all,
Tearing my hair out here (and I have SFA left anyway)
My Father-in-law's SGS i9000 seems to have real issues. Initially problem I was having was that there was an app I could not uninstall- it would reappear on reboot. I initially suspected malware or such, but it appears to be a real problem with the internal memory. I had MIUI installed on it, but wanted to change to a more stock ROM.
First time I really started to worry was when I found that every time I put a new rom onto the internal sdcard, it disappeared at reboot (and thus wasn't there to install when rebooted into CWM)
Since then, haven't had a functioning phone.
adb push to sdcard still not persistent on reboot.
Cannot flash new ROM with ODIN either, although KERNEL changes, filesystem no longer mounts.
I think the version of MIUI I was using used an ext4 lagfix, as inside an adb shell, I can see the partitions:
parted /dev/block/mmcblk0
a "print" lists two partitions:
Number Start End Size Type File system Flags
1 32.8kB 14.4GB 14.4GB primary fat32 lba
2 14.4GB 16.4GB 2013MB primary ext4 lba
rm 1, rm 2
to try to delete the partitions and start again- doesn't work. Nothing happens
If I load partition 2 into parted:
parted /dev/block/mmcblk0p2
print
Model: Unknown (unknown)
Disk /dev/block/mmcblk0p2: 2013MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 2013MB 2013MB ext4
Can;t check any partitions as ext4 isn't supported by parted.
I cannot remove any partitions, reformat them or anything.
e2fsck errors as it cant read superblock flags on any of the partitions.
Any other ideas? Anyone?
I don't want to toss the phone out
http://forum.xda-developers.com/showthread.php?t=845708
i dont know if this will help u but u can try this guy instruction. See link above
compacity said:
http://forum.xda-developers.com/showthread.php?t=845708
i don't know if this will help u but u can try this guy instruction. See link above
Click to expand...
Click to collapse
If that worked, it would have been just what I was looking for
I googled the hell out of this problem, and that one never came up, but others I'd seen led me to try that same plan.
Where it fails on my device, is that deleting the partitions in "parted" fails- rm1 followed by rm 2 to delete the partitions. "Print" reveals they're still there.
Any other partition tools worth trying?
I got it back to square one:
Flashed kernel thru Odin with a version of CWM that worked.
reboot into recovery.
Flash update from SDcard- card contents still the same, so could re-flash MIUI.
reboot, bootloop. Re-enter CWM recovery and reflash.
Back to Square One - MIUI 1.12.16 (JVK)
Cannot install anything - nothing is persistent after reboot, even WIFI settings disappear
If it is any help to anyone who knows what they're talking about:
Now that MIUI boots I can look at the filesystem better.
Can anyone point me in the direction of what I should be looking for/trying to do to figure out what is wrong here?
try finding solution here, its PIT stop for i9000 problem
http://forum.xda-developers.com/showpost.php?p=30415128&postcount=1
Mine seems to be a bit tougher than these solutions can deal with.
Tried assorted ROMs over past day. No install works.
Cannot install anything from internal memory, as nothing dropped into that card will remain after a reboot.
Installing anything from an external card just throws up bootloops etc- as the only thing that seems to be able to retained between boots is the kernel/CWM.
If I install a new ROM, first flash says partition table is incompatible and /data will be overwritten (no problems, nothing on it). I accept the inevitable and re-select the ROM.
Reboot bootloops, as expected, reboot into CWM (now a new version with the Kernel), try reflashing the ROM image- Error 0 or 7. Try from External Memory- same. Try sideloading image. Same. All I can do is re-flash the MIUI image on internal SDcard (which works)
It looks like the internal memory refreshes itself from a recovery image at each boot? (I think).
Anyway- can't get anything to stick, except MIUI
edit:
http://forum.xda-developers.com/showthread.php?t=761537&page=3
http://forum.xda-developers.com/showthread.php?t=1230059&page=3
hav u try this 2 link as this is da only thread matches ur MBR problem
compacity said:
did u try any jb kernel out there? as its also ext4 n push it using adb. juz a suggestion though.
Click to expand...
Click to collapse
Good suggestion Logical
I'd thought that also- The JB kernels should support ext4.
No joy though
The version of CWM recovery that is stable with the MIUI install is 5.0.2.7, and it doesn't have any voodoo/lagfix options
When I flash a kernel with a CWM with lagfix, and try to use the CWM lagfix toggles, nothing changes.
Doesn't matter what I select inside CWM, it reads the status from memory as "Lagfix on, Debug off"
The reason I asked about ext4 tools in ADB is that running filesystem commands in a shell just throws up errors I can't seem to fix.
e2fsck just throws up superblock errors (on both /dev/block/mmcblk0 and the partition /dev/block/mmc0p2.
Defining one of the backup superblocks doesn't help- they're all bad.
"parted" doesn't work anymore (i note it isn't in /sbin, so I am picking this kernel doesn't install it), but even when I did have it, "parted" doesn't support ext4. Using "rm" to remove a partition did exactly nothing.
Starting to think the only way forward would possibly be flashing a custom .pit file to define partitions that move the data off an obviously bad block? Above my skill level however LOL
refresh browser see my post above again

Categories

Resources