*REQUEST* Firerat's Custom MTD Partitions (resize Data,System and Cache) - EVO 4G Q&A, Help & Troubleshooting

can any dev. make this happen for our EVO 4G please? I included a link to the thread were the mod is. This mod enables a person to decide how big the partitions in their phone should be. (ei system, data, cache, etc). Its awesome but I just have it on my hero which i gave to my brother and it wouldn't hurt that everyone could have more space for apps on their phone.
Thanks everyone!!!
http://forum.xda-developers.com/showthread.php?t=754805

I found a dmesg for your evo
# dmesg|awk '/0x.+: "/{ print }'
Code:
<5>[ 4.290466] 0x00003f360000-0x00003ff60000 : "wimax"
<5>[ 4.305419] 0x00003ff60000-0x000040000000 : "misc"
<5>[ 4.306518] 0x000004240000-0x000004740000 : "recovery"
<5>[ 4.312377] 0x000004740000-0x0000049c0000 : "boot"
<5>[ 4.315979] 0x0000049c0000-0x00001a7c0000 : "system"
<5>[ 4.730438] 0x00001a7c0000-0x0000247c0000 : "cache"
<5>[ 4.916748] 0x0000247c0000-0x00003f360000 : "userdata"
it has an extra partition to the g1 ( wimax )
see below for working version v1.5.7

Sounds really great! Thank you, Firerat.
But FR-CustomMTD-v1.5.6-Evo4G.zip is not downloadable to me. The site says its set to private.
Firerat said:
FR-CustomMTD-v1.5.6-Evo4G.zip
that zip contains
73d5ba178ffd702c9b963e9de9b4d5bc FR-recovery-v1.5.6-Evo4G-CustomMTD_S.zip
f468aefb7ad1f86b24c0156fb81a36c2 FR-boot-v1.5.6-Evo4G-CustomMTD_S.zip
89b4e67b87f5337e19c2d7dc95e87055 FR-remove-v1.5.6-Evo4G-CustomMTD_S.zip
Click to expand...
Click to collapse

ywjkid said:
Sounds really great! Thank you, Firerat.
But FR-CustomMTD-v1.5.6-Evo4G.zip is not downloadable to me. The site says its set to private.
Click to expand...
Click to collapse
oops,
http://www.mediafire.com/?0ae7y9sekpb3s
b74d178e7ed698879b555123ea494377 FR-recovery-v1.5.7rc1-CustomMTD_S.zip
331c1b31bbc007fa7c3a9ff01c9301dd FR-boot-v1.5.7rc1-CustomMTD_S.zip
ab946b6b9aa83554c452d3d5face18d4 FR-remove-v1.5.7rc1-CustomMTD_S.zip
its a generic version, which _should_ suit all devices with msm_nand
it collects every partition from dmesg
few little bits I want to do, then I'll bump it up to v2

RC1 is not working for me. After flashing FR-recovery-v1.5.7rc1-CustomMTD_S.zip, my RA-recovery 1.8 is broken and generates errors like
E: Can't find MISC:
E: Can't mount CACHE:recovery/command
E: Can't mount CACHE:recovery/log
E: Can't open CACHE:recovery/log
Firerat said:
oops,
http://www.mediafire.com/?0ae7y9sekpb3s
b74d178e7ed698879b555123ea494377 FR-recovery-v1.5.7rc1-CustomMTD_S.zip
331c1b31bbc007fa7c3a9ff01c9301dd FR-boot-v1.5.7rc1-CustomMTD_S.zip
ab946b6b9aa83554c452d3d5face18d4 FR-remove-v1.5.7rc1-CustomMTD_S.zip
Click to expand...
Click to collapse

ywjkid said:
RC1 is not working for me. After flashing FR-recovery-v1.5.7rc1-CustomMTD_S.zip, my RA-recovery 1.8 is broken and generates errors like
E: Can't find MISC:
E: Can't mount CACHE:recovery/command
E: Can't mount CACHE:recovery/log
E: Can't open CACHE:recovery/log
Click to expand...
Click to collapse
Ok, I think I see the problem
Not at home right now,
But in the mean time you should be able to flash the remove zip and return to stock
Looks like a copy paste fail and I'm excluding userdata what I shouldn't be
May also be escaping when I shouldn't be
If you have problems flashing the remove zip you can mount cache manually via adb shell
( you can also flash_image a standard recovery.img via adb shell )

Thanks. Just reflashed recovery and restore the nandroid and everything is fine. I am glad there is no permanent damage done. Cannot wait for the working version!
Firerat said:
Ok, I think I see the problem
Not at home right now,
But in the mean time you should be able to flash the remove zip and return to stock
Looks like a copy paste fail and I'm excluding userdata what I shouldn't be
May also be escaping when I shouldn't be
If you have problems flashing the remove zip you can mount cache manually via adb shell
( you can also flash_image a standard recovery.img via adb shell )
Click to expand...
Click to collapse

ywjkid said:
Thanks. Just reflashed recovery and restore the nandroid and everything is fine. I am glad there is no permanent damage done. Cannot wait for the working version!
Click to expand...
Click to collapse
new version here
http://www.mediafire.com/?7w9sh54lm3mwi
9074fde94c8e534585da4adaa5e59e14 FR-AutoMTD_partitionPatcher_v1.5.7.tar.bz2
919db3e671d0688af9824f37b16ccc87 FR-boot-v1.5.7-CustomMTD_S.zip
05828d98920540c711e06abe5028388f FR-recovery-v1.5.7-CustomMTD_S.zip
changed the 'remove' option
to revert to the stock MTD layout set system size to 0 in mtdpartmap.txt and flash the recovery patcher
e.g.
echo "mtd 0" > /sdcard/mtdpartmap.txt

