hey
i wanna shrink desire z bulid to something around 270mb
then i remove same apps with titanium backup
and few animations of the boot and shutdown and other jpgs that take space
using file explorer with root
so the system.ext2 is shrink by around 100mb
from 370mb to 270mb but file size is the same i need to capture it
those cmds i used
Code:
sudo su
dd if=/dev/zero of=/dev/system.ext2 bs=1048760 count=270
[ dont remember the correct bs ]
mke2fs -F system.ext2
mount -t ext2 system.ext2 /media/sys2 -o loop
mcopy /media/sys2/* /media/sys
umount /media/sys
all went fine
but when i wanna use the new system.ext2 which 270mb its wont load it stuck
and the original system.ext2 which is 370mb or more is working
what im doing wrong
Proz00 said:
but when i wanna use the new system.ext2 which 270mb its wont load it stuck
and the original system.ext2 which is 370mb or more is working
what im doing wrong
Click to expand...
Click to collapse
Hi. I want to do this too - sort of. Can YOU pleasssssseeeeeeeee HELP>>>????
phoenixtraveller said:
xCan someone tell me why it stops at desktop ubuntu?
I copy all linux files to sdcard \linux and setup magldr sd-boot to here.
COPY (not renamed) initrd.cpio.gz to initrd.gz and adb_zimage to just zImage.
partitioned sd card previously with 4096-ext and 256-cache (16gb) using CLOCKWORK OF COURSE.
NAND=clockwork/blank.
Boots.
But can someone help me/make a boot.img+system.img(containing FIXED initrd.gz and zImage) PLEASE - and proper flash.cfg for daf.exe ???
or UPDATE.ZIP for clockwork install ???
Thanks.
Will donate $.
Click to expand...
Click to collapse
ubuntu/magldr/clockwork/hspl...
And - How to mount rootfs.ext2 to YAFFS2/Nand? or even data.img? or sdcard partition ? GpartedLive?
Please: just want a simple boot.img+system.img combo that will allow daf.exe to install (correct parts etc) Ubuntu to NAND - and if this not possible then at least cut down version (resize rootfs.ext2 and mount to sd???) for AD SD BOOT.
Can anyone please help?
Thankyou.
Proz00 said:
hey
i wanna shrink desire z bulid to something around 270mb
then i remove same apps with titanium backup
and few animations of the boot and shutdown and other jpgs that take space
using file explorer with root
so the system.ext2 is shrink by around 100mb
from 370mb to 270mb but file size is the same i need to capture it
those cmds i used
Code:
sudo su
dd if=/dev/zero of=/dev/system.ext2 bs=1048760 count=270
[ dont remember the correct bs ]
mke2fs -F system.ext2
mount -t ext2 system.ext2 /media/sys2 -o loop
mcopy /media/sys2/* /media/sys
umount /media/sys
all went fine
but when i wanna use the new system.ext2 which 270mb its wont load it stuck
and the original system.ext2 which is 370mb or more is working
what im doing wrong
Click to expand...
Click to collapse
It should be working.
270M = 276480
Code:
sudo su -
mkdir /mnt/system
mount -o loop system.ext2 /mnt/system
genext2fs -d /mnt/system -b 276480 system.ext2.new
umount /mnt/system
rmdir /mnt/system
Related
Hi I have some applications in my Data.img
that I would like to extract. Is there any way
I can do this?
Thanks
Tc
Code:
cd /sdcard
mkdir datamount
mkdir AppsBackup
mount -o loop data.img datamount
cp /datamount/app/*.apk /AppsBackup
umount -f datamount
rmdir datamount
Just check relevant directories, I am assuming you are running everything from root of sd card.
Im running it off nand
what should I do?
Even simple
Code:
mkdir /sdcard/Backupapps
cp /data/app/*.apk /sdcard/Backupapps
you can also use one of the many backup programs in the market. I like Astro file manager, in the tools, it has a backup tool. it will backup to the sdcard.
If I were to create a 1.5gb fakesd.img ext2 file
done once, on computer
dd if=/dev/zero of=fakesd.img bs=1048576 count=1536
mke2fs -F fakesd.img
--------
done in rootfs-init
losetup /dev/block/loop2 /sdcard/fakesd.img
mount -t ext2 -o noatime,nodiratime /dev/block/loop2 /fakesd
change " symlink /mnt/sdcard /sdcard/ " in rootfs-init.rc
symlink /mnt/sdcard /fakesd/
probably want to avoid changing the external path from /mnt/sdcard/ to anything.. for compatibility sake..
I have my windows stuff on my card. I want android to index as little as possible yet still be able to access my sd card at /sdcard.. Will this work?
I have a feeling that someone is just going to tell me to partition card. I don't feel like it right now..
Partition the card Just kidding, but I like your thinking.
Trying to test it out post boot.. My router has more command line functionality, thanks Google.
This is outdated and probably does not work.
UnCoRrUpTeD SD--PARTITIONER
I have made this really easy to partition your sdcard while preserving all data on the fat32 partition.This one is used to setup your sdcard for a2sd and swap instead of using the built in partitioning program, which will destroy all your fat32 contents. Eventually I will add support for backing up the ext partition if you want to resize the existing partitions.
You have the option of specifying the size of the partitions in /sdcard/sdpartmap.txt
To specify your own sizes and filesystem do..
Code:
c:\xxxxxx\adb shell
/ # echo 150 200 ext4 > /sdcard/sdpartmap.txt
replacing 150, 200, ext4 with your own
.
The 1st number is a2sd data partition (system/sd or sd-ext mounted at /dev/block/mmcblkXp2)
The 2nd number is swap partition. (mounted at /dev/block/mmcblkXp3)
The 3rd entry will be for ext3 or ext4 FS
It's best to do a2sd data in increments of 256MB and
swap in increments of 32MB
If you don't specify an ext type it will default to ext2.
If there is no sdpartmap.txt file the partitions will be automatically set to
a2sd data = 256
swap = 0
ext type = ext2
Make sure you have enough free space on the card to accommodate the extra partitions until I incorprate checks for that.
INSTRUCTIONS:
1. Download unCoRrUpTeD_SD--PARTITIONER.zip
2. Reboot into recovery
Code:
adb shell reboot recovery
3. Unzip the contents of sdpart.zip. There should be a folder named sdpart. Push the files inside sdpart folder to /tmp/
Code:
adb push c:\xxxxxx\sdpart /tmp/
4. run /tmp/sdpart.sh in adb shell
Code:
adb shell /tmp/sdpart.sh
If sdpart.sh doesn't run then you will have to chmod it before running it, but it should already have permission to run.
Code:
adb shell chmod 777 /tmp/sdpart.sh
If for some reason you can not push the files mount your sdcard through your phone and copy the sdpart folder to your sdcard and then
Code:
adb shell reboot recovery (might need to do adb reboot recovery or just reboot into recovery)
adb shell
mount /sdcard
cp -a /sdcard/sdpart/* /tmp
/tmp/sdpart.sh
you said you could make it into a flashable Zip /
Would love to see this.
ADB Retarted.....
mahalocat said:
you said you could make it into a flashable Zip /
Would love to see this.
ADB Retarted.....
Click to expand...
Click to collapse
That's why I put step by step instructions. I'll have to find the flashable one.
Sent from my HERO200 using XDA App
Worked wonderfully!!!
will try out, thanks.
Does this work for the droid incredible?
It should work on any phone, but you should back up your sdcard to a PC every once in a while just in case your sdcard gets corrupted or quits working.
Sent from my HERO200 using XDA App
How can I tell if it worked? Can I check my partition sizes or my ext somehow?
nagasgura said:
How can I tell if it worked? Can I check my partition sizes or my ext somehow?
Click to expand...
Click to collapse
I'll add some things to the OP later today. When you run the script it should output your SD partitions before and after.
Sent from my dual-booted liquidsense 2.1
how to do in te???
no pc guy/....
You've got to be kidding me.
Saves me the trouble of transferring 16 GB everytime I partition.
Waiting for the flashable zip.
Sent from my Galaxy Fit @ 801Mhz- RazoDroid
Dude what ever happened to the whole dualboot thing for every phone I really wanted that
via tha xquizit EII4G ♚ of phonez
Hey you did a good job but there's some bugs in it
the script
Code:
$parted $extmount -s mkpartfs primary ext2 $newfat $newa2sd &> /dev/null ;
if [ "$exttype" = "ext4" ] ;
then
$mke2fs -T ext4 ${extmount}p2 &> /dev/null ;
fi
obviously ,it can't creat ext3
so I crrect it
Code:
$parted $extmount -s mkpartfs primary ext2 $newfat $newa2sd &> /dev/null ;
if [ "$exttype" = "ext2" ] ;
then
$mke2fs -T ext2 ${extmount}p2 &> /dev/null ;
elif [ "$exttype" = "ext3" ] ;
then
$mke2fs -T ext3 ${extmount}p2 &> /dev/null ;
elif [ "$exttype" = "ext4" ] ;
then
$mke2fs -T ext4 ${extmount}p2 &> /dev/null ;
fi
great work man, thanks for this!
dswaggz said:
Dude what ever happened to the whole dualboot thing for every phone I really wanted that
via tha xquizit EII4G ♚ of phonez
Click to expand...
Click to collapse
I ran into a problem with my java code and got frustrated with trying to figure out why it doesn't work correctly. That and my wife was getting upset that I was on the computer all the time. I have been running the stock ROM on my EVO 3D since getting it on launch day and just recently flashed some ROMs in Boot Manager to test some things out.
What if I wanted to go back and delete the ext partition?
Somehow I fail to see how this is easier than using the parted that's built in to almost every recovery out there.
But maybe that's just me.
Just make the fat partition the size of the sdcard and swap and ext both 0.
When using parted in recovery you lose your data (pics, downloads, backups, etc). This way you won't lose anything.
Sent from my PG86100 using XDA App
Sounds great.. is flashable zip available yet?
Sent from my HD2 using xda premium
If i already have a 2048 mb ext4 and i want to add a swap partition what i have to do
Sent from my HTC HD2 using XDA
I've seen a lot of threads detailing how to create an Ext4 partition using Gparted but if you don't want to download the image and would rather do it all on your phone, here's how:
This entire procedure should take less than 5min so you can go back to messing with your phone in other ways.
REQUIRES:
CLOCKWORK MOD RECOVERY
ADB
FINGERS
I am not responsible for any damage done to your phone doing this process. =.=
1. Download the zip file provided.
2. Extract the zip file to the same folder you have ADB in. (You should now have a folder named ext4 in the same folder you have ADB)
3. Reboot the phone into MAGDLR. Then select the option to boot into the recovery.
4. Make sure that /system/ is mounted using the option to mount partition in Clockwork Recovery.
5. Open a command (cmd) prompt and cd into your folder with ADB.
6. Run these commands in the command prompt. (Commands are in BOLD)
adb push ext4 /system/etc/
adb shell
parted /dev/block/mmcblk0
print (make note of the total size of your partition here)
resize 1 0 xxxx (where xxxx is the size you want for your FAT32 partition. It should equal total size of your partition that you gleaned from print minus 1024 for the ext4 partition you're about to set up)
mkpartfs primary ext2 xxxx yyyy (where xxxx is where your previous partition ended and yyyy is the total size of your sdcard)
.... (Let it do its thing. Shouldn't take more than a minute)
print (Make sure that everything is correct: You have a fat32 partition running from 0 to xxxx and an ext2 partition running from xxxx to the total size of your partition)
quit
Now to utilize the two files we previously pushed to /system/etc/
chmod 777 /system/etc/tune2fs
chmod 777 /system/etc/e2fsck
/system/etc/tune2fs -j /dev/block/mmcblk0p2 <- You now have ext3
/system/etc/tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2 (Note: CAsE SEnSitiVE)
/system/etc/e2fsck -fpDC0 /dev/block/mmcblk0p2 (Note: CAsE SEnSitiVE) <- You now have ext4
7. You can check that it's truly ext4 by:
parted /dev/block/mmcblk0
print (It should now read that you have a FAT32 and an ext4 partition.)
quit
You're all done! Now you have a 1GB ext4 partition for all your data and apps. If you know what you're doing, these same steps can be modified so that you have two ext4 partitions if you'd like. You can also alter the size of your ext4 partition to something smaller if you don't have that many apps to install or have a smaller SDcard (512MB should be sufficient in most cases, 1GB is slightly overkill IMO)
i will try with my HD2. I need more space to install app on sd not on phone. Thanks so much
Hi, I follow your instruction but when I get a "Permision deined" error when I type in the following commond
/system/etc/tune2fs -j /dev/block/mmcblk0p2
Can you please help?
Many many thanks!!
justj said:
Hi, I follow your instruction but when I get a "Permision deined" error when I type in the following commond
/system/etc/tune2fs -j /dev/block/mmcblk0p2
Can you please help?
Many many thanks!!
Click to expand...
Click to collapse
Crap. I forgot a step. You have to type
chmod 777 /system/etc/tune2fs
chmod 777 /system/etc/e2fsck
prior to using those files. That should fix the permission denied error.
I've edited the OP to reflect the changes, thanks for pointing that out.
Thanks man
Thanks Bro I have successfully make ext4 and I am enjoying my new Rom
Using HTC Desire runnymede 5.0
Amazing. I will keep it for future reference, although I partitioned my SD with CWM recovery and Gparted.
What kind of partition is made when using CWM? I made a 1GB partition on my card that way, and it works great. But I've heard good things about having it as ext4. How does this guide reflect the fact that I already have an SD-EXT on my card that's not necessarily ext4?
Thanks!
please help
please help me i cant get it to work... its same with /system mounted and unmounted...not even one 3rd app is working for me on my win 7 64x when i want to create ext4 this is my last hope. card is brand new 8gb ultra speed its working fine so cant be problem there. it seems like chmod 777 will delete that file..
Code:
C:\Users\OgziR\Desktop\adt-bundle-windows-x86_64-20130522\sdk\platform-tools>adb
push ext4 /system/etc/
push: ext4/tune2fs -> /system/etc/tune2fs
push: ext4/e2fsck -> /system/etc/e2fsck
2 files pushed. 0 files skipped.
1573 KB/s (603400 bytes in 0.374s)
C:\Users\OgziR\Desktop\adt-bundle-windows-x86_64-20130522\sdk\platform-tools>adb
shell
~ # /system/etc/tune2fs -j /dev/block/mmcblk0p2
/system/etc/tune2fs -j /dev/block/mmcblk0p2
/sbin/sh: /system/etc/tune2fs: Permission denied
~ # chmod 777 /system/etc/tune2fs
chmod 777 /system/etc/tune2fs
~ # /system/etc/tune2fs -j /dev/block/mmcblk0p2
/system/etc/tune2fs -j /dev/block/mmcblk0p2
/sbin/sh: /system/etc/tune2fs: not found
~ #
Hye... I have 2 question...
My phone is a HTC HD2 running an NexusHD2.ICS.CM9.HWA.V2.3 ROM... The cmd prompt cant seem so fine my device. Do have any advice on this???
Secondly, what do i do with the ext4.zip file??? I mean, do it extract it, or put in same folder with ADB??
Btw, i am Super Noob on this, so i apologize if my question offends anyone... 1000 apologizes...
OK, first of all, do you have adb installed correctly? If cmd prompt can't find your device that is the most likely problem.
As for what to do with ext4.zip, you need to extract it to your adb folder.
Sent from my Vivid 4G using xda app-developers app
You can find some thread for you to move data partition to sd-ext. But there is a easier way to do that: Modify the mount point of sd-ext and data in ramdisk.
The basic step is:
0. Make a nandroid backup
1. Make an ext4 partition on your sdcard (I used gparted in ubuntu, very fast and not lost data)
2. Download your kernel as boot.img
3. Unpack you boot.img (you can find many thread said how to do, and I think the most completly tool you can get from http://forum.xda-developers.com/showthread.php?t=1241005. You can find the example to unpack boot.img, extract ramdisk, repack ramdisk, repack boot.img from the README.txt file of this tool)
4. Extract ramdisk:
Code:
gzip -dc ../unpack/boot.img-ramdisk.gz | cpio -i
If you find ramdisk.cpio file, you need to extract it by
Code:
cpio -i -F ramdisk.cpio
5. Modify the mount point of data and sd-ext
- File fstab:
+ Find the line
Code:
/data yaffs2 userdata
, and change to
Code:
/data ext4 /dev/block/mmcblk0p2
- File init.semc.rc
+ Find the line
Code:
mount yaffs2 [email protected] /data nosuid nodev
and change to
Code:
mount ext4 /dev/block/mmcblk0p2 /data nosuid nodev
- File recovery.fstab:
+ Find the line
Code:
/data yaffs2 userdata
and change to
Code:
/data ext4 /dev/block/mmcblk0p2
6. Repack the ramdisk
If you extracted from ramdisk.cpio file, you need to pack to ramdisk.cpio first
Code:
find . | cpio -o -H newc -O <target path>/ramdisk.cpio
Then repack you ramdisk: At the ramdisk folder:
Code:
mkbootfs <ramdisk folder> | gzip > <target path>/boot.img-ramdisk-new.gz
7. Repack boot.img
Code:
mkbootimg --kernel <path to>/boot.img-zImage --ramdisk <path to>/boot.img-ramdisk-new.gz -o <path to>/boot_new.img --base `cat <path to>/boot.img-base`
8. Flash boot_new.img
9. Enter CWM, wipe phone and restore from your backup
--> Done
Thanks for the info. Or you can go on cmw and create sd-ext from there.
Will it Work with an ext3 partition too?
Gesendet von meinem LT15i
lol
i dont understand at all...
ARip Kenpachi said:
i dont understand at all...
Click to expand...
Click to collapse
It's because the title is wrong.. it's not the "easy way" .. it's a little bit more 'medium - adv user' way..
If it's so hard for you, I think it's better u to search 'script/app' for doing this.
There's a lot available like link2sd, cronmod script, etc
Excellent, it worked on Vengeance Kernel, actually that was the only kernel that I was able to extract the ramdisk.
Lupus kernel has is ramdisk in another format (not gzip), and KTG is in a elf file.
The boot took a little bit longer, but i think is more stable than using init.d scripts.
EDIT: Make the backup from an old CWM (like the one on the recoveryARC.img file), newer versions will check for the correct filesystem, and as we are changing it, It will not work. For restore, use any version of CWM (the one included on Vengeance works great).
Also, if you have an LT15i, backup your /system/vendor folder, otherwise, it will be not longer available (and a lot of apps will crash), I copied it into the data folder and made a symlink into /system/vendor (and as your data folder will be bigger, thats no issue).
I can't manage to do the trick on my Arc S with DoomKernel_v22. When I flash the modified .img the phone doesn't start and i can't go into CWM.
I have two partitions on SD, the second one is the ext4 i want to use.
These are the files extracted from Doomkernel:
fstab:
Code:
/data yaffs2 userdata
/cache yaffs2 cache
init.semc.rc:
Code:
on fs
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
mount yaffs2 [email protected] /system
mount yaffs2 [email protected] /system rw remount
mount yaffs2 [email protected] /data nosuid nodev
mount yaffs2 [email protected] /cache nosuid nodev
recovery.fstab:
Code:
/cache yaffs2 cache
/data yaffs2 userdata
/system yaffs2 system
/sdcard vfat /dev/block/mmcblk0p1
/sd-ext auto /dev/block/mmcblk0p2
Can anyone help me please?