Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,812,470 Members 40,587 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Building AOSP ROM, yet want it to build to 'user' instead of 'userdebug'

Tip us?
 
bergqvistjl
Old
(Last edited by bergqvistjl; 4th February 2014 at 09:50 AM.)
#1  
Member - OP
Thanks Meter 1
Posts: 50
Join Date: Aug 2010
Default [Q] Building AOSP ROM, yet want it to build to 'user' instead of 'userdebug'

Hi, i'm building my own Nexus 5 ROM from AOSP following this guide: http://nosemaj.org/howto-build-android-kitkat-nexus-5 Which has worked fine, except I want to get it to build to the 'User' buildtype rather than 'userdebug'. I changed "userdebug" to "user" within the 'device/lge/hammerhead/vendorsetup.sh' file in the hope that this would do it, but it appears to have built me an 'eng' build. Is there anything else I need to do, aside from changing the line in the vendorsetup.sh file.
Can anyone help?

Edit: Just to clarify, this is what it prints out when building, so it seems like it's building the 'user' type:
Quote:
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.2
TARGET_PRODUCT=aosp_hammerhead
TARGET_BUILD_VARIANT=user
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.12.5-1-ARCH-x86_64-with-glibc2.2.5
HOST_BUILD_TYPE=release
BUILD_ID=KOT49H
OUT_DIR=out
yet my final filename is: aosp_hammerhead-img-eng.[username].zip.
 
rootSU
Old
#2  
rootSU's Avatar
Senior Member
Thanks Meter 11,422
Posts: 22,463
Join Date: Aug 2010
Location: Oxenhope, West Yorkshire, UK
Just type "lunch" and pick using numbers the build you want.
Want to root/unroot? All important guides and info threads are contained within the "Sticky Roll-up" thread in General. Click the link below to get there!

**Sticky Roll-up: All Guides snd Info Threads linked here**



Philz Touch Recovery with passkey secure lock

I do NOT reply to support queries over PM.
 