Great! now the recovery error is gone and the mod is working on my EVO, beautifully. More than 600M for /data. Thank you so much, Firerat. You're the best!
Code:
df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 207.4M 0 207.4M 0% /dev
tmpfs 207.4M 0 207.4M 0% /mnt/asec
/dev/block/mtdblock4 240.0M 195.1M 44.9M 81% /system
/dev/block/mtdblock6 637.6M 374.7M 262.9M 59% /data
tmpfs 8.0M 4.0K 8.0M 0% /app-cache
/dev/block/mtdblock6 637.6M 374.7M 262.9M 59% /cache
PS. It seems /cache and /data now share the same space. It is new to me. Does that mean there is only one size need to specify in mtdpartmap.txt?
Firerat said:
new version here
http://www.mediafire.com/?7w9sh54lm3mwi
9074fde94c8e534585da4adaa5e59e14 FR-AutoMTD_partitionPatcher_v1.5.7.tar.bz2
919db3e671d0688af9824f37b16ccc87 FR-boot-v1.5.7-CustomMTD_S.zip
05828d98920540c711e06abe5028388f FR-recovery-v1.5.7-CustomMTD_S.zip
changed the 'remove' option
to revert to the stock MTD layout set system size to 0 in mtdpartmap.txt and flash the recovery patcher
e.g.
echo "mtd 0" > /sdcard/mtdpartmap.txt
Click to expand...
Click to collapse

ywjkid said:
Great! now the recovery error is gone and the mod is working on my EVO, beautifully. More than 600M for /data. Thank you so much, Firerat. You're the best!
Code:
df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 207.4M 0 207.4M 0% /dev
tmpfs 207.4M 0 207.4M 0% /mnt/asec
/dev/block/mtdblock4 240.0M 195.1M 44.9M 81% /system
/dev/block/mtdblock6 637.6M 374.7M 262.9M 59% /data
tmpfs 8.0M 4.0K 8.0M 0% /app-cache
/dev/block/mtdblock6 637.6M 374.7M 262.9M 59% /cache
PS. It seems /cache and /data now share the same space. It is new to me. Does that mean there is only one size need to specify in mtdpartmap.txt?
Click to expand...
Click to collapse
you still need to specify size of cache , the minimum is 2mb
on your phone /cache is actually a bind mount of /data/cache
its there if anything needs to use it, for instance your rom may want to put dalvik-cache in /cache/dalvik-cache
it will actually be on /data, the advantage is that you can make better use of what was free space on /cache

That's indeed a nice advantage. A million thanks. Now I can throw everything in the phone storage without worrying about the space.
Firerat said:
you still need to specify size of cache , the minimum is 2mb
on your phone /cache is actually a bind mount of /data/cache
its there if anything needs to use it, for instance your rom may want to put dalvik-cache in /cache/dalvik-cache
it will actually be on /data, the advantage is that you can make better use of what was free space on /cache
Click to expand...
Click to collapse

Noob tutorial
THIS IS SO COOL. THANK YOU SO MUCH FIRERAT.
Hope this mod helps everyone. Just like it is helping me
Thanks anyone.
TUTORIAL FOR NOOBS
In TERMINAL:
1. for Fresh Evo 3.4.0.1: echo "mtd 210 3" > /sdcard/mtdpartmap.txt *****(you can do less than 210 for cm6 if you desire)*****
2. adb shell reboot recovery
In RECOVERY MENU
1. nandroid backup
2. wipe data/factory reset
3. wipe cache
4. wipe Dalvik-cache
5. flash fr-recovery.zip
6. wipe data/factory reset
7. wipe cache
8. wipe Dalvik-cache
In TERMINAL
1. adb shell reboot recovery
In RECOVERY MENU
1.2*. IF YOU GET A CACHE ERROR DO NOT ALARM IT MEANS SOMETHING WENT WRONG. ALL YOU NEED TO DO IS WIPE DATA, CACHE, AND DALVIK-CACHE AND FLASH fr-recovery.zip and then when it finish flashing - adb reboot recovery - from terminal
1.3** IF YOU DID NOT GET THE ABOVE ERROR GO TO STEP 2
2. flash ROM (or nandroid backup)
3. flash app (I.E. cm6 google apps)
4. flash kernal (if one)
5. flash fr-boot.zip
6. reboot
7. DONE!!! AND ENJOY THANKS TO FIRERAT (DONT FORGET TO THANKS HIM)
If you want to update/install a kernal
In TERMINAL
1. adb shell reboot recovery
In RECOVERY MENU
2. wipe cache
3. wipe Dalvik-cache
4. flash KERNAL
5. flash fr-boot.zip
6. reboot
7. Sit and let EVO turn on
*****for reset partitions--- echo "mtd 0" > /sdcard/mtdpartmap.txt**** (IF YOU WANT TO GO BACK TO STOCK) and flash the FR-AutoMTD_partitionPatcher then flash any ROM you want or NANDROID BACKUP
+++IF I DID ANYTHING WRONG UP THERE FEEL FREE IN CORRECTING ME +++

mrcamposd said:
THIS IS SO COOL. THANK YOU SO MUCH FIRERAT.
Can anyone post a tutorial for noobs?
Or is this the same as for the HERO?
Hope this mod helps everyone. Just like it is helping me
Thanks anyone.
Click to expand...
Click to collapse
I can confirm the process is the same as for the HERO.

