[Q] Need help installing a recovery image - Hero CDMA Q&A, Help & Troubleshooting

I have a Sprint HTC Hero which until yesterday had never been rooted. Software version was 2.31.651.7. I'm trying to install CM6 using these instructions.
http://wiki.cyanogenmod.com/index.php?title=Full_Update_Guide_-_Sprint_Hero_with_Android_2.1
I have rolled it back to 2.27.651.5, as suggested in the above article and I used the universal root method, which seems to have worked. Then when I started the Flashing Radio step I realized that they left out how to install a custom recovery image. I searched and found these instructions:
http://forum.xda-developers.com/showpost.php?p=4898505
After figuring out what adb and fastboot are, I was able to run 'adb devices' which shows:
List of devices attached
HT99RHF03843 device
I then ran 'adb shell reboot bootloader' which gave me the screen with the three androids riding skateboards. Info from that screen:
HERC XC SHIP S-ON
HBOOT-1.47.0000 (HERO20000)
MICORP-0110
TOUCH PANEL-SYN0104
RADIO-2.42.01.04.27
Mar 1 2010,16:02:39
When I try to run 'fastboot boot recovery-RA-heroc-v1.6.2.img' I get:
downloading 'boot.img'... FAILED (remote: not allow)
This is were I'm stuck. 'fastboot devices' shows:
HT99RHF03843 fastboot
I've tried searching and most of what I found is over a year old and says something about a perfect SPL, but I gotta believe there is some way around this. I do believe the root worked because I can do an 'adb shell' then 'su' and I get the # prompt. If I can't get a custom image on I'm just going to buy a new phone so I'm willing to risk bricking the phone to get this to work. If anyone knows a way around this I would greatly appreciate some assistance. Thanks.
-Iz-

1. I think you have the latest radio - might not need to flash a new one.
2. About flashing recovery, it's pretty easy -
a. Download the recovery image you want and put it on the SD card (not in any folder)
b. Goto ADB shell and run following commands:
- "flash_image recovery </sdcard/image name>" without quotes and "<>" - replacing image name with the actual file name with extension that you saved to the SD card
- reboot recovery
I am assuming once rooted, you can get to adb shell from your computer.
Let me know if you have further questions.

Thanks for the suggestion here is where I'm at now.
adb shell puts me at the $ prompt, when I type 'flash_image recovery recovery-RA-heroc-v1.6.2.img' from there I get 'flash_image: permission denied'. I also get that if I type gibberish for example if I type 'djherjn' i get 'djherjn: permission denied'. If I use 'su' to get to a # prompt, then run the command I get 'flash_image: not found', If I type gibberish at the # prompt I get 'djherjn: not found'. So it looks like it does not recognize the command flash_image. I checked path using 'echo $PATH' on both prompts it returns '/sbin:/system/sbin:/system/bin:/system/xbin'. Odd thing is there is no /system/sbin directory and flash_image is not located in any other directory. I'm starting to think the phone isn't really rooted. But when I run the universal root again it says phone is already rooted.

You are missing some words on the flashing I think...try this instead.
Connect your USB from the phone to PC choose Charge only.
Now open up Command Prompt(CMD) and type adb shell. Then just to be safe type SU...if SuperUser asks for permission on your phone, give it permission. Should give a # sign instead of $.
Then type ---- flash_image recovery /sdcard/recovery-RA-heroc-v1.6.2.img
You forgot the /sdcard/ from what I read from your post.

With the device set to charge only, adb does not see it. I've been having to set it to HTC Sync, just tried again to make sure. I'm still getting 'flash_image: not found' when I type the command 'flash_image recovery /sdcard/recovery-RA-heroc-v1.6.2.img' from the # prompt. I also tried 'cd sdcard' and then 'flash_image recovery recovery-RA-heroc-v1.6.2.img' still same error. 'ls sdcard' does show the image in that directory and I'm using copy and paste to avoid typos. I'm still thinking it is complaining that there is no flash_image command. I'm going to re-flash it with the HTC software and start over just in case I screwed something up.

I had the same problem.
Before you go ahead with flashing HTC software, try the ROM manager app from the market. You could flash the ClockWorkMod recovery from ROM manager.
If that does not work, don't waste any more time - go the RUU route (preferbaly using the 2.27.651.5 release) and root using: http://forum.xda-developers.com/showthread.php?t=694572.
I just went through a bunch of issues with recovery/backup/restore and such, so consider this fresh advice ;-).

izard said:
With the device set to charge only, adb does not see it. I've been having to set it to HTC Sync, just tried again to make sure. I'm still getting 'flash_image: not found' when I type the command 'flash_image recovery /sdcard/recovery-RA-heroc-v1.6.2.img' from the # prompt. I also tried 'cd sdcard' and then 'flash_image recovery recovery-RA-heroc-v1.6.2.img' still same error. 'ls sdcard' does show the image in that directory and I'm using copy and paste to avoid typos. I'm still thinking it is complaining that there is no flash_image command. I'm going to re-flash it with the HTC software and start over just in case I screwed something up.
Click to expand...
Click to collapse
EDIT: Andy beat me to it!
If you want Amon-Ra you have to choose Flash Alternate Recovery.

