[Resolved] [Q] How to install stock rom from RUU on Wildfire using linux only? - General Questions and Answers

Hi!
I have an HTC Wildfire, have it rooted, clockwork and cyanogenmod installed. Now, I need to send it back for repair an therefor restore everything as it was. This thread is great help: http://forum.xda-developers.com/showthread.php?t=1160251
I have a problem though: I don't have Windows except for Virtualbox and RUU won't work there. So I need to install the data from RUU*.exe using linux tools only.
So far I have extracted the rom.zip file using wine and
Code:
find .wine/drive_c/ -name 'rom.zip' -exec cp -v {} ./update.zip \;
Inside this rom.zip I have the following:
Code:
android-info.txt radio.img recovery.img system.img userdata.img boot.img hboot_7225_1.01.0001_101117.nb0 rcdata.img splash1.nb0
So I boot into the recovery and try to flash rom.zip which I have renamed to update.zip and copied to /sdcard/. I needed to turn signature checkings off to get past signature checking error, now I get following:
Code:
E:Can't open /sdcard/update.zip
(bad)
Installation aborted
I assume that it is possible to install all the *.img and *.nb0 files, but in what order do I have to install them and how exactly? I have linux, fastboot and adb at my disposal. HTCFlasher doesn't work with wildfire. So, how do I get my stock rom back? Does anybody have an idea?

Found out myself (sort of).
Ok, I bit the bullet, cleaned the cache and did as follows from a folder with all the rom images:
Code:
fastboot flash boot boot.img
fastboot flash radio radio.img
fastboot flash rcdata rcdata.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash userdata userdata.img
fastboot erase cache
fastboot reboot
Now I have HTC stock firmware with HTC Sense on top of it. Probably no root, but I need it to send my wildfire back for repair anyway.
Last thing to do: install hboot with
Code:
fastboot oem mb 9C068490 1 30
fastboot flash hboot hboot_7225_1.01.0001_101117.nb0
Let's hope it'll work.
EDIT: It did work indeed!
Code:
BUZZ PVT SHIP S-ON
HBOOT-1.01.0001
Does anybody know what "fastboot oem mb 9C068490 1 30" exactly does? Except that it is an OEM command of course?

Related

one S stuck