mrcamposd said:
THIS IS SO COOL. THANK YOU SO MUCH FIRERAT.
*****for reset partitions--- echo "mtd 0" > /sdcard/mtdpartmap.txt**** (IF YOU WANT TO GO BACK TO STOCK) and flash the FR-AutoMTD_partitionPatcher then flash any ROM you want or NANDROID BACKUP
Click to expand...
Click to collapse
How do I flash this? It doesn't show up in the list of zip files in recovery. I tried renaming it and extracting it but it doesn't look like it's in a flashable format.

antiphon said:
How do I flash this? It doesn't show up in the list of zip files in recovery. I tried renaming it and extracting it but it doesn't look like it's in a flashable format.
Click to expand...
Click to collapse
i think you just need to rename the file's extension to xxxxx.zip (because .zip's are the one you flash in recovery), but then again I have not used that file. So not responsible for damages or anything. Try it at your own risk buddy.

mrcamposd said:
*****for reset partitions--- echo "mtd 0" > /sdcard/mtdpartmap.txt**** (IF YOU WANT TO GO BACK TO STOCK) and flash the FR-AutoMTD_partitionPatcher then flash any ROM you want or NANDROID BACKUP
+++IF I DID ANYTHING WRONG UP THERE FEEL FREE IN CORRECTING ME +++
Click to expand...
Click to collapse
FR-AutoMTD_partitionPatcher , is linux shell script to shoehorn the boot patcher into a rom zip ( so the end user dosn't need to flash the boot patcher , its automagic ) ,, you don't really need it
to get back to stock layout,
do the mtd 0 thing
nand backup
flash the recovery patcher
format system cache and data ( I recommend clockwork recovery )
reboot
nand restore ( providing the backup will fit stock ! )
flash boot patcher
your done
Note, v1.5.7b is newer

Had this working well on my Hero, so I'm looking forward to putting this on my new Evo as well!

Doesn't Calkulin have an evo version posted?
Sent From My HTC Evo 4G Using Tapa Talk Pro!

Related

[HOW TO] Extract a stock image to restore to

Ok, there don't seem to be many, if any stock images to revert to if you need to restore and send back your phone. Especially if you have a custom rom like me.
I DO NOT ACCEPT ANY RESPONSIBILITY IF YOUR BREAK YOUR DEVICE, CAUSE WW3 ETC
Can someone just check over this. I think it will work but I can't guarantee it. Once we know it works, we can get people to extract various images so we all have something to restore to.
1) Download the CWM image: DOWNLOAD
We need to do it this way because ROM Manager requires root
2) Use fastboot to unlock the bootloader on the device. At the same time, this will wipe the phone to the clean stock image:
fastboot oem unlock
4) Use fastboot to boot CWM, NOT flash it. This will temporarily boot into CWM, however it will not flash it to your device:
fastboot boot recovery-clockwork-5.5.0.2-maguro.img
5) Once in CWM, go to backups and perform a full device backup
6) Reboot your device. If you want, lock the bootloader to return to how it was when you got it:
fastboot oem lock
7) Upload the backup for all to use
Click to expand...
Click to collapse
Now, technically that will have created a backup of every stock image on this system, correct?
If so, that should give us all something to restore to, should you need to send it back for any reason. To restore you would need to:
1) Download a backup and put it onto /sdcard/ of your rooted phone
2) Use fastboot to boot into CWM as above if you haven't flashed it. If not, just boot into CWM Recovery
3) Go to backups and restore the backup from above
4) *Not sure if recovery.img will have been restored. If not, use a stock recovery.img
5) Use fastboot to lock the bootloader:
fastboot oem lock
Click to expand...
Click to collapse
This should take us back to stock. The only thing I see it not flashing is the recovery.img. Not too sure how we can get that, however perhaps the Peter Alfonze recovery.img would work
Appreciated if someone could give this a second opinion and their thoughts
Evostance said:
Ok, there don't seem to be many, if any stock images to revert to if you need to restore and send back your phone. Especially if you have a custom rom like me.
DO NOT ATTEMPT THIS YET. NEED TO GET IT CHECKED OVER FIRST
Can someone just check over this. I think it will work but I can't guarantee it. Once we know it works, we can get people to extract various images so we all have something to restore to.
Now, technically that will have created a backup of every stock image on this system, correct?
If so, that should give us all something to restore to, should you need to send it back for any reason. To restore you would need to:
This should take us back to stock. The only thing I see it not flashing is the recovery.img. Not too sure how we can get that, however perhaps the Peter Alfonze recovery.img would work
Appreciated if someone could give this a second opinion and their thoughts
Click to expand...
Click to collapse
Hmm, that's a good idea, BUT we can also boot in the CWM image and from there dd all partitions. I only don't know if you boot with fastboot boot, that img file is mounted on the usual boot partition
Yes, that should save all partitions, including sytem, data, boot, radio, recovery etc. I'm just not sure if you will be able to backup data partition since it's auto-mounted in recovery (otherwise you wont be able to see the content of virtual SD card):
Code:
0 /tmp ramdisk (null) (null) 0
1 /system ext4 /dev/block/platform/omap/omap_hsmmc.0/by-name/system (null) 0
2 /cache ext4 /dev/block/platform/omap/omap_hsmmc.0/by-name/cache (null) 0
[B]3 /data auto /dev/block/platform/omap/omap_hsmmc.0/by-name/userdata (null) 0[/B]
4 /misc emmc /dev/block/platform/omap/omap_hsmmc.0/by-name/misc (null) 0
5 /boot emmc /dev/block/platform/omap/omap_hsmmc.0/by-name/boot (null) 0
6 /recovery emmc /dev/block/platform/omap/omap_hsmmc.0/by-name/recovery (null) 0
7 /sbl emmc /dev/block/platform/omap/omap_hsmmc.0/by-name/sbl (null) 0
8 /xloader emmc /dev/block/platform/omap/omap_hsmmc.0/by-name/xloader (null) 0
9 /radio emmc /dev/block/platform/omap/omap_hsmmc.0/by-name/radio (null) 0
To be honest this is very bad solution in Samsung Galaxy Nexus. Also I'm not sure why HSMMC devices are flagged as EMMC. I tried contacting with koush about it but no answer from him. OK, sorry, no more hijacking your thread
netchip said:
Hmm, that's a good idea, BUT we can also boot in the CWM image and from there dd all partitions. I only don't know if you boot with fastboot boot, that img file is mounted on the usual boot partition
Click to expand...
Click to collapse
That was my only concern
mike1986. said:
Yes, that should save all partitions, including sytem, data, boot, radio, recovery etc. I'm just not sure if you will be able to backup data partition since it's auto-mounted in recovery (otherwise you wont be able to see the content of virtual SD card):
Code:
0 /tmp ramdisk (null) (null) 0
1 /system ext4 /dev/block/platform/omap/omap_hsmmc.0/by-name/system (null) 0
2 /cache ext4 /dev/block/platform/omap/omap_hsmmc.0/by-name/cache (null) 0
[B]3 /data auto /dev/block/platform/omap/omap_hsmmc.0/by-name/userdata (null) 0[/B]
4 /misc emmc /dev/block/platform/omap/omap_hsmmc.0/by-name/misc (null) 0
5 /boot emmc /dev/block/platform/omap/omap_hsmmc.0/by-name/boot (null) 0
6 /recovery emmc /dev/block/platform/omap/omap_hsmmc.0/by-name/recovery (null) 0
7 /sbl emmc /dev/block/platform/omap/omap_hsmmc.0/by-name/sbl (null) 0
8 /xloader emmc /dev/block/platform/omap/omap_hsmmc.0/by-name/xloader (null) 0
9 /radio emmc /dev/block/platform/omap/omap_hsmmc.0/by-name/radio (null) 0
To be honest this is very bad solution in Samsung Galaxy Nexus. Also I'm not sure why HSMMC devices are flagged as EMMC. I tried contacting with koush about it but no answer from him. OK, sorry, no more hijacking your thread
Click to expand...
Click to collapse
I know its not an ideal solution, but if we can get this to work, at least it gives us an option in the short run
Nobody got any other views?
Why other views? It will simply work, even with mounted data partition.
mike1986. said:
Why other views? It will simply work, even with mounted data partition.
Click to expand...
Click to collapse
That'll do! Now, just need to get someone to do it before they flash a custom rom...
I haven't flashed anything yet. I can wipe and make a nandroid backup, if it is needed.
matt2053 said:
I haven't flashed anything yet. I can wipe and make a nandroid backup, if it is needed.
Click to expand...
Click to collapse
Please!
Sent from my Galaxy Nexus using Tapatalk
Ok, so if you want to go back to stock quick and dirty, this should do the trick.
1. Download this zip.
2. Extract to /sdcard/clockworkmod/backup
3. Boot into ClockworkMod recovery.
4. Restore backup "maguro_4.0.1"
http://www.mediafire.com/?7k9076axlyg7r7u
Thanks. I might need this as I have a few dead pixels and I'm looking to return and get a new one.
matt2053 said:
Ok, so if you want to go back to stock quick and dirty, this should do the trick.
1. Download this zip.
2. Extract to /sdcard/clockworkmod/backup
3. Boot into ClockworkMod recovery.
4. Restore backup "maguro_4.0.1"
http://www.mediafire.com/?7k9076axlyg7r7u
Click to expand...
Click to collapse
Downloading and saving just for the sake of saving it you never know.
Sent from my Galaxy Nexus using xda premium
Could someone please confirm it works? Thanks!
Sent from my Sensation using XDA App
matt2053 said:
Ok, so if you want to go back to stock quick and dirty, this should do the trick.
1. Download this zip.
2. Extract to /sdcard/clockworkmod/backup
3. Boot into ClockworkMod recovery.
4. Restore backup "maguro_4.0.1"
http://www.mediafire.com/?7k9076axlyg7r7u
Click to expand...
Click to collapse
Where did you get that zip from?
Sent from my Galaxy Nexus using Tapatalk
Evostance said:
Where did you get that zip from?
Sent from my Galaxy Nexus using Tapatalk
Click to expand...
Click to collapse
I made it. I am still in factory stock, so I just did a factory reset and made the backup.
Sent from my Galaxy Nexus using XDA App
matt2053 said:
I made it. I am still in factory stock, so I just did a factory reset and made the backup.
Sent from my Galaxy Nexus using XDA App
Click to expand...
Click to collapse
Top guy! Thanks a lot
Let us know if you manage to flash back to stock successfully using this.
This will definitely work for rooted users and the stock recovery from PeterAlphonzo's images can be fastbooted back on if desired. A couple notes of caution though:
After restoring this backup, you will still be rooted and therefore not completely stock.
The radio is not backed up and restored by CWM and cannot be extracted using DD because it comes up all FF bytes in the image rendered. This shouldn't be of critical importance to most users because the radio is not typically altered by user modifications anyway, so this still gives you your best method of restoring a stock configuration until an official set of images is made available.
cellzealot said:
After restoring this backup, you will still be rooted and therefore not completely stock.
Click to expand...
Click to collapse
If you mean unlocked, that's what fastboot oem lock is for.
Ok, by using various images, zips etc posted on here. I've managed to get the phone back to the stock unrooted rom, stock kernels etc and the stock recovery.
I'll post a tutorial up later

[Q] {URGENT} SDCard won't mount or format!

Hello, this is my first post but been seeing lot of threads here with lot of help, so I thank you all before you start helping me.
I have my HTC One X, tried to update to Jelly Bean using Dragon's ROM, all went fine but the phone got stuck on HTC logo.
Since that I can only start on recovery (ClockWork Mod 5.8.4.0), HBOOT (0.94) or fastboot.
There is no way I can access the SDCard from recovery to flash the rom.
I tried factory reset with no luck, wipe cache, wipe data.../factory reset. all with no luck! Every time I try to format my sdcard it says:
"Formatting /sdcard/.android_secure..."
"Error mounting /sdcard/.android_secure!"
"Skipping format..."
If I try with "mounts and storage" then "format sdcard":
"Formatting sdcard..."
"Error mounting /sdcard!"
I must say that I can use "Mount USB storage", did format with FAT32 on Windows & Mac, no luck. Also tried using parted with adb shell, formatting on ext2, but no luck.
Here is my "recovery.fstab":
~ # cat /etc/recovery.fstab
# mount point fstype device [device2]
# /recovery emmc recovery
# /boot emmc boot
# /system ext4 system
# /cache ext4 cache
# /misc emmc misc
# /sdcard vfat /dev/block/sda1 /dev/block/sda
# /internal_sdcard vfat /dev/block/mmcblk0p14
# /data ext4 userdata
# /devlog ext4 devlog
/recovery emmc /dev/block/mmcblk0p5
/boot emmc /dev/block/mmcblk0p4
/cache ext4 /dev/block/mmcblk0p13
/data ext4 /dev/block/mmcblk0p15
/sdcard vfat /dev/block/mmcblk0p14
/system ext4 /dev/block/mmcblk0p12
/misc emmc /dev/block/mmcblk0p17
------------
And here my fstab:
~ # cat /etc/fstab
/dev/block/mmcblk0p13 /cache ext4 rw
/dev/block/mmcblk0p15 /data ext4 rw
/dev/block/mmcblk0p12 /system ext4 rw
/dev/block/mmcblk0p14 /sdcard vfat rw
---------------
There is no way that ClockWork Mod can read my internal card for installing any zip. Any help would be really appreciated, even I would pay if necessary.
Thanks in advance for all the great work you guys do, and hope to get my phone back working!
If you mean the skydragon rom, ypu have to update hboot to use it.
And for the mounting problems... Try reflashing recovery.
I saw "fastboot oem format" somewhere and I aint sure what it does, but it might be worth a try.
Sent from my HTC One X using xda app-developers app
TToivanen said:
If you mean the skydragon rom, ypu have to update hboot to use it.
And for the mounting problems... Try reflashing recovery.
I saw "fastboot oem format" somewhere and I aint sure what it does, but it might be worth a try.
Sent from my HTC One X using xda app-developers app
Click to expand...
Click to collapse
Hello, thanks for the fast answer.
I tried the oem format and this is the result:
prosacalatform-tools prosaca$ ./fastboot oem format
...
(bootloader) [ERR] Command error !!!
OKAY [ 0.017s]
finished. total time: 0.017s
I just want to get my phone working, does not matter what ROM or whatever, just want it working hehe.
I tried also reflashing recovery with no luck.
I don't know what left to do...
poloivan said:
Hello, thanks for the fast answer.
I tried the oem format and this is the result:
prosacalatform-tools prosaca$ ./fastboot oem format
...
(bootloader) [ERR] Command error !!!
OKAY [ 0.017s]
finished. total time: 0.017s
I just want to get my phone working, does not matter what ROM or whatever, just want it working hehe.
I tried also reflashing recovery with no luck.
I don't know what left to do...
Click to expand...
Click to collapse
Someone could please tell me how do I restore my phone as it came?
I have downloaded a RUU, my version main is: version-main: 1.28.161.9
When I click the RUU it does nothing, someone please help?
Thanks.
You have to relock bootloader first: fastboot oem lock.
Then run RUU with admin rights.
Sent from my HTC One X using xda app-developers app
TToivanen said:
You have to relock bootloader first: fastboot oem lock.
Then run RUU with admin rights.
Sent from my HTC One X using xda app-developers app
Click to expand...
Click to collapse
Thank you all.
I have fixed my phone running the correct RUU.
Right now I am using Android Revolution HD 9.8. How can I update my HBOOT to run Android Revolution HD 18.0?
Best regards.
Two choices: Use a JB RUU or flash the correct firmware for your cid.

