Post Reply

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

4th February 2014, 09:44 AM   |  #1  
OP Member
Thanks Meter: 1
 
50 posts
Join Date:Joined: Aug 2010
More
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.
Last edited by bergqvistjl; 4th February 2014 at 09:50 AM.
4th February 2014, 01:01 PM   |  #2  
rootSU's Avatar
Senior Member
Flag Oxenhope, West Yorkshire, UK
Thanks Meter: 11,677
 
22,635 posts
Join Date:Joined: Aug 2010
More
Just type "lunch" and pick using numbers the build you want.
4th February 2014, 01:19 PM   |  #3  
OP Member
Thanks Meter: 1
 
50 posts
Join Date:Joined: Aug 2010
More
Quote:
Originally Posted by rootSU

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".
Last edited by bergqvistjl; 4th February 2014 at 01:24 PM.
4th February 2014, 02:24 PM   |  #4  
Senior Member
Thanks Meter: 552
 
1,426 posts
Join Date:Joined: Oct 2007
Quote:
Originally Posted by rootSU

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

device/lge/hammerhead/vendorsetup.sh

or edit to -user


Sent from my SHV-E300K using XDA Premium 4 mobile app
4th February 2014, 03:08 PM   |  #5  
rootSU's Avatar
Senior Member
Flag Oxenhope, West Yorkshire, UK
Thanks Meter: 11,677
 
22,635 posts
Join Date:Joined: Aug 2010
More
Quote:
Originally Posted by bergqvistjl

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"
4th February 2014, 06:33 PM   |  #6  
OP Member
Thanks Meter: 1
 
50 posts
Join Date:Joined: Aug 2010
More
Quote:
Originally Posted by rootSU

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

4th February 2014, 06:34 PM   |  #7  
OP Member
Thanks Meter: 1
 
50 posts
Join Date:Joined: Aug 2010
More
Quote:
Originally Posted by koe1974


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?
4th February 2014, 06:35 PM   |  #8  
Senior Member
Flag Göd
Thanks Meter: 671
 
1,108 posts
Join Date:Joined: Nov 2011
More
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
4th February 2014, 09:30 PM   |  #9  
OP Member
Thanks Meter: 1
 
50 posts
Join Date:Joined: Aug 2010
More
Quote:
Originally Posted by bitdomo

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
4th February 2014, 10:20 PM   |  #10  
rootSU's Avatar
Senior Member
Flag Oxenhope, West Yorkshire, UK
Thanks Meter: 11,677
 
22,635 posts
Join Date:Joined: Aug 2010
More
Quote:
Originally Posted by bergqvistjl

No!

No what???????

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Nexus 5 Q&A, Help & Troubleshooting by ThreadRank