Finally got it! I used the ROM manger app. I swear last night when I was considering it, I only saw the paid version. That was so much easier then what I was doing. Thanks everyone for your help. It is highly appreciated.
-Iz-

Related

[Q] trouble installing Amon_Ra's recovery image

I've ran a search and wasn't able to find anything that specifically outlined my issue.
to preface, I have a t-mobile Nexus One, and my PC is running Windows 7 64-bit.
I'm running into a bunch of trouble trying to root my Nexus One and add Cyanogen's latest ROM. My first problem was trying to get Android SDK setup to use adb. the instructions on adding the path were unclear (still unsure if I did that right), and then I couldnt get my device to show up becuase the drivers wouldnt install. I used this link http://forum.xda-developers.com/showthread.php?t=613217 (the adb devices command now worked fine at this point) and that installed the drivers and I was able to successfully unlock the bootloader.
Now, i've downloaded Amon_Ra's recovery image, changed the file name and placed it on the root of my SD card. Phone is in debug mode, rebooted to the bootloader, and did the "fastboot flash recovery recovery.img" command, but i get 'error: cannot load 'recovery.img' "
as a test, i used the adb devices command again, and it does not work. to test if it was a drivers issue, I used the same process as the link above. this time the Nexus One does not show, but i DO see Android Phone > Android Composite ADB Interface.
in "Eviroment Variables" in "Path" I have added "tools/C:\android-sdk-windows\tools" and (from a different link I have seen) i added a Custom User Variable called adb with the variable value "C:\android-sdk-windows\tools"
So.. what am I doing wrong? Is there something I may have missed?
Recovery
If you type in the "adb devices" command and see your device listed, you have set up your SDK properly.
I usually put the recovery.img on my computer where its easy to find. Once youre in bootloader try the command "fastboot devices" and once again make sure your device is shown. Then "fastboot flash recovery C:\Wherever\recovery.img"
so THATS probably what I was doing wrong. I would type in literally "fastboot flash recovery recovery.img" (cause hey, thats what it said to type!). I ended up using the "easy" clockwork method, and used his recovery image instead. had a few more hiccups, but about 5 hours later, I'm all rooted and running CM6.
thanks!

[Q] Please help me use adb to root JI6 on a mac!!