bergqvistjl
Old
(Last edited by bergqvistjl; 4th February 2014 at 01:24 PM.)
#3  
Member - OP
Thanks Meter 1
Posts: 50
Join Date: Aug 2010
Quote:
Originally Posted by rootSU View Post
Just type "lunch" and pick using numbers the build you want.
Yeah but the hammerhead build, by default is a userdebug one, in the device/lge/hammerhead/vendorsetup.sh file, now I don't want to build the 'userdebug' variant, just the 'user' one, which isn't listed in Lunch. How do I build that one? Is it as simple as changing the line in the vendorsetup file to read "user" rather than "userdebug" and running . build/envsetup.sh then lunch, before I build it? Because (if you read what i'd posted in the OP) although it says it's building a "user" build, the suffix on the finished zip is "eng".
 
koe1974
Old
#4  
Senior Member
Thanks Meter 550
Posts: 1,424
Join Date: Oct 2007
Quote:
Originally Posted by rootSU View Post
Just type "lunch" and pick using numbers the build you want.
$ lunch
.. make your selection
$ choosevarient
... make your selection


Sent from my SHV-E300K using XDA Premium 4 mobile app

---------- Post added at 11:24 PM ---------- Previous post was at 11:22 PM ----------

Quote:
Originally Posted by bergqvistjl View Post
device/lge/hammerhead/vendorsetup.sh
or edit to -user


Sent from my SHV-E300K using XDA Premium 4 mobile app
I'm reckless with my devices. I'm just warning you!
 
rootSU
Old
#5  
rootSU's Avatar
Senior Member
Thanks Meter 11,422
Posts: 22,463
Join Date: Aug 2010
Location: Oxenhope, West Yorkshire, UK
Quote:
Originally Posted by bergqvistjl View Post
Yeah but the hammerhead build, by default is a userdebug one.
Hmm odd then. I dont understand. Historically when you type lunch, it should give you a numbered list of all devices, and each build option for each device and you just type the one you want. It shouldn't default to anything if you type just "lunch"
Want to root/unroot? All important guides and info threads are contained within the "Sticky Roll-up" thread in General. Click the link below to get there!

**Sticky Roll-up: All Guides snd Info Threads linked here**



Philz Touch Recovery with passkey secure lock

I do NOT reply to support queries over PM.
 
bergqvistjl
Old
#6  
Member - OP
Thanks Meter 1
Posts: 50
Join Date: Aug 2010
Quote:
Originally Posted by rootSU View Post
Hmm odd then. I dont understand. Historically when you type lunch, it should give you a numbered list of all devices, and each build option for each device and you just type the one you want. It shouldn't default to anything if you type just "lunch"
No!

I want to get it to build to the 'User' buildtype rather than 'userdebug'.

I changed "userdebug" to "user" within the 'device/lge/hammerhead/vendorsetup.sh' file, and then selected it in Lunch, in the hope that this would do it, but it appears to have actually built me an 'eng' build, as the filename of the final zip file is:

aosp_hammerhead-img-eng.[username].zip. Is this normal?

The info that displays when the build begins is this, so it looks like it's picking up that it should build a user version:

Quote:
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.2
TARGET_PRODUCT=aosp_hammerhead
TARGET_BUILD_VARIANT=user
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.12.5-1-ARCH-x86_64-with-glibc2.2.5
HOST_BUILD_TYPE=release
BUILD_ID=KOT49H
OUT_DIR=out
 
bergqvistjl
Old
#7  
Member - OP
Thanks Meter 1
Posts: 50
Join Date: Aug 2010
Quote:
Originally Posted by koe1974 View Post

or edit to -user
That's what i've done, but the filename of the built zip file indicates that it's an eng build: aosp_hammerhead-img-eng.[username].zip Which is right?
 
bitdomo
Old
#8  
Senior Member
Thanks Meter 661
Posts: 1,080
Join Date: Nov 2011
Location: Göd
I use
$ lunch aosp_hammerhead-user
Then
$ make -j8 otapackage
to create flashable zip.

Changing the ending of aosp_hammerhead-user to "-userdebug" or to "-eng" gives the same filename as you mentoined in the op. However if you used "-user" there is no "su" file in the /system/xbin while with "-userdebug" you have and usb debugging is enabled by default. If you use "-eng" you get a red frame in applications if it hangs up, and you get an extra app called dev tools, besides these -eng is the same as -userdebug.

Tapatalk-kal küldve az én Nexus 5-el
 
bergqvistjl
Old
#9  
Member - OP
Thanks Meter 1
Posts: 50
Join Date: Aug 2010
Quote:
Originally Posted by bitdomo View Post
I use
$ lunch aosp_hammerhead-user
Then
$ make -j8 otapackage
to create flashable zip.

Changing the ending of aosp_hammerhead-user to "-userdebug" or to "-eng" gives the same filename as you mentoined in the op. However if you used "-user" there is no "su" file in the /system/xbin while with "-userdebug" you have and usb debugging is enabled by default. If you use "-eng" you get a red frame in applications if it hangs up, and you get an extra app called dev tools, besides these -eng is the same as -userdebug.

Tapatalk-kal küldve az én Nexus 5-el
Thanks, it turns out it *is* building a user build after all, you're right in that the output filename doesn't change. Cheers
 
rootSU
Old
#10  
rootSU's Avatar
Senior Member
Thanks Meter 11,422
Posts: 22,463
Join Date: Aug 2010
Location: Oxenhope, West Yorkshire, UK
Quote:
Originally Posted by bergqvistjl View Post
No!
No what???????
Want to root/unroot? All important guides and info threads are contained within the "Sticky Roll-up" thread in General. Click the link below to get there!

**Sticky Roll-up: All Guides snd Info Threads linked here**



Philz Touch Recovery with passkey secure lock

I do NOT reply to support queries over PM.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes