[HELP] Create a custom recovery - Upgrading, Modifying and Unlocking

Hello.
First, if this post is on wrong place, sorry. Please move it, if necessary.
So, I have a chinese clone of Sony C6. It is rooted, based on MT6580, but I don't know how or why, my kid messed up something, and now it is stuck at logo screen after restart. So, I searched for a way to flash it to brand new with a ROM dump I made some days ago with 'dd'.
It also was bootloader unlocked, but I don't know why, it locked again when I tried to flash the backup files I have (maybe I locked for so many tries to flash). It refused to re-unlock. Maybe I need to go settings and enable "allow oem unlocking" under developer settings, but as the phone don't boot, this is not an option. BTW, the fastboot mode of this phone don't have a lot of commands, is very simple. Don't have even the 'fastboot oem ?' command. It flashed boot and recovery when unlocked, but when I tried to flash system, it gives an error of 'unknow command' when erasing system. So, tried with -u option, but gives another error about 'unknow chunk size'. Searches about this don't give me anything helpful.
Some other things I tried:
Downloaded a compatible ROM for this phone (the original simply don't exists), checked the scatter file, and replace relevant files with my backup, to use with SP Flash Tools, but the download never starts. I checked the drivers and everything else and are all correct. Tried on another computer with different operating system, but it simply don't start the download. Maybe isn't compatible with my phone;
Use 'fastboot flash system', but as sayed above, with locked bootloader I can't flash the files anymore at this mode;
Make a flashable ROM on SuperR's kitchen to flash with adb sideload (as stock recovery can't flash this), but it ended with 'installation aborted' just after start;
Tried to make a CWM recovery through CWM builder, and flash the ROM made by kitchen, but it gives 'bad gateway' at the end. Tried to build one in a ubuntu virtual machine, but it can't sync the repo, so I can't build one.
On the kitchen, I sucessfully modified and flashed recovery to allow ADB commands (as the original gives me 'unauthorized'), but in the actual state, it even can't mount system, giving an '/system/bin/sh not found' error.
So, I have a working stock recovery with ADB and also fastboot mode working, but none of them helped. I need help to make that CWM, or another way to have the phone working.
Attached is the modified recovery and original boot images. Can someone please convert it for me?
Also, any suggestions in how I can put the phone working will be helpful.
Thanks in advice.

Related

[Q] Flashing system.img to a bricked handset