I have been trying to make this whole adb think work for about twenty hours strait and I still have not gotten very far. I own a mac and no pc and updated to froyo with my buddies pc. I have followed all the directions to a T over and over using terminal on the mac and I can get to the ADB commands and even to where I can see my phone by clicking devices but I must be missing something important. ANY HELP WOULD BE REALLY APPRECIATED I AM ABOUT TO PULL MY FREAKING HAIR OUT!!!
Ok, so if you can see your phone through adb, then you are definitely on the right track. Unfortunately, I'm not really familiar with OS X anymore so I'm not quite sure how to do it. Just sit tight for now until someone who does use a Mac, or has more of a clue then I do can help you out.
But seriously, don't pull your hair out. It won't stay on your head forever ya know...
Edit: oops, just saw this is JI6 (Froyo) not JF6, so I can't help you, but here is a general overview:
from terminal inside Android sdk main directory:
tools/adb devices -> list all devices connected that ADB can see
tools/adb shell -> gets a normal user shell on your phone
tools/adb reboot recovery -> reboots into recovery mode, suitable for update.zip root method
--------------------------------
Place the root update.zip on internal sdcard.
from terminal inside Android sdk directory:
tools/adb reboot recovery
Select the update software option, and you will be done.
laxwillsch said:
I have been trying to make this whole adb think work for about twenty hours strait and I still have not gotten very far. I own a mac and no pc and updated to froyo with my buddies pc. I have followed all the directions to a T over and over using terminal on the mac and I can get to the ADB commands and even to where I can see my phone by clicking devices but I must be missing something important. ANY HELP WOULD BE REALLY APPRECIATED I AM ABOUT TO PULL MY FREAKING HAIR OUT!!!
Click to expand...
Click to collapse
Start simple:
If you open a terminal on the mac, and go to your android SDK tools folder; what happens when you type ADB shell?
Or if you type any of the ADB push commands?
You need to give more detail around what you are seeing for us to help you.
Ok so if I am in terminal and i type in my /android-sdk-mac_x86/tools nothing happens and it just says /android-sdk-mac_x86/tools is a directory. But if I type the same but with /tools/abd it opens the abd command lines, like how to write code. Then when I try to "adb push rageagainstthecage-arm5.bin /data/local/tmp/rageagainstthecage-arm5.bin"
it says "-bash: adb: command not found"
however when I type laxwillsch$ /android-sdk-mac_x86/tools/adb shell
it does give me the drop down $
but when I then try to write the next line of code "chmod 0755 rageagainstthecage-arm5.bin"
it says "chmod: rageagainstthecage-arm5.bin: No such file or directory"
I am stumped I am beginning to think i need to buy a pc as I am very interested in android development and want to learn more, but it seems all the tutorials are run assuming you are on a PC
EDIT** I have downloaded the android SDK started pack, and the 2.2 root pack and they are all in my /android-sdk-mac_x86/tools folder that is directly on my Macintosh HD for simplicity
Do you know how to change directories (cd command)?
The problem is that you are trying to work in one directory, but all your tools are in another.
So change directories to the tools directory:
cd /android-sdk-mac_x86/tools/
now run your adb commands - you may have to type ./adb to tell your mac to look in the current directory for the adb command (that is what ./ means "start here")
Also, try to understand what is happening so you can more easily troubleshoot: chmod is a command to change permissions, and you are running it on the phone. If you can't push the file to the phone, then you can change it's permisssions. I guess you never got rageagainstthecage on the phone, so there is no way to chmod it.
If you can't do this on a mac, a PC is not easier. I use both, and like both, but you need to learn basic commands first - they apply to the mac terminal and the windows cmd prompt.
Getting root means moving in and out of the phone - adb shell - puts you in a terminal on the phone. So you really need to understand cd (change directory); pwd (present working directory - shows you where you are); cp (copy); and know your current path - what the ./ does.
I hope this helps, not trying to sound condescending - maybe practice a linux terminal tutorial would help
Thanks so much, I am at school right now and cant test out all that but you are really helping me understand all this! I will post tonight and let you know how it goes. again thank you
ok so i dont have my usb cable with me but I was playing around with the commands that you suggested and ureka! i finally got to a point where it says "h70-33-65-19:tools laxwillsch$" thats a first! and when i type pwd it shows "/android-sdk-mac_x86/tools" so that means I am working out of the right directory right? and from here I enable usb debugging connect my phone then just copy and paste the codes from the thread correct?
yes, it sounds like you are on the right track. But take it nice and slow when you follow the steps. It is very important that the commands are entered exactly as you see them.
Also, one step tells you to wait for something to run and kick you out of ADB - wait just like it says - takes about 45 seconds but feels like forever.
If you are in the tools directory - just by typing "adb" no quotes will give you whole page of adb commands - if you get a "command not found", then you need to add the ./ and make it ./adb
Hope this helps and again, read the commands step by step a couple times first so you understand what is happening.
In a nutsell, you push the rage file;
change its permissions, run it;
get kicked out of ADB and then open a new ADB shell;
you are now root;
remount the system partition to give you write access when it reboots;
reboot;
push over some files;
change permissions on files you pushed;
reboot;
Some things to know - SU is a command for gaining root access; when you use SU your prompt changes (in adb shell) from $ to #
If you are succesful you should see the SuperUser app listed in your apps.
Done and Done just rooted successfully couldnt have done it without you! thanks so much

[GUIDE] HOW to downgrade HTC Legend 2.2 to 2.1 to enable root

