Question Troubleshooting re-locking bootloader on Pixel 6 Pro with a self-signed build of AOSP - Google Pixel 6

Trying to re-lock a Pixel 6 Pro using the vanilla AOSP, while some progress has been made since I last posted (link) it still isn't working. I'm at the point to where it "should" let me lock it and instead I'm getting this error message:
fastboot flashing lock
FAILED (remote: 'invalid android images, skip locking')
Click to expand...
Click to collapse
Other than that, it boots just fine. My best guess is that something went wrong when signing. I'm following instructions from here for signing the build with some customization below. Here's a summary of the entire process.
Checkout the source code:
repo init -u https://android.googlesource.com/platform/manifest -b android-13.0.0_r37 --depth=1
repo sync -j1 --fail-fast
wget https://dl.google.com/dl/android/aosp/google_devices-raven-tq2a.230305.008.f1-54772b94.tgz
tar -xzf google_devices-raven-tq2a.230305.008.f1-54772b94.tgz
./extract-google_devices-raven.sh
source build/envsetup.sh
lunch aosp_raven-user
Click to expand...
Click to collapse
Generating the self signed keys:
export PATH=~/Android/Sdk/platform-tools/:$PATH
subject='/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=[email protected]'
mkdir ~/.android-certs
for x in releasekey platform shared media networkstack; do \
./development/tools/make_key ~/.android-certs/$x "$subject"; \
done
openssl pkcs8 -in ~/.android-certs/releasekey.pk8 -inform DER -out ~/.android-certs/releasekey.key -nocrypt
Click to expand...
Click to collapse
Patch sign_target_files_apks.py so that it doesn't die when it can't find vendor.img
diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py
index 6f96d8f6a..aacd0fd83 100755
--- a/tools/releasetools/sign_target_files_apks.py
+++ b/tools/releasetools/sign_target_files_apks.py
@@ -534,7 +534,7 @@ def ProcessTargetFiles(input_tf_zip, output_tf_zip, misc_info,
for info in input_tf_zip.infolist():
filename = info.filename
- if filename.startswith("IMAGES/"):
+ if filename.startswith("IMAGES/") and not filename.endswith(("vendor.img" , "vendor_dlkm.img")):
continue
Click to expand...
Click to collapse
Build the code and sign it
make dist
sign_target_files_apks -o --default_key_mappings ~/.android-certs out/dist/*-target_files-*.zip signed-target-files.zip
img_from_target_files signed-target-files.zip signed-img.zip
./external/avb/avbtool.py extract_public_key --key ~/.android-certs/releasekey.key --output pkmd.bin
Click to expand...
Click to collapse
Flash your Pixel 6 Pro, but first put it into fastboot mode
fastboot update signed-img.zip
Click to expand...
Click to collapse
Wait for it to boot, then shut it down and go back into Fastboot Mode. Now we flast our self-signed key
fastboot erase avb_custom_key
fastboot flash avb_custom_key pkmd.bin
fastboot reboot bootloader
fastboot flashing lock
Click to expand...
Click to collapse
Then cry when it doesn't work. I am suspicious that it might not be signing the images correctly, however I can't figure out how to check to see if my keys have been used to sign the images. Any idea how to verify that? Anything else I can check to eliminate potential problems? I've also flashed both A and B slots which did nothing.

I am aware of the guide for LineageOS. Did try a few suggestions from there, like patching the Makefile, and it didn't make any difference.

Related

[Guide] How to build android from source for the dell streak

This quide is a work in progress. (only testing with Ubuntu 10.04 x64)
After searching for a complete how to for building android from source I have determined there is none that are 100% complete.
Here is a compilation of guides from various sites that I used to build for the streak
Step One – install some packages.
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl sun-java5-jdk zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev
Click to expand...
Click to collapse
Step Two – select the right version of Java.
sudo update-java-alternatives -s java-1.5.0-sun
Click to expand...
Click to collapse
Ubuntu doesn't have packages for the X11 libraries, but that can be worked around with the following command:
sudo ln -s /usr/lib32/libX11.so.6 /usr/lib32/libX11.so
Click to expand...
Click to collapse
Step Three - Installing repo.
make bin dir in home directory and add to path
cd ~
mkdir bin
export PATH=~/bin:$PATH
Click to expand...
Click to collapse
This can be made Permanent bay adding to the .bashrc file in ~/
Download the repo script and make it executable:
curl http://android.git.kernel.org/repo >~/bin/repo
chmod a+x ~/bin/repo
Click to expand...
Click to collapse
Step Four – Repo Init.
Create a working directory
mkdir mydroid
cd mydroid
Click to expand...
Click to collapse
Initialize the repo
repo init –u git://android.git.kernel.org/platform/manifest.git
Click to expand...
Click to collapse
Or if you would like to check out a specific branch use the following
repo init -u git://android.git.kernel.org/platform/manifest.git -b cupcake
(replace cupcake with your branch of choice)
Click to expand...
Click to collapse
If successful you will receive a message like:
“repo initialized in /mydroid”
To pull the files to your working directory now use:
repo sync
Click to expand...
Click to collapse
Step Four – Verify tags.
gpg --import
Then paste in the following:
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV
lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7
8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu5hOF9KXwCgkxMD
u4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0qRAN7dEoff0FeXsEaUA6U90sEoVks0Z
wNj96SA8BL+a1OoEUUfpMhiHyLuQSftxisJxTh+2QclzDviDyaTrkANjdYY7p2cq
/HMdOY7LJlHaqtXmZxXjjtw5Uc2QG8UY8aziU3IE9nTjSwCXeJnuyvoizl9/I1S5
jU5SA/9WwIps4SC84ielIXiGWEqq6i6/sk4I9q1YemZF2XVVKnmI1F4iCMtNKsR4
MGSa1gA8s4iQbsKNWPgp7M3a51JCVCu6l/8zTpA+uUGapw4tWCp4o0dpIvDPBEa9
b/aF/ygcR8mh5hgUfpF9IpXdknOsbKCvM9lSSfRciETykZc4wrRCVGhlIEFuZHJv
aWQgT3BlbiBTb3VyY2UgUHJvamVjdCA8aW5pdGlhbC1jb250cmlidXRpb25AYW5k
cm9pZC5jb20+iGAEExECACAFAknnWD4CGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIX
gAAKCRDorT+BmrEOeNr+AJ42Xy6tEW7r3KzrJxnRX8mij9z8tgCdFfQYiHpYngkI
2t09Ed+9Bm4gmEO5Ag0ESedYRBAIAKVW1JcMBWvV/0Bo9WiByJ9WJ5swMN36/vAl
QN4mWRhfzDOk/Rosdb0csAO/l8Kz0gKQPOfObtyYjvI8JMC3rmi+LIvSUT9806Up
hisyEmmHv6U8gUb/xHLIanXGxwhYzjgeuAXVCsv+EvoPIHbY4L/KvP5x+oCJIDbk
C2b1TvVk9PryzmE4BPIQL/NtgR1oLWm/uWR9zRUFtBnE411aMAN3qnAHBBMZzKMX
LWBGWE0znfRrnczI5p49i2YZJAjyX1P2WzmScK49CV82dzLo71MnrF6fj+Udtb5+
OgTg7Cow+8PRaTkJEW5Y2JIZpnRUq0CYxAmHYX79EMKHDSThf/8AAwUIAJPWsB/M
pK+KMs/s3r6nJrnYLTfdZhtmQXimpoDMJg1zxmL8UfNUKiQZ6esoAWtDgpqt7Y7s
KZ8laHRARonte394hidZzM5nb6hQvpPjt2OlPRsyqVxw4c/KsjADtAuKW9/d8phb
N8bTyOJo856qg4oOEzKG9eeF7oaZTYBy33BTL0408sEBxiMior6b8LrZrAhkqDjA
vUXRwm/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp9ILz8jEGqmUtkBszwo
G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ
hN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+BmrEOeCUOAJ9qmR0l
EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KLM=
=Wi5D
-----END PGP PUBLIC KEY BLOCK-----
Click to expand...
Click to collapse
Once you have done this press CTRL + D
Now there are a few changes we need to make before we build.
1.)We need to install gcc-4.3 (gcc-4.4 has more strict rules then previous versions that causes some issues during build)
sudo apt-get install gcc-4.3 g++-4.3
Click to expand...
Click to collapse
2.)Add JAVE_HOME to ~/.bashrc
nano ~/.bashrc
Click to expand...
Click to collapse
Add this to the end of the file:
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.16
Click to expand...
Click to collapse
A small issue with gcc
sudo apt-get install g++-multilib
Click to expand...
Click to collapse
Fix issue with webkit build later on
cd ~
cd android/system/external/webkit
git cherry-pick 18342a41ab72e2c21931afaaab6f1b9bdbedb9fa
Click to expand...
Click to collapse
Now that this is complete the build is pretty straight forward.
bluez
2) build android by
. build/envsetup.sh
choosecombo (all default option)
make -j4
3) replace external/bluez, and 'export BOARD_HAVE_BLUETOOTH=true'
4) mmm external/bluez
-------------------------------------------------------------------------------
jpeg
2) build android by
. build/envsetup.sh
choosecombo (all default option)
make -j4
3) replace external/jpeg
4) mmm external/jpeg
-------------------------------------------------------------------------------
webkit
2) build android by
. build/envsetup.sh
choosecombo (all default option)
make -j4
3) replace external/webkit
4) mmm external/webkit
-------------------------------------------------------------------------------
wpa_supplicant
2) build android by
. build/envsetup.sh
choosecombo (all default option)
make -j4
3) replace external/wpa_supplicant
4) mmm external/wpa_supplicant
-------------------------------------------------------------------------------
kernel
2) repleace kernel
3) build android by
. build/envsetup.sh
choosecombo
Build for the simulator or the device?
1. Device
2. Simulator
Which would you like? [1]
Build type choices are:
1. release
2. debug
Which would you like? [1]
Product choices are:
1. emulator
2. generic
3. sim
4. msm7627_ffa
5. msm7627_surf
6. qsd8250_ffa
7. qsd8250_surf
You can also type the name of a product if you know it.
Which product would you like? [generic] 7
Variant choices are:
1. user
2. userdebug
3. eng
Which would you like? [eng]
4) make -j4
Guide not complete. Will finish shortly
Sources -
http://source.android.com/source/download.html
http://www.johandekoning.nl/index.php/2009/06/07/building-android-15-build-environment/
http://hi.baidu.com/caicry/blog/item/cad9977f11f2920528388a9f.html
http://opensource.dell.com/releases/streak/1.12/HOW-TO-BUILD.txt
This is awesome work you're doing here! Seems pretty daunting to try to build android if you don't know where to begin- this is a great step by step guide.
very nicely done. always good to have all the info in once place, im forever forgetting commands as it is. needs a sticky
Anyone actually got this to work? I can build the framework but building the kernel is another story.
First of all, what kernel should be used? common? msm? something else? And what branch?
Second, what kernel configuration? The one from the phone doesn't work 100%
Thirdly, "choosecombo" does not find any products to choose from. Is that a problem?
Fourthly, after it's all build, what's next? How is the update zip made?
drstock said:
Anyone actually got this to work? I can build the framework but building the kernel is another story.
First of all, what kernel should be used? common? msm? something else? And what branch?
Second, what kernel configuration? The one from the phone doesn't work 100%
Thirdly, "choosecombo" does not find any products to choose from. Is that a problem?
Fourthly, after it's all build, what's next? How is the update zip made?
Click to expand...
Click to collapse
Read the first post again....your answers are all there
fards said:
Read the first post again....your answers are all there
Click to expand...
Click to collapse
What? No they're not, read the questions again.
Anywho, I got the kernel to build with the config from the phone, just one change needed: CONFIG_QSD_OEM_RPC_VERSION_CHECK=N
Using the MSM7XXX kernel, android-msm-2.6.29-donut branch. Haven't had the guts to test it yet.
Here's mores links
http://opensource.dell.com/releases/streak/1.12/
Probably the same stuff but haven't read above.
you really should use the codeaurora android tree nopt the android one as CA has the extra edits for snapdragon
drstock said:
What? No they're not, read the questions again.
Anywho, I got the kernel to build with the config from the phone, just one change needed: CONFIG_QSD_OEM_RPC_VERSION_CHECK=N
Using the MSM7XXX kernel, android-msm-2.6.29-donut branch. Haven't had the guts to test it yet.
Click to expand...
Click to collapse
oh yes they are...
here, let me wipe your arse for you. hold your hand
you need the dell kernel source.
kernel
2) repleace kernel
3) build android by
build/envsetup.sh
choosecombo
Build for the simulator or the device?
1. Device
2. Simulator
Which would you like? [1]
Build type choices are:
1. release
2. debug
Which would you like? [1]
Product choices are:
1. emulator
2. generic
3. sim
4. msm7627_ffa
5. msm7627_surf
6. qsd8250_ffa
7. qsd8250_surf
You can also type the name of a product if you know it.
Which product would you like? [generic] 7
Variant choices are:
1. user
2. userdebug
3. eng
Which would you like? [eng]
4) make -j4
Click to expand...
Click to collapse
which parts dont you understand of that?
once you have the source set up properly (try source build/envsetup.sh as an alternative to ./buildsetup.sh)
choosecombo should work fine.
flash the seperate created imgs.
Nice work deserves a sticky keep it up
Would love to try it myself when the howto is complete.
fards said:
oh yes they are...
here, let me wipe your arse for you. hold your hand
Click to expand...
Click to collapse
fards said:
you need the dell kernel source.
Click to expand...
Click to collapse
Of course I use the dell kernel source.
fards said:
which parts dont you understand of that?
once you have the source set up properly (try source build/envsetup.sh as an alternative to ./buildsetup.sh)
choosecombo should work fine.
Click to expand...
Click to collapse
First of all, it says "replace kernel" but the framework does not include the kernel source, only a prebuilt generic kernelcd . And I can't replace the prebuilt kernel at that step since I haven't built the kernel yet at that step. See my predicament?
Building the framework does not rebuild the kernel as far as I can see.
choosecombo works, but it doesn't give the output described in the howto. This is what I see when running it:
~/mydroid$ choosecombo
Build for the simulator or the device?
1. Device
2. Simulator
Which would you like? [1]
Build type choices are:
1. release
2. debug
Which would you like? [1]
Which product would you like? [generic]
Click to expand...
Click to collapse
As i understand it the product targets should be available under device/ but that directory doesn't even exist.
fards said:
flash the seperate created imgs.
Click to expand...
Click to collapse
Could you upload the images you created to mediafire?
Thanks for the help.
By the sound of it, you don't have the dell kernel *source*
It's not prebuilt at all. It's an archive which has a folder inside called kernel, inside there is a lot of files and folders that when compiled make the kernel zImage
You need to delete the folder called kernel that's inside the main folder where you repo synced the codeauroura/android source, depending on which. Git you used
Then move the kernel folder from the dell source archive to the codeauroura/android whatever youcalledit folder where you just deleted the other folder.
Then carry on with the instructions.
I'm not using The donut source, I'm trying to port to froyo, and as such don't have a valid boot.Img
fards said:
By the sound of it, you don't have the dell kernel *source*
It's not prebuilt at all. It's an archive which has a folder inside called kernel, inside there is a lot of files and folders that when compiled make the kernel zImage
You need to delete the folder called kernel that's inside the main folder where you repo synced the codeauroura/android source, depending on which. Git you used
Then move the kernel folder from the dell source archive to the codeauroura/android whatever youcalledit folder where you just deleted the other folder.
Then carry on with the instructions.
I'm not using The donut source, I'm trying to port to froyo, and as such don't have a valid boot.Img
Click to expand...
Click to collapse
I'm using the dell kernel source (streak_1.12_kernel.tar.gz). The prebuilt kernel I'm talking about is the one included in the framework, located under /prebuilt/android-arm/kernel/. As I understand the documentation, that's the one used when images are built. Is that incorrect? Cause from what I can see, the kernel isn't even built when running make on the framework, even if the source is there.
I haven't looked at froyo, but in the donut source (that you get from "repo init -u git://android.git.kernel.org/platform/manifest.git -b donut") no kernel source is included. It's in a separate repo, or actually several different repos depending on target (msm7xxx, tegra etc).
It's inconsistencies like these that makes me doubt the build instructions from dell. But maybe I'm just thick.
I am terribly n00b at all this but a veteran software developer; just never developed on embedded systems, yet. The question I have is, does Dell have Android "drivers" for their hardware that can be extracted and put into the kernel available with the Android source code? I believe this is how old Windows Mobile OS worked.
Hey crush6, are you planning on finishing the amazing howto you started?
Sorry guys been away for a few days I will finish this up soon.
drstock said:
I haven't looked at froyo, but in the donut source (that you get from "repo init -u git://android.git.kernel.org/platform/manifest.git -b donut") no kernel source is included. It's in a separate repo, or actually several different repos depending on target (msm7xxx, tegra etc).
Click to expand...
Click to collapse
As you were told several times, you need to use CodeAurora source, not the generic Android source.
smokku said:
As you were told several times, you need to use CodeAurora source, not the generic Android source.
Click to expand...
Click to collapse
If I could only get it:
~/mydroid$ repo init -u git://codeaurora.org/platform/manifest.git -b donut
--- long python traceback ---
xml.parsers.expat.ExpatError: mismatched tag: line 11, column 4
Click to expand...
Click to collapse
drstock said:
If I could only get it:
Click to expand...
Click to collapse
Nevermind, didn't realize that I needed to specify manifest too. I assume Q8650BSDCANLYA3200.xml is correct for the streak.

{[ROM][v1.3pre][DEV][Firefox OS on Xperia Neo V][fireXperia][14.10.13]}

I finally made it:laugh: firefox can work on xperia neo v
There are quite jobs needs to done, but basic things works well
didn't test too much but for now
calls works
camera doesn't work
Code:
#include <std_disclaimer.h>
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
####final update
Here is alpha preview with firefox os v1.3pre
files for download:
boot.img
full_haida-ota-eng.root.zip
system.img.xz
firexperia-wifi-modules.SIGNED.zip
it has two way installer
fastboot or cwm choose as you like
installation
fastboot flash boot boot.img
fastboot flash system system.img or install from cwm with full_haida-ota-eng.root.zip
install wifi modules via cwm
do factory reset/wipe data
reboot and enjoy
####update5
I was upgrade my system to i7 haswell maybe I can build roms for whole 2011 xperia series at least I will try I am not promise anything but stay tuned
####update 4
Here is alpha preview with firefox os v1.1hd_pre
files for download:
boot.img
full_haida-ota-eng.root.zip
system.img.7z
firexperia-wifi-modules.SIGNED.zip
it has two way installer
fastboot or cwm choose as you like
installation
fastboot flash boot boot.img
fastboot flash system system.img or install from cwm with full_haida-ota-eng.root.zip
install wifi modules via cwm
do factory reset/wipe data
reboot and enjoy
####update 3
switch to v1.1.0hd branch
rebase with fxp-229-cm9 branch
HDPi build works and screen resolution is normal now
need a lot of time to provide a stable version but maybe a preview version
####update 2
no release for now
Sources of builds
and credits goes to
neuralassembly
sola
FXP
Cyanogenmod
AOSP
Mozilla.org
GNU/Linux
thanks to them
oh yeah ... well done, take help from other developers
Looks nice there, bud.
Edit: Darn it. Too bad I can't speak Japanese and those guide just canned me to Tokyo.
Greetings, from HTC One via Tap-A-Talk IV Beta
Good work bro ,
keep going for this project :good:
Best regards from Team Blur
What's this thread doing on general section? Should be in dev section. Great job bro. Hope some devs jump in this project.
Sent from my MT11i
What kernel you used?
n1kolaa said:
What kernel you used?
Click to expand...
Click to collapse
Cm9 kernel
Sent from my haida
can you help me i get some eror when i almost fully compile source for anzu
he tells some file that you want to fork dont exist
n1kolaa said:
can you help me i get some eror when i almost fully compile source for anzu
he tells some file that you want to fork dont exist
Click to expand...
Click to collapse
Show me to log of error
Or check my sources
edit : probably the problem with this
add on anzu.xml
origin code
Code:
<project path="prebuilt" name="platform/prebuilt" revision="0e104261b6d33f87e9f86ff4249bcc0306ab278b"/>
proper code
Code:
<project path="prebuilt" name="platform/prebuilt"[COLOR="Red"] remote="aosp" [/COLOR]revision="0e104261b6d33f87e9f86ff4249bcc0306ab278b"/>
Sent from my haida
yacloo said:
Show me to log of error
Or check my sources
edit : probably the problem with this
add on anzu.xml
origin code
Code:
<project path="prebuilt" name="platform/prebuilt" revision="0e104261b6d33f87e9f86ff4249bcc0306ab278b"/>
proper code
Code:
<project path="prebuilt" name="platform/prebuilt"[COLOR="Red"] remote="aosp" [/COLOR]revision="0e104261b6d33f87e9f86ff4249bcc0306ab278b"/>
Sent from my haida
Click to expand...
Click to collapse
no more errorrs now i will build it
Code:
$ cd $B2G_WORK/B2G/gaia/build
$ wget https://dl.dropboxusercontent.com/u/69652790/patch/b2g-webapp-zip.patch
$ patch < b2g-webapp-zip.patch
when i run line to pach it it give me erorr
can you shere me that file from your pc?
n1kolaa said:
no more errorrs now i will build it
Code:
$ cd $B2G_WORK/B2G/gaia/build
$ wget https://dl.dropboxusercontent.com/u/69652790/patch/b2g-webapp-zip.patch
$ patch < b2g-webapp-zip.patch
when i run line to pach it it give me erorr
can you shere me that file from your pc?
Click to expand...
Click to collapse
I run the patch like this it was okay
Code:
$ cd $B2G_WORK/B2G/gaia/build
$ wget --no-check-certificate https://dl.dropboxusercontent.com/u/69652790/patch/b2g-webapp-zip.patch
$ patch [COLOR="Red"]-p1[/COLOR] < b2g-webapp-zip.patch
yacloo said:
I run the patch like this it was okay
Code:
$ cd $B2G_WORK/B2G/gaia/build
$ wget --no-check-certificate https://dl.dropboxusercontent.com/u/69652790/patch/b2g-webapp-zip.patch
$ patch [COLOR="Red"]-p1[/COLOR] < b2g-webapp-zip.patch
Click to expand...
Click to collapse
Code:
[email protected]:~/b2g_work/B2G/gaia/build$ wget --no-check-certificate https://dl.dropboxusercontent.com/u/69652790/patch/b2g-webapp-zip.patch
--2013-07-09 11:05:10-- https://dl.dropboxusercontent.com/u/69652790/patch/b2g-webapp-zip.patch
Resolving dl.dropboxusercontent.com (dl.dropboxusercontent.com)... 50.19.230.97
Connecting to dl.dropboxusercontent.com (dl.dropboxusercontent.com)|50.19.230.97|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 780 [text/x-diff]
Saving to: `b2g-webapp-zip.patch.1'
100%[======================================>] 780 --.-K/s in 0s
2013-07-09 11:05:11 (107 MB/s) - `b2g-webapp-zip.patch.1' saved [780/780]
[email protected]:~/b2g_work/B2G/gaia/build$ patch -p1 < b2g-webapp-zip.patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- webapp-zip.js.orig 2013-06-23 20:26:30.135978096 +0900
|+++ webapp-zip.js 2013-06-23 20:43:02.032010587 +0900
--------------------------
File to patch: webapp-zip.js
patching file webapp-zip.js
Hunk #1 FAILED at 335.
1 out of 1 hunk FAILED -- saving rejects to file webapp-zip.js.rej
[email protected]:~/b2g_work/B2G/gaia/build$ ^C
[email protected]:~/b2g_work/B2G/gaia/build$
look still geting error can you shere webapp-zip.js from your pc ?
n1kolaa said:
no more errorrs now i will build it
Code:
$ cd $B2G_WORK/B2G/gaia/build
$ wget https://dl.dropboxusercontent.com/u/69652790/patch/b2g-webapp-zip.patch
$ patch < b2g-webapp-zip.patch
when i run line to pach it it give me erorr
can you shere me that file from your pc?
Click to expand...
Click to collapse
I was update my sources, patch will not work on my sources
but anyway you can build your b2g without patch or you need to patch manually
mozilla was create new branch for hdpi devices called "v1.1.0hd"
I will build with v1.1.0hd branch but now I am busy maybe next week
I am trying to port B2G to smultron and i have a question :
In kernel the only modification is to add init.b2g.rc file and edit init.rc right?
init.b2g.rc :
Code:
service fakeperm /system/bin/fakeperm
class main
user root
service b2g /system/bin/b2g.sh
class main
onrestart restart media
service rilproxy /system/bin/rilproxy
class main
socket rilproxy stream 660 root system
user root
group radio
on boot
exec /system/bin/rm -r /data/local/tmp
# set RLIMIT_NOFILE to increase soft limit from 1024(default) to 2048.
# Hard limit keeps default value(4096).
setrlimit 7 2048 4096
edit init.rc with this :
Code:
service fakeperm /system/bin/fakeperm
class main
user root
service rilproxy /system/bin/rilproxy
class main
socket rilproxy stream 660 root system
user root
group radio
service servicemanager-g /system/bin/servicemanager
class core
user system
group system
critical
service b2g /system/bin/b2g.sh
class main
onrestart restart media
or i need to edit more?
n1kolaa said:
no more errorrs now i will build it
Code:
$ cd $B2G_WORK/B2G/gaia/build
$ wget https://dl.dropboxusercontent.com/u/69652790/patch/b2g-webapp-zip.patch
$ patch < b2g-webapp-zip.patch
when i run line to pach it it give me erorr
can you shere me that file from your pc?
Click to expand...
Click to collapse
Today I checked the repository of gaia, and I found that the problem on webapp-zip.js has already been fixed 5 days ago.
So, if you downloaded the latest source codes, you do not have to apply the above patch any more.
I omitted the above commands from my blog.
Moreover, as for the manifest file, the download errors often take place depending on the network state.
When I downloaded the latest codes today without modifying manifest file,
I executed "./config.sh anzu" several times to obtain successful download.
Nice OS, I like it
neuralassembly said:
Today I checked the repository of gaia, and I found that the problem on webapp-zip.js has already been fixed 5 days ago.
So, if you downloaded the latest source codes, you do not have to apply the above patch any more.
I omitted the above commands from my blog.
Moreover, as for the manifest file, the download errors often take place depending on the network state.
When I downloaded the latest codes today without modifying manifest file,
I executed "./config.sh anzu" several times to obtain successful download.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?p=43408927#post43408927 i succes with building it but problem is resoution
and lot of things not sized well
n1kolaa said:
http://forum.xda-developers.com/showthread.php?p=43408927#post43408927 i succes with building it but problem is resoution
and lot of things not sized well
Click to expand...
Click to collapse
I have not tried your rom yet, but have you set the following environment variables before building?
The first one is for firefox icons, and second one is for high resolution device.
export MOZILLA_OFFICIAL=1
export GAIA_DEV_PIXELS_PER_PX=2
neuralassembly said:
I have not tried your rom yet, but have you set the following environment variables before building?
The first one is for firefox icons, and second one is for high resolution device.
export MOZILLA_OFFICIAL=1
export GAIA_DEV_PIXELS_PER_PX=2
Click to expand...
Click to collapse
thanks,also camera is fixed to photo only
im thinking to make 3.0.x kernel for b2g also i add you on my grup for b2g with i made 
 @yacloo i can add you too if you want to be part of it
n1kolaa said:
thanks,also camera is fixed to photo only
im thinking to make 3.0.x kernel for b2g also i add you on my grup for b2g with i made
@yacloo i can add you too if you want to be part of it
Click to expand...
Click to collapse
I cannot post to developer section because I am a new one, so I post here.
Please do not use the picture in my blog in your thread.
As for the update, I think you should not apply OTA system update
because my patch to gaia and gecko will be erased.
As a result, battery always shows 100%, the LED of home button is always ON,
and the effect of "GAIA_DEV_PIXELS_PER_PX=2" will also be erased.

[HOWTO][AOSP] Build Nexus 9 volantis target from sources

Building image for Nexus 9 (volantis)
$ lunch aosp_flounder-userdebug
$ make
Building kernel:
Get sources:
$ git clone https://android.googlesource.com/kernel/tegra kernel/tegra
$ git checkout origin/android-tegra-flounder-3.10-lollipop-release
Configuring:
$ make ARCH=arm64 flounder_defconfig
Building:
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android-
Copying to default place:
$ cp kernel/tegra/arch/arm64/boot/Image.gz-dtb device/htc/flounder-kernel/
Then build the whole image with new kernel
$ make
or build only boot.img with:
$ make bootimage
finikorg said:
Hi All,
I want to build Nexus 9 image from sources myself. Is it correct sequence:
$ lunch aosp_flounder-userdebug
$ make
I also read that there is somewhere target aosp_flounder64-userdebug. Which one is better?
Click to expand...
Click to collapse
You'll need to decide that for yourself. If you do the 64-bit version, be sure to have 64-bit gapps ready to flash.
But are those targets multiarch targets? So it shall be fine to run 32bit apps.
Nexus stops on 'Android' start-up screen after reflash my built image
Hi, I tried to build aosp code and it successes.
Now I failed in flashing all my built image into the Nexus 9.
What I did are :
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash cache cache.img
fastboot flash recovery recovery.img
fastboot reboot
Then my Nexus 9 has reboot and it stops on the screen of 'android' ......
One more question, please... how can I generate the vender.img ?
Regards,
Tonie Huang said:
Hi, I tried to build aosp code and it successes.
Now I failed in flashing all my built image into the Nexus 9.
What I did are :
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash cache cache.img
fastboot flash recovery recovery.img
fastboot reboot
Then my Nexus 9 has reboot and it stops on the screen of 'android' ......
One more question, please... how can I generate the vender.img ?
Regards,
Click to expand...
Click to collapse
I used
$ fastboot flashall -w
Hi, Thank for your reply.
But my question is if I download all source code from Google.
And build all on my side.
How can I flash all built images into Nexus 9.
Thanks.
Tonie Huang said:
Hi, Thank for your reply.
But my question is if I download all source code from Google.
And build all on my side.
How can I flash all built images into Nexus 9.
Thanks.
Click to expand...
Click to collapse
fastboot flashall should do this. vendor images you shall extract from factory images.
Hi, I did try it.
What I did were :
~$ lunch aosp_flounder-userdebug
Then ~$ make -j4
Then I copy out/target/product/flounder/
1. boot.img
2. cache.img
3. system.img
4. recovery.img
to the folder that Google released factory image : volantis-lrx22c
Then I've tried to:
1. zip those 4 files shown above and also add vender.img into my own image-my.zip
Then follow official steps to flash the system.
It stopped on 'android' logo after rebooting up.
I also tried to use 'fastboot flash boot boot.img' commands to flash each files.
It also halt on 'android' logo after flashing all files and rebooted.
Any other thing I didn't know ? please advise.
Regards,:crying:
Hi, now it works.
What I did are :
Re-created my own Image zip files (within android-info.txt, boot.img, cache.img, recovery.img, system.img and vender.img), and then using fastboot -w update MyImages.zip...
It works...
Thanks.

[Q] Using fastboot -c

Hello everybody. I need help figuring out what command line configuration to put inside of the parentheses of
Code:
fastboot -c " "
How can I find out what command line to put in so that I can use
Code:
fastboot boot
Apparently since Android 4.4 you can no longer simply do the command
Code:
fastboot boot img.mg
and you have to do it something like
Code:
fastboot -c "console=ttyHSL0,115200,n8 androidboot.hardware=mako lge.kcal=0|0|0|x" img.img
or
Code:
fastboot -c "lge.kcal=0|0|0|x" boot img.img
or else it won't boot. The above commands work for the nexus 4. I do not have the source for my device but I do have the boot.img and zimage. I need this info to help me root the HD6!
can you put the boot and zimage somewhere so i can download them.
HT123 said:
can you put the boot and zimage somewhere so i can download them.
Click to expand...
Click to collapse
Yes I will do that later today
[quote name="AdamOutler" post=57883049]So that is your CMDLINE. You can get the default CMDLINE from the stock boot.img. If you are on Ubuntu, you can
apt-get install abootimg
Click to expand...
Click to collapse
, then
abootimg -x path/to/boot.img
Click to expand...
Click to collapse
The file named something.cfg will contain the stock CMDLINE. Hope that helps.[/QUOTE]
I appreciate your reply. Neat tool. Before I was using unpackbootimg and it would create a blank boot.img-cmdline file. I just tried out your method and got similar results:
bootsize = 0x51f100
pagesize = 0x800
kerneladdr = 0x10008000
ramdiskaddr = 0x11000000
secondaddr = 0x10f00000
tagsaddr = 0x10000100
name =
cmdline =
Click to expand...
Click to collapse
I am guessing that the image should not require an additional command line param. But I am unable to boot even the stock boot img with fastboot boot. Is this a result of a locked bootloader?
kernel
Any progress? may be you can give us the kernel binary, so we can also test together
senzhk said:
Any progress? may be you can give us the kernel binary, so we can also test together
Click to expand...
Click to collapse
HT123 said:
can you put the boot and zimage somewhere so i can download them.
Click to expand...
Click to collapse
https://drive.google.com/open?id=0Bx_94ujbh0qoTm5rd0R5a041Ymc&authuser=0
Tried fastboot boot boot.img. It said Downloaded, and booting, but nothing happened.
I remember you have UART output, do you get any output whille 'booting'?
senzhk said:
Tried fastboot boot boot.img. It said Downloaded, and booting, but nothing happened.
I remember you have UART output, do you get any output whille 'booting'?
Click to expand...
Click to collapse
It shows some log about kernel size and ram size and then stops loging

Question Propietary blobs/files for Odin

Hey, does anyone know how to get the propietary blobs out of the device? I'm kinda done with MIUI and i wanna try to compile some custom rom and maybe a legit twrp.
SanHelios said:
Hey, does anyone know how to get the propietary blobs out of the device? I'm kinda done with MIUI and i wanna try to compile some custom rom and maybe a legit twrp.
Click to expand...
Click to collapse
lol i am looking for the same
check this out
vamsi209 said:
lol i am looking for the same
check this out
Click to expand...
Click to collapse
what shall i check out?
SanHelios said:
what shall i check out?
Click to expand...
Click to collapse
Extracting proprietary blobs from LineageOS zip files | LineageOS Wiki
wiki.lineageos.org
SanHelios said:
Hey, does anyone know how to get the propietary blobs out of the device? I'm kinda done with MIUI and i wanna try to compile some custom rom and maybe a legit twrp.
Click to expand...
Click to collapse
Trying to look for the Chinese tool to flash the unofficial TWRP, once I manage to do that will try help on grabbing those needed proprietary blobs. May need guide on how to pull the blobs, am still a noob
dan079 said:
Trying to look for the Chinese tool to flash the unofficial TWRP, once I manage to do that will try help on grabbing those needed proprietary blobs. May need guide on how to pull the blobs, am still a noob
Click to expand...
Click to collapse
Me too... TWRP is tricky, since it can only be done by this OneInject-function of TWRP, but it's possible. I tried the 'current' unofficial release of TWRP for this, but all i got was a reboot to BL.
vamsi209 said:
Extracting proprietary blobs from LineageOS zip files | LineageOS Wiki
wiki.lineageos.org
Click to expand...
Click to collapse
yshalsager, who created the Firmware-script, told me the same.. here is his answer.
"
Hi,
Thanks for your words, glad to hear my work helps.
You can use LineageOS extract files script that will generate vendor tree for you. It is available in any device tree but you should use one of your device so it reads from its proprietary-files.txt or something.
"
Maybe LOS is closer than we think.
SanHelios said:
yshalsager, who created the Firmware-script, told me the same.. here is his answer.
"
Hi,
Thanks for your words, glad to hear my work helps.
You can use LineageOS extract files script that will generate vendor tree for you. It is available in any device tree but you should use one of your device so it reads from its proprietary-files.txt or something.
"
Maybe LOS is closer than we think.
Click to expand...
Click to collapse
niceee, so for mix 4, i extracted the twrp trees using this,
[SCRIPT] TWRP device tree generator
Create a TWRP-compatible device tree only from an Android recovery image (or a boot image if the device uses non-dynamic partitions A/B) of your device's stock ROM. It has been confirmed that this script supports images built starting from...
forum.xda-developers.com
setup the local repo for building twrp trees, using these
1. Installing the tools
A Python library/script to automatically generate TWRP-compatible device tree from a boot/recovery image - twrpdtgen/twrpdtgen
github-wiki-see.page
tried building but the device doesn't lunch after following the steps shown above,
Code:
http://www.hastebin.com/jonexiyowu.md
and one of the dev https://github.com/imjyotiraditya , helped me build an aospa rom for g8x,
now he is on to building twrp for our device odin.
if anyone has twrp trees, we can try geting aospa build ready for our device
vamsi209 said:
niceee, so for mix 4, i extracted the twrp trees using this,
[SCRIPT] TWRP device tree generator
Create a TWRP-compatible device tree only from an Android recovery image (or a boot image if the device uses non-dynamic partitions A/B) of your device's stock ROM. It has been confirmed that this script supports images built starting from...
forum.xda-developers.com
setup the local repo for building twrp trees, using these
1. Installing the tools
A Python library/script to automatically generate TWRP-compatible device tree from a boot/recovery image - twrpdtgen/twrpdtgen
github-wiki-see.page
tried building but the device doesn't lunch after following the steps shown above,
Code:
http://www.hastebin.com/jonexiyowu.md
and one of the dev https://github.com/imjyotiraditya , helped me build an aospa rom for g8x,
now he is on to building twrp for our device odin.
if anyone has twrp trees, we can try geting aospa build ready for our device
Click to expand...
Click to collapse
hey, i'm trying it right now... was able to manage a device tree from the latest weekly of the EU-rom. Repo is syncing right now for the aosp-twrp-11 repository.
U used the same script for the recovery trees?
vamsi209 said:
U used the same script for the recovery trees?
Click to expand...
Click to collapse
yes, i extracted it from the boot.img.
Update... build/envsetup.sh error, anyone any suggestions?
Update managed to get envsetup.sh to work, got following error messages
source build/envsetup.sh
including device/xiaomi/odin/vendorsetup.sh
COMMON_LUNCH_CHOICES: Befehl nicht gefunden.
COMMON_LUNCH_CHOICES: Befehl nicht gefunden.
lunch twrp_odin-eng
In file included from build/make/core/config.mk:291:
In file included from build/make/core/envsetup.mk:266:
build/make/core/product_config.mk:155: error: Can not locate config makefile for product "twrp_odin".
23:22:04 dumpvars failed with: exit status 1
WARNING: Trying to fetch a device that's already there
Traceback (most recent call last):
File "/home/dave/AOSP-Recovery/vendor/twrp/build/tools/roomservice.py", line 431, in <module>
fetch_device(device)
File "/home/dave/AOSP-Recovery/vendor/twrp/build/tools/roomservice.py", line 399, in fetch_device
git_data = search_gerrit_for_device(device)
File "/home/dave/AOSP-Recovery/vendor/twrp/build/tools/roomservice.py", line 86, in search_gerrit_for_device
device_data = check_repo_exists(git_data, device)
File "/home/dave/AOSP-Recovery/vendor/twrp/build/tools/roomservice.py", line 62, in check_repo_exists
raise Exception("{device} not found,"
Exception: odin not found,exiting roomservice
In file included from build/make/core/config.mk:291:
In file included from build/make/core/envsetup.mk:266:
build/make/core/product_config.mk:155: error: Can not locate config makefile for product "twrp_odin".
23:22:05 dumpvars failed with: exit status 1
** Don't have a product spec for: 'twrp_odin'
** Do you have the right repo manifest?
Anyone a good guess?
Did you had any luck, or any chance I can help?
Puksom said:
Did you had any luck, or any chance I can help?
Click to expand...
Click to collapse
well, i made some progress, but i failed again. I posted a thread in the official twrp forum. Maybe you might want to take a look at it.. thx.
Post in thread '[DEV]How to compile TWRP touch recovery' https://forum.xda-developers.com/t/dev-how-to-compile-twrp-touch-recovery.1943625/post-85686505
Puksom said:
Did you had any luck, or any chance I can help?
Click to expand...
Click to collapse
I'm a total beginner, so i might be wrong. But as far as i can tell, the makefiles of the extracted device tree need to be update or even completely rebuild.
Hi, it seems like I was able to execute the script successfully.
It didn't work on Windows because it got stuck on the execution of unpackimg.bat.
I ran it on Linux and it worked (after chmod 777 of boot.img). This is the command I ran:
python3 -m twrpdtgen -o ./odin ./boot.img
output:
Code:
TWRP device tree generator
Version 1.3.0
[INFO] Cloning AIK...
Done! You can find the device tree in odin/xiaomi/odin
I took boot.img from the latest MIUI 12.5.7.0 China Stable
Now I have what it seems to be the device tree (odin.zip) but I don't know what to do it it or what it is.
radoinc said:
Hi, it seems like I was able to execute the script successfully.
It didn't work on Windows because it got stuck on the execution of unpackimg.bat.
I ran it on Linux and it worked (after chmod 777 of boot.img). This is the command I ran:
python3 -m twrpdtgen -o ./odin ./boot.img
output:
Code:
TWRP device tree generator
Version 1.3.0
[INFO] Cloning AIK...
Done! You can find the device tree in odin/xiaomi/odin
I took boot.img from the latest MIUI 12.5.7.0 China Stable
Now I have what it seems to be the device tree (odin.zip) but I don't know what to do it it or what it is.
Click to expand...
Click to collapse
This is great, so we know this script works and does what it is supposed to do...
I checked the makefiles to see if there are any differences, but there are none. So it suggests that it doesn't matter, from which version you get the files from. I love, that the users of the Mi Mix 4 are more open so compiling than the community of the MI 11 Ultra is..
SanHelios said:
This is great, so we know this script works and does what it is supposed to do...
I checked the makefiles to see if there are any differences, but there are none. So it suggests that it doesn't matter, from which version you get the files from. I love, that the users of the Mi Mix 4 are more open so compiling than the community of the MI 11 Ultra is..
Click to expand...
Click to collapse
I'm trying to replicate your steps but I get the same "Can not locate config makefile for product "twrp_odin"." as you did above. In the other topic I see you managed to get past that step.
I see you get some output after executing envsetup.sh and it seems like this is related to the device tree.
Can you please share what you did with the device tree before attempting to compile twrp? I'd like to try myself but I can't find clear instructions.
radoinc said:
I'm trying to replicate your steps but I get the same "Can not locate config makefile for product "twrp_odin"." as you did above. In the other topic I see you managed to get past that step.
I see you get some output after executing envsetup.sh and it seems like this is related to the device tree.
Can you please share what you did with the device tree before attempting to compile twrp? I'd like to try myself but I can't find clear instructions.
Click to expand...
Click to collapse
Acutally i left it completely unchanged, the only thing i did was to change the repository. I deleted the aosp-repository and took the omni-twrp-repository
(https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni)
mkdir twrp
cd twrp
repo init -u git://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git -b twrp-10.0
repo sync
after syncing was complete, i followed these instructions
4. Build TWRP from source
A Python library/script to automatically generate TWRP-compatible device tree from a boot/recovery image - twrpdtgen/twrpdtgen
github-wiki-see.page
SanHelios said:
Acutally i left it completely unchanged, the only thing i did was to change the repository. I deleted the aosp-repository and took the omni-twrp-repository
(https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni)
mkdir twrp
cd twrp
repo init -u git://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git -b twrp-10.0
repo sync
after syncing was complete, i followed these instructions
4. Build TWRP from source
A Python library/script to automatically generate TWRP-compatible device tree from a boot/recovery image - twrpdtgen/twrpdtgen
github-wiki-see.page
Click to expand...
Click to collapse
Thanks! Now I managed to get the same result as you. The error seems to be raised by mkbootimg.py:
Python:
def write_header(args):
BOOT_IMAGE_HEADER_V1_SIZE = 1648
BOOT_IMAGE_HEADER_V2_SIZE = 1660
BOOT_MAGIC = 'ANDROID!'.encode()
if (args.header_version > 2):
raise ValueError('Boot header version %d not supported' % args.header_version)
To me it seems like this Omni repo includes old version of mkbootimg.py, because in the google repos I can see that the current version of this function looks like this:
Python:
def write_header(args):
if args.header_version > 4:
raise ValueError(
f'Boot header version {args.header_version} not supported')
if args.header_version in {3, 4}:
return write_header_v3_and_above(args)
It seems like Boot header version 3 was introduced with Android 11: https://source.android.com/devices/bootloader/boot-image-header
I think we can't do much with the Omnia repos until they get updated with current mkbootimg.
radoinc said:
Thanks! Now I managed to get the same result as you. The error seems to be raised by mkbootimg.py:
Python:
def write_header(args):
BOOT_IMAGE_HEADER_V1_SIZE = 1648
BOOT_IMAGE_HEADER_V2_SIZE = 1660
BOOT_MAGIC = 'ANDROID!'.encode()
if (args.header_version > 2):
raise ValueError('Boot header version %d not supported' % args.header_version)
To me it seems like this Omni repo includes old version of mkbootimg.py, because in the google repos I can see that the current version of this function looks like this:
Python:
def write_header(args):
if args.header_version > 4:
raise ValueError(
f'Boot header version {args.header_version} not supported')
if args.header_version in {3, 4}:
return write_header_v3_and_above(args)
It seems like Boot header version 3 was introduced with Android 11: https://source.android.com/devices/bootloader/boot-image-header
I think we can't do much with the Omnia repos until they get updated with current mkbootimg.
Click to expand...
Click to collapse
My question is, do the makefiles from the devicetree need to be adjusted or completely rebuild to android 11 parameters? I.e. rhe command "add_lunch_combo" is obsolete and "COMMAND_LUNCH_CHOICES" took its place..
Sorry in advance for this nooby questions...

Categories

Resources