Ok, now i've read through various magic and dream forums, and i think i've got this, but i wanted to check...it's not my phone and i don't want to get fired
I could tell you all the background that got me to this point, but it's really long winded and would bore you to death.
Basically, i have been given a bricked phone that i need to recover for the company i work for. Someone tried to update it with a heroimg.zip file and it trashed it.
Fastboot and Hboot work fine and i only have the boot.img, system.img and recovery.img files to do it.
If i understand this right, i should be able to flash these img files to the device while in fastboot.
Code:
fastboot flash boot boot.img
fastboot flash system system.img
fastboot recovery recovery.img
fastboot reboot
Should that work? I've happily used the amon RA recovery to do update.zip updates on my own phones, but company procedures and stuff won't let me do anything other than leave it as standard.
I don't claim to understand adb/fastboot really, but i think those are the commands i need to flash the img files across manually.
am i right? Just hoping someone here who is a lot more intelligent than I can just confirm it before i totally kill the damn thing!​
Don't know if this helps, but Paul has the 'stock' shipping (ie unmodified and unrooted) update.zip files on Modaco here
You could use the latest one of these after Fastbooting the latest AmonRA. That way, you're not flashing AmonRA to the device or anything like that. This should give you a stock Hero with no modifications to it.
But then again, your company might not like this either. In that case, I haven't tried those commands, but they should, in theory, work (I've used 1 or 2 to flash a custom boot.img so I could modify the ramdisk, but that's about it for me)
that's why i figured they might work...i've used the boot.img one to flash a recover on mine, but i was just working from a 'how to guide'.
still not got my head around the commands yet. Not as confident playing with these things as i was on WinMo in the past...
any chance you boot the custom recovery from fastboot and flash the update.zip from there?
maddie said:
any chance you boot the custom recovery from fastboot and flash the update.zip from there?
Click to expand...
Click to collapse
TBH, if you're not comfortable with the commands for flashing yet, I would not try and learn on a work phone.
To do it this way, as suggested before, download an update.zip from Modaco for the latest 'stock' official Hero build.
Now download the latest AmonRA recovery image and put it in a folder to hand. Rename it to recovery.img for ease of typing later on.
Install the Android SDK if you don't have it already, and boot the phone to fastboot (Power + Back IIRC)
Now type into a command prompt window
Code:
fastboot devices
and make sure the phone's serial number appears.
Code:
fastboot boot C:\recovery.img
to boot the custom AmonRA recovery image (not the stock one!)
Optional step here is to do a 'wipe' if there is something wrong with the data (user) partition, but this depends on circumstances.
Once in the recovery image, choose to apply a named update file, and point it to the file on the root of the SD Card (put it there from within Windows Explorer. You will need to use a card reader or another phone to do this since this one is 'bricked'.
Now wait patiently for the flash to happen. It is usually done for me in 10 mins when flashing a Modaco ROM, but if it stops working, DO NOT TURN IT OFF OR UNPLUG THE BATTERY!!! (sorry for caps, but it's really important as this seems to be no.1 cause of proper 'bricks')
Phone should then reboot into new ROM.
I should add ... that following the anon2122 guide will leave your phone "stock" as in... there will be no way to tell that anything has been done... no lasting recovery image, a stock ROM etc etc..
anon2122's method is the way to go.
Your method wont work unless the phone has an "S-OFF" SPL... You likely don't! If you happen to ... then your steps will work fine. Although ... You may also need to wipe the user data if the phone doesn't boot after your steps!
Code:
fastboot erase cache
fastboot erase userdata
Thanks for all the tips guys, they did indeed help.
In the end, it turned out that the phone was S-Off, as we do tend to get some test rigs in at various points.
I've got the recovery image already installed on my personal phone, but for various reasons couldn;t use it in this case.
But thatnks for the help, and it's all working now.
And yes, i did need to do a wipe afterwards.
Thanks all. That's some more commands i understand now.
Good to hear that it worked.
Thanks for letting us know, since it is all too often that the OP doesn't let others who may find this thread in future know whether the fix worked or not.
well, that's why i responded. It winds me up no end when people don;t bother to tell you if it worked or not.
And i did learn something new as i was not aware of the erase commands. Yet another thing to add to my little box of tricks....

[Q] Phone only starting in Clockwork and Fastboot

After attempting to install franco kernel, my nexus was stuck at the Google logo upon startup. After attempting to recover via clockwork recovery, I found it to be missing (temporary install perhaps?). Currently I have installed clockwork recovery via nexus toolkit. The problem I am now trying to address is that I have no way of putting .zip files on my phone. Some Google searches did not come up with anything quite like this. I am new to this, so any information is good information. Thanks in advance
luminuss3 said:
After attempting to install franco kernel, my nexus was stuck at the Google logo upon startup. After attempting to recover via clockwork recovery, I found it to be missing (temporary install perhaps?). Currently I have installed clockwork recovery via nexus toolkit. The problem I am now trying to address is that I have no way of putting .zip files on my phone. Some Google searches did not come up with anything quite like this. I am new to this, so any information is good information. Thanks in advance
Click to expand...
Click to collapse
Your boot image is missing...
When your phone boots in bootloadermode, it should (now, anyway) say: boot.img missing. Or something of that nature. Check this, flash it via fastboot, then everything should be back to normal...
EDIT:
It works with both: CDMA & GSM
luminuss3 said:
After attempting to install franco kernel, my nexus was stuck at the Google logo upon startup. After attempting to recover via clockwork recovery, I found it to be missing (temporary install perhaps?). Currently I have installed clockwork recovery via nexus toolkit. The problem I am now trying to address is that I have no way of putting .zip files on my phone. Some Google searches did not come up with anything quite like this. I am new to this, so any information is good information. Thanks in advance
Click to expand...
Click to collapse
do you know how to use fastboot and adb?
Excuse my lack of knowledge, but how exactly do I flash something over fastboot? Thanks in advance again.
Edit: And I do know how to use adb, however it does not connect. I do not know how to use fastboot
After some playing around with fastboot, I now have a basic understanding. However, I am not sure where I should be flashing that file you have linked.
Today, a friend suggested I try mounting via, and copying roms over that way. However, even with all the drivers installed on my computer, I get nothing.
If anyone has ANY insight on this problem, it would be be greatly appreciated. My new toy is a brick at the moment
Thanks in advance!
luminuss3 said:
Today, a friend suggested I try mounting via, and copying roms over that way. However, even with all the drivers installed on my computer, I get nothing.
If anyone has ANY insight on this problem, it would be be greatly appreciated. My new toy is a brick at the moment
Thanks in advance!
Click to expand...
Click to collapse
I'd seriously try to go back to stock first. I'm not a Windows user but if you have adb, fastboot, and your drivers setup, it should be easy. Mark is a great help in this thread and you can use his script I guess:
http://forum.xda-developers.com/showthread.php?t=1400871
You need to also realize that if you have wiped everything to install a new rom, you have nothing to boot to. Also there is install-recovery.sh file that keeps re-writing your recovery to stock erasing custom recovery (CWR) until you rename or erase that file. So going back to stock would be the safest and then you can try again.
You can use adb in recovery and fastboot in bootloader. If you have everything setup correctly (sdk, adb, fastboot, drivers for windows) either of these commands should recognize your phone:
In Bootloader (the first screen you see with big arrow on top):
Code:
fastboot devices
In recovery:
Code:
adb devices
If you don't have a recovery, then use the first one. If you see your phone's serial number like this
Code:
List of devices attached
HT12HS005115 device
you can now use it to flash things onto your phone. As I said I am not a windows user so I can't be specific, sorry. But adb and fastboot, once you are at their prompt, should work the same.
In general, when fastboot is recognizing your phone in the bootloader, you can use:
Code:
fastboot flash zip YOURFILENAME.zip
changing yourfilename of course. This zip file could be a stock imaqe or a custom recovery. Again, you need someone with windows to give you exact steps, this is just general stuff.
if your phone is yakju build then you can get the stock images from google.
download and unzip the files to your fastboot folder and use these commands, the file names in these commands are for the Android 4.0.1 (ITL41F) build so you will have to change the filenames if you use a different build.
Code:
fastboot devices (to make sure your phone is connect to fastboot)
fastboot flash bootloader bootloader-maguro-primekj10.img
fastboot reboot-bootloader
fastboot flash radio radio-maguro-i9250xxkk1.img
fastboot reboot-bootloader
fastboot -w update image-yakju-itl41f.zip

How to recover my phone

I didn't to a NANDROID backup before trying to flash a new ROM (fail I know). I had factory reset my phone before flashing the new ROM, but the ROM that was flashed hasn't installed correctly and the phone no longer powers completely on. I would like to just throw a different ROM/gapps on the SD card, but I can no longer access it on my computer since the phone will not completely boot up.
Someone suggested somewhere that I mount the USB Storage from recovery, but in the mount + storage recovery section all I see is mount /data, mount /system, and mount /cache, none of which make the GNEX storage available on my computer.
Any suggestions for fixing this problem, or for simply accessing the SD card on my computer without the phone turning completely on?
Thank you.
You can adb push a ROM while booted in a custom recovery. You should check out the stickies in this forum & the general forum.
Download the factory image from google for your phone. Extract it and get system.img from it (you have to extract it a few times). Get adb/fastboot setup by installing the correct drivers and the android sdk (there may be files posted here at xda with just the files needed for adb/fastboot). Then put system.img in the same folder as fastboot.exe (assuming you use windows).
Connect your phone while in bootloader (both volume keys + power) and from a command prompt in that directory, type:
1) fastboot flash system system.img
2) fastboot reboot
It won't wipe anything other than /system.
I'm getting < waiting for device > when executing the first command (fastboot flash system system.img)
I tried a few solutions for this error based on information I could find, such as reinstalling the drivers from Samsung, but nothing seems to have worked. Any help here? I really just need to get any form of a working ROM installed so I can boot the phone.
Paybacks1 said:
I'm getting < waiting for device > when executing the first command (fastboot flash system system.img)
I tried a few solutions for this error based on information I could find, such as reinstalling the drivers from Samsung, but nothing seems to have worked. Any help here? I really just need to get any form of a working ROM installed so I can boot the phone.
Click to expand...
Click to collapse
You need to get your phone to be recognized by your pc. It is a driver problem. Try following some of the steps in this thread.
mwalt2 said:
You need to get your phone to be recognized by your pc. It is a driver problem. Try following some of the steps in this thread.
Click to expand...
Click to collapse
Paybacks1 said:
I'm getting < waiting for device > when executing the first command (fastboot flash system system.img)
I tried a few solutions for this error based on information I could find, such as reinstalling the drivers from Samsung, but nothing seems to have worked. Any help here? I really just need to get any form of a working ROM installed so I can boot the phone.
Click to expand...
Click to collapse
I have the same problem. Going to take a look at what mwalt suggested tomorrow. Paybacks, if you find a solution, can you please post it here? Thanks.
mwalt2 said:
You need to get your phone to be recognized by your pc. It is a driver problem. Try following some of the steps in this thread.
Click to expand...
Click to collapse
I was finally able to flash the system.img from Google, but see no change. What is expected to happen once this .img has been pushed?
EDIT: Ended up flashing the entire .zip installation instead of just the system.img file and I have a stock install atm. Thank you for the help!
To Man_Utd, I ended up just re-executing the superboot r5 while in bootloader and it seemed to help recognize the phone..-shrug-.

Sani N10 bricked while modding

Hello,
I have troubles with a Sanei N10 tablet. There was a problem during an update process, and it is not able to start. The problem is, the owner tried to force in a Clockworkmod recovery and a Cyanogenmod ROM via the fastboot.exe command "fastboot flash" using recovery.img and boot.img files. The only thing I can see on a regular boot is the Sanei logo, and then a black screen.
I managed to have fastboot.exe access by switching it on with the volume-down button pressed. I can see the device if I write "fastboot devices", and I am still able to flash the individual partitions with the same "fastboot partition file.img".
I tried myself to flash a CWM recovery and a Cyanogenmod rom, but I still have the same black screen. Then I tried to get the original rom, but I used a lot of files from a lot of forums and I still can not get out of this.
I have no access with Livesuit and Phoenixsuite to restore the tablet with, they are not able to see the device (adb.exe is not able to see it as well).
Have you any clue about how could I solve this?
A friend of mine has a working tablet identical to this one, is there any way to extract the partitions in .img format and to apply them to my device?
Thank you,
Jimmy
try this one askmefast.com/How_to_do_a_factory_reset_on_sanei_n10-qna4671741.html im 10 post user so cant add link.

Mi5S bricked?

Hi guys,
Yesterday i wanted do flash the official LineageOS.
I flashed the Gyver-kernel, LineageOS and latest gapps..
When i first startet my phone, it did boot up properly and it looked like i was ready to go through the startup configuration..
But then i saw it. I didn't have an installed keyboard. The only textinput method i got was speech input.
After that i formatet my device, so now i am stuck at the Xiaomi logo at startup.
The only connection i can make is from fastboot..
What can i do?
I can't figure out, how to use MiFlash-tool, or if it even works
Sorry for my basic english.
Please help
I don't have a lot of knowledge about custom kernels, but you probably try these steps:
https://lifehacker.com/the-easiest-way-to-install-androids-adb-and-fastboot-to-1586992378
After installing ADB download the official TWRP again (https://eu.dl.twrp.me/capricorn/) and copy it into the ADB folder. Do the same with the ROM (don't flash a kernel first, just to check if that one works, or see if you can find the original kernel and copy that one into the folder). Keep the USB-cable attached.
Afterwards, in that same folder, click shift + right mouse button and select to open a command window. Type "fastboot devices" to check if the drivers are working correctly.
Then:
"fastboot flash recovery recovery.img"
"fastboot boot recovery.img"
You should be booting to the recovery where you can fix things.
If the kernel doesn't respond for some reason, this topic might help a bit, although note that it's about a different phone. Fastboot commands are the same though.
https://forum.xda-developers.com/showthread.php?t=2131284
Did you btw format the system partition? That might give the problems you are facing.
So here I am again. If you won't be able( I honestly wish you to repair it, it's amazing phone) repair the phone, I maybe will want to buy it.
If you can go to fast boot. You have a good chance to unbrick it. Just extract the original rom to the state where you can see a lot of files. Put fastboot.exe(im copying all minimal adb content to it) and run flash-all-without-lock.bat. i don't remember the name exactly​.
its easy bro ... just hold volume up and power go to twrp flash the rom ( or volume down go fast boot flash and install twrp )

Categories

Resources