[SOLVED] Building aosp_blueline-userdebug on server and flashing locally - Google Pixel 3 Questions & Answers

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).

Related

[Resolved] [Q] How to install stock rom from RUU on Wildfire using linux only?

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?

ADB Command/HBOOT Changes in recent OTA enhancement for 4.1.2

So it has become prudent to me that I update this info to the general public within the home of our One SV. Most of you may already be aware of the recent OTA Enhancement that the k2_cl has been receiving or already received. I have just learned after trying some modifications within my device that some commands were changed. I have not been able to figure out what all commands have been changed however one that I am aware of and the very one I constantly use as a safety hazard on my own device is booting vice flashing while in fastboot usb. Originally you all may have known the command to be fastboot boot recovery recovery.img (as an example). Its common for people to flash being the command: fastboot flash recovery recovery.img. As for me I ALWAYS BOOT before I flash to insure it's integrity while operating on my device. Thank of it as running within a virtual window to dumb this down for the less understanding individuals. Back on track, this command has been changed. fastboot boot boot boot.img (as an example) no longer works. They changed the command to: fastboot -c "lge.kcal=0|0|0|x" boot customrecovery.img. That code functions respectively no different than as we would use to type: fastboot boot recovery customrecovery.img. Why they made such changes I am not sure. So be cautious of these changes. I made this thread to all who may come to learn about other changes with other commands and if so then please come back here and shar this knowledge as it will be VERY USEFUL TO US ALL. Thanks.
EDIT:
"fastboot boot" command DOESN'T work with the recent 4.1.2 OTA enhancement so you need to SPECIFY a kernel commandline to use "fastboot boot" command.
A list of commands with a quick summary on them.
/boot
This is the boot partition of your Android device, as the name suggests. It includes the android kernel and the ramdisk. The device will not boot without this partition. Wiping this partition from recovery should only be done if absolutely required and once done, the device must NOT be rebooted before installing a new one, which can be done by installing a ROM that includes a /boot partition.
/system
As the name suggests, this partition contains the entire Android OS, other than the kernel and the ramdisk. This includes the Android GUI and all the system applications that come pre-installed on the device. Wiping this partition will remove Android from the device without rendering it unbootable, and you will still be able to put the phone into recovery or bootloader mode to install a new ROM.
/recovery
This is specially designed for backup. The recovery partition can be considered as an alternative boot partition, that lets the device boot into a recovery console for performing advanced recovery and maintenance operations on it.
/data
Again as the name suggest, it is called userdata partition. This partition contains the user’s data like your contacts, sms, settings and all android applications that you have installed. While you are doing factory reset on your device, this partition will wipe out, Then your device will be in the state, when you use for he first time, or the way it was after the last official or custom ROM installation.
/cache
I hope you have some idea about cache, as you are expert on internet browsing. This is the partition where Android stores frequently accessed data and app components. Wiping the cache doesn’t effect your personal data but simply gets rid of the existing data there, which gets automatically rebuilt as you continue using the device.
/misc
This partition contains miscellaneous system settings in form of on/off switches. These settings may include CID (Carrier or Region ID), USB configuration and certain hardware settings etc. This is an important partition and if it is corrupt or missing, several of the device’s features will will not function normally.
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip​ flashall flash boot + recovery + system​ flash <partition> [ <filename> ] write a file to a flash partition​ erase <partition> erase a flash partition​ getvar <variable> display a bootloader variable​ boot <kernel> [ <ramdisk> ] download and boot kernel​ flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it​ devices list all connected devices​ continue continue with autoboot​ reboot reboot device normally​ reboot-bootloader reboot device into bootloader​
options:
-w erase userdata and cache​ -s <serial number> specify device serial number​ -p <product> specify product name​ -c <cmdline> override kernel commandline​ -i <vendor id> specify a custom USB vendor id​ -b <base_addr> specify a custom kernel base address​ -n <page size> specify the nand page size. default:​
Edit
---------- Post added at 06:30 PM ---------- Previous post was at 06:21 PM ----------
V1sual1mpact said:
That code functions respectively no different than as we would use to type: fastboot boot recovery customrecovery.img.
EDIT:
"fastboot boot" command DOESN'T work with the recent 4.1.2 OTA enhancement so you need to SPECIFY a kernel commandline to use "fastboot boot" command.
Click to expand...
Click to collapse
The correct cmd to boot a recovery.img before flashing is :
Code:
fastboot boot recovery.img
NOT fastboot boot recovery recovery.img
:thumbup:
russellvone said:
Edit
---------- Post added at 06:30 PM ---------- Previous post was at 06:21 PM ----------
The correct cmd to boot a recovery.img before flashing is :
Code:
fastboot boot recovery.img
NOT fastboot boot recovery recovery.img
:thumbup:
Click to expand...
Click to collapse
Actually, the command I gave is also correct (it's based on optional command) . But thanks for the input. The command has always been the command which I used. However, since that OTA I can not use it anymore.
help
V1sual1mpact said:
Actually, the command I gave is also correct (it's based on optional command) . But thanks for the input. The command has always been the command which I used. However, since that OTA I can not use it anymore.
Click to expand...
Click to collapse
OK, so I'm a bit confused here....What would be the proper command line to actually flash custom recovery....I keep getting an unknown error message using fast flash recovery custom recovery.img...
Rename the recovery.img to recovery.img.
Code:
fastboot flash recovery recovery.img
http://forum.xda-developers.com/showthread.php?p=47471643
Sent from my C525c using XDA Premium 4 mobile app

Returning to stock, where can I find the stock image?

I need to warranty a phone but I need to turn it back to stock. I am using an older version of TWRP, I am guessing here but do I just download the factory image and flash it and I am done? It seems like everything I get when searching is geared towards the Pixel XL and using ADB rather than TWRP.
Thanks in advance.
Beacuse I part time as an internet troll, I have to chastise you for not reading threw this forum, because well that's why it's there, but hey we all can't use our Brian's all the time, but yes download the factory image for your phone Marlin for Pixel XL and Sailfish for Pixel unzip the file, make sure you have lastest usb drivers installed and click the flash all.bat.
Fastboot and flash factory image.
A wonderful guide: https://forum.xda-developers.com/pixel-xl/how-to/guide-how-to-unlock-root-flash-pixel-xl-t3507886
jerryhou85 said:
Fastboot and flash factory image.
A wonderful guide: https://forum.xda-developers.com/pixel-xl/how-to/guide-how-to-unlock-root-flash-pixel-xl-t3507886
Click to expand...
Click to collapse
why do I have to fastboot or ADB cant I just boot into twrp and flash factory image?
twilk73 said:
why do I have to fastboot or ADB cant I just boot into twrp and flash factory image?
Click to expand...
Click to collapse
I'm not a good developer so I cannot answer you that question, but on Google official page, it is recommended to use fastboot or adb to flash factory images...
twilk73 said:
why do I have to fastboot or ADB cant I just boot into twrp and flash factory image?
Click to expand...
Click to collapse
Because recovery and boot are sort of intermingled now. You would be writing over twrp at the same time you are trying to use it to flash.
Use the flashall bat file. If you want to save data edit out the -w from the bat file.
twilk73 said:
why do I have to fastboot or ADB cant I just boot into twrp and flash factory image?
Click to expand...
Click to collapse
I am on linux let me just get that out of the way.
So I used adb to fastboot the factory image but nothing happens
the file is in downloads and in the fastboot file. So I type cd Downloads, cd fastboot, fastboot sailfish-nmf260 it all looks good and you can tell adm is working but nothing happens on the phone.
I am current only able to get the phone into fastboot mode I dont know what I messed up but I can no longer even boot into TWRP.
I must have succesfully removed the twrp recovery because no i get the no command screen. If I hold power and press up I can get into the stock android recovery. Is there a way to install the factory image still? Or is the process still the same and I need to adb fastboot? I might need to just do the abd fastboot on a windows computer at work tomorrow.
twilk73 said:
I must have succesfully removed the twrp recovery because no i get the no command screen. If I hold power and press up I can get into the stock android recovery. Is there a way to install the factory image still? Or is the process still the same and I need to adb fastboot? I might need to just do the abd fastboot on a windows computer at work tomorrow.
Click to expand...
Click to collapse
Download the factory image you want here. Unzip the entire contents to the same folder fastboot is located in. Then boot the phone to the bootloader, then plug it in to you computer. Then, if you're using Linux, double click the flash-all.sh file that got unzipped to your fastboot folder. If you're using a Windows computer, double click on the flash-all. bat file instead of the flash-all.sh file. Then sit back and wait. That's about all there is to it. One note. If you want to save your data, open the script you're going to use in a text editor and remove the -w toward the end of the script (remember to save your changes). If you want the phone wiped clean and like new again, just leave it as is.
robocuff said:
Download the factory image you want here. Unzip the entire contents to the same folder fastboot is located in. Then boot the phone to the bootloader, then plug it in to you computer. Then, if you're using Linux, double click the flash-all.sh file that got unzipped to your fastboot folder. If you're using a Windows computer, double click on the flash-all. bat file instead of the flash-all.sh file. Then sit back and wait. That's about all there is to it. One note. If you want to save your data, open the script you're going to use in a text editor and remove the -w toward the end of the script (remember to save your changes). If you want the phone wiped clean and like new again, just leave it as is.
Click to expand...
Click to collapse
ive done these steps but its failing to work. This is exactly what I am doing.
1. Download factory image.
2. Extract factory image into fastboot file.
the fast boot file is in the dowloads folder so I type.
cd Downloads
cd fastboot
fastboot flash-all.sh
iv also tried fastboot the sailfish-nmf260.img and boot.img and flashall. Ive tried several different ways this is what happens no mater what I type.
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot, system, vendor and if found,
recovery
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
format[:[<fs type>][:[<size>]] <partition> format a flash partition.
Can override the fs type and/or
size the bootloader reports.
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> [ <second> ] ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> [ <second> ] ] create bootimage and
flash it
devices list all connected devices
continue continue with autoboot
reboot reboot device normally
reboot-bootloader reboot device into bootloader
help show this help message
options:
-w erase userdata and cache (and format
if supported by partition type)
-u do not first erase partition before
formatting
-s <specific device> specify device serial number
or path to device port
-l with "devices", lists device paths
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address.
default: 0x10000000
-n <page size> specify the nand page size.
default: 2048
-S <size>[K|M|G] automatically sparse files greater
than size. 0 to disable
Click to expand...
Click to collapse
On the phone nothing happens. It appears that all I am getting is a list of options but none of the options seem to be working either.
I might add that the fastboot folder I am using was downloaded back when I installed twrp is it possible my fastboot file doesnt have the correct files to get the job done?
twilk73 said:
ive done these steps but its failing to work. This is exactly what I am doing.
1. Download factory image.
2. Extract factory image into fastboot file.
the fast boot file is in the dowloads folder so I type.
cd Downloads
cd fastboot
fastboot flash-all.sh
iv also tried fastboot the sailfish-nmf260.img and boot.img and flashall. Ive tried several different ways this is what happens no mater what I type.
On the phone nothing happens. It appears that all I am getting is a list of options but none of the options seem to be working either.
I might add that the fastboot folder I am using was downloaded back when I installed twrp is it possible my fastboot file doesnt have the correct files to get the job done?
Click to expand...
Click to collapse
Have you tried putting phone in fastboot mode and doubble click the flash all.sh file? That's how it is done on Windows.
Sent from my Google Pixel using XDA Labs
Sgace said:
Have you tried putting phone in fastboot mode and doubble click the flash all.sh file? That's how it is done on Windows.
Sent from my Google Pixel using XDA Labs
Click to expand...
Click to collapse
Basically yes. But with linux you cant just double click. So in terminal I typed "cd Download, cd fastboot, fastboot flash-all.sh" that command will attempt to launch that file.
I feel like the issue is with adb on my laptop I tried making sure its updated but i got nothing so ill try to do it on a work computer when I get free time.
Its pretty crappy right now because I am without a phone but heck I pet the dog today during lunch instead of reading the news feed off my phone so I guess the dog is happy lol.
twilk73 said:
Basically yes. But with linux you cant just double click. So in terminal I typed "cd Download, cd fastboot, fastboot flash-all.sh" that command will attempt to launch that file.
I feel like the issue is with adb on my laptop I tried making sure its updated but i got nothing so ill try to do it on a work computer when I get free time.
Its pretty crappy right now because I am without a phone but heck I pet the dog today during lunch instead of reading the news feed off my phone so I guess the dog is happy lol.
Click to expand...
Click to collapse
I don't think you can flash it with fastboot. In Windows, at the command prompt, you just type flash-all.bat and the batch file will run. It contains all the necessary fastboot commands. Perhaps that's where you're going wrong. Try just typing flash-all.sh. Leave the fastboot out.
twilk73 said:
Basically yes. But with linux you cant just double click. So in terminal I typed "cd Download, cd fastboot, fastboot flash-all.sh" that command will attempt to launch that file.
I feel like the issue is with adb on my laptop I tried making sure its updated but i got nothing so ill try to do it on a work computer when I get free time.
Its pretty crappy right now because I am without a phone but heck I pet the dog today during lunch instead of reading the news feed off my phone so I guess the dog is happy lol.
Click to expand...
Click to collapse
Try this for sailfish (fix accordingly if marlin, username of course is common sense, if still confused, you shouldn't be using linux)
I build and use debian sid
Code:
cd /home/username/Downloads
tar xvf sailfish-opr3.170623.008-factory-bb8bb3a3.zip -C /home/username
cd /home/username/sailfish-opr3.170623.008
tar xvf image-sailfish-opr3.170623.008.zip
cd /home/username/sailfish-opr3.170623.008
./flash-all.sh
If you need the latest adb/fastboot name it something like google.sh
Code:
#!/bin/bash
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
unzip \platform-tools-latest-linux.zip
cp platform-tools/adb /usr/bin/adb
cp platform-tools/fastboot /usr/bin/fastboot
piperx said:
Try this for sailfish (fix accordingly if marlin, username of course is common sense, if still confused, you shouldn't be using linux)
I build and use debian sid
Code:
cd /home/username/Downloads
tar xvf sailfish-opr3.170623.008-factory-bb8bb3a3.zip -C /home/username
cd /home/username/sailfish-opr3.170623.008
tar xvf image-sailfish-opr3.170623.008.zip
cd /home/username/sailfish-opr3.170623.008
./flash-all.sh
If you need the latest adb/fastboot name it something like google.sh
Code:
#!/bin/bash
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
unzip \platform-tools-latest-linux.zip
cp platform-tools/adb /usr/bin/adb
cp platform-tools/fastboot /usr/bin/fastboot
Click to expand...
Click to collapse
Sorry I wish I could try this. I had access to a windows computer at work and I was able to get everything done. After doing it at work I have a feeling I wasnt placing the files in the correct folder together to get it to start the update. It can be hard doing this on something other than windows for a dummy like me because most of the tutorials for things like this seem to be windows oriented. Regardless its done. I couldnt lock the boot loader on the windows computer though oddly but no big deal because I can do it on my laptop.
Thanks for all the help guys.

[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

Hhow to flash the pixel 3 with a userdebug aosp

obviously the device I get from market is based in the user build, so there is no chance to adb root adb disable-verity, that’s why I need to manually mount the partition before any file movement into those partitions (mostly /vendor/etc because a lot of audio configuration locate here ),
I repo sync the following
PD1A.180720.030 android-9.0.0_r11 Pie Pixel 3 XL, Pixel 3 2018-09-05
with repo init -u https://android.googlesource.com/platform/manifest -b android-9.0.0_r11
lunch
19. aosp_blueline-userdebug
make the whole image for blueline(pixel 3), and built pass, I also make updatepackage to wrap up all stuff,
boot.img already exists, no need to overwrite...
system.img already exists, no need to overwrite...
vbmeta.img already exists, no need to overwrite...
dtbo.img already exists, no need to overwrite...
product.img already exists, no need to overwrite...
Total of 720896 4096-byte output blocks in 27 input chunks.
Total of 76800 4096-byte output blocks in 15 input chunks.
done.
[100% 60/60] Package: out/target/product/blueline/aosp_blueline-img-eng.zip
and flash it by fastboot update aosp_blueline-img-eng.zip
I will expect the debug version of image for pixel 3 would be up and running and provide me the full permission to adb root, adb remount, adb disable-verity, thus I can adb push file to /vendor/etc, or /system/lib,
but this ends up a boot loop in bootloader after doing the flash, device always boot into bootloader instead of system, can someone kindly tell me anything wrong in choosing the build ??
does the pixel 3 got from market allow me to flash any image that built from AOSP ??

Categories

Resources