my friend have one s then he flash it with recovery for "one X " after that the phone wont boot only stuck on "hTC this build is for development purposes only do ...etc" and every time i reboot it it gives me the same message
also it says **TAMPERED** whats that mean ?
Ouch. You should have followed the directions to flashing recovery for the One S not X. But I guess you know that now. Tampered means the sky is going to swallow you up in 24 hours. I'd find cover.
Lolz...jk. tampered. Modded. Unlocked bootloader....don't worry about it. As far as getting out of your situation. Go to the Q&A section.
Sent back in time to find Marty.
boot into bootloader and flash the correct recovery..
after that flash a different ROM after doing a full factory reset. You should be fine
azzledazzle said:
boot into bootloader and flash the correct recovery..
after that flash a different ROM after doing a full factory reset. You should be fine
Click to expand...
Click to collapse
i flash the correct recovery and i tried factory reset it didnt work
flash a different ROM then, Chances are if the old owner flash recovery for a One X, he probably flashed a ROM for the One X too !
first off, let someone ok this before you do it as the one s may be different with erasing system than my N1 is, since it has no actual sdcard
you could also try
fastboot erase system
fastboot -w
before doing any fastboot flashing of recovery then rom
maybe even fastboot erase recovery after fastboot -w
have everything on one s sdcard before doing this
without a system wipe, sometimes old rom remnants are left behind and not overwritten when new rom flashes. also one time I had to erase system before recovery would flash
You have various options, depending on your current state, which is always tough to judge if not having the actual device.
You can
1. push system.img and boot.img via bootloader
Start the 1.53 RUU and then look in TEMP folder in a folder with current date, then in the subfolder you find rom.zip. Copy that to another place outside of TEMP.
Now unzip with winrar and copy system.img and boot.img to fastboot folder along with a proper custom recovery
Now flash the 3 images with
fastboot flash boot boot_signed.img
fastboot flash system system.img
fastboot flash recovery r2-modaco-recovery-clockwork-touch-ville.img
Here`s the custom recovery for you - http://minus.com/mIA3OFkYq/4
Now reboot with
fastboot reboot
OR
2. Restore my clean stock nandroid backup
Part 1 - add clockworkmod folder (in case you don`t have them yet)
Boote in recovery and in cmd navigate to fastboot folder
Now type:
adb shell
then
mkdir /sdcard/clockworkmod
then
mkdir /sdcard/clockworkmod/backup
then
mkdir /sdcard/clockworkmod/backup/stockbackup
Now we have the empty folders.
Part 2 - Nandroid push and restore
Now we push the single parts of my backup in clockworkmod/backup folder. Navigate to your fastboot folder in cmd and type:
adb push .android_secure.vfat.tar /sdcard/clockworkmod/backup/stockbackup
adb push boot.img /sdcard/clockworkmod/backup/stockbackup
adb push cache.ext4.tar /sdcard/clockworkmod/backup/stockbackup
adb push data.ext4.tar /sdcard/clockworkmod/backup/stockbackup
adb push nandroid.md5 /sdcard/clockworkmod/backup/stockbackup
adb push recovery.img /sdcard/clockworkmod/backup/stockbackup
adb push system.ext4.tar /sdcard/clockworkmod/backup/stockbackup
Now we have everything in sdcard/clockworkmod/backup/stockbackup
Now you can restore that backup in recovery.
http://minus.com/mquC9WDG6/4
Tip: If you are sure your data partition is fine, you can leave out the data.ext4.tar, but make sure you also delete the md5 of data.ext4.tar before in nandroid.md5. That way you would restore wiithout having data loss
good process and "command" info, even if you don't need to do all of it
especially for folks not real familiar with fastboot/adb
hope OP gets it working

Trying to flash an insecure boot.img, no luck.