[Recovery][Script] TWRP and CWM recoveries for ANY custom ROM

For now, you can use Recovery-in-FOTA images! It is better solution, but if it doesn't work for you, you can still use this script.
I am proud to present you recovery script for installing TWRP or CWM recovery on any custom ROM.
Usage:
Download zip with prefered recovery, place it to your sd-card or to internal memory and flash it via your current recovery. Yes, it is very simple. Note: if you want to install it on CM12, which comes with CM recovery, flash it right after flashing ROM or kernel (if kernel doesn't contain working recovery).
Everything is doing on your own risk, so i am not responsible if your device gets bricked or if your cat gets pregnant.
How it works?
Package contains recovery ramdisk, binaries for unpacking and repacking boot image and shell script. Script copies you current boot image (boot.img), runs binary for unpacking it, extracts files from ramdisk, replaces recovery-ramdisk.cpio (which is you recovery) with one in zip, then script packs ramdisk and boot image with already replaced file and flashes new boot.
Thanks to:
@FindYanot for helping with script and linux commands (half of work is done by him)
@Noel Macwan for base for this script (I used his script and binaries for replacing zImage as base for mine, you can find his works here)
@JustArchi for compiling TWRP 2.8.3.0 for our device in ArchiDroid 3.0.1.1
So, the choice is yours.
Download
Download it now and use whenever you want.
PhilZ zip is broken and it recovery is too buggy on new kernels, so don't download it. Choose TWRP or CWM, they work good.
Download from ftp >>>
Reserved
CWM works
I tested CWM script on last fxp build CM12 ROM, it works
PhilZ recovery availabe now!
Download
Choose PhilZ-recovery.zip
FindYanot said:
PhilZ recovery availabe now!
Download
Choose PhilZ-recovery.zip
Click to expand...
Click to collapse
PhilZ is broken, CWM and TWRP worked. log in attachment
Remorcer said:
PhilZ is broken, CWM and TWRP worked. log in attachment
Click to expand...
Click to collapse
I'll try to fix it soon, thanks for report and logcat.
I fixed PhilZ zip, but recovery by itself has screen split bug, so I didn't upload fixed version, we'll remove it until someone fixes it.
How do i install it?
strianugraha said:
How do i install it?
Click to expand...
Click to collapse
Flash via recovery.
sd-ext support in twrp
I know you can access sd-ext card via terminal command or via adb but no problem to add it to GUI
Here is change to ramdisk-recovery.cpio for sd-ext support in twrp:
Code:
--- etc/twrp.fstab.old
+++ etc/twrp.fstab
@@ -6,3 +6,4 @@
/data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata length=-16384
/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="Micro SDcard";storage;wipeingui;removable
/usb-otg vfat /dev/block/sda1 /dev/block/sda flags=display="USB OTG";storage;wipeingui;removable
+/sd-ext auto /dev/block/mmcblk1p2 flags=display="SD-Ext";storage;wipeingui;removable
Does it work on sony Xperia z3 operating cm12?
LeonidasTurk said:
Does it work on sony Xperia z3 operating cm12?
Click to expand...
Click to collapse
I replied you in private messages, just give me boot.img's with CWM and TWRP recoveries from any custom (not based on stock) ROM.
hi guys.i downloading both recovery but after i want install in recovery of cm, error and say E/: can not install.how to install this recovery on beta3 cm12?
xp7 said:
hi guys.i downloading both recovery but after i want install in recovery of cm, error and say E/: can not install.how to install this recovery on beta3 cm12?
Click to expand...
Click to collapse
CM Recovery doesn't flash zip's, use repacked kernel. BTW, I will post recovery-in-FOTA images soon (it is strange that no one made these for our device). It is better then recovery-in-boot images, because it stays untouched after kernel flashing.
jkkk88 said:
I know you can access sd-ext card via terminal command or via adb but no problem to add it to GUI
Here is change to ramdisk-recovery.cpio for sd-ext support in twrp:
Code:
--- etc/twrp.fstab.old
+++ etc/twrp.fstab
@@ -6,3 +6,4 @@
/data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata length=-16384
/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="Micro SDcard";storage;wipeingui;removable
/usb-otg vfat /dev/block/sda1 /dev/block/sda flags=display="USB OTG";storage;wipeingui;removable
+/sd-ext auto /dev/block/mmcblk1p2 flags=display="SD-Ext";storage;wipeingui;removable
Click to expand...
Click to collapse
I will look for this if will have enough time.
2All
There is some better solution than this script. Read this thread for more info.
cucumber09 said:
I will look for this if will have enough time.
Click to expand...
Click to collapse
Here you have it for CWM.
Code:
--- etc/recovery.fstab.old
+++ etc/recovery.fstab
@@ -10,6 +10,7 @@
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc wait,check,en
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 nosuid,nodev,barrier=1 wait,c
+/dev/block/mmcblk1p2 /sd-ext auto defaults recoveryonly
/devices/platform/msm_sdcc.3/mmc_host/mmc1 auto auto defaults wait,voldmanaged=sdcard1:auto
And illustration for twrp...
What is difference b/w ur threads script and fota man?
imdkiller said:
What is difference b/w ur threads script and fota man?
Click to expand...
Click to collapse
Script repacks your kernel with new recovery. You need to flash it after every update. Recovery-FOTA replaces your FOTAKernel image without touching your kernel, so you need to flash it just once.

Help with /dev/block/mmcblkxxx (HTC Desire 816)

The problem started when I flashed the philz touch recovery, and used the "Clear for new rom" in the wipe menu. I then proceeded to try to install two different roms unsuccessfully, as well as trying two different recoveries, and they always return the same error:
Code:
Mount:failed to mount /dev/block/mmcblk0p6
This is a strange error, since using the df command returns the following results:
Code:
tmpfs 683452 160 683292 0% /dev
tmpfs 683452 652 682800 0% /tmp
/dev/block/mmcblk0p42
273948 4408 269540 2% /cache
/dev/block/mmcblk0p44
4506568 707644 3798924 16% /data
/dev/block/mmcblk0p44
4506568 707644 3798924 16% /sdcard
/dev/block/mmcblk1p1 15540224 4846896 10693328 31% /external_sd
If I am understanding this correctly, the ROM should be installed on mmcblk0p44 since it is the internal drive and always has been, not mmcblk0p6, and I don't see why it needs access to mmcblk0p6.
I tried a method of repairing the filesystem using a mkfs.ext4 file, found in a blog.
I then used the following commands after putting the mkfs file in /tmp:
Code:
chmod 777 /tmp/mkfs.ext4
/tmp/mkfs.ext4 -b 4096 -O ^huge_file,^dir_nlink,^ext_attr,^resize_inode,^extra_isize -m 0 /dev/block/mmcblk0p37
After this, I managed to get a ROM to report installing successfully, but when I booted the phone, it got stuck in a boot loop which was better than the immediate booting to recovery, and am now getting the same error again, and I can't boot the phone at all, it just goes into recovery.
I have tried to restore from previous backups, with no luck.
Can anyone help?
jacobjake683 said:
The problem started when I flashed the philz touch recovery, and used the "Clear for new rom" in the wipe menu. I then proceeded to try to install two different roms unsuccessfully, as well as trying two different recoveries, and they always return the same error:
Code:
Mount:failed to mount /dev/block/mmcblk0p6
This is a strange error, since using the df command returns the following results:
Code:
tmpfs 683452 160 683292 0% /dev
tmpfs 683452 652 682800 0% /tmp
/dev/block/mmcblk0p42
273948 4408 269540 2% /cache
/dev/block/mmcblk0p44
4506568 707644 3798924 16% /data
/dev/block/mmcblk0p44
4506568 707644 3798924 16% /sdcard
/dev/block/mmcblk1p1 15540224 4846896 10693328 31% /external_sd
If I am understanding this correctly, the ROM should be installed on mmcblk0p44 since it is the internal drive and always has been, not mmcblk0p6, and I don't see why it needs access to mmcblk0p6.
I tried a method of repairing the filesystem using a mkfs.ext4 file, found in a blog.
I then used the following commands after putting the mkfs file in /tmp:
Code:
chmod 777 /tmp/mkfs.ext4
/tmp/mkfs.ext4 -b 4096 -O ^huge_file,^dir_nlink,^ext_attr,^resize_inode,^extra_isize -m 0 /dev/block/mmcblk0p37
After this, I managed to get a ROM to report installing successfully, but when I booted the phone, it got stuck in a boot loop which was better than the immediate booting to recovery, and am now getting the same error again, and I can't boot the phone at all, it just goes into recovery.
I have tried to restore from previous backups, with no luck.
Can anyone help?
Click to expand...
Click to collapse
Could you please provide me with the mkfs.ext4 binary? The link in that blog has expired.
I'm also having problems with my partitions and can't flash anything. I can't relock the bootloader either.
If you have stock recovery installed on your phone, you should relock the bootloader. Then run the ruu. That should fix the problem.
Thanks in advance.
uhm said:
Could you please provide me with the mkfs.ext4 binary? The link in that blog has expired.
I'm also having problems with my partitions and can't flash anything. I can't relock the bootloader either.
If you have stock recovery installed on your phone, you should relock the bootloader. Then run the ruu. That should fix the problem.
Thanks in advance.
Click to expand...
Click to collapse
Sorry, but I do not have the file anymore due to the fact that I have gone through various hard drive formats and I don't seem to have it on the HTC anymore.
No problem. Thanks for your reply.

[Fixed] FireTV Stick 2nd Gen (tank) stuck on logo. Potentially broken file system/partitions. (Unlocked + TWRP available)

Hey folks! I unlocked my FireTV stick and was able to install TWRP following the amazing guide by @k4y0z (https://forum.xda-developers.com/t/unlock-root-twrp-unbrick-fire-tv-stick-2nd-gen-tank.3907002/).
I can boot into TWRP just OK.
I am using adb shell to issue TWRP commands. (I don't have an OTG cable with power input).
I began by flashing stock ROMs by @0815hoffi from here (https://forum.xda-developers.com/t/...-7-ota-zip-launcher-replacement-root.4155489/).
Then I tried installing pre-rooted images by @rbox (https://forum.xda-developers.com/t/fire-tv-stick-2-tank-prerooted-stock-images-5-2-7-3_r1.3912271/) along with magisk.
Here are the general steps I followed while flashing these images :
1. wiping everything. I suspect my first issue here :
Code:
$ adb shell
$ twrp wipe cache
$ twrp wipe data
$ twrp wipe dalvik
$ twrp wipe /system
~ # twrp wipe cache
Formatting Cache using make_ext4fs...
Failed to mount '/cache' (No such device)
Done processing script file
Click to expand...
Click to collapse
~ # twrp wipe /system
Formatting System using make_ext4fs...
Failed to mount '/system' (No such device)
Done processing script file
Click to expand...
Click to collapse
~ # mount /cache
mount: mounting /dev/block/mmcblk0p12 on /cache failed: No such device
Click to expand...
Click to collapse
~ # stat /dev/block/mmcblk0p12
File: '/dev/block/mmcblk0p12'
Size: 0 Blocks: 0 IO Block: 4096 block special file
Device: ch/12d Inode: 5332 Links: 1 Device type: b3,c
Access: (0600/brw-------) Uid: ( 0/ root) Gid: ( 0/ root)
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
Access: 2010-01-01 00:17:58.000000000
Modify: 2010-01-01 00:17:57.000000000
Change: 2010-01-01 00:17:57.000000000
Click to expand...
Click to collapse
2. push images to /sdcard
Code:
$ adb push update-kindle-full_tank-288.6.6.4_user_664657620.bin /sdcard/firm.zip
update-kindle-full_tank-288.6.6.4_user... 6.1 MB/s (532252995 bytes in 83.009s)
3. Install image
adb shell
~ # twrp install /sdcard/firm.zip
Installing zip file '/sdcard/firm.zip'
Checking for Digest file...
Skipping Digest check: no Digest file found
[amonet] Remove boot patch...
[amonet] OK
Patching system image unconditionally...
Copying preloader_prod.img to boot partition 0 for secure device...
script succeeded: result was [][amonet] Install boot patch...
[amonet] OK
[amonet] Install recovery patch...
[amonet] ALREADY_INSTALLED
Done processing script file
Click to expand...
Click to collapse
4. `adb shell reboot`
They all install just OK. But in all cases, every time I do `reboot` in `adb shell` after `adb install` commands, it boots and gets stuck on 'fireTV Stick' logo.
At first I thought maybe it takes time to boot for first time, but I let it go for as long as half an hour and still no good.
I tried wiping cache and dalvik before rebooting too, no avail (had same could not mount /cache prompt).
I am pretty sure I am doing something stupid, I'd really appreciate any help. I'll be happy if I get it back to a working state, I do not really need root. This all started because the stick went into bootloop outta nowhere. My initial finding pointed at a failed update, see :
https://twitter.com/i/web/status/1393963756426698756
Maybe try with 5.2.7.7
ftvs2k-5.2.7.7
MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.
www.mediafire.com
0815hoffi said:
Maybe try with 5.2.7.7
ftvs2k-5.2.7.7
MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.
www.mediafire.com
Click to expand...
Click to collapse
Thanks @0815hoffi , that's actually the very first image I tried with from your thread.
Looking back, I think there's something wrong with my partitions.
If I see logs of other people from these threads, it says
script succeeded: result was [ALL DONE][amonet] Install boot patch...
Click to expand...
Click to collapse
Whereas for me, it says
script succeeded: result was [][amonet] Install boot patch...
Click to expand...
Click to collapse
This may mean that my flash is not successful, right? It's same everytime I flash.
I wonder, is there a way to bring everything to a clean state?
Given your expertise in amonet, @k4y0z from the thread and this comment, do you have a suspicion of what could be going wrong?
It looks like like it indeed were messed up partitions. My initial plan was to flash GPT fix in DL mode (by @k4y0z : link). But I thought might as well play with few things if am anyway going to re-do everything.
I started by going deleting directories manually (e.g. `rm -rf /system`). My plan was to manually flash each partition through fastboot.
Before that I attempted
Code:
fastboot format all
and received a bunch of errors, specifically
Code:
Formatting is not supported for file system with type ''.
Though format didn't work, I decided to wipe anyway
Code:
fastboot -w
It finished with few errors, but looked like it created those directories which I deleted earlier. So I rebooted to TWRP and did
Code:
twrp wipe data
Re-flashed @0815hoffi 's image and luckily it booted into "Optimising storage" screen. Post boot-up it appears to be working OK so far. Had an issue with wifi, but restart fixed it.
tl;dr
Code:
rm -rf /cache
rm -rf /data/dalvik
rm -rf /system
fastboot format userdata # errors
fastboot -w # completed but some errors
twrp wipe data
twrp install <img.zip>
reboot
EDIT : Looks like @Sus_i and @racega went through a similar journey and ended up with a similar fix. Good to know the fix is reproducible. Here's their posts : https://forum.xda-developers.com/t/...ck-2nd-gen-tank.3907002/page-61#post-83031003
saurabhshri said:
It looks like like it indeed were messed up partitions. My initial plan was to flash GPT fix in DL mode (by @k4y0z : link). But I thought might as well play with few things if am anyway going to re-do everything.
I started by going deleting directories manually (e.g. `rm -rf /system`). My plan was to manually flash each partition through fastboot.
Before that I attempted
Code:
fastboot format all
and received a bunch of errors, specifically
Code:
Formatting is not supported for file system with type ''.
Though format didn't work, I decided to wipe anyway
Code:
fastboot -w
It finished with few errors, but looked like it created those directories which I deleted earlier. So I rebooted to TWRP and did
Code:
twrp wipe data
Re-flashed @0815hoffi 's image and luckily it booted into "Optimising storage" screen. Post boot-up it appears to be working OK so far. Had an issue with wifi, but restart fixed it.
tl;dr
Code:
rm -rf /cache
rm -rf /data/dalvik
rm -rf /system
fastboot format userdata # errors
fastboot -w # completed but some errors
twrp wipe data
twrp install <img.zip>
reboot
EDIT : Looks like @Sus_i and @racega went through a similar journey and ended up with a similar fix. Good to know the fix is reproducible. Here's their posts : https://forum.xda-developers.com/t/...ck-2nd-gen-tank.3907002/page-61#post-83031003
Click to expand...
Click to collapse
Usually when this corrupted partitions happen you may try the command:
fastboot format userdata
followed by :
adb shell
(to call twrp#)
Then :
twrp wipe data
twrp wipe system
twrp wipe cache
twrp wipe dalvik
Then adb push the rom, gapps/magisk to /sdcard
twrp install nameofyourrom.zip
twrp install gappsxx.zip
Let it boot once and go back and update magisk via recovery.
(adb reboot recovery once permissions set or use powermenu little vic apk for quickness)
Another method I found which works good with fireos is :
When faced with corrupted/encrypted partition issues and/or unable to mount/format data issues
goto advanced wipe
select change file system
change it to EXT2
it will format data and data should appear become mount
hit back and change to EXT4 Filesystem again.
Then push rom and any other zips etc to /sdcard and install in usual way.
Good you got it working
Regards
Thank you for writing this down @Bertonumber1, I am sure it'll be very helpful to people who will encounter such situation in future.
Bertonumber1 said:
select change file system
change it to EXT2
it will format data and data should appear become mount
hit back and change to EXT4 Filesystem again.
Click to expand...
Click to collapse
I sincerely wish I could have done this. But I don't have an OTG with power input and deliveries are closed due to the pandemic. I was issuing TWRP commands through adb. I'll keep this in mind for future!
Thanks!
saurabhshri said:
Thank you for writing this down @Bertonumber1, I am sure it'll be very helpful to people who will encounter such situation in future.
I sincerely wish I could have done this. But I don't have an OTG with power input and deliveries are closed due to the pandemic. I was issuing TWRP commands through adb. I'll keep this in mind for future!
Thanks!
Click to expand...
Click to collapse
Ah I see, I'm sure the twrp can be commanded to repair change file systems. However, you are correct it is much easier via otg mouse or keyboard.
Regards

Categories

Resources