Hey guys, it took me 3 whole days to find the right way to downgrade.
Note: This is to be done at your own risk; I am not responsible for any damage or harm caused by this process.
Note: Information in this guide is taken from the works of following Authors:
1. wag3slav3: (http://forum.xda-developers.com/showthread.php?t=725430)
2. Paul (http://android.modaco.com/content/ht...rom-froyo-ota/)
3. TheDeadCpu: (http://forum.xda-developers.com/showthread.php?t=746454)
Please Follow the Instructions Carefully; to ensure success!
Items Required:
1. HTC Legend
2. 1 MicroSD Card (Gold Card)
3. 1 Micro USB Cable
4. Full Charge Recommended
5. Windows OS (I used W7)
Other Stuff:
1. Android SDK
2. hack4legend-v5.zip
3. RUU 1.31 for Legend
Common Errors Faced in the Process:
1. c---rw---- INSTEAD OF crwxrwxrwx
2. ADB Server timed out
3. Various RUU Errors
4. Visionary Not Working/Opening
Troubleshoot:
When you attempt to root you may face ADB timed out errors, it can be very annoying – there are various reasons for this, for me it was HTC Sync that was conflicting with ADB, shutting it down allowed me to boot into the custom recovery (step2 in the root process).
If you run into various other RUU errors (such as: unable to load boot loader, which was fixed by following step 3 correctly.) while trying to downgrade, most likely you didn’t do it correctly. Try doing it again and it should work.
Visionary Not Working/Opening (Solution: Download from phone browser: http://content.modaco.net/dropzone/c...ryplus.r13.apk)
Recommended to Back up Data:
1. Contacts:
You can save you’re contacts from you’re legend by clicking contacts, menu, import/export and export to SD Card.
2. SMS:
Get the SMS Backup and Restore App form Market, Install and Save it on to the SD Card.
3. Backup Complete SD Card:
Copy all the contents of the SD Card and save it onto the PC.
We start now;
Step 1:
Install Android SDK
Extract hack4legend-v5.zip to C Drive
Step 2:
Have adb in your path, or move the files contained in hack4legend-v5.zip into your sdk/tools directory so your pushes will work properly.
FOR ALL OS's Make sure your phone has Applications->Development->USB Debugging turned on.
Do NOT have your phone in Disk Drive Mode, have it in Charge Only.
Open a terminal window in your /tools/ directory. Type this at the prompt.
Code:
crackin.sh
or in Windows
Code:
crackin.bat
Your phone will reboot 5 times.
You WILL see several error messages.
it looks like this c---rw----
c---rw---- 1 1001 2002 90, 0 Jul 19 16:19 /dev/mtd/mtd0
You’re done with this.
Step 3:
- Temproot with VISIONary r13 (install the downloaded file as per a normal APK)
- Once you are temprooted, connect via 'adb' and do 'su' (to get root) then '/data/local/flash_image misc /data/local/misc1-2.img'
Step 4:
RUN RUU to downgrade to 2.1 – it should be possible to do so now.
Hence, you will be downgraded to 2.1 and you can use the normal way to root your legend.
All I can say is that the CM7 Mod is so fast on the Legend, no lag whatsoever, it's beyond! (will post a video 4 you guys)
End.
Forgive me if i seem rude.Hasn't this been covered in many other threads before?
I searched the site but never found this same method, is a combination of 2 or more guides at one place, also touching on some of the common errors faced when downgrading.
after this command '/data/local/flash_image misc /data/local/misc1-2.img'
it says "flash_image not found"....
So? Find it and put it there via adb.
but this is what i try...
i have both files in c:/hack4/ and in c:/android-sdk-windows/tools/
i wright in command " /c/hack4/flash_image misc /c/hack4/misc1-2.img"
and i have the message "flash_image not found"
am i doing something wrong?
i have also tried "/c/android-sdk-windows/tools/flash_image misc /c/android-sdk-windows/tools/misc1-2.img" the same problem...
What hboot do you have? Look at the guide for YOUR hboot ive had different Hboots across 2 devices and needed to use the right guide for the right hboot
bonesy said:
What hboot do you have? Look at the guide for YOUR hboot ive had different Hboots across 2 devices and needed to use the right guide for the right hboot
Click to expand...
Click to collapse
i have 1.01
alfagama said:
i have 1.01
Click to expand...
Click to collapse
http://forum.xda-developers.com/showpost.php?p=10217134&postcount=1
bonesy said:
http://forum.xda-developers.com/showpost.php?p=10217134&postcount=1
Click to expand...
Click to collapse
i have tried this to... the same problem
Are you sure you executed these codes from Guide 2 ?
Code:
adb push flash_image /data/local/
adb push misc1-2.img /data/local/...switch back to 1st command prompt and change permission of flash_image_binary:
Code:
chmod 755 /data/local/flash_image
Click to expand...
Click to collapse
These is supposed to upload the images required on your phone and be exventually be executed on your phone to replace the image
ps: im no expert but i just flashed mine recently and i had to read the guides several times to understand the logic behind each guide to avoid mistakes some had with their phones...
alfagama said:
i have tried this to... the same problem
Click to expand...
Click to collapse
Then you cant be followign the guide right.Have you done temproot?
yes i tried with visionairy13 and 14 both time i had su= #
a noob question...'/data/local/flash_image misc /data/local/misc1-2.img' =" /c/hack4/flash_image misc /c/hack4/misc1-2.img" where i have the 2 files...
Blay0 answered correctly...i didnt
alfagama said:
a noob question...'/data/local/flash_image misc /data/local/misc1-2.img' =" /c/hack4/flash_image misc /c/hack4/misc1-2.img" where i have the 2 files...
Click to expand...
Click to collapse
Nooooooooo dammit! You have just pushed both those files to your phone!!!!!!!!! Go to your phone shell via adb, execute su to gain root privileges and then execute flash_image on your phone not on your PC!!!!! It doesn't really matter where on the phone do you have both as long as they are both in /data dir and don't prepend anything!!!
i am very confused now , can yoy help me step by step?
i run on my phone visionairy and then i click on temproot.
then i run on my pc cmd and i give the comand "adb shell" and then i type su and it says #...
after that should i give the next command on the pc again or on my phone, and with what should i replace the /data/local/ ...?
Pay attention dude!
Open two command prompts. Name them ONE and TWO. You gonna use ONE for copying files from your PC to your phone using adb push. You gonna use TWO for connecting from your PC to your phone using adb shell and execute all commands meant to be executed on your phone there. Now use ONE to copy (adb push) a program called flash_image to your phone's directory /data/local. After you do that use TWO to connect to your phone (adb shell), execute su to gain root privileges (you get # prompt) now in the same commnd prompt (that's TWO) change permissions of program flash_image you have just copied to your phone in ONE. Then also on TWO execute flash_image program with parameters from above.
If you don't understand what I'm saying you better sell that phone and instead use phone booth. In fact sell all your hi-tech stuff including your PC. It would be much safer for you and even for us.
Sent from my HTC Legend
alfagama said:
/c/hack4/flash_image misc
Click to expand...
Click to collapse
Faaaairly sure you're gonna want to write C: and not c/ dude, regardless of what other stuff you're doing wrong.
BlaY0 said:
Pay attention dude!
Open two command prompts. Name them ONE and TWO. You gonna use ONE for copying files from your PC to your phone using adb push. You gonna use TWO for connecting from your PC to your phone using adb shell and execute all commands meant to be executed on your phone there. Now use ONE to copy (adb push) a program called flash_image to your phone's directory /data/local. After you do that use TWO to connect to your phone (adb shell), execute su to gain root privileges (you get # prompt) now in the same commnd prompt (that's TWO) change permissions of program flash_image you have just copied to your phone in ONE. Then also on TWO execute flash_image program with parameters from above.
If you don't understand what I'm saying you better sell that phone and instead use phone booth. In fact sell all your hi-tech stuff including your PC. It would be much safer for you and even for us.
Sent from my HTC Legend
Click to expand...
Click to collapse
my friend i pretty sure that you know much than i do...
but for your information i am 48 and i am the last 20 years involved with computers and mobile phones.... over that 20 years i have learned at least to follow instructions (if they are clear), so once again thanks for your help.
my problem was that after unistalling sync 3.0 and installing sync 2.033 i have not uninstalled the drivers so i had problem.
after fixing that everything went smooth.
So after 20 years in computers, you actually found out that the problem was on your side and not in the instructions. Too bad. My mom is also been using computers for more than 20 years. She knows what is monitor and that she can move cursor around with the mouse.
BTW what has version of sync to do with your confusion? You are trying to say that "flash_image not found" error had something to do with sync version? Ohh, give me a break...
And as far as clear instructions are concerned... I guess they are pretty clear if 99 ppl find them OK and one (that's you) doesn't.
Don't want to be rude but maybe 20 years was too much and it is time to start something completely different.

Flash new recovery to Wildfire the Easy Way

I found this after searching around for ages on a way to upgrade the recovery on my Wildfire/Buzz, all the friggin fastboot methods weren't working. This worked straight away, no errors, no problems.
Flash a New Recovery Image
1. Find the recovery image you want and MAKE SURE IT IS FOR YOUR PHONE (should say in where you download it what phone it is for)
2. Rename the filename of the recovery image EXACTLY as it is written to recovery.img
3. Put the recovery image file on the SD card (not in any folders)
4. Download Android Terminal Emulator from the Market (there are a few different terminals in the Market some have an onscreen keyboard and some don’t experiment till you get one, also hold down Menu in some of them to bring up the onscreen keyboard if you don’t see it)
5. Open the Terminal program and type the following (with hitting enter at the end of each line):
su (press enter)
(at this stage it will ask you for superuser permission to access your core system. Allow the access)
su (press enter)
flash_image recovery /sdcard/recovery.img
6. Phone should pause for a second and then show you a new blank line. Turn it off and back on by holding down Home and Power to ensure it flashed correctly. Done.
Error
flash_image: not found
Sdcard is fat (not fat32). Any idea.
Sent from my HTC Wildfire using XDA App
EDIT - Sorry, Wrong method, here's the correct one:
First, make sure you have the latest Android SDK, then:
Connect the device to your computer
Copy recovery.img to the root of your SD card
Open term on your computer and run: adb root adb remount
Flashing the custom recovery adb shell flash_image recovery /sdcard/recovery.img
Reboot into recovery to make sure the process was successful.
Sec:
http://wiki.cyanogenmod.com/wiki/RE-recovery-img
3xeno, your method is the same as yusuo's.
he directly use console on android to send command "flash_image recovery /sdcard/recovery.img" after become root ("su")
pro: no need for PC, con: hard typing on the device
you ask adb to execute on the device the command "flash_image recovery /sdcard/recovery.img".
pro: single command with a real keyboard; con: need for PC and cable
fastboot works only with s-off,if you don t have s-off it will not work .-. (or if you don t have the right files)
anyway this metod didn t work for me
fastboot is the best and more simple than this,anyway is there a metod to flash recovery from the phone?
ilgimmy said:
3xeno, your method is the same as yusuo's.
he directly use console on android to send command "flash_image recovery /sdcard/recovery.img" after become root ("su")
pro: no need for PC, con: hard typing on the device
you ask adb to execute on the device the command "flash_image recovery /sdcard/recovery.img".
pro: single command with a real keyboard; con: need for PC and cable
Click to expand...
Click to collapse
I know, but the method on the handset itself didn't work for him. Hence, just suggested the alternative of the same technique as in the OP
My phone has alpharevx s-off. I thought there was no need of pc and everything can be done from phone itself. But still it didn't work for me. Same error.
If there was a need of pc terminal, maybe the 1st post needs to be clear.
Sent from my HTC Wildfire using XDA App
After a bit more reading, it seems "flash_image" must be present in /system/bin for it to work.
More details here:
http://forum.xda-developers.com/showthread.php?t=1146566
Std Disclaimer - I have not tested any of these, so I don't know if they will work or not.
3xeno said:
After a bit more reading, it seems "flash_image" must be present in /system/bin for it to work.
More details here:
http://forum.xda-developers.com/showthread.php?t=1146566
Std Disclaimer - I have not tested any of these, so I don't know if they will work or not.
Click to expand...
Click to collapse
Yes. Now I can confirm that it works when there is "flash_image" (a file with no extension) is present in the path /system/bin/. Also the permissions of flash_image needs to be executable. Just flashed the recovery partition .
Download flash_image from the link given by 3xeno. The OP needs to be updated.
Sent from my HTC Wildfire using XDA App
i use this command since age... it's the only method that works on my buzz

Help flashing stock rom to Pixel 4 XL with Pixelbook?

Hello folks!
Its been a while since i posted here - i havent been flashing roms for an age (kids etc got in the way!)
Anyway, i've picked up a Pixel 4 XL, and it was running a custom ROM, i'm trying to move back to stock and have been able to follow all the guides i've found up to using the 'fastboot flashall' in shell.
The command works and delivers the
Bootloader Version...:
Baseband Version.....:
Serial Number........:
values, but then errors out with the following error "fastboot: error: ANDROID_PRODUCT_OUT not set"
I'm stumped what that means and how to fix. I'm doing all of this on my Pixelbook, and have updated fastboot and adb as per the initial steps for flashing.
Can anyone shed any light on what i still need to do to get flashall to work as expected?
Thanks in advance if you are able to help out!
ptm
Welcome Back
Could you post the exact command you are using for fastboot flash please? It sounds like fastboot is not finding the files to flash. Usually, depending on the configuration of the fastboot install, it's easier to place the firmware in the same directory as the fastboot binary.
Thanks! It turns out i've missed this place!
So the firmware files are all on the chromebook and I've used 'shell' to navigate to where I've unzipped. Here's the command line with the command i'm using: "[email protected] ~/Downloads/ota_file $ fastboot flashall"
Before trying a full flash, i was trying to sideload the OTA as per instructions here https://developers.google.com/android/ota#instructions but moving the file from my pixelbook to the 4XL fails at 47% every time.
So i reverted to a full flash as per these instructions - https://developers.google.com/android/images and that is where i'm coming a cropper with the 'not set' error.
Thanks for your help!
ktmom said:
Welcome Back
Could you post the exact command you are using for fastboot flash please? It sounds like fastboot is not finding the files to flash. Usually, depending on the configuration of the fastboot install, it's easier to place the firmware in the same directory as the fastboot binary.
Click to expand...
Click to collapse
I thinnk you may be merging several approaches.
You are using the full factory image downloaded from the https://developers.google.com/android/images page, right? Then, once downloaded, you are unzipping the file and cd into the new directory (from the unzip). The command then should be
Code:
./flash-all.sh
As far as the OTA install is concerned, you are using the command
Code:
adb sideload "ota_file.zip"
, and at 47%, what happens that it appears to fail? My memory on my P3XL is at that point it takes awhile.
If you are using a C to C switch to an A to C cable and try it. You'll want to remove the wipe from the flash-all before you flash the full image and it's the flash all you should be using to flash.
Yeah i think you're right - so now just concentrating on the Full Flash method shown on the Google Developers page, and yes doing it exactly as you'd described.
Ok - using
Code:
./flash-all.sh
now returns the error
Code:
bash: ./flash-all.sh: Permission denied
I have tried to prefix './flash-all.sh' with 'Fastboot' but no dice here either. Is that required at all?
ktmom said:
I thinnk you may be merging several approaches.
You are using the full factory image downloaded from the https://developers.google.com/android/images page, right? Then, once downloaded, you are unzipping the file and cd into the new directory (from the unzip). The command then should be
Code:
./flash-all.sh
As far as the OTA install is concerned, you are using the command
Code:
adb sideload "ota_file.zip"
, and at 47%, what happens that it appears to fail? My memory on my P3XL is at that point it takes awhile.
Click to expand...
Click to collapse
ptm said:
Yeah i think you're right - so now just concentrating on the Full Flash method shown on the Google Developers page, and yes doing it exactly as you'd described.
Ok - using
Code:
./flash-all.sh
now returns the error
Code:
bash: ./flash-all.sh: Permission denied
I have tried to prefix './flash-all.sh' with 'Fastboot' but no dice here either. Is that required at all?
Click to expand...
Click to collapse
You need to give the "flash-all.sh" script execution rights (that is why the permission denied error). Use this code:
Code:
chmod +x ./flash-all.sh
You may need super user/root rights:
Code:
sudo chmod +x ./flash-all.sh
The "flash-all.sh" script is a stand-alone script that sequentially flashes the entire factory package. As was mentioned in another repsonse in this thread, in cases where you want to update, but not lose your installed user apps and data, you would edit the script and remove the "-w" augment. In this case, you are returning to stock and you should perform the wipe (-w).
The dot slash (./) that preceeds the flash-all.sh tells the bash interpreter (what runs commands you give) that the file is right here, in this directory.
The flash-all.sh is a standalone script (series of written instructions) and calls fastboot from within it.
Thanks for sticking with me on this ktmom!
OK, i've used both
Code:
chmod +x ./flash-all.sh
and
Code:
sudo chmod +x ./flash-all.sh
but still getting the permission denied error when i launch ./flash-all.sh
I'll do a screencast vid walking through the entire process i'm following, so that you can see what i'm up too and in case it gives any further clues for a solution.
Thanks again!
ktmom said:
You need to give the "flash-all.sh" script execution rights (that is why the permission denied error). Use this code:
Code:
chmod +x ./flash-all.sh
You may need super user/root rights:
Code:
sudo chmod +x ./flash-all.sh
The "flash-all.sh" script is a stand-alone script that sequentially flashes the entire factory package. As was mentioned in another repsonse in this thread, in cases where you want to update, but not lose your installed user apps and data, you would edit the script and remove the "-w" augment. In this case, you are returning to stock and you should perform the wipe (-w).
The dot slash (./) that preceeds the flash-all.sh tells the bash interpreter (what runs commands you give) that the file is right here, in this directory.
The flash-all.sh is a standalone script (series of written instructions) and calls fastboot from within it.
Click to expand...
Click to collapse
@ptm, No worries, I'll do my best to help. I'm typing this on a chromebook that I also use to fastboot to a P3XL.
Edit 1:
Just to make sure:
1) The bootloader is unlocked?
2) "fastboot devices" returns the serial number of your device?
3) you are running ./flash-all.sh command as root or as the default user? In other words, the same way that fastboot devices returns the serial number. Either sudo fastboot devices or just fastboot devices.
4) if you enter the linux command: ls -al flash-all.sh do you get something like:
-rwxr-xr-x. 1 chronos chronos 957 Jul 18 2019 flash-all.sh
In this example -rwxr-xr-x is depicting the file permissions where there are three groupings; owner group everyone else. The first rwx means read, write and execute permissions for the file owner. Others in the same group and everyone else has read and execute permissions. Execute (x) is required in order for a script to run. If your file does not have three x so that all three groups have permission to execute it, then we need to revisit that.
Edit 2:
Another thought that could be affecting you is ADB and Fastboot are old. in your crosh shell, type:
Code:
[email protected] ~ $ adb --version
Android Debug Bridge version 1.0.41
Version 29.0.5-5949299
[email protected] ~ $ fastboot --version
fastboot version 29.0.5-5949299
Installed as /usr/local/bin/fastboot
If either returns a version older than the output above, then the easy way to update these is to use the script on Nathan Chance's Githuib. This might look a little overwhelming but it's pretty easy. I suggest you read the page, but the operative information is in section 4. Run the setup script:
To install, run
Code:
curl -s https://raw.githubusercontent.com/nathanchance/chromeos-adb-fastboot/master/install.sh | bash
in your shell prompt.
This script very nicely updates your ADB/Fastboot to the newest version which will be required for your P4XL
Are you guys sure you aren't making it too hard? You don't have to give any commands to install the full image. Download the full image and put it into an empty folder, go ahead and extract it in that folder. Create another new folder, Copy everything into it so you still have the full image in the first folder. Now download the tools and put those into a folder and extract them in that folder. Take the entire contents of that folder and add it to the folder you copied the extracted image into. What you should have now is one folder that still has the full extracted image, one that has the full extracted tools, and one that has both. If you have not already done so the phone should have debugging enabled and oem should be on. Go ahead and put it into bootloader mode and plug it in, type cmd in the path bar of the folder with both tools and image and check devices which will tell you if the tools can see the phone. If you get your serial the tools can see the phone. If you're going to wipe you can go ahead and click the flash-all and it will start the process, you do not give any commands. If you don't want to wipe the edit the flash-all to remove the-w, save it, and click on it. Again, no command is given, you just click and the flash-all does the rest.
Edit... And dont forget, A to C, not the provided C to C.
krabman said:
Are you guys sure you aren't making it too hard? You don't have to give any commands to install the full image. Download the full image and put it into an empty folder, go ahead and extract it in that folder. Create another new folder, Copy everything into it so you still have the full image in the first folder. Now download the tools and put those into a folder and extract them in that folder. Take the entire contents of that folder and add it to the folder you copied the extracted image into. What you should have now is one folder that still has the full extracted image, one that has the full extracted tools, and one that has both. If you have not already done so the phone should have debugging enabled and oem should be on. Go ahead and put it into bootloader mode and plug it in, type cmd in the path bar of the folder with both tools and image and check devices which will tell you if the tools can see the phone. If you get your serial the tools can see the phone. If you're going to wipe you can go ahead and click the flash-all and it will start the process, you do not give any commands. If you don't want to wipe the edit the flash-all to remove the-w, save it, and click on it. Again, no command is given, you just click and the flash-all does the rest.
Edit... And dont forget, A to C, not the provided C to C.
Click to expand...
Click to collapse
What Tools do you need to do this?
Same page as the images, scroll up from them and in the description of the process they have a link to the platform tools.
@krabman, Since this is using a chromebook, not a PC, things are flakier than normal. I just replicated the problems experienced by @ptm and some of it is due to old ADB/Fastboot as described in my previous post. Some is because ChromeOS made a change in an update that mounts nearly all of the partitions noexec, which means scripts can not execute and give the reported, "no permissions" error. There is a workaround since /usr/local is mounted executable. It's also possible to remount a partition with exec permissions.
@ptm, as the easiest route, I suggest making sure the ABD is current using the script I linked yesterday, and then going back to the OTA sideload method. I tanked my phone for a few hours yesterday trying to make fastboot get through the entire system image. I finally resorted to my full ubuntu install on my chromebook.
airmaxx23 said:
What Tools do you need to do this?
Click to expand...
Click to collapse
A general Fastboot/ADB tutorial is available here. If you are not using a chromebook, this thread's discussion will just add confusion.
If you are using a chromebook, then you need to enter a crosh shell, make sure adb and fastboot are updated as described in an earlier post and read the rest of the information I posted about the associated problems.
My understanding is the sh should flash on chrome with the latest tools as I described and you use the bat for PC. If the device is down he would have nothing to lose trying, if not I'd be leery of trying it since a partial flash will definitely result in a softie. Of course the possibility that I don't fully understand it may explain my puzzlement.
ktmom said:
A general Fastboot/ADB tutorial is available here. If you are not using a chromebook, this thread's discussion will just add confusion.
If you are using a chromebook, then you need to enter a crosh shell, make sure adb and fastboot are updated as described in an earlier post and read the rest of the information I posted about the associated problems.
Click to expand...
Click to collapse
Thanks, I know how to use ADB on the PC but I have a ChromeBook that I'd like to use as well. I already have it in Developer Mode.
I got it working, I just to run the script to update ADB and Fastboot.
airmaxx23 said:
Thanks, I know how to use ADB on the PC but I have a ChromeBook that I'd like to use as well. I already have it in Developer Mode.
When I open a Crosh Window, type shell, then adb devices my Pixel 4 XL shows up but I get: no permissions; see [http://developer.android.com/tools/device.html]
Click to expand...
Click to collapse
My bet is your ADB/fastboot are to old. Go back to post 9 and read the lower portion under edit2. You should also read forward from that point as there are additional issues that ChromeOS introduced with the noexec mounting of partitions. It will mean that without a workaround, you can not execute the flash-all.sh.
ktmom said:
My bet is your ADB/fastboot are to old. Go back to post 9 and read the lower portion under edit2. You should also read forward from that point as there are additional issues that ChromeOS introduced with the noexec mounting of partitions. It will mean that without a workaround, you can not execute the flash-all.sh.
Click to expand...
Click to collapse
Hey there,
SO i decided to try the OTA sideload method on a friends PC - i got the following response through CMD prompt
Code:
C:\Users\LYALL\Downloads>adb sideload ota-file.zip
Total xfer: 1.00x 1
However the phone is reporting a failure verifying the file signature and giving
Code:
E: Error code: 21
What do you think is causing that? I saw that Google has a new browser based flash tool to allow for AOSP builds to flash - would using that work better for me do you think?
ptm
ptm said:
Hey there,
SO i decided to try the OTA sideload method on a friends PC - i got the following response through CMD prompt
Code:
C:\Users\LYALL\Downloads>adb sideload ota-file.zip
Total xfer: 1.00x 1
However the phone is reporting a failure verifying the file signature and giving
Code:
E: Error code: 21
What do you think is causing that? I saw that Google has a new browser based flash tool to allow for AOSP builds to flash - would using that work better for me do you think?
ptm
Click to expand...
Click to collapse
Make sure you have downloaded the correct OTA and for crosshatch coral. Use the sha256 checksum provided in the download page and ensure the file is not corrupted. I check the integrity of the file before using it especially if I've moved it since the last verification.
You are rebooting to recovery (not rescue mode) and using the OTA sideload action from *within* recovery, before using the adb command, right?
The Google update and repair tool is an option.
ktmom said:
Make sure you have downloaded the correct OTA and for crosshatch. Use the sha256 checksum provided in the download page and ensure the file is not corrupted. I check the integrity of the file before using it especially if I've moved it since the last verification.
You are rebooting to recovery (not rescue mode) and using the OTA sideload action from *within* recovery, before using the adb command, right?
The Google update and repair tool is an option.
Click to expand...
Click to collapse
I think Pixel 4 XL is Coral, not Crosshatch.
I have downloaded the OTA file thats third from the bottom on this page (https://developers.google.com/android/ota) which is the rom number - 10.0.0 (QQ1B.200105.004, Jan 2020).
Yes, followed the instructions and booted to recovery, selected 'update from adb' from within recovery and then checked
Code:
adb devices
to ensure it showed 'sideload'. I then ran the command
Code:
adb sideload ota_file.zip
The transfer seemed to work fine, but then i got the error above showing on the device.
I cant seem to use the Google update and repair tool, as I'm in the UK and it says its not supported.
I can get it working with a VPN but the carrier i'm on doesnt show, although i do have the option of selecting 'other' as the carrier - I'm happy to give that a go, but wanted to get your thoughts on it first. Will selecting carrier as 'other' work ok for a UK based phone?
ptm

Categories

Resources