I am desperately trying flash an insecure boot image on my TF300T, and I am just about at my wit's end. I have gone through the following process. (this is on a .29 TF300T btw)
Unlocked my TF300T with the ASUS tool, and then flashed CWM and got root using this guide.
Obtained .29 US firmware zip from the ASUS website.
Unzipped the "blob" file and then extracted all of the firmware components from it using BlobTools.
Renamed blob.LNX (one of the extracted files which is apparently the boot image) to boot.img for convenience.
Split boot.img into kernel and ramdisk using this set of scripts made for that purpose.
Changed the ro.secure=1 line in default.prop to ro.secure=0.
Packed everything back up again using that set of scripts.
flashed my new boot.img using the line fastboot -i 0x0B05 flash boot boot_new.img (boot_new.img is generated upon repacking)
and finally, I run fastboot -i 0x0B05 reboot only to find upon booting that absolutely nothing has changed! adbshell getprop ro.secure still gives a 1! I'm almost positive that I've done this all correctly, as I was able to get an insecure boot image onto a kindle fire just a few days ago. Could anyone tell me if I'm doing something wrong? Please
One thing to note, for some reason I could not run fastboot -i 0x0B05 boot boot_new.img to try out the new boot image as it would cause fastboot to give me an error and a red line of text to appear on the TF300T's screen detailing something about it being unable to find the command. Perhaps that is related to my problem?
I'd try taking the 'boot.img' file and putting back to simply 'blob' with no extension, then flashing via ADB or terminal emulator with root.
Code:
adb push blob /sdcard/ (Just place on root of Internal Storage if using term emulator or have easy MTP access. )
adb shell (Don't need if using emulator)
su (Give ROOT permission)
dd if=/sdcard/blob of=/dev/block/mmcblk0p4
reboot
See if that'll flash it for you.
"dd if=/sdcard/blob of=/dev/block/mmcblk0p4" This part I am NOT 100% sure about, you'll need the TF300's partition table, I know mmcblk0p4 is the Staging partition on the TF101, but not sure if it's the same on the TF300, just replace mmcblk0p4 with the STAGING partition label
Hope it helped.
Needs Root and BusyBox installed.

How to extract recovery.img from the ASUS firmware? [7.0/8.0] [ZE552KL/ZE520KL]

Hello guys, some time ago this device had more support from developers, someone could extract the recovery.img in order to keep it updated.
I wonder if anyone would know what the procedure is for extracting.
My device is the ZE552KL (Z012D).
I followed the steps in this tutorial, however, I did not succeed: https://tinyurl.com/yd3w4pxa
I followed all the steps and tried to extract recovery.img from the Zenfone 3 ZE552KL (Z012D) Asus firmware, however, there was a problem after applying the applypatch directive.
Error: patch boot.img: Only patches to EMMC targets are supported.
And I can not solve it.
install-recovery.sh (original extraction): https://hastebin.com/lupoqovila.bash
install-recovery.sh (change): https://hastebin.com/ofuqofezat.bash
Apllypatch directive used at the prompt: applypatch -b recovery-resource.dat boot.img recovery.img 28e9d4088f51c9dafb9189eb15f061c78be55a57 18791676 4a9f7c48e01aed3a46ac8d06618239dff9834caf: recovery-from-boot.p
Error:
https://imgur.com/a/JWfyr
I also asked for help at Zentalk, but so far no one has spoken.
https://www.asus.com/zentalk/tw/thread-147621-2-1.html
Please, I'll be grateful if anyone can help.
The recovery partition is #59, therefore to back it up you can use terminal emulator and type;
Su
dd if=/dev/block/mmcblk0p59 of=/sdcard/recovery.img
To flash, go to fastboot and type
Fastboot flash recovery recovery.img
Fastboot reboot
You need root for all this. You can convert the recovery image to be flashable via recovery but it only works with twrp, not stock.
wang1chung said:
The recovery partition is #59, therefore to back it up you can use terminal emulator and type;
Su
dd if=/dev/block/mmcblk0p59 of=/sdcard/recovery.img
To flash, go to fastboot and type
Fastboot flash recovery recovery.img
Fastboot reboot
You need root for all this. You can convert the recovery image to be flashable via recovery but it only works with twrp, not stock.
Click to expand...
Click to collapse
Thanks for taking note of my question, but what I really need to know is about recovery stock. It would not be logical for my use to perform custom recovery extraction, since it is already found in the .img format from the developer's available links (TWRP).
Following the tutorial steps of the links I indicated it is possible to make a kind of compilation using the official OTA file, processing on the device itself to generate the file recovery.img stock.
Again thank you for trying to help, any and all help is very welcome.
+1
Can someone post here stock recovery.img for ze520kl newest oreo firmware?
I'd like to know how to do this as well. I went through a lot of trouble to get Oreo installed after rooting and installing TWRP on my phone running Nougat, ended up having to go back to stock and install updates incrementally. As you noted, root is required to save the stock recovery.img, but since my device is not rooted now I can't root without installing TWRP first. That would put me in the same situation as the OP. The google translate of the link posted by the OP is a bit hard to understand, can someone else give an english explanation of how to extract recovery.img from firmware zip?
TIA
Update: I managed to follow the instructions in the OP's link, ended up with a similar applypatch command as he did and also encountered the same error with running the command over adb. I'm not sure if those instructions are for all asus devices, the one in the link is Asus P028 (Zenpad 10)
applypatch -b recovery-resource.dat boot.img recovery.img f448eeec56d4d87173858cd7aec25c36a7dfaaa7 18736380 9ebabd3eb6a59cfcaf0f4f048e2d8d6d870d7924:recovery-from-boot.p
ktl20 said:
Can someone post here stock recovery.img for ze520kl newest oreo firmware?
Click to expand...
Click to collapse
Here
Error
I keep getting
/sbin/sh: f448eeec56d4d87173858cd7aec25c36a7dfaaa7: not found
whenever i go through this. what am i doing wrong? T_T
wang1chung said:
The recovery partition is #59, therefore to back it up you can use terminal emulator and type;
Su
dd if=/dev/block/mmcblk0p59 of=/sdcard/recovery.img
To flash, go to fastboot and type
Fastboot flash recovery recovery.img
Fastboot reboot
You need root for all this. You can convert the recovery image to be flashable via recovery but it only works with twrp, not stock.
Click to expand...
Click to collapse
when I type su and enter, on adb shell show error "/system/bin/sh: su: not found". my device is unrooted. I did this for boot and recovery backup before rooting. I'm using Zenfone x00rd (Live L1)

[ROM][STOCK][FASTBOOT][OP6] Stock Fastboot ROMs for OnePlus 6

Things are changing with the advent of project treble and seamless updates. OnePlus will no longer release ROMs flashable via stock recovery (with twrp is possible but not recommended). The updates will be done on the slot not used for example if you are using slot a the update will be installed on slot b and the slot b will be set as default. If you brick and you are in bootloop how you can restore the rom? You can't with Stock ROM you have, because the zip can be only installed via Update Engine, so what can you do? Flash a stock rom via fastboot. I have extracted all images from the stock zip and i have made a new zip with the Fastboot ROM with a flash-all.bat included. This will work only if your bootloader is unlocked. This will erase all your data and will wipe your internal storage.
HOW TO FLASH
Download the zip;
Unpack the zip in a folder;
Reboot the OnePlus 6 in fastboot mode (Power and volume-);
Connect the OnePlus 6 to PC;
Run flash-all.bat flasher you need;
Wait until the process end;
The phone will automatically reboot.
FLASHER ADVANCED GUIDE
flash-all-partitions-fastboot.bat : this .bat will flash all possible partitions through fastboot (Except persist) , there are some criticals partitions that can't be flashed through fastboot;
flash-only-persist.bat : this .bat will flash only persist partition in fastboot mode (This is good for people that have problems with sensor);
flash-all-partitions-recovery-criticals.bat : this .bat will boot the twrp and will flash criticals partitions, use this carefully;
flash-system-boot-vendor.bat : this .bat is the same of older flash-all.bat and so it will flash only vendor, system and boot;
flash-all-partitions.bat : this .bat will run flash-all-partitions-fastboot.bat , then flash-only-persist.bat and then flash-all-partitions-recovery-criticals.bat .
Now usually the one needed is only the first "flash-all-partitions-fastboot.bat" but if you are badly bricked i recommend to use flash-all-partitions.bat .
DOWNLOAD
All roms on AFH: https://www.androidfilehost.com/?w=files&flid=271877
All roms on Sourceforge: https://sourceforge.net/projects/fastbootroms/files/OnePlus 6/
MANUAL FLASH: Windows - OSX - Linux
If you want to manual flash these roms these are the commands (you need to extract images.zip before proceed)
Fastboot Partitions:
Code:
fastboot flash aop_a aop.img
fastboot flash aop_b aop.img
fastboot flash bluetooth_a bluetooth.img
fastboot flash bluetooth_b bluetooth.img
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
fastboot flash dsp_a dsp.img
fastboot flash dsp_b dsp.img
fastboot flash dtbo_a dtbo.img
fastboot flash dtbo_b dtbo.img
fastboot flash fw_4j1ed_a fw_4j1ed.img
fastboot flash fw_4j1ed_b fw_4j1ed.img
fastboot flash fw_4u1ea_a fw_4u1ea.img
fastboot flash fw_4u1ea_b fw_4u1ea.img
fastboot flash modem_a modem.img
fastboot flash modem_b modem.img
fastboot flash oem_stanvbk oem_stanvbk.img
fastboot flash qupfw_a qupfw.img
fastboot flash qupfw_b qupfw.img
fastboot flash storsec_a storsec.img
fastboot flash storsec_b storsec.img
fastboot flash system_a system.img
fastboot flash system_b system.img
fastboot flash vbmeta_a vbmeta.img
fastboot flash vbmeta_b vbmeta.img
fastboot flash vendor_a vendor.img
fastboot flash vendor_b vendor.img
fastboot flash LOGO_a LOGO.img
fastboot flash LOGO_b LOGO.img
If you need also persist partition, this is the command:
Code:
fastboot flash persist persist.img
Criticals Partitions, for these you need to boot the TWRP:
Code:
fastboot boot TWRP.img
When you are in TWRP you need to run these commands to push and flash all criticals partitions:
Code:
adb push abl.img /sdcard/abl.img
adb shell dd if=/sdcard/abl.img of=/dev/block/bootdevice/by-name/abl_a
adb shell dd if=/sdcard/abl.img of=/dev/block/bootdevice/by-name/abl_b
adb push cmnlib.img /sdcard/cmnlib.img
adb shell dd if=/sdcard/cmnlib.img of=/dev/block/bootdevice/by-name/cmnlib_a
adb shell dd if=/sdcard/cmnlib.img of=/dev/block/bootdevice/by-name/cmnlib_b
adb push cmnlib64.img /sdcard/cmnlib64.img
adb shell dd if=/sdcard/cmnlib64.img of=/dev/block/bootdevice/by-name/cmnlib64_a
adb shell dd if=/sdcard/cmnlib64.img of=/dev/block/bootdevice/by-name/cmnlib64_b
adb push devcfg.img /sdcard/devcfg.img
adb shell dd if=/sdcard/devcfg.img of=/dev/block/bootdevice/by-name/devcfg_a
adb shell dd if=/sdcard/devcfg.img of=/dev/block/bootdevice/by-name/devcfg_b
adb push hyp.img /sdcard/hyp.img
adb shell dd if=/sdcard/hyp.img of=/dev/block/bootdevice/by-name/hyp_a
adb shell dd if=/sdcard/hyp.img of=/dev/block/bootdevice/by-name/hyp_b
adb push keymaster.img /sdcard/keymaster.img
adb shell dd if=/sdcard/keymaster.img of=/dev/block/bootdevice/by-name/keymaster_a
adb shell dd if=/sdcard/keymaster.img of=/dev/block/bootdevice/by-name/keymaster_b
adb push xbl.img /sdcard/xbl.img
adb shell dd if=/sdcard/xbl.img of=/dev/block/bootdevice/by-name/xbl_a
adb shell dd if=/sdcard/xbl.img of=/dev/block/bootdevice/by-name/xbl_b
adb push xbl_config.img /sdcard/xbl_config.img
adb shell dd if=/sdcard/xbl_config.img of=/dev/block/bootdevice/by-name/xbl_config_a
adb shell dd if=/sdcard/xbl_config.img of=/dev/block/bootdevice/by-name/xbl_config_b
REMEMBER
"Invalid sparce file format at header magic" is not an error, you need to wait a bit when you see that string, just wait.
These ROMs can't be used to update or downgrade your phone but just to restore your phone, so don't use them to come back to oreo or to update from oreo to pie.
If you want to rebrand your phone from HydrogenOS to OxygenOS you can follow this guide: Rebrand Guide
If you want you can use also my tool to flash Factory Images, unlock bootloader, flash twrp or to understand if the device is recognized: https://toolaio.tk/
Thanks to @SaiBork for first time tested
If you got some problems like write error or no partition, check this: https://forum.xda-developers.com/showpost.php?p=76658555&postcount=34
DONATE LINK
If you want to support this and others my projects please consider making a donation, thanks.
​
This would've saved me 6 hours of my life trying to unbrick my 6 this morning. You are a savior. Reserved.
So how do we install the OTA update when we have twrp installed?..
Always through fastboot?...
will this erase internal storage?
---------- Post added at 07:17 PM ---------- Previous post was at 07:15 PM ----------
mikex8593 said:
This would've saved me 6 hours of my life trying to unbrick my 6 this morning. You are a savior. Reserved.
Click to expand...
Click to collapse
did this work for u?
cultofluna said:
So how do we install the OTA update when we have twrp installed?..
Always through fastboot?...
Click to expand...
Click to collapse
No, with Update Engine. With project treble the updates are installed from an Android app called Update Engine in the slot that you are not using, when you reboot the device after the update, the slot will be changed and you will have the update. The stock recovery is there only to wipe your memory if needed and there is no longer the recovery partition but the recovery is included in the boot partition.
Bradl79 said:
will this erase internal storage?
Click to expand...
Click to collapse
Yes, i added it on first post
If you get some errors write it here and i will help you to solve it
mauronofrio said:
No, with Update Engine. With project treble the updates are installed from an Android app called Update Engine in the slot that you are not using, when you reboot the device after the update, the slot will be changed and you will have the update. The stock recovery is there only to wipe your memory if needed and there is no longer the recovery partition but the recovery is included in the boot partition.
Yes, i added it on first post
Click to expand...
Click to collapse
so it pretty much puts it back to factory settings. So even with us being rooted and having a custom recovery, will we be able to get OTA's or will we have to wipe our phones on every update?
Bradl79 said:
will this erase internal storage?
---------- Post added at 07:17 PM ---------- Previous post was at 07:15 PM ----------
did this work for u?
Click to expand...
Click to collapse
I restored it via the unofficial twrp by flashing the stock zip in recovery, but it was a pain because the new modded version didn't support mtp and the original was extremely slow and didn't load with anything on the internal storage. It was a painful process with repeated failures and if I had this method, would've saved a lot of frustration. I will definitely try next time I brick, which I do a lot....
---------- Post added at 07:24 PM ---------- Previous post was at 07:23 PM ----------
Maybe I'll just take one for the team and intentionally brick to try for sure
mikex8593 said:
I restored it via the unofficial twrp by flashing the stock zip in recovery, but it was a pain because the new modded version didn't support mtp and the original was extremely slow and didn't load with anything on the internal storage. It was a painful process with repeated failures and if I had this method, would've saved a lot of frustration. I will definitely try next time I brick, which I do a lot....
---------- Post added at 07:24 PM ---------- Previous post was at 07:23 PM ----------
Maybe I'll just take one for the team and intentionally brick to try for sure
Click to expand...
Click to collapse
have for u to brick but that would be great to know if this works, b/c i don't think there has been any tests on it, would u be able to make a video of it too?
Bradl79 said:
have for u to brick but that would be great to know if this works, b/c i don't think there has been any tests on it, would u be able to make a video of it too?
Click to expand...
Click to collapse
Maybe in a week or so because I have a cold at the moment. I could probably do a video on my PC with no audio.
So we can just take the OTA when it drops like stock users?..
And how about root?
After any update we flash root through twrp?..
Sory for so.many questions but im on OP3T now and im planning to upgrade to OP6...
This A/B think is totally new for me..
Trying to clear things out...
Bradl79 said:
so it pretty much puts it back to factory settings. So even with us being rooted and having a custom recovery, will we be able to get OTA's or will we have to wipe our phones on every update?
Click to expand...
Click to collapse
If you make an update you will lose root and twrp, but if you run magisk manager before reboot after the update you can keep the root.
I forget to say that the latest TWRP have the support for Update Engine
Zip updated
mauronofrio said:
Zip updated
Click to expand...
Click to collapse
new links?
flash-all.bat dont works for me,
unzip, fastboot, start flash-all.bat > result: show me current folder and exit, after 1sec
uragan1987 said:
flash-all.bat dont works for me,
unzip, fastboot, start flash-all.bat > result: show me current folder and exit, after 1sec
Click to expand...
Click to collapse
Did you:
1 have unlocked bootloader
2 tyoe fastboot devices and get response
did unlock and flash twrp, did a try to install a clear system, now system wont boot and twrp crash at start after some second
looks like a bug at twrp, cause no system on phone
uragan1987 said:
did unlock and flash twrp, did a try to install a clear system, now system wont boot and twrp crash at start after some second
looks like a bug at twrp, cause no system on phone
Click to expand...
Click to collapse
Well you should be able to get to bootloader and fastboot devices
Have you tried that?
uragan1987 said:
flash-all.bat dont works for me,
unzip, fastboot, start flash-all.bat > result: show me current folder and exit, after 1sec
Click to expand...
Click to collapse
Sure that you have entered the correct path into cmd? If so and it still doesn't work, maybe follow the instructions of this post: https://forum.xda-developers.com/showpost.php?p=76632484&postcount=82, at least type the shown commands into cmd. These are, what the bat file includes, but now "manually".
If it still doesn't work you maybe have to install another adb version (like shown in the linked post).
But before, try it once more with @mauronofrio method and make sure that
- your phone is in fastboot mode
- the zip is unzipped to one new folder, which only includes the unzipped files
- and that you entered the correct path via cmd (if you are on windows).
- and wait... some files flashing need a while
- while that, don´t touch the display of the op6 (even not, when it is shown lock.... unlock bootloader - just wait)
thx Flying Fox, you push me to right way
this is inside bat:
flash-all.bat
Code:
@echo off
title Mauronofrio flashall :P
for %%f in (""CurrentDIR.bat"") DO @SET currDir_=%%~df%%~pf
echo.
echo Current Directory = %currDir_%
SET ANDROID_PRODUCT_OUT=%currDir_%
pause
cant see commands here for fastboot
at this script is only setup for ANDROID_PRODUCT_OUT
will be nice, to update script and include this code too:
https://forum.xda-developers.com/showpost.php?p=76632484&postcount=82
androidfilehost indicates its 2gb file...but downloadable file is 3.08gb...cant understand

[SOLVED] Building aosp_blueline-userdebug on server and flashing locally

Hi,
I want to flash the userdebug build of blueline onto my Pixel 3 (Android 9 rooted with bootloader unlocked). I am building AOSP on a remote server due to limited space on my local machine. In the docs one can use
Code:
fastboot flashall -w
to flash the kernel assuming you are still in the shell you built the kernel in. However, after building, I scp the target/product/blueline directory onto my local machine. How can I flash my device from there? I tried:
Code:
ANDROID_PRODUCT_OUT="./" fastboot flashall
This command fails with: Rebooting into fastboot FAILED (remote: 'Unsupported reboot option reboot-fastboot')
If I simply do:
Code:
fastboot flash boot boot-debug.img
I get an error on boot: invalid boot image boot.img
Is there anything I'm doing wrong here? What is the typical workflow for buliding AOSP? I'm sure I'm not the only one building the kernel remotely
I am pretty sure you need to flash the boot.img then sideload the package.
wangdaning said:
I am pretty sure you need to flash the boot.img then sideload the package.
Click to expand...
Click to collapse
What do you mean by package?
Building AOSP should give an update.zip or something like that.
Where can I find the update.zip. I'm following the official Android docs (https://source.android.com/setup/build/running) and after building my directory (aosp/out/target/product/blueline) has following contents:
Code:
$>>ls
android-info.txt persist
boot.img persist.img
build_fingerprint.txt previous_build_config.mk
build_thumbprint.txt product
clean_steps.mk product.img
data product_copy_files_ignored.txt
dex_bootjars ramdisk-recovery.img
dtbo.img ramdisk.img
fake_packages recovery
gen recovery.id
installed-files-product.json root
installed-files-product.txt symbols
installed-files-system-other.json system
installed-files-system-other.txt system.img
installed-files.json system_other
installed-files.txt system_other.img
kernel userdata.img
module-info.json vbmeta.img
obj vendor
obj_arm
Where can I find such a zip? What I am trying to do is reflash the entire OS, not just update. Would you still recommend a sideload?
It could be I am wrong, been a long time since I built AOSP. I think there was another step to create the update.zip, but not coming to me very quickly.
Your initial post showed you tried to flash boot-debug.img, but there is no file with that name in the output. I think you will have to flash partitions one by one, unless someone has already created a script for it.
Hopefully someone with more recent experience building AOSP can shed some light on this for you.
I got it to work
Basically my mistake was that I didn't download and extract the qualcomm and google vendor binaries at the root of the source tree. For reference these can be found here (https://developers.google.com/android/drivers). Then rebuild using
Code:
make clobber && make -j14
. Finally flashing the image is just done via:
Code:
fastboot flashall -w
. I had to download the newest fastboot version (29.1) and make sure that I use it instead of the one that AOSP builds (28.xx).

Categories

Resources