My old trusty P8000 stopped reading it's sim card and I have to get a new phone, so I thought this would be the perfect time to do a little hacking on it.
I'm a total noob to android, I've managed to root the phone and install CWM.
I've also cooked up a custom rom in android kitchen, but I'm having some problems passing the proper mount command to the update-binary.
My updater script reads:
Code:
format("yaffs2", "MTD", "system");
mount("yaffs2", "MTD", "/dev/block/mtdblock5", "/system");
show_progress(0.500000, 0);
package_extract_dir("system", "/system");
When I run the update.zip in CWM it comes back with installation complete, but the log says unmount of system failed: no such volume.
Does anyone know the proper mount commands for these old MTD flash drives?
Yes I'm sure the "system" partition is /dev/block/mtdblock5
Code:
~ # cat /proc/mtd
dev: size erasesize name
mtd0: 008c0000 00040000 "boot"
mtd1: 008c0000 00040000 "recovery"
mtd2: 00f00000 00040000 "fota"
mtd3: 09880000 00040000 "cache"
mtd4: 002c0000 00040000 "persist"
mtd5: 0e940000 00040000 "system"
mtd6: 00280000 00040000 "splash"
mtd7: 20a00000 00040000 "userdata"
The format command only works if I use:
Code:
format("yaffs2", "MTD", "system");
It doesn't work as:
Code:
format("yaffs2", "MTD", "/system");
Something to do with the MTD partition table being hardcoded into the kernel.
Also, is there any way to view CWM installer logs other than from the advanced menu on the phone. I'm only able to see the last few lines of the log, and it doesn't give me any clue why "/system" doesn't mount.
Thanks for any advice you can offer.
Ok, I fond the answer in this thread http://forum.xda-developers.com/showpost.php?p=17594598&postcount=30
Code:
mount("yaffs2", "MTD", "system", "/system");
:laugh:
Related
now this is not that relevant to vibrant but i had no where else to post thats y its in Q/A section so please if someone knows help me out here
i just got a tablet and it has no support anywhere on the net yet , i got hold of an update from the manufacture, in the update it has this script
my questions are could someone please explain what is
nand_spl.bin used for?
x-boot.bin used for?
boot.img is for boot folder
system.img is system folder
userdata.img is user data folder
i am trying to extract recovery from it so i could flash the recovery to it, in case anything goes back i would re flash the original recovery
ui_print("Setup your device...");
ui_print("update nand_spl....");
format("MTD", "nand_spl");
package_extract_file("nand-spl.bin", "/tmp/nand-spl.bin");
write_raw_image("/tmp/nand-spl.bin","nand_spl");
ui_print("update xboot....");
format("MTD", "xboot");
package_extract_file("x-boot.bin", "/tmp/x-boot.bin");
write_raw_image("/tmp/x-boot.bin","xboot");
ui_print("update boot.img....");
set_progress("2");
show_progress("0.1", 1);
format("MTD", "boot");
package_extract_file("boot.img", "/tmp/boot.img");
write_raw_image("/tmp/boot.img","boot");
show_progress("0.1", 1);
ui_print("update system.img....");
set_progress("9");
show_progress("0.02", 1);
show_progress("0.02", 1);
show_progress("0.02", 1);
format("MTD", "system");
show_progress("0.02", 1);
show_progress("0.02", 1);
show_progress("0.02", 1);
package_extract_file("system.img", "/tmp/system.img");
show_progress("0.02", 1);
show_progress("0.02", 1);
show_progress("0.02", 1);
write_oob_image("/tmp/system.img","system");
show_progress("0.1", 1);
ui_print("update userdata.img....");
show_progress("0.1", 1);
show_progress("0.1", 1);
format("MTD", "userdata");
show_progress("0.1", 1);
show_progress("0.1", 1);
package_extract_file("userdata.img", "/tmp/userdata.img");
show_progress("0.1", 1);
write_oob_image("/tmp/userdata.img","userdata");
show_progress("0.1", 1);
ui_print("Done.");
set_progress("10");
show_progress("0.1", 1);
also when i run cat /proc/mtd
i get this
dev: size erasesize name
mtd0: 000400000 00080000 "misc"
mtd1: 000c00000 00080000 "recovery"
mtd2: 000c00000 00080000 "boot"
mtd3: 010000000 00080000 "system"
mtd4: 01f400000 00080000 "userdata"
mtd5: 008000000 00080000 "cache"
mtd6: 000400000 00080000 "kpanic"
mtd7: 004c00000 00080000 "storage"
mtd8: 001000000 00080000 "deviceID"
mtd9: 000100000 00080000 "nand_spl"
mtd10: 000f00000 00080000 "xboot"
now if i extract
cat /dev/mtd/mtd1 > /sdcard/img/recovery.img
is this recovery.img flashable?
Hello,
I want to add a rule to the init.rc to autostart a program.
I tried to follow this guide:
hxxp://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
Instead of the following:
Code:
#cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00020000 "misc"
mtd1: 00500000 00020000 "recovery"
mtd2: 00280000 00020000 "boot"
mtd3: 04380000 00020000 "system"
mtd4: 04380000 00020000 "cache"
mtd5: 04ac0000 00020000 "userdata"
I am only getting:
Code:
dev: size erasesize name
mtd0: 00100000 00001000 "w25q80"
So where can I get the boot image that is installed? The device is a Galaxy Nexus 4.1.1
Thank you for your help!
Mark
Found it
On this device the boot image is located here:
Code:
/dev/block/platform/omap/omap_hsmmc.0/by-name/boot
Hello guys,
i want to write a update-script that makes some changes on the phone,
but before i can extract files, set symlinks, etc. i have to mount some partitions.
The format of the partitions is MTD, but i don´t know how to find out which block is for /system, /hidden, /data, etc. and where is the block?
I searched much in the internet, have read the instructions for edify-scripting and so on,
but i´ve never found it for MTD and never found how to find out which block is which partition.
I hope you can help
Every phone is different, so for you to get useful advice you need to state what you are using.
I've always found it very helpful to look at the updater script for custom ROMs since they have mount instructions for /system.
Sent from my HTC Desire S
BillGoss said:
Every phone is different, so for you to get useful advice you need to state what you are using.
I've always found it very helpful to look at the updater script for custom ROMs since they have mount instructions for /system.
Sent from my HTC Desire S
Click to expand...
Click to collapse
I realy have to thank you for your reply
I´m using a Motorola Motoluxe XT615 and the problem is, theres no custom ROM out there.
A friend has developt a awesome JB-Design for it and we know how to mount system, but anything else doesn´t work.
The command we´ve used:
Code:
run_program("/sbin/busybox", "mount", "/system");
Thats the output when i´m in /dev/block and enter command "ls":
Code:
dm-2
dm-1
dm-0
vold
mtdblock11
mtdblock10
mtdblock9
mtdblock8
mtdblock7
mtdblock6
mtdblock5
mtdblock4
mtdblock3
mtdblock2
mtdblock1
mtdblock0
loop7
loop6
loop5
loop4
loop3
loop2
loop1
loop0
mmcblk0p1
platform
mmcblk0
Maybe this is usefull, too. Output of command "cat /proc/mtd":
Code:
dev: size erasesize name
mtd0: 00700000 00020000 "boot"
mtd1: 00300000 00020000 "misc"
mtd2: 00300000 00020000 "misc2"
mtd3: 00200000 00020000 "splash"
mtd4: 00700000 00020000 "recovery"
mtd5: 00d00000 00020000 "ftm"
mtd6: 00d00000 00020000 "hidden"
mtd7: 01500000 00020000 "cda"
mtd8: 00060000 00020000 "dbgmsk"
mtd9: 16300000 00020000 "system"
mtd10: 0a000000 00020000 "cache"
mtd11: 183e0000 00020000 "userdata"
Well, that will work if a ROM with busybox is already installed.
Here's what's in the updater script for the HTC Desire S ROMs:
assert(getprop("ro.product.device") == "saga" || getprop("ro.build.product") == "saga");
mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/system");
...
format("ext4", "EMMC", "/dev/block/mmcblk0p25", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/system");
package_extract_dir("system", "/system");
Nope this helps. I think you need to use MTD instead of EMMC. And, obviously mtdblock9 instead of mmcblk0p25.
Sent from my HTC Desire S
BillGoss said:
Well, that will work if a ROM with busybox is already installed.
Here's what's in the updater script for the HTC Desire S ROMs:
assert(getprop("ro.product.device") == "saga" || getprop("ro.build.product") == "saga");
mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/system");
...
format("ext4", "EMMC", "/dev/block/mmcblk0p25", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/system");
package_extract_dir("system", "/system");
Nope this helps. I think you need to use MTD instead of EMMC. And, obviously mtdblock9 instead of mmcblk0p25.
Sent from my HTC Desire S
Click to expand...
Click to collapse
Finally i got it, thank you
It wasn´t even that hard. The right command is:
Code:
mount("MTD", "userdata", "/data");
mount("MTD", "system", "/system");
mount("MTD", "hidden", "/hidden");
Thanks for your help
Hi everyone. Sorry for my English. I'm trying to port cwm recovery to my rus device bliss pad a973. This is what I've done:
1. Cat /proc/mtd
[email protected]:/ $ su
[email protected]:/ # cat /proc/mtd
dev: size erasesize name
mtd0: 00800000 00200000 "bootloader"
mtd1: 00800000 00800000 "logo"
mtd2: 00800000 00800000 "aml_logo"
mtd3: 00800000 00800000 "recovery"
mtd4: 00800000 00800000 "boot"
mtd5: 20000000 00800000 "system"
mtd6: 10000000 00800000 "cache"
mtd7: 40000000 00800000 "userdata"
mtd8: 38c000000 00800000 "NFTL_Part"
[email protected]:/ #
2. dd if=/dev/mtd/mtdblock3 of=/sdcard/recovery.img
3.then i have downloaded script for unpacking img files (run it on cygwin) and have error " android magic not found"
I have put my img and cwm img for another device in winhex and have seen the difference. My img file really haven't "ANDROID! " and only readable info was kernel build info (linux - 3.0.8). More googling stucked me, i need some help. Guess xda-guru can help me to solve this problem.
my-files(dot)ru/Download/rzay/mtd3dd.img - my dump of mtd3 (sorry, couldn't upload here from tablet directly and couldn't post link to file because I am new user )
i am just looking for a simple guide on how to install insertcoin from 4.2 , i have firewater hboot soff and rooted, ? can i just flash the rom , i see problems with the operating system attempting to locate the drives if they are not partitioned correctly which is why i am asking here first, if it is as simple as just flashing the ROM then i apologize in advanced,
Thanks
U cant flash it bec its for kk
[email protected] said:
i am just looking for a simple guide on how to install insertcoin from 4.2 , i have firewater hboot soff and rooted, ? can i just flash the rom , i see problems with the operating system attempting to locate the drives if they are not partitioned correctly which is why i am asking here first, if it is as simple as just flashing the ROM then i apologize in advanced,
Thanks
Click to expand...
Click to collapse
Zara UL or CL? If UL use this modified rom for Zara UL 2.20.0000 and firewater hboot. Use recovery for Jelly Bean
https://drive.google.com/file/d/0B6bGr-ir8saMR1JvUW5qS3ZlNzg/edit?usp=sharing
standak14 said:
Zara UL or CL? If UL use this modified rom for Zara UL 2.20 and firewater hboot. Use recovery for Jelly Bean
https://drive.google.com/file/d/0B6bGr-ir8saMR1JvUW5qS3ZlNzg/edit?usp=sharing
Click to expand...
Click to collapse
its for zara cl virgin mobile, and to the guy who said it wasn't possible, that just don't make any sense , ( no pun intended ) i don't care if i have to upgrade the device to 4.4.2 or have to repartition the the drive manually , i am pretty technical and can handle any task. i just want to know the proper procedure. thanks in advanced.
[email protected] said:
its for zara cl virgin mobile, and to the guy who said it wasn't possible, that just don't make any sense , ( no pun intended ) i don't care if i have to upgrade the device to 4.4.2 or have to repartition the the drive manually , i am pretty technical and can handle any task. i just want to know the proper procedure. thanks in advanced.
Click to expand...
Click to collapse
For CL use this file. Open you rom in winrar, find path \META-INF\com\google\android and add from winrar menu downloaded file updater-script
https://drive.google.com/file/d/0B6bGr-ir8saMc20xc1RYQTJfbjQ/edit?usp=sharing
standak14 said:
For CL use this file. Open you rom in winrar, find path \META-INF\com\google\android and add from winrar menu downloaded file updater-script
https://drive.google.com/file/d/0B6bGr-ir8saMc20xc1RYQTJfbjQ/edit?usp=sharing
Click to expand...
Click to collapse
going to test within the hour and post back results, have you verified that this works, is this just a remapping of the partition tables that the rom writes to when flashing?, isnt the operating system going to be looking at the predefined paths set by the operating system?
[email protected] said:
going to test within the hour and post back results, have you verified that this works, is this just a remapping of the partition tables that the rom writes to when flashing?, isnt the operating system going to be looking at the predefined paths set by the operating system?
Click to expand...
Click to collapse
Post updated. Use this updater-script file.
Only changed instalation path in file updater-script
if
file_getprop("/tmp/aroma-data/wipe.prop","selected.0") == "2"
then
set_progress(0.10);
ui_print("@Executing Full Wipe");
ui_print("-> Erasing & formatting /cache as EXT4");
unmount("/cache");
format("ext4", "EMMC", "/dev/block/mmcblk0p34", "0"); Kitkat 36
set_progress(0.15);
ui_print("-> Erasing & formatting /system as EXT4");
unmount("/system");
format("ext4", "EMMC", "/dev/block/mmcblk0p33", "0"); Kitkat 35
set_progress(0.20);
ui_print("-> Erasing & formatting /data as EXT4");
mount("ext4", "EMMC", "/dev/block/mmcblk0p35", "/data"); Kitkat 37
package_extract_file("tools/wipe/wipe.sh", "/tmp/wipe.sh");
set_perm(0, 0, 0777, "/tmp/wipe.sh");
run_program("/tmp/wipe.sh");
etc.
This modifications works on Zara UL firewater hboot 2.20.5555 without problem
standak14 said:
Post updated. Use this updater-script file.
Only changed instalation path in file updater-script
if
file_getprop("/tmp/aroma-data/wipe.prop","selected.0") == "2"
then
set_progress(0.10);
ui_print("@Executing Full Wipe");
ui_print("-> Erasing & formatting /cache as EXT4");
unmount("/cache");
format("ext4", "EMMC", "/dev/block/mmcblk0p34", "0"); Kitkat 36
set_progress(0.15);
ui_print("-> Erasing & formatting /system as EXT4");
unmount("/system");
format("ext4", "EMMC", "/dev/block/mmcblk0p33", "0"); Kitkat 35
set_progress(0.20);
ui_print("-> Erasing & formatting /data as EXT4");
mount("ext4", "EMMC", "/dev/block/mmcblk0p35", "/data"); Kitkat 37
package_extract_file("tools/wipe/wipe.sh", "/tmp/wipe.sh");
set_perm(0, 0, 0777, "/tmp/wipe.sh");
run_program("/tmp/wipe.sh");
etc.
This modifications works on Zara UL firewater hboot 2.20.5555 without problem
Click to expand...
Click to collapse
im just going to hang tight ill try flashing it later , ul and cl are different devices and different partition tables due to different partitions being required.
[email protected] said:
im just going to hang tight ill try flashing it later , ul and cl are different devices and different partition tables due to different partitions being required.
Click to expand...
Click to collapse
Need help or not?
Partitions table is same. Zara CL have 2 partitions more
Zara UL
cat proc/emmc
dev: size erasesize name
mmcblk0p21: 000ffa00 00000200 "misc"
mmcblk0p32: 00fffe00 00000200 "recovery"
mmcblk0p31: 01000000 00000200 "boot"
mmcblk0p33: 71fffc00 00000200 "system"
mmcblk0p28: 00140200 00000200 "local"
mmcblk0p34: 0efffe00 00000200 "cache"
mmcblk0p35: 130000000 00000200 "userdata"
mmcblk0p24: 01400000 00000200 "devlog"
mmcblk0p26: 00040000 00000200 "pdata"
mmcblk0p29: 00010000 00000200 "extra"
mmcblk0p16: 02d00000 00000200 "radio"
mmcblk0p17: 00a00000 00000200 "adsp"
mmcblk0p15: 00100000 00000200 "dsps"
mmcblk0p18: 00500000 00000200 "wcnss"
mmcblk0p19: 007ffa00 00000200 "radio_config"
mmcblk0p22: 00400000 00000200 "modem_st1"
mmcblk0p23: 00400000 00000200 "modem_st2"
mmcblk0p30: 01fffc00 00000200 "reserve"
Zara CL
dev: size erasesize name
mmcblk0p21: 000ffa00 00000200 "misc"
mmcblk0p32: 00fffe00 00000200 "recovery"
mmcblk0p31: 01000000 00000200 "boot"
mmcblk0p33: 71fffc00 00000200 "system"
mmcblk0p28: 00140200 00000200 "local"
mmcblk0p34: 0efffe00 00000200 "cache"
mmcblk0p35: 130000000 00000200 "userdata"
mmcblk0p24: 01400000 00000200 "devlog"
mmcblk0p26: 00040000 00000200 "pdata"
mmcblk0p29: 00010000 00000200 "extra"
mmcblk0p36: 01900000 00000200 "carrier"
mmcblk0p16: 02d00000 00000200 "radio"
mmcblk0p17: 00a00000 00000200 "adsp"
mmcblk0p15: 00100000 00000200 "dsps"
mmcblk0p18: 00500000 00000200 "wcnss"
mmcblk0p19: 007ffa00 00000200 "radio_config"
mmcblk0p22: 00400000 00000200 "modem_st1"
mmcblk0p23: 00400000 00000200 "modem_st2"
mmcblk0p36: 01900000 00000200 "carrier"
mmcblk0p30: 01fffc00 00000200 "reserve"
Here is modified insertcoin 6thsense zara cl-3.0.6 rom for Zara CL 2.20.0000 and firewater hboot. Use recovery for Jelly Bean
https://drive.google.com/file/d/0B6bGr-ir8saMNkV2X3B0Zy1vNDQ/edit?usp=sharing
sorry for the long delay i could not take a change because i need the phone to work at all times i have tested the updated rom and it is working 100%
Thank you very much.
standak14 said:
Need help or not?
Partitions table is same. Zara CL have 2 partitions more
Zara UL
cat proc/emmc
dev: size erasesize name
mmcblk0p21: 000ffa00 00000200 "misc"
mmcblk0p32: 00fffe00 00000200 "recovery"
mmcblk0p31: 01000000 00000200 "boot"
mmcblk0p33: 71fffc00 00000200 "system"
mmcblk0p28: 00140200 00000200 "local"
mmcblk0p34: 0efffe00 00000200 "cache"
mmcblk0p35: 130000000 00000200 "userdata"
mmcblk0p24: 01400000 00000200 "devlog"
mmcblk0p26: 00040000 00000200 "pdata"
mmcblk0p29: 00010000 00000200 "extra"
mmcblk0p16: 02d00000 00000200 "radio"
mmcblk0p17: 00a00000 00000200 "adsp"
mmcblk0p15: 00100000 00000200 "dsps"
mmcblk0p18: 00500000 00000200 "wcnss"
mmcblk0p19: 007ffa00 00000200 "radio_config"
mmcblk0p22: 00400000 00000200 "modem_st1"
mmcblk0p23: 00400000 00000200 "modem_st2"
mmcblk0p30: 01fffc00 00000200 "reserve"
Zara CL
dev: size erasesize name
mmcblk0p21: 000ffa00 00000200 "misc"
mmcblk0p32: 00fffe00 00000200 "recovery"
mmcblk0p31: 01000000 00000200 "boot"
mmcblk0p33: 71fffc00 00000200 "system"
mmcblk0p28: 00140200 00000200 "local"
mmcblk0p34: 0efffe00 00000200 "cache"
mmcblk0p35: 130000000 00000200 "userdata"
mmcblk0p24: 01400000 00000200 "devlog"
mmcblk0p26: 00040000 00000200 "pdata"
mmcblk0p29: 00010000 00000200 "extra"
mmcblk0p36: 01900000 00000200 "carrier"
mmcblk0p16: 02d00000 00000200 "radio"
mmcblk0p17: 00a00000 00000200 "adsp"
mmcblk0p15: 00100000 00000200 "dsps"
mmcblk0p18: 00500000 00000200 "wcnss"
mmcblk0p19: 007ffa00 00000200 "radio_config"
mmcblk0p22: 00400000 00000200 "modem_st1"
mmcblk0p23: 00400000 00000200 "modem_st2"
mmcblk0p36: 01900000 00000200 "carrier"
mmcblk0p30: 01fffc00 00000200 "reserve"
Here is modified insertcoin 6thsense zara cl-3.0.6 rom for Zara CL 2.20.0000 and firewater hboot. Use recovery for Jelly Bean
If I use the modified version can I still get the OTA updates to flash or will this cause problems?
What is the process to use the regular version?
Click to expand...
Click to collapse
Coach56 said:
If I use the modified version can I still get the OTA updates to flash or will this cause problems?
What is the process to use the regular version?
Click to expand...
Click to collapse
Different partition table in hboots 2.20 and 2.22
Ota updates should work. I have not tested.