# AOSP build with no Baseband-(Cdma Galaxy Nexus)



## Adam80460

**Noob Alert**

So after I finally got a build to compile from source, (which took forever BTW), I loaded it up and couldn't activate it. I know the radios are not included in AOSP, so I was wondering how do I go about adding them to my build?

Im pretty sure the radios are not suppose to be in the zip right? What could be causing it?


----------



## sate86

hey adam,

i went through the process of building a ROM from aosp for my cdma galaxy nexus too.

i used the zip file from this post and followed the guys directions : http://forum.xda-developers.com/showthread.php?t=1421188

i can confirm that my phone/data worked on the AOSP rom i built.


----------



## Adam80460

Thanks bro, i finally got it







now i'm tring to get root to work and update through the superuser app


----------



## sate86

hey, i am having trouble with enabling root. i want to figure out how to include /system/bin/su and Superuser.apk directly into the ROM i build (as opposed to flashing it aftewards). can you please share your techniques/results with me if you get it to work?

cheers!


----------



## Adam80460

Sure will,









Sent from my Galaxy Nexus using Tapatalk


----------



## JBirdVegas

I've been asked this question before so this may help
check out the device/*/*/*.mk files, lets call this our device's make file (ie device/motorola/droid2.mk), this is where you include the SuperUser app , su binary and busybox binary (of course you can include it from anywhere, usually root stuff is in common.mk files, but this is easiest for our example).

ok so lets assume you keep the top of your source tree is @ ~/android/system so we set the TOP variable with something like...


Code:


export TOP=~/android/system

so lets navigate to the top of you build and get the SuperUser source


Code:


<br />
cd $TOP<br />
git clone [URL=git://github.com/ChainsDD/Superuser.git]git://github.com/ChainsDD/Superuser.git[/URL] packages/apps/Superuser<br />

I'm going to assume everyone can get the su and busybox binaries... moving on

place the su and busybox binaries in your devices prebuilt in the folder you intend it to be in on the system
so for this example we are going to use the path $TOP/device/motorola/droid2/prebuilt/xbin/su and $TOP/device/motorola/droid2/prebuilt/xbin/busybox

so in our device's make file we want to add a comment to note what we are doing, then tell the compiler to build Superuser.apk and copy over the required binaries
something like...


Code:


# Tell compiler where our prebuilt folder is<br />
DEVICE_PREBUILT := device/motorola/droid2/prebuilt<br />
<br />
# Tell compiler to build Superuser.apk<br />
PRODUCT_PACKAGES := \<br />
	Superuser<br />
<br />
# Include busybox and su binaries<br />
PRODUCT_COPY_FILES += \<br />
	$(DEVICE_PREBUILT)/xbin/busybox:system/xbin/busybox \<br />
	$(DEVICE_PREBUILT)/xbin/su:system/xbin/su<br />
<br />
# This is a script to automatically symlink busybox and su binaries on boot (the code for 91-busybox_linkage.sh is below)<br />
PRODUCT_COPY_FILES += \<br />
	$(DEVICE_PREBUILT)/etc/init.d/91-busybox_linkage.sh:system/etc/inti.d/91-busybox_linkage.sh

Now we need to create the 91-busybox_linkage.sh file we can do this from this from the command line to make it easy so something like...


Code:


<br />
#make our install script in the correct file<br />
echo "for cmd in $(busybox --list);do ln -s /system/xbin/$cmd $cmd; done; ln -s /system/xbin/su su;" > $TOP/device/motorola/droid2/prebuilt/etc/init.d/91-busybox_linkage.sh<br />
<br />
#ensure that the script has the correct permissions<br />
chmod 777 $TOP/device/motorola/droid2/prebuilt/etc/init.d/91-busybox_linkage.sh<br />

EDIT: thanks nocoast
add these files to $TOP/build/target/product/security
https://github.com/CyanogenMod/android_build/blob/gingerbread/target/product/security/superuser.x509.pem
https://github.com/CyanogenMod/android_build/blob/gingerbread/target/product/security/superuser.pk8

if all goes well you should have a properly setup rooted aosp enviroment good luck guys


----------



## Adam80460

Easy as that huh..? We will see ..lol

Thanks for taking the time to write that up.

Sent from my Galaxy Nexus using RootzWiki


----------



## doug piston

JBirdVegas said:


> I've been asked this question before so this may help
> check out the device/*/*/*.mk files, lets call this our device's make file (ie device/motorola/droid2.mk), this is where you include the SuperUser app , su binary and busybox binary (of course you can include it from anywhere, usually root stuff is in common.mk files, but this is easiest for our example).
> 
> ok so lets assume you keep the top of your source tree is @ ~/android/system so we set the TOP variable with something like...
> 
> 
> Code:
> 
> 
> export TOP=~/android/system
> 
> so lets navigate to the top of you build and get the SuperUser source
> 
> 
> Code:
> 
> 
> <br />
> cd $TOP<br />
> git clone [URL=git://github.com/ChainsDD/Superuser.git]git://github.com/ChainsDD/Superuser.git[/URL] packages/apps/Superuser<br />
> 
> I'm going to assume everyone can get the su and busybox binaries... moving on
> 
> place the su and busybox binaries in your devices prebuilt in the folder you intend it to be in on the system
> so for this example we are going to use the path $TOP/device/motorola/droid2/prebuilt/xbin/su and $TOP/device/motorola/droid2/prebuilt/xbin/busybox
> 
> so in our device's make file we want to add a comment to note what we are doing, then tell the compiler to build Superuser.apk and copy over the required binaries
> something like...
> 
> 
> Code:
> 
> 
> # Tell compiler where our prebuilt folder is<br />
> DEVICE_PREBUILT := device/motorola/droid2/prebuilt<br />
> <br />
> # Tell compiler to build Superuser.apk<br />
> PRODUCT_PACKAGES := \<br />
> Superuser<br />
> <br />
> # Include busybox and su binaries<br />
> PRODUCT_COPY_FILES += \<br />
> $(DEVICE_PREBUILT)/xbin/busybox:system/xbin/busybox \<br />
> $(DEVICE_PREBUILT)/xbin/su:system/xbin/su<br />
> <br />
> # This is a script to automatically symlink busybox and su binaries on boot (the code for 91-busybox_linkage.sh is below)<br />
> PRODUCT_COPY_FILES += \<br />
> $(DEVICE_PREBUILT)/etc/init.d/91-busybox_linkage.sh:system/etc/inti.d/91-busybox_linkage.sh
> 
> Now we need to create the 91-busybox_linkage.sh file we can do this from this from the command line to make it easy so something like...
> 
> 
> Code:
> 
> 
> <br />
> #make our install script in the correct file<br />
> echo "for cmd in $(busybox --list);do ln -s /system/xbin/$cmd $cmd; done; ln -s /system/xbin/su su;" > $TOP/device/motorola/droid2/prebuilt/etc/init.d/91-busybox_linkage.sh<br />
> <br />
> #ensure that the script has the correct permissions<br />
> chmod 777 $TOP/device/motorola/droid2/prebuilt/etc/init.d/91-busybox_linkage.sh<br />
> 
> if all goes well you should have a properly setup rooted aosp enviroment good luck guys


I wuve this post so much.....


----------



## nocoast

No, I do too!


----------



## nocoast

sate86 said:


> hey adam,
> 
> i went through the process of building a ROM from aosp for my cdma galaxy nexus too.
> 
> i used the zip file from this post and followed the guys directions : http://forum.xda-dev...d.php?t=1421188
> 
> i can confirm that my phone/data worked on the AOSP rom i built.


Koushs git has newer props i do believe....


----------



## nocoast

and i sit here and await my -j4 otapackage







I did notice in the beginning of the output there was mention of this mr.superuser apk so that is a good sign







I know your on the team but thank you jbird! Suing the 403 has been far more challenging than entering a number into the kitchen as i used to do







...well it was running









Code:


make: *** No rule to make target `build/target/product/security/superuser.pk8', needed by `out/target/product/toro/obj/APPS/Superuser_intermediates/package.apk'.  Stop.

 Just documenting this and then when I come up with a fix ill document that too


----------



## nocoast

EDIT:AT THE TIME I THOUGHT THIS WAS THE PROBLEM



> OK so my errors were the result of some shoddy *nixmanship jbird pointed out something very interesting. All of these guides to compile always tell you to sudo -i sudo su WHATEVER, login as root. As a result it makes your working directories owned by root, not you (unless you are root, I am nocoast and i have not granted myself root perms...so anyways, in the process of editing some of the device.mk files I ran into some issues with file ownership/permissions (root owning device.mk for example) so i chowned the individual file and edited it (against jbirds advice to chown the whole top directory) after having chown -R nocoast ~/ICS_SOURCE (or whatever your directory is) my build is compiling smooth as butter and im currently loving jbird. I pray that superuser.apk acts right!
> 
> 
> 
> 
> 
> 
> 
> I want my own rootrom!


----------



## doug piston

You put your working dir in root??? Ouch man. ~/android is a good way to go.


----------



## nocoast

yeah i realize this...just got the same error running it as nocoast :/ make: *** No rule to make target `build/target/product/security/superuser.pk8', needed by `out/target/product/toro/obj/APPS/Superuser_intermediates/package.apk'. Stop.
make: *** Waiting for unfinished jobs....
target thumb C++: libjni_pinyinime <= packages/inputmethods/PinyinIME/jni/share/sync.cpp !!! Any help would be greatly appreciated


----------



## doug piston

[sup]You can try sudo gedit whatever.youFile. Then save it.[/sup]


----------



## nocoast

yeah all of my files are edited properly and in order though thats not my issue is /


Code:


make: *** No rule to make target `build/target/product/security/superuser.pk8', needed by `out/target/product/toro/obj/APPS/Superuser_intermediates/package.apk'. Stop.<br />
make: *** Waiting for unfinished jobs....<br />
target thumb C++: libjni_pinyinime <= packages/inputmethods/PinyinIME/jni/share/sync.cpp !!! Any help would be greatly appreciated

 Just for kicks im moving the directory to nocoasts home folder and out of root running chown -R over it again and then lunching


----------



## nocoast

nothing happened...anyone who might have an idea as what might be causing this error it would be greatly appreciated...


----------



## nocoast

So the issue as the output stated was in the superuser.pk8 being needed. Well I didnt have that, and superusers git clone did not clone [email protected]#! into build/target/product/security so Im point everyone in the direction that seemed to fix it for me hit this https://github.com/RootzBoat/android_build/commit/a5363a7902bc3299293d7a7532e52428878ab2c1#diff-0 git up and grab the two files and make/download them and place them into build/target/product/security one will be a superuserxsomething.pem file and the other superuser.pk8 The pk8 can be downloaded from git i do believe and the other you just copy paste the code...i dont want to speak too soon but terminal has been compiling longer than ever before so I am reallly hoping for the best!


----------



## doug piston

You should look at the readme from ChainsDD and consider making your own keys for not only your build itself but superuser.apk as well.


----------



## doug piston

Wouldn't the proper way be to :



Code:


<br />
development/tools/make_key superuser  '/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=[email="[email protected]"][email protected][/email]'<br />

Instead of taking soneone elses?


----------



## nocoast

I'm just doing as I'm told lol

Sent from my Full AOSP on Toro using RootzWiki


----------



## JBirdVegas

doug piston said:


> Wouldn't the proper way be to :
> 
> 
> 
> Code:
> 
> 
> <br />
> development/tools/make_key superuser  '/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=[email="[email protected]"][email protected][/email]'<br />
> 
> Instead of taking soneone elses?


Yes but I was going for easy and although that isn't very difficult either it would require having the sdk setup. So yes you are correct I was taking the easy way out and thanks for calling me out on it ;-)


----------



## nocoast

I'm at the drs dyyyying to get back to see if this build worked. I've ben chasing tail for the last three days lol

Sent from my Full AOSP on Toro using RootzWiki


----------



## nocoast

Yeah I don't want to setup the sdk







haha for real I was just so worn out I just grabbed the keys and when I left my house terminal was still spewing out code so I hope I'll have a 403 with working su when I get home









Sent from my Full AOSP on Toro using RootzWiki


----------



## doug piston

JBirdVegas said:


> Yes but I was going for easy and although that isn't very difficult either it would require having the sdk setup. So yes you are correct I was taking the easy way out and thanks for calling me out on it ;-)


Nice, wasn't calling you out at all. I'm just trying to setup my enviroment properly and sign it all coreectly in one build instead of having to use a kitchen and blah blah blah.

Next step is to compile superuser and busybox at build time so rom, su, and busybox are all up-to-date. I very much appreciated your post.


----------



## nocoast

How often is busybox updated?

Sent from my Full AOSP on Toro using RootzWiki


----------



## nocoast

I kinda want to build a better kitchen for personal use. Kitchens aimed at doing build environment/pre build stuff. Not editing of already existent zips if that makes any sense...

Sent from my Full AOSP on Toro using RootzWiki


----------



## Adam80460

Damn I go to work and come back to shit load of information.

I have another question, what is the correct way to apply git comment patches?, For example like on romans fixes.. I did it manually but just wondered is there another way?


----------



## JBirdVegas

Adam80460 said:


> Damn I go to work and come back to shit load of information.
> 
> I have another question, what is the correct way to apply git comment patches?, For example like on romans fixes.. I did it manually but just wondered is there another way?


git cherry-pick #########

Where ######## is the commit hashcode

Edit I think thats syntax but I'm not in front of my computer


----------



## doug piston

@JBirdVegas

Just built busybox, su and superuser into my build with adry'd kernel. I used the binaries but built them moments before putting them in the build. You help make my toro build much cleaner. Appreciate it.


----------



## Adam80460

you guys ever seen this?



Code:


<br />
[email protected] ~/android/source $ . build/envsetup.sh<br />
including device/moto/stingray/vendorsetup.sh<br />
including device/moto/wingray/vendorsetup.sh<br />
including device/samsung/crespo4g/vendorsetup.sh<br />
including device/samsung/crespo/vendorsetup.sh<br />
including device/samsung/maguro/vendorsetup.sh<br />
including device/samsung/toro/vendorsetup.sh<br />
including device/samsung/tuna/vendorsetup.sh<br />
including device/ti/panda/vendorsetup.sh<br />
including sdk/bash_completion/adb.bash<br />
[email protected] ~/android/source $ lunch<br />
You're building on Linux<br />
Lunch menu... pick a combo:<br />
	 1. full-eng<br />
	 2. full_x86-eng<br />
	 3. vbox_x86-eng<br />
	 4. full_stingray-userdebug<br />
	 5. full_wingray-userdebug<br />
	 6. full_crespo4g-userdebug<br />
	 7. full_crespo-userdebug<br />
	 8. full_maguro-userdebug<br />
	 9. full_toro-userdebug<br />
	 10. full_tuna-userdebug<br />
	 11. full_panda-eng<br />
Which would you like? [full-eng] 9<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
============================================<br />
PLATFORM_VERSION_CODENAME=REL<br />
PLATFORM_VERSION=4.0.3<br />
TARGET_PRODUCT=full_toro<br />
TARGET_BUILD_VARIANT=userdebug<br />
TARGET_BUILD_TYPE=release<br />
TARGET_BUILD_APPS=<br />
TARGET_ARCH=arm<br />
TARGET_ARCH_VARIANT=armv7-a-neon<br />
HOST_ARCH=x86<br />
HOST_OS=linux<br />
HOST_BUILD_TYPE=release<br />
BUILD_ID=IML74K<br />
============================================<br />
[email protected] ~/android/source $ . build/envsetup.sh<br />


----------



## Adam80460

I was doing just fine until i switched computers .. built a couple of builds no issues now nothing but errors on this new set up...grrr


----------



## JBirdVegas

doug piston said:


> @JBirdVegas
> 
> Just built busybox, su and superuser into my build with adry'd kernel. I used the binaries but built them moments before putting them in the build. You help make my toro build much cleaner. Appreciate it.


Always happy to help


----------



## JBirdVegas

Adam80460 said:


> I was doing just fine until i switched computers .. built a couple of builds no issues now nothing but errors on this new set up...grrr


Look guys if you are following a guide that says you should be logged in as root ... find another guide. You should use root to install programs and some other admin tasks but not for everyday use... if that is ur M.O. then that is fine but don't expected to get a lot of help as you are misusing your OS. Yo shouldn't need root for anything beyond installing dependancies. You do NOT NEED ROOT ACCESS TO BUILD.

Please LINUX n00bs STOP logging in as root. You will see why after working with a secure os for the first time.


----------



## nocoast

Jbird is right su is ruing you! Looks like you got the $ and not the #...switch to the # by sudo -i'ing before build sudo su'ing before the build or sudo su chown -R <insert username> <insert name of file/dir that you are trying to change ownership on)


----------



## doug piston

If you have properly setup your build enviroment you should never have to su, sudo or chown anything.Your working directory should be in /home/your username/. Like stated before sudo and su should really only be used for installing applications or other maintainence on your OS, not for building android. To make in visible everything should be done from $ and not #.

Your sdk may be in root, for example mine is in /opt/ but this is why you setup udev rules. With the proper rules and setup using sudo and su are completely unneeded.

http://source.androi...ownloading.html <-- Red through that and you'll see one mention of sudo or su and that is for troubleshooting your OS.


----------



## Adam80460

Yeah I'm pretty sure I wasn't root while doing anything dealing with the setup .. and I didn't follow any tutorial . Just followed the directions on the android source page. The only thing I did differently was uninstall openjdk.

Sent from my Galaxy Nexus using RootzWiki


----------



## nocoast

well have you tryed setting up buildenv then su'ing then trying lunch just to make sure? If it lets you pick then youll know it did....there is a whole lot of sudoing when installing packages to get ur environment started i wouldnt be suprised if you mighta accidently sudo su'd or sudo -i'd in the process.


----------



## Adam80460

Well I started over and re downloaded the source I get a little different error this time.



Code:


<br />
[email protected] ~/ics_source $ prebuilt/linux-x86/ccache/ccache -M 50G<br />
bash: prebuilt/linux-x86/ccache/ccache: No such file or directory<br />
[email protected] ~/ics_source $ source build/envsetup.sh<br />
including device/moto/stingray/vendorsetup.sh<br />
including device/moto/wingray/vendorsetup.sh<br />
including device/samsung/crespo4g/vendorsetup.sh<br />
including device/samsung/crespo/vendorsetup.sh<br />
including device/samsung/maguro/vendorsetup.sh<br />
including device/samsung/toro/vendorsetup.sh<br />
including device/samsung/tuna/vendorsetup.sh<br />
including device/ti/panda/vendorsetup.sh<br />
including sdk/bash_completion/adb.bash<br />
[email protected] ~/ics_source $ lunch<br />
You're building on Linux<br />
Lunch menu... pick a combo:<br />
	 1. full-eng<br />
	 2. full_x86-eng<br />
	 3. vbox_x86-eng<br />
	 4. full_stingray-userdebug<br />
	 5. full_wingray-userdebug<br />
	 6. full_crespo4g-userdebug<br />
	 7. full_crespo-userdebug<br />
	 8. full_maguro-userdebug<br />
	 9. full_toro-userdebug<br />
	 10. full_tuna-userdebug<br />
	 11. full_panda-eng<br />
Which would you like? [full-eng] 9<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: No such file or directory<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: No such file or directory<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: No such file or directory<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: No such file or directory<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: No such file or directory<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: No such file or directory<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: No such file or directory<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: No such file or directory<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: No such file or directory<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: No such file or directory<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: No such file or directory<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: No such file or directory<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: No such file or directory<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: No such file or directory<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: No such file or directory<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: No such file or directory<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: No such file or directory<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: No such file or directory<br />
============================================<br />
PLATFORM_VERSION_CODENAME=REL<br />
PLATFORM_VERSION=4.0.3<br />
TARGET_PRODUCT=full_toro<br />
TARGET_BUILD_VARIANT=userdebug<br />
TARGET_BUILD_TYPE=release<br />
TARGET_BUILD_APPS=<br />
TARGET_ARCH=arm<br />
TARGET_ARCH_VARIANT=armv7-a-neon<br />
HOST_ARCH=x86<br />
HOST_OS=linux<br />
HOST_BUILD_TYPE=release<br />
BUILD_ID=IML74K<br />
============================================<br />
[email protected] ~/ics_source $ cd '/home/adam80460/ics_source/prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin'<br />
[email protected] ~/ics_source/prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin $ ls<br />
arm-linux-androideabi-addr2line  arm-linux-androideabi-gprof<br />
arm-linux-androideabi-ar		 arm-linux-androideabi-ld<br />
arm-linux-androideabi-as		 arm-linux-androideabi-ld.bfd<br />
arm-linux-androideabi-c++		arm-linux-androideabi-ld.gold<br />
arm-linux-androideabi-c++filt	arm-linux-androideabi-nm<br />
arm-linux-androideabi-cpp		arm-linux-androideabi-objcopy<br />
arm-linux-androideabi-g++		arm-linux-androideabi-objdump<br />
arm-linux-androideabi-gcc		arm-linux-androideabi-ranlib<br />
arm-linux-androideabi-gcc-4.4.3  arm-linux-androideabi-readelf<br />
arm-linux-androideabi-gccbug	 arm-linux-androideabi-run<br />
arm-linux-androideabi-gcov	   arm-linux-androideabi-size<br />
arm-linux-androideabi-gdb		arm-linux-androideabi-strings<br />
arm-linux-androideabi-gdbtui	 arm-linux-androideabi-strip<br />

Now its telling me the directory doesn't exist.. Wtf .. as you can see by rhe ls that they are there...

this is the correct branch right?

repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.3_r1


----------



## JBirdVegas

Your missing https://github.com/CyanogenMod/android_prebuilt

Sent from my Galaxy Nexus using Tapatalk


----------



## JBirdVegas

doug piston said:


> @JBirdVegas
> 
> Just built busybox, su and superuser into my build with adry'd kernel. I used the binaries but built them moments before putting them in the build. You help make my toro build much cleaner. Appreciate it.


Glad I could help


----------



## Adam80460

Thanks for the response .. but the directory and all the files are there .. I just don't get it ..driving me nuts



JBirdVegas said:


> Your missing https://github.com/CyanogenMod/android_prebuilt
> 
> Sent from my Galaxy Nexus using Tapatalk


Sent from my Galaxy Nexus using RootzWiki


----------



## nocoast

are you on the 10.04?


----------



## Adam80460

No Linux mint 12

Sent from my Galaxy Nexus using RootzWiki


----------



## nocoast

switch to 10.04 you wont get any issues i promise.


----------



## JBirdVegas

nocoast said:


> switch to 10.04 you wont get any issues i promise.


I don't have issues on mint 12


----------



## JBirdVegas

Adam80460 said:


> Thanks for the response .. but the directory and all the files are there .. I just don't get it ..driving me nuts
> 
> Sent from my Galaxy Nexus using RootzWiki


The error you posted was an error related to missing tool chains these are the 'conversion' files that translate c code to chipsets specific assembly code. They are absolutely a requirements to build for any device. I'm fairly certain you problem is related to missing toolchains

Sent from my Galaxy Nexus using Tapatalk


----------



## Adam80460

So I just ended up just wiping my Linux drive and starting over, now everything is peachy..( yeah I said peachy) thanks for your help guys.

Sent from my Galaxy Nexus using RootzWiki


----------



## nocoast

when all else fails, format and star over...


----------



## Adam80460

So I am now tring to add su and busybox to my build and of course nothing works right for me ..

this is my full_toro.mk doest it look correct?

i



Code:


<br />
# Copyright (C) 2011 The Android Open Source Project<br />
#<br />
# Licensed under the Apache License, Version 2.0 (the "License");<br />
# you may not use this file except in compliance with the License.<br />
# You may obtain a copy of the License at<br />
#<br />
#	  [URL=http://www.apache.org/licenses/LICENSE-2]http://www.apache.org/licenses/LICENSE-2[/URL].0<br />
#<br />
# Unless required by applicable law or agreed to in writing, software<br />
# distributed under the License is distributed on an "AS IS" BASIS,<br />
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br />
# See the License for the specific language governing permissions and<br />
# limitations under the License.<br />
#<br />
# This file is the build configuration for a full Android<br />
# build for toro hardware. This cleanly combines a set of<br />
# device-specific aspects (drivers) with a device-agnostic<br />
# product configuration (apps). Except for a few implementation<br />
# details, it only fundamentally contains two inherit-product<br />
# lines, full and toro, hence its name.<br />
#<br />
# Tell compiler where our prebuilt folder is<br />
DEVICE_PREBUILT := device/samsung/toro/prebuilt<br />
# Camera / Superuser.apk<br />
PRODUCT_PACKAGES := \<br />
	Camera \<br />
	Gallery \<br />
	Superuser<br />
  <br />
#if we do this after the full_base_telephony is included some of these don't get picked up..<br />
PRODUCT_COPY_FILES += \<br />
	device/samsung/toro/bcmdhd.cal:system/etc/wifi/bcmdhd.cal \<br />
	device/sample/etc/apns-conf_verizon.xml:system/etc/apns-conf.xml \<br />
	frameworks/base/data/etc/android.hardware.telephony.cdma.xml:system/etc/permissions/android.hardware.telephony.cdma.xml<br />
	$(DEVICE_PREBUILT)/xbin/busybox:system/xbin/busybox \<br />
	$(DEVICE_PREBUILT)/xbin/su:system/xbin/su<br />
	$(DEVICE_PREBUILT)/etc/init.d/91-busybox_linkage.sh:system/etc/inti.d/91-busybox_linkage.sh<br />
  <br />
# Inherit from those products. Most specific first.<br />
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)<br />
# This is where we'd set a backup provider if we had one<br />
#$(call inherit-product, device/sample/products/backup_overlay.mk)<br />
# Inherit from toro device<br />
$(call inherit-product, device/samsung/toro/device.mk)<br />
# Set those variables here to overwrite the inherited values.<br />
PRODUCT_NAME := full_toro<br />
PRODUCT_DEVICE := toro<br />
PRODUCT_BRAND := Android<br />
PRODUCT_MODEL := Full AOSP on Toro<br />
# Overrides<br />
PRODUCT_BUILD_PROP_OVERRIDES += \<br />
  PRODUCT_NAME=mysid \<br />
  BUILD_ID=ICL53F \<br />
  BUILD_DISPLAY_ID=IML74K \<br />
		  BUILD_FINGERPRINT="google/mysid/toro:4.0.2/ICL53F/235179:user/release-keys" \<br />
		  PRIVATE_BUILD_DESC="mysid-user 4.0.2 ICL53F 235179 release-keys"<br />


----------



## doug piston

Do you get an error? Or it isn't including them?


----------



## Adam80460

yeah both

here is one i get when i try and run a make clean



Code:


<br />
[email protected] ~/ics_source $ make clean<br />
device/samsung/toro/full_toro.mk:37: *** multiple target patterns.  Stop.<br />

and another



Code:


<br />
Notice file: system/extras/showslab/NOTICE -- out/target/product/toro/obj/NOTICE_FILES/src//system/xbin/showslab.txt<br />
Notice file: external/sqlite/dist/NOTICE -- out/target/product/toro/obj/NOTICE_FILES/src//system/xbin/sqlite3.txt<br />
make: *** No rule to make target `/xbin/su', needed by `out/target/product/toro/system/xbin/su'.  Stop.<br />
make: *** Waiting for unfinished jobs....<br />
Notice file: external/dropbear/NOTICE -- out/target/product/toro/obj/NOTICE_FILES/src//system/xbin/ssh.txt<br />
Notice file: external/strace/NOTICE -- out/target/product/toro/obj/NOTICE_FILES/src//system/xbin/strace.txt<br />
[email protected] ~/ics_source $<br />


----------



## doug piston

Should add "\" after $(DEVICE_PREBUILT)/xbin/su:system/xbin/su



Code:


<br />
$(DEVICE_PREBUILT)/xbin/busybox:system/xbin/busybox \<br />
$(DEVICE_PREBUILT)/xbin/su:system/xbin/su \<br />
$(DEVICE_PREBUILT)/etc/init.d/91-busybox_linkage.sh:system/etc/inti.d/91-busybox_linkage.sh<br />

Should fix both errors.


----------



## Adam80460

Well hot damn its compiling.... thanks doug


----------



## Adam80460

damn it i still get this one



Code:


<br />
In file included from external/strace/defs.h:33make: *** No rule to make target `device/samsung/toro/prebuilt/xbin/su', needed by `out/target/product/toro/system/xbin/su'.  Stop.<br />
make: *** Waiting for unfinished jobs....<br />


----------



## doug piston

Sorry I missed it before

#if we do this after the full_base_telephony is included some of these don't get picked up..
PRODUCT_COPY_FILES += \
 device/samsung/toro/bcmdhd.cal:system/etc/wifi/bcmdhd.cal \
 device/sample/etc/apns-conf_verizon.xml:system/etc/apns-conf.xml \
 frameworks/base/data/etc/android.hardware.telephony.cdma.xml:system/etc/permissions/android.hardware.telephony.cdma.xml \ <-- need one there as well
$(DEVICE_PREBUILT)/xbin/busybox:system/xbin/busybox \
 $(DEVICE_PREBUILT)/xbin/su:system/xbin/su \
$(DEVICE_PREBUILT)/etc/init.d/91-busybox_linkage.sh:system/etc/inti.d/91-busybox_linkage.sh

Hope that gets it for you. I haven't seen that error before.


----------



## Adam80460

Do I edit the full_toro.mk or the device.mk or Android.mk ?


----------



## EmericanX

I'll be taking a look at this thread tomorrow! I've got a full flashed build. I just can't get root to work! I've included the binary and apk. Have even tried to flash an su.zip... root permission is denied! I've modified my boot.img so its rooted and I can ad remount but nothing can access root from within the system...

Sent from my Galaxy Nexus using Tapatalk


----------



## doug piston

full_toro.mk.


----------



## JBirdVegas

lifebeginsfriday said:


> I'll be taking a look at this thread tomorrow! I've got a full flashed build. I just can't get root to work! I've included the binary and apk. Have even tried to flash an su.zip... root permission is denied! I've modified my boot.img so its rooted and I can ad remount but nothing can access root from within the system...
> 
> Sent from my Galaxy Nexus using Tapatalk


Sounds like you are missing symlinks


----------



## EmericanX

Awesome! Exactly why I wanna follow this thread! I'm gonna do another build tomorrow. I'll touch base to see if you can fill me in on what I'm missing... I'm sure I am because I didn't add anything other then the binary. As a matter of fact. My last build didn't even have su in the build until I added it to the .zip

Sent from my Galaxy Nexus using Tapatalk


----------



## doug piston

For those with issues on getting root, make sure you have SU and busybox in /xbin on your build. Also I did have an issue with this command

echo "for cmd in $(busybox --list);do ln -s /system/xbin/$cmd $cmd; done; ln -s /system/xbin/su su;" > $TOP/device/motorola/droid2/prebuilt/etc/init.d/91-busybox_linkage.sh

It wasn't actually putting the correct script into the 91-busybox_linkage.sh. (I blame user error.) So to resolve the issue i cd'd to the prebuilt dir then:


Code:


<br />
mkdir -p etc/init.d<br />
cd etc/init,.d<br />
nano 91-busybox_linkage.sh (use gedit if you prefer instead)<br />

Paste this in there


Code:


<br />
for cmd in $(busybox --list);do ln -s /system/xbin/ ; done; ln -s /system/xbin/su su;<br />

Save it and exit. Do a make clobber and restart your build. Hope this helps a few.


----------



## Adam80460

So for the life of me I can get busybox and su compiled into my build so i want to explain what i did to see if i did it wrong.

Step #1

After adding export TOP=~/android/system to my .bashrc

I did a cd into my device's folder:



Code:


<br />
[email protected] ~ $ cd '/home/adam80460/ics_source/device/samsung/toro'<br />
[email protected] ~/ics_source/device/samsung/toro $<br />

Step #2

Then I Made the directories:



Code:


<br />
[email protected] ~/ics_source/device/samsung/toro $ mkdir prebuilt<br />
[email protected] ~/ics_source/device/samsung/toro $ cd prebuilt<br />
[email protected] ~/ics_source/device/samsung/toro/prebuilt $ mkdir etc<br />
[email protected] ~/ics_source/device/samsung/toro/prebuilt $ mkdir xbin<br />
[email protected] ~/ics_source/device/samsung/toro/prebuilt $ cd etc<br />
[email protected] ~/ics_source/device/samsung/toro/prebuilt/etc $ mkdir init.d<br />
<br />

Step #3

Then I changed directories into the xbin folder and pulled the su and busybox from the Rom I was running at the time :



Code:


<br />
[email protected] ~/ics_source/device/samsung/toro/prebuilt $ cd xbin<br />
[email protected] ~/ics_source/device/samsung/toro/prebuilt/xbin $ adb pull system/xbin/su<br />
246 KB/s (22372 bytes in 0.088s)<br />
[email protected] ~/ics_source/device/samsung/toro/prebuilt/xbin $ adb pull system/xbin/busybox<br />
2634 KB/s (468940 bytes in 0.173s)<br />

Step #4

i changed Directories to the init.d folder and made the 91-busybox_linkage.sh:

Terminal:



Code:


<br />
[email protected] ~/ics_source/device/samsung/toro/prebuilt/xbin $ cd ..<br />
[email protected] ~/ics_source/device/samsung/toro/prebuilt $ cd etc/init.d<br />
[email protected] ~/ics_source/device/samsung/toro/prebuilt/etc/init.d $ gedit 91-busybox_linkage.sh<br />
[email protected] ~/ics_source/device/samsung/toro/prebuilt/etc/init.d $<br />

Contents of bash



Code:


<br />
#!/bin/bash<br />
#make our install script in the correct file<br />
echo "for cmd in $(busybox --list);do ln -s /system/xbin/$cmd $cmd; done; ln -s /system/xbin/su su;" > $TOP/device/samsung/toro/prebuilt/etc/init.d/91-busybox_linkage.sh<br />
#ensure that the script has the correct permissions<br />
chmod 777 $TOP/device/samsung/toro/prebuilt/etc/init.d/91-busybox_linkage.sh<br />

I then saved the sh file.

Step #5

I then Navigated to my Device's folder again and preceded to edit the full_toro.mk:

Contents of full_toro.mk



Code:


<br />
# Copyright (C) 2011 The Android Open Source Project<br />
#<br />
# Licensed under the Apache License, Version 2.0 (the "License");<br />
# you may not use this file except in compliance with the License.<br />
# You may obtain a copy of the License at<br />
#<br />
#	  [URL=http://www.apache.org/licenses/LICENSE-2]http://www.apache.org/licenses/LICENSE-2[/URL].0<br />
#<br />
# Unless required by applicable law or agreed to in writing, software<br />
# distributed under the License is distributed on an "AS IS" BASIS,<br />
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br />
# See the License for the specific language governing permissions and<br />
# limitations under the License.<br />
#<br />
# This file is the build configuration for a full Android<br />
# build for toro hardware. This cleanly combines a set of<br />
# device-specific aspects (drivers) with a device-agnostic<br />
# product configuration (apps). Except for a few implementation<br />
# details, it only fundamentally contains two inherit-product<br />
# lines, full and toro, hence its name.<br />
#<br />
# Camera / Superuser.apk<br />
PRODUCT_PACKAGES := \<br />
	Camera \<br />
	Gallery \<br />
	Superuser<br />
  <br />
#if we do this after the full_base_telephony is included some of these don't get picked up..<br />
PRODUCT_COPY_FILES += \<br />
	device/samsung/toro/bcmdhd.cal:system/etc/wifi/bcmdhd.cal \<br />
	device/sample/etc/apns-conf_verizon.xml:system/etc/apns-conf.xml \<br />
	frameworks/base/data/etc/android.hardware.telephony.cdma.xml:system/etc/permissions/android.hardware.telephony.cdma.xml \<br />
	  <br />
# Inherit from those products. Most specific first.<br />
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)<br />
# This is where we'd set a backup provider if we had one<br />
#$(call inherit-product, device/sample/products/backup_overlay.mk)<br />
# Inherit from toro device<br />
$(call inherit-product, device/samsung/toro/device.mk)<br />
# Set those variables here to overwrite the inherited values.<br />
PRODUCT_NAME := full_toro<br />
PRODUCT_DEVICE := toro<br />
PRODUCT_BRAND := Android<br />
PRODUCT_MODEL := Full AOSP on Toro<br />
# Overrides<br />
PRODUCT_BUILD_PROP_OVERRIDES += \<br />
  PRODUCT_NAME=mysid \<br />
  BUILD_ID=ICL53F \<br />
  BUILD_DISPLAY_ID=IML74K \<br />
		  BUILD_FINGERPRINT="google/mysid/toro:4.0.2/ICL53F/235179:user/release-keys" \<br />
		  PRIVATE_BUILD_DESC="mysid-user 4.0.2 ICL53F 235179 release-keys"<br />
# Tell compiler where our prebuilt folder is<br />
DEVICE_PREBUILT := /device/samsung/toro/prebuilt<br />
# Include busybox and su binaries<br />
PRODUCT_COPY_FILES += \<br />
		$(DEVICE_PREBUILT)/xbin/busybox:system/xbin/busybox \<br />
		$(DEVICE_PREBUILT)/xbin/su:system/xbin/su<br />
# This is a script to automatically symlink busybox and su binaries on boot (the code for 91-busybox_linkage.sh is below)<br />
PRODUCT_COPY_FILES += \<br />
		$(DEVICE_PREBUILT)/etc/init.d/91-busybox_linkage.sh:system/etc/inti.d/91-busybox_linkage.sh		<br />
		<br />

Step #6

added these files to $TOP/build/target/product/security
https://github.com/C...eruser.x509.pem
https://github.com/C...y/superuser.pk8

after that I did a make clean and a make and I always end up with one of these errors



Code:


<br />
[email protected] ~/ics_source $ make clean<br />
device/samsung/toro/full_toro.mk:37: *** multiple target patterns.  Stop.<br />




Code:


<br />
Notice file: system/extras/showslab/NOTICE -- out/target/product/toro/obj/NOTICE_FILES/src//system/xbin/showslab.txt<br />
Notice file: external/sqlite/dist/NOTICE -- out/target/product/toro/obj/NOTICE_FILES/src//system/xbin/sqlite3.txt<br />
make: *** No rule to make target `/xbin/su', needed by `out/target/product/toro/system/xbin/su'.  Stop.<br />
make: *** Waiting for unfinished jobs....<br />
Notice file: external/dropbear/NOTICE -- out/target/product/toro/obj/NOTICE_FILES/src//system/xbin/ssh.txt<br />
Notice file: external/strace/NOTICE -- out/target/product/toro/obj/NOTICE_FILES/src//system/xbin/strace.txt<br />
[email protected] ~/ics_source $<br />

I'm sorry to keep bugging but I really want to learn this shit .


----------



## JBirdVegas

Adam80460 said:


> ...
> 
> 
> Code:
> 
> 
> <br />
> #!/bin/bash<br />
> #make our install script in the correct file<br />
> echo "for cmd in $(busybox --list);do ln -s /system/xbin/$cmd $cmd; done; ln -s /system/xbin/su su;" > $TOP/device/samsung/toro/prebuilt/etc/init.d/91-busybox_linkage.sh<br />
> #ensure that the script has the correct permissions<br />
> chmod 777 $TOP/device/samsung/toro/prebuilt/etc/init.d/91-busybox_linkage.sh<br />
> 
> ...


and here that shouldn't be a script just execute those commands and it will create the file $TOP/device/samsung/toro/prebuilt/etc/init.d/91-busybox_linkage.sh with the contents


Code:


 for cmd in $(busybox --list);do ln -s /system/xbin/$cmd $cmd; done; ln -s /system/xbin/su su;

then we just give the created script permissions to be executed.

but the file is created @ ~/*android/source*/toro/prebuilt/etc/init.d/91-busybox_linkage.sh because of the TOP variable issue so that is part of your problem...

Now the biggie the reason your build is erroring out is in full_toro.mk



Code:


<br />
DEVICE_PREBUILT:= /device/toro/prebuilt

This should read:


Code:


DEVICE_PREBUILT :=/home/adam80460/ics_source/device/toro/prebuilt

I think that should do it


----------



## doug piston

For shits and giggles change


Code:


<br />
PRODUCT_COPY_FILES += \<br />
                $(DEVICE_PREBUILT)/xbin/busybox:system/xbin/busybox \<br />
                $(DEVICE_PREBUILT)/xbin/su:system/xbin/su<br />

to 


Code:


<br />
<br />
PRODUCT_COPY_FILES += \<br />
                device/samsung/toro/prebuilt/xbin/busybox:system/xbin/busybox \<br />
                device/samsung/toro/prebuilt/xbin/su:system/xbin/su<br />

This is how I did it instead of defining my prebuilt dir. Just a thought.


----------



## Adam80460

I think I just got bad luck or something









after fixing what you guys suggested I still get this shit



Code:


<br />
src//system/lib/libwebrtc_audio_preprocessing.so.txt<br />
make: *** No rule to make target `/home/ics_source/device/samsung/toro/prebuilt/xbin/busybox', needed by `out/target/product/toro/system/xbin/busybox'.  Stop.<br />
make: *** Waiting for unfinished jobs....<br />
Notice file: external/icu4c/stubdata/NOTICE -- out/target/product/toro/obj/NOTICE_FILES/src//system/usr/icu/icudt46l.dat.txt<br />
[email protected] ~/ics_source $<br />

what the hell does this mean


Code:


<br />
make: *** No rule to make target<br />

The only thing I edit is the full_toro.mk right?


----------



## JBirdVegas

Adam80460 said:


> I think I just got bad luck or something
> 
> after fixing what you guys suggested I still get this shit
> 
> 
> 
> Code:
> 
> 
> <br />
> make: *** No rule to make target `/home/ics_source/device/samsung/toro/prebuilt/xbin/busybox', needed by `out/target/product/toro/system/xbin/busybox'.  Stop.<br />
> make: *** Waiting for unfinished jobs....<br />
> <br />
> [email protected] ~/ics_source $<br />
> 
> what the hell does this mean
> 
> 
> Code:
> 
> 
> <br />
> make: *** No rule to make target<br />


Ok it is borking because you goofed on the path to you device prebuilt folder. Look where it says /home/ics_source unless ics_source is your linux username ... but we know its not so try replacing /home/ics_source with /home/adam80460/ics_source or ~/ics_source fyi ~/ means /home/UserName/

No rule to make target means that the compiler was told to include a file and the file wasn't found. Generally these are path errors or errors caused by setting the wrong build flag, but in your case its the path.


----------



## Adam80460

Thanks for your patience bro. That's a obvious mistake .. I have been messing with that shit for almost a week ,

Sent from my Galaxy Nexus using RootzWiki


----------



## doug piston

@JBirdVegas,

In my travels in setting up and vendor and a common.mk I found or think I found that android seems to stay in its on DIR when being built. For example
I used just



Code:


<br />
PRODUCT_COPY_FILES += \<br />
				vendor/dp/prebuilt/xbin/busybox:system/xbin/busybox \<br />
				vendor/dp/prebuilt/xbin/su:system/xbin/su<br />

I do not have to define that /vendor was in ~/android nor define in my make file where prebuilt was. Could be a total fluke and the improper way of doing it but it does work for me.


----------



## JBirdVegas

Yea the build system does mostly find things without a full path but when in you start running into problems using fully qualified paths sometimes helps


----------



## doug piston

JBirdVegas said:


> Yea the build system does mostly find things without a full path but when in you start running into problems using fully qualified paths sometimes helps


Just wanted make sure I wasn't crazy


----------



## EmericanX

listen to Doug and Jbird! Doug got me straight over on a thread in another forum that I had a topic going just like this...

add Jbird's script and everything from above. pull busybox and superuser.apk from a rooted rom. if its ok with Doug I can post a link to the working su that he linked me over there.. really the instructions from before will get you where you need to be! let me know if I can help in anyway. Since I was going through a similar issue! lol... Thanks again guys!!!


----------



## Adam80460

So I finally got it to build with no errors I don't know how I made something so easy , be so hard . ...thanks for your help guys ..

Now on the the bug fixing ...

Sent from my GalaxyNexus using RootzWiki


----------



## nocoast

you won't have many bugs? Did you remove SPG (wifi provisioning) If not do that... ill post the code later so you can do wifi tether...nice simple edit to get you warmed up.


----------



## Adam80460

Nice would be cool

The only bugs I have found is the spell check on the keyboard ..and the some features on the camera like the ,big eyes, big mouth options cause the camera to fc.

Sent from my GalaxyNexus using RootzWiki


----------



## EmericanX

Yep. I'm seeing the auto correct issue myself. Id also love to see the wifi coding. I also forgot to set a default wallpaper! Lol

Sent from my Galaxy Nexus using Tapatalk


----------



## mbroeders

Adam80460 said:


> The only bugs I have found is the spell check on the keyboard ..and the some features on the camera like the ,big eyes, big mouth options cause the camera to fc.
> Sent from my GalaxyNexus using RootzWiki


To stop the camera from FCing you'll have to copy some additional files. Look for a stock 4.0.2. rom and extract the two *.emd files and some mp4 files from the /system/media/ folder. You can easily add them to you prebuilt folder and then add them to the .mk file:


Code:


<br />
# Adding files needed for extra camera features<br />
PRODUCT_COPY_FILES += \<br />
	vendor/aokp/prebuilt/common/media/LMprec_508.emd:system/media/LMprec_508.emd \<br />
	vendor/aokp/prebuilt/common/media/PFFprec_600.emd:system/media/PFFprec_600.emd \<br />
	vendor/aokp/prebuilt/common/media/video/AndroidInSpace.240p.mp4:system/media/video/AndroidInSpace.240p.mp4 \<br />
	vendor/aokp/prebuilt/common/media/video/AndroidInSpace.480p.mp4:system/media/video/AndroidInSpace.480p.mp4 \<br />
	vendor/aokp/prebuilt/common/media/video/Disco.240p.mp4:system/media/video/Disco.240p.mp4 \<br />
	vendor/aokp/prebuilt/common/media/video/Disco.480p.mp4:system/media/video/Disco.480p.mp4 \<br />
	vendor/aokp/prebuilt/common/media/video/Sunset.240p.mp4:system/media/video/Sunset.240p.mp4 \<br />
	vendor/aokp/prebuilt/common/media/video/Sunset.480p.mp4:system/media/video/Sunset.480p.mp4<br />

I don't have the time now to type it all out, but in the code above you can see the files that are missing and where they should go.

A different question:
I successfully build a rooted rom yesterday, but somehow Superuser app was FCing and TB kept complaining I had no root. Manually I copied the su binary to the /system/bin/ folder, gave it the proper permissions and TB worked (I also replaced the Superuser.apk file I compiled with a pre-compiled .apk one). So now everything is working, but I'm not sure what I did wrong. But just to clarify, the su binary has to go in the xbin folder and not the bin?

-edit- BTW, great thread! This is so very helpful!! Thanks to all.


----------



## nocoast

nocoast​1-172-12​Development 101​
*Getting Wifi tether to not cause FC's in settings if it is*​
RED means delete code, All credit goes to kejar31 (and will be evident by the bitbucket) as do the general quotations....

*"Do this to your device"*
Again, find that config.xml file in the directory posted on the bitbucket and REMOVE the red, you can add the green code if you want your led to always flash green lol...I think thats what its there for, i haven't used it

*"Do this to your vendor"*

*Again, find those files and delete the red code, and in the case of SPG.apk just browse for it in your vendor/samsung/toro/proprietary (or something like that) on your local drive ( not their git) and delete it by hand if the dev you kang'd hasn't done all of these things already...If you kang rootzboats proprietary folder i don't believe you need to do the edits but i think editing things is a good way to get to understand things.








*


----------



## doug piston

Adam80460 said:


> Nice would be cool
> 
> The only bugs I have found is the spell check on the keyboard ..and the some features on the camera like the ,big eyes, big mouth options cause the camera to fc.
> 
> Sent from my GalaxyNexus using RootzWiki


I am going to assume you are using an older gapps. Try using the wookie-gapps and it should resolve the constant red line on spelling. Also from your rom, if you flash woookie-gapps, remove both calender apks and provision.apk.


----------



## nocoast

mods please delete​


----------



## EmericanX

mbroeders said:


> To stop the camera from FCing you'll have to copy some additional files. Look for a stock 4.0.2. rom and extract the two *.emd files and some mp4 files from the /system/media/ folder. You can easily add them to you prebuilt folder and then add them to the .mk file:
> 
> 
> Code:
> 
> 
> <br />
> # Adding files needed for extra camera features<br />
> PRODUCT_COPY_FILES += <br />
> vendor/aokp/prebuilt/common/media/LMprec_508.emd:system/media/LMprec_508.emd <br />
> vendor/aokp/prebuilt/common/media/PFFprec_600.emd:system/media/PFFprec_600.emd <br />
> vendor/aokp/prebuilt/common/media/video/AndroidInSpace.240p.mp4:system/media/video/AndroidInSpace.240p.mp4 <br />
> vendor/aokp/prebuilt/common/media/video/AndroidInSpace.480p.mp4:system/media/video/AndroidInSpace.480p.mp4 <br />
> vendor/aokp/prebuilt/common/media/video/Disco.240p.mp4:system/media/video/Disco.240p.mp4 <br />
> vendor/aokp/prebuilt/common/media/video/Disco.480p.mp4:system/media/video/Disco.480p.mp4 <br />
> vendor/aokp/prebuilt/common/media/video/Sunset.240p.mp4:system/media/video/Sunset.240p.mp4 <br />
> vendor/aokp/prebuilt/common/media/video/Sunset.480p.mp4:system/media/video/Sunset.480p.mp4<br />
> 
> I don't have the time now to type it all out, but in the code above you can see the files that are missing and where they should go.
> 
> A different question:
> I successfully build a rooted rom yesterday, but somehow Superuser app was FCing and TB kept complaining I had no root. Manually I copied the su binary to the /system/bin/ folder, gave it the proper permissions and TB worked (I also replaced the Superuser.apk file I compiled with a pre-compiled .apk one). So now everything is working, but I'm not sure what I did wrong. But just to clarify, the su binary has to go in the xbin folder and not the bin?
> 
> -edit- BTW, great thread! This is so very helpful!! Thanks to all.


I was able to get su working in either /bin or /xbin... so I can confirm that doesn't matter... as far as superuser.apk fc and root saying no root. That was exactly what I was seeing when I had the wrong su.bin... use the su from a built 4.0.3! Superuser will stop fcing and you will have root. The su I had when it was erroring out was about 2.5meg the one that works is only like 22kb if I'm not mistaken..

Sent from my Galaxy Nexus using Tapatalk


----------



## mbroeders

lifebeginsfriday said:


> I was able to get su working in either /bin or /xbin... so I can confirm that doesn't matter... as far as superuser.apk fc and root saying no root. That was exactly what I was seeing when I had the wrong su.bin... use the su from a built 4.0.3! Superuser will stop fcing and you will have root. The su I had when it was erroring out was about 2.5meg the one that works is only like 22kb if I'm not mistaken..
> 
> Sent from my Galaxy Nexus using Tapatalk


Ok, thanks, good to know! The su I'm using works fine when added manually, so I don't think it's the su binary itself. Anyway, I'll look into it, try a few things. But nice to know it shouldn't matter where I put the su.


----------



## JBirdVegas

Adam80460 said:


> Yep. I'm seeing the auto correct issue myself. Id also love to see the wifi coding. I also forgot to set a default wallpaper! Lol


http://review.cyanog...m/#change,11505


----------



## mwaters33

Amazing thread! I've been working on my git skills for the last 3 hours and stumbled across this... I've successfully built AOSP from source for toro but haven't even looked to see if I have a rooted build or tried to install it yet. I have a lot of info to process now. Thanks for sharing.

EDIT

I used the instructions from JBirdVegas in post 6 to add Superuser and busybox to my build. I am happy to say I successfully completed an ota package build, unfortunately, Superuser.apk is the only app that built. (the su and busybox binaries did make it into xbin also)

So now how do I get the rest of my apps to compile also?


----------



## JBirdVegas

mwaters33 said:


> So now how do I get the rest of my apps to compile also?


Include them by their package name in the mk file just like you did with superuser


----------



## Adam80460

I had another question.. if you guys dont mind. Whats is the proper way to cherry-pick commits from someones git..
I am trying to kang the extended power menu from from this git repo https://github.com/p...877a084bfa93169

from my ics source do i have to be in the specific directory?

this is what i was trying



Code:


<br />
[URL=https://github.com/peteralfonso/platform_frameworks_base]https://github.com/peteralfonso/platform_frameworks_base[/URL].git<br />

then



Code:


<br />
git cherry-pick 94f1b570d99bc8c15bf463e90877a084bfa93169<br />

but it gives me some sort of weird error.

Is that even remotely close to being correct, I think I am suppose to merge or something after that but not sure.


----------



## JBirdVegas

Adam80460 said:


> ... Whats is the proper way to cherry-pick commits from someones git.. I am trying to kang the extended power menu from from this git repo https://github.com/p...877a084bfa93169
> ... but it gives me some sort of weird error


well that is a tough one and I don't have the AOSP local to try and tell you for sure exactly how to do it so you will have to work with me here:

first yes, you need to be in the git repository folder so since you are attempting to change $TOP/frameworks/base you need to be in that directory (exception is when doing repo branches for submission to gerrit code review but that is for another thread) so cd $TOP/frameworks/base

then just in case we bork everything we want to be on a different branch


Code:


<br />
git checkout -b MyAwesomeChange<br />
#now we are on branch MyAwesomeChange<br />
git cherry-pick 94f1b570d99bc8c15bf463e90877a084bfa93169<br />

now here is where you are going to have problems
Very Likely
1) fast-forward errors: This means that the commit log for one repository is ahead of the other... It may produce 'conflicts' they will stop the build process and they are anointed in the code with <<< and >>> HEAD markers

Not sure if it will be a problem
2) can't find commit: I honestly don't know the inner working of git enough to say for sure but from my understanding the Change Id: HASHTAG is global on git servers (once again I may be wrong) but as I understand it should be able to find the commit this way. Since, you are setup to track another repository entirely I can't say for sure with out trying it sorry.

So what are your solutions?
1) head over to the page and pull the code and manually place it in the same file in the same locations ***BE SURE YOU GIVE CREDIT AND A LINK TO CODE OWNERS COMMIT***

2) resolve the conflicts look in on of the conflict files and start removing the anointments, this method is the most comprehensive but also the most tedious as you must keep referencing working code to not mess with the inner-workings of the given source file.


----------



## Adam80460

Well. That sounds a lot harder then I thought ..lol. I will probably just add it manually. Until I get my git skills down.

Thanks again bro,

Sent from my Galaxy Nexus by Adam80460 using RootzWiki


----------



## JBirdVegas

I would try git first it gets easier I promise; using git is really just an exercise in syntax









and if it fails just run git branch and use git checkout BranchName where BranchName is the only other thing listed from the git branch command other than MyAwesomeChange

this will completely reset the folder to before you restarted then you can try to add manually


----------



## mwaters33

I started adding apps and compiled again to test what I had added. A couple didn't compile but I may have had some typos.

I spent a couple of hours browsing github and bitbucket comparing different repositories (mainly kejar, teamkang, and peter alphonso) to see how they had their builds setup. I don't want to just clone a repo to build from because you can't learn that way, but they build for multiple devices with multiple make files to prevent having to duplicate code for common files. It makes it difficult to piece together everything that actually goes to a specific device.

Does anyone know of a repository that's setup for a single device so I can see everything together first? It seems like it would be easier to start there first and then start learning how to break it down from there. If I'm going the wrong way, I would appreciate any advice I can get.

I hope all that makes sense.... and thanks for the help.


----------



## EmericanX

Got is fighting me as well! Lol. I actually managed to push my device directory... but I don't know which process it was that did it. Does any of the other noobs just get confused looking at the cheat sheets? Lol

Sent from my Galaxy Nexus using Tapatalk


----------



## JBirdVegas

@mwaters33
Global-KANGS has the droid2we ics only
Liquidsmoothroms only has 2 ICS devices


----------



## JBirdVegas

lifebeginsfriday said:


> ... I actually managed to push my device directory... but I don't know which process it was that did it...


let me walk you through it maybe that will help, if I'm understanding what you are asking.
when you fork the repository to your github you create a 'remote' clone

we also keep local clones they both have git history... and it keeps everything, EVERYTHING.
so once we fork what ever we what to change we make our local repository



Code:


git clone [email protected]:UserName/repo_name.git -b ics

now we have a local clone configured with push access to github.com/UserName in repository 'repo_name'
in the 'ics' branch

Now lets say once we have the clone we make our changes to ExampleFile.xml
at this point if we run git status we see a red ExampleFile.xml noting its been modified
we need to tell git that we want to save our progress on this file:


Code:


<br />
git add ExampleFile.xml<br />
git status<br />
#note ExampleFile.xml's changes are now green and therefor the deltas are 'tracked'<br />
#we could also track change in the folder with git add -A<br />
#at this point BEFORE we commit we can see what is about to be commited by<br />
git diff<br />

Next, we want to commit the changes to the git history ~think of committing as hitting save on an entire folder
*what happened? It took the history and 'tracked' what files were changed and in what way (changes are deltas)
*this is why git sometimes gets confused and has the 'conflicts' we have been talking about ie fast-forward and auto-merge errors
*when you are cherry-picking and pulling in merges or pull requests

EVERY COMMIT MUST HAVE A COMMIT MESSAGE
-please don't just put 'my pimp changes' -that tells everyone nothing ={


Code:


git commit -m "ie: fixed impropperly formatted TextView causing problems when loading activity"

now we can commit a hundred times before we decide to share with the remote because at this point all our changes and the history to make those changes is saved in our local clone's git history. For this example we are going to push to the remote clone located on @ github.com/UserName/repo_name on the ics branch


Code:


git push

now your code and the git history is online.

that awnser your questions?


----------



## EmericanX

OK. That makes sense. One last question. For git init . Is it supposed to be done in the root or local source? Then git add any of the sub directories?

Sent from my Galaxy Nexus using Tapatalk


----------



## JBirdVegas

lets say use ~/dev/ then subfolders like ~/dev/MyAwesomeApp
I would mkdir -p ~/dev/MyAwesomeApp
cd ~/dev/MyAwesomeApp
git init #this creates ~/dev/MyAwesomeApp/.git

git remote add origin [email protected]:UserName/repo_name
configures the default push to location note it is the [email protected] not git:// or https:// (git and https don't accept incoming data only [email protected]:UserName will accept an upstream


----------



## mwaters33

Do you have a working directory (clone) separate from your build tree locally and push changes upstream that way, or just do everything from master and only push to your remote


----------



## JBirdVegas

mwaters33 said:


> Do you have a working directory (clone) separate from your build tree locally and push changes upstream that way, or just do everything from master and only push to your remote


your build tree should be separate. Push to git repo, then repo sync your source then build... exceptions are when you are working with repo in the scope of submitting code for review via a community gerrit code review process. That probably won't apply in this thread, but if this is an issue PLEASE open a new thread new coders are welcomed. Assuming they follow they style guidelines set by google of coarse ;-)


----------



## Adam80460

Anybody know why when I clone the kernel source I just end up with a empty folder?

Sent from my Galaxy Nexus by Adam80460 using RootzWiki


----------



## JBirdVegas

Adam80460 said:


> Anybody know why when I clone the kernel source I just end up with a empty folder?


What was your clone command? Are you sure it empty? Should have a hidden .git/ folder


----------



## Adam80460

What I used was



Code:


<br />
git clone [URL=https://android.googlesource.com/kernel/omap]https://android.googlesource.com/kernel/omap[/URL].git<br />

and I do have a hidden .git folder


----------



## JBirdVegas

What error did it give?


----------



## Adam80460

no error just empty


----------



## JBirdVegas

Weird ...remove the whole folder and try again. Or look in the .git folder if it downloaded it would be there


----------



## rascarlo

Hello
i've built AOSP from source with no issues for my Maguro. bumped all the proprietary binaries for GPS, BlueTooth, Camera. Everything is working but i am having trouble to add su and busybox.

i followed JBirdVegas directions in post #6

*1. git cloned SuperUser in $TOP*


Code:


<br />
git clone [URL=git://github.com/ChainsDD/Superuser.git]git://github.com/ChainsDD/Superuser.git[/URL] packages/apps/Superuser<br />

*2. copied su and busybox binaries from apex ROM and put them in $TOP/device/samsung/maguro/prebuilt/xbin*

*3. edited $TOP/device/samsung/maguro/full_maguro.mk*


Code:


<br />
[email protected]:~$ cat $TOP/device/samsung/maguro/full_maguro.mk<br />
# Copyright (C) 2011 The Android Open Source Project<br />
#<br />
# Licensed under the Apache License, Version 2.0 (the "License");<br />
# you may not use this file except in compliance with the License.<br />
# You may obtain a copy of the License at<br />
#<br />
#	  [URL=http://www.apache.org/licenses/LICENSE-2]http://www.apache.org/licenses/LICENSE-2[/URL].0<br />
#<br />
# Unless required by applicable law or agreed to in writing, software<br />
# distributed under the License is distributed on an "AS IS" BASIS,<br />
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br />
# See the License for the specific language governing permissions and<br />
# limitations under the License.<br />
<br />
#<br />
# This file is the build configuration for a full Android<br />
# build for maguro hardware. This cleanly combines a set of<br />
# device-specific aspects (drivers) with a device-agnostic<br />
# product configuration (apps). Except for a few implementation<br />
# details, it only fundamentally contains two inherit-product<br />
# lines, full and maguro, hence its name.<br />
#<br />
<br />
# Get the long list of APNs<br />
PRODUCT_COPY_FILES := device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml<br />
<br />
# Camera<br />
PRODUCT_PACKAGES := \<br />
	Camera<br />
<br />
# Tell compiler where our prebuilt folder is<br />
DEVICE_PREBUILT := device/samsung/maguro/prebuilt<br />
<br />
# Tell compiler to build Superuser.apk<br />
PRODUCT_PACKAGES := \<br />
		Superuser<br />
<br />
# Include busybox and su binaries<br />
PRODUCT_COPY_FILES += \<br />
		$(DEVICE_PREBUILT)/xbin/busybox:system/xbin/busybox \<br />
		$(DEVICE_PREBUILT)/xbin/su:system/xbin/su<br />
<br />
# This is a script to automatically symlink busybox and su binaries on boot (the code for 91-busybox_linkage.sh is below)<br />
PRODUCT_COPY_FILES += \<br />
		$(DEVICE_PREBUILT)/etc/init.d/91-busybox_linkage.sh:system/etc/inti.d/91-busybox_linkage.sh<br />
<br />
# Inherit from those products. Most specific first.<br />
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)<br />
# This is where we'd set a backup provider if we had one<br />
#$(call inherit-product, device/sample/products/backup_overlay.mk)<br />
# Inherit from maguro device<br />
$(call inherit-product, device/samsung/maguro/device.mk)<br />
<br />
# Set those variables here to overwrite the inherited values.<br />
PRODUCT_NAME := full_maguro<br />
PRODUCT_DEVICE := maguro<br />
PRODUCT_BRAND := Android<br />
PRODUCT_MODEL := Full AOSP on Maguro<br />

*4. created 91-busybox_linkage.sh in $TOP/device/samsung/maguro/prebuilt/etc/init.d*


Code:


<br />
[email protected]:~$ cat $TOP/device/samsung/maguro/prebuilt/etc/init.d/91-busybox_linkage.sh<br />
for cmd in $(busybox --list);do ln -s /system/xbin/$cmd $cmd; done; ln -s /system/xbin/su su;	<br />

*5. set permissions for 91-busybix_linkage.sh*


Code:


<br />
[email protected]:~/myAOSP/device/samsung/maguro/prebuilt/etc/init.d$ ls -l<br />
total 4  -rwxrwxrwx 1 rascarlo rascarlo 94 2012-02-14 13:52 91-busybox_linkage.sh	<br />

*6. added https://github.com/C...eruser.x509.pem and https://github.com/C...y/superuser.pk8 in $TOP/build/target/product/security*

then i make installclean, make clean, make clobber and then i run make otapackage -j8

*but it won't build. i get this as last line in terminal:*


Code:


<br />
<br />
'out/target/common/obj/APPS/Settings_intermediates/classes.dex' as 'classes.dex'...<br />
[email protected]:~/myAOSP$<br />

*and scrolling up in terminal i see this error :*


Code:


<br />
make: *** [out/target/product/maguro/obj/APPS/Superuser_intermediates/package.apk] Error 1<br />

*can anybody help?
thank you*


----------



## JBirdVegas

Show more of the build failing, please


----------



## rascarlo

JBirdVegas said:


> Show more of the build failing, please


thank you

i run make -j 16 >& buildlog.txt
this is grep error buildlog.txt



Code:


<br />
[email protected]:~/myAOSP$ grep error buildlog.txt<br />
host C: libpng <= external/libpng/pngerror.c<br />
external/expat/lib/xmlparse.c: In function ‘errorProcessor’:<br />
external/expat/lib/xmlrole.c: In function ‘error’:<br />
host C++: libtinyxml <= external/tinyxml/tinyxmlerror.cpp<br />
target thumb C: libc_common <= bionic/libc/unistd/perror.c<br />
target thumb C: libc_common <= bionic/libc/stdio/ferror.c<br />
target thumb C: libc_common <= bionic/libc/string/strerror.c<br />
target thumb C: libc_common <= bionic/libc/string/strerror_r.c<br />
target thumb C: libc_common <= bionic/libc/netbsd/resolv/herror.c<br />
target thumb C: libc_common <= bionic/libc/regex/regerror.c<br />
target arm C: libjpeg <= external/jpeg/jerror.c<br />
external/expat/lib/xmlrole.c: In function 'error':<br />
external/expat/lib/xmlparse.c: In function 'errorProcessor':<br />
target thumb C: libpng <= external/libpng/pngerror.c<br />
target thumb C++: libicuuc <= external/icu4c/common/errorcode.cpp<br />
external/elfutils/lib/xmalloc.c:38: warning: implicit declaration of function ‘error’<br />
host C: libelf <= external/elfutils/libelf/elf_error.c<br />
host C: emulator-libui <= external/qemu/distrib/libpng-1.2.19/pngerror.c<br />
host C: emulator-libqemu <= external/qemu/qemu-error.c<br />
host C: emulator-libqemu <= external/qemu/qerror.c<br />
target thumb C++: libchromium_net <= external/chromium/base/safe_strerror_posix.cc<br />
target thumb C++: libchromium_net <= external/chromium/net/base/net_errors.cc<br />
target thumb C++: libchromium_net <= external/chromium/net/base/net_errors_posix.cc<br />
target thumb C++: libchromium_net <= external/chromium/net/socket/ssl_error_params.cc<br />
target thumb C++: libchromium_net <= external/chromium/net/url_request/url_request_error_job.cc<br />
host C++: libLLVMSupport <= external/llvm/lib/Support/system_error.cpp<br />
host C: libLLVMSupport <= external/llvm/lib/Support/regerror.c<br />
target thumb C: libdbus <= external/dbus/dbus/dbus-errors.c<br />
target thumb C: libbluetoothd <= external/bluetooth/bluez/src/error.c<br />
external/bluetooth/bluez/src/android_bluez.c:72: warning: implicit declaration of function 'error'<br />
target thumb C: libglib <= external/bluetooth/glib/glib/gerror.c<br />
In file included from external/bluetooth/glib/glib/gerror.c:27:<br />
external/ping/ping.c: In function 'receive_error_msg':<br />
target thumb C: libipsec <= external/ipsec-tools/src/libipsec/ipsec_strerror.c<br />
target thumb C++: libLLVMSupport <= external/llvm/lib/Support/system_error.cpp<br />
target thumb C: libLLVMSupport <= external/llvm/lib/Support/regerror.c<br />
target thumb C: libxml2 <= external/libxml2/error.c<br />
target thumb C: libtommath <= external/dropbear/libtommath/bn_error.c<br />
target thumb C: libtomcrypt <= external/dropbear/libtomcrypt/src/misc/error_to_string.c<br />
external/strace/syscall.c: In function 'get_error':<br />
host C: libext2_com_err_host <= external/e2fsprogs/lib/et/error_message.c<br />
host C++: liboprofile_pp <= external/oprofile/libpp/image_errors.cpp<br />
external/elfutils/lib/xmalloc.c:38: warning: implicit declaration of function ‘error’<br />
host C: libxml2 <= external/libxml2/error.c<br />
target thumb C: ash <= system/core/sh/error.c<br />
target thumb C: libext2_com_err <= external/e2fsprogs/lib/et/error_message.c<br />
target arm C: libcoregrind-arm-linux <= external/valgrind/main/coregrind/m_errormgr.c<br />
target arm C: drd-arm-linux <= external/valgrind/main/drd/drd_error.c<br />
target arm C: helgrind-arm-linux <= external/valgrind/main/helgrind/hg_errors.c<br />
target arm C: memcheck-arm-linux <= external/valgrind/main/memcheck/mc_errors.c<br />
In file included from external/valgrind/main/helgrind/hg_errors.c:45:<br />
target thumb C++: libcxcore <= external/opencv/cxcore/src/cxerror.cpp<br />
host C++: libicuuc <= external/icu4c/common/errorcode.cpp<br />
frameworks/base/core/res/res/values/public.xml:860: warning: No comment for public symbol android:drawable/stat_notify_error<br />

and here is the whole log: http://dl.dropbox.co...71/buildlog.txt

thank you


----------



## skylordusa1

Whats up guys. Not sure if any of you will see this but had a question. Have any of you got the aosp build to compile without errors after doing all these steps to add su and busybox but not have the superuser.apk on your phone when you boot up and still not have root? I followed all the steps in this thread to add su and busy box and git cloned the superuser.apk and the build compiled fine with no errors but when I flashed it and booted up I didnt have su permissions and there was no superuser.apk on the phone. The only thing i did different which is probably the problem is I couldnt figure out how to get the superuser.pk8 from git hub (im a total noob) so I created my own with the below command from the thread.

development/tools/make_key superuser '/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=[email protected]'

Im thinking it has to be that step or maybe I did something wrong when editing my full_toro.mk file which is below

# Copyright © 2011 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or...ses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

#
# This file is the build configuration for a full Android
# build for toro hardware. This cleanly combines a set of
# device-specific aspects (drivers) with a device-agnostic
# product configuration (apps). Except for a few implementation
# details, it only fundamentally contains two inherit-product
# lines, full and toro, hence its name.
#

# Camera
PRODUCT_PACKAGES := \
Camera \
Gallery \
Superuser

#if we do this after the full_base_telephony is included some of these don't get picked up..
PRODUCT_COPY_FILES += \
device/samsung/toro/bcmdhd.cal:system/etc/wifi/bcmdhd.cal \
device/sample/etc/apns-conf_verizon.xml:system/etc/apns-conf.xml \
frameworks/base/data/etc/android.hardware.telephony.cdma.xml:system/etc/permissions/android.hardware.telephony.cdma.xml \
# Inherit from those products. Most specific first.
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
# This is where we'd set a backup provider if we had one
#$(call inherit-product, device/sample/products/backup_overlay.mk)
# Inherit from toro device
$(call inherit-product, device/samsung/toro/device_vzw.mk)
# Set those variables here to overwrite the inherited values.
PRODUCT_NAME := full_toro
PRODUCT_DEVICE := toro
PRODUCT_BRAND := Android
PRODUCT_MODEL := Full AOSP on Toro-VZW
# Tell compiler where our prebuilt folder is
DEVICE_PREBUILT := /home/cdogg/ICS_SOURCE/device/samsung/toro/prebuilt
# Include busybox and su binaries
PRODUCT_COPY_FILES += \
$(DEVICE_PREBUILT)/xbin/busybox:system/xbin/busybox \
$(DEVICE_PREBUILT)/xbin/su:system/xbin/su \
# This is a script to automatically symlink busybox and su binaries on boot (the code for 91-busybox_linkage.sh is below)
PRODUCT_COPY_FILES += \
$(DEVICE_PREBUILT)/etc/init.d/91-busybox_linkage.sh:system/etc/inti.d/91-busybox_linkage.sh \

Let me know if you guys have any suggestions. I would really like to get this working. Thanks.


----------



## skylordusa1

Ok so I tried again and deleted the superuser.pk8 and replaced it with the one from github that you guys provided and changed my full_toro.mk to the below. Now my build compiles and when I boot up I now have the superuser.apk on the phone and in terminal emulator I type su and get the root allow prompt so it seems to be working. But when I actually go into the superuser.apk it eventually spits out the unfortunately SU.apk is no longer working and force closes. Anyone get this before. Any help would be appreciated.



Code:


<br />
# Copyright © 2011 The Android Open Source Project<br />
#<br />
# Licensed under the Apache License, Version 2.0 (the "License");<br />
# you may not use this file except in compliance with the License.<br />
# You may obtain a copy of the License at<br />
#<br />
#	  [URL=http://www.apache.or...ses/LICENSE-2]http://www.apache.or...ses/LICENSE-2[/URL].0<br />
#<br />
# Unless required by applicable law or agreed to in writing, software<br />
# distributed under the License is distributed on an "AS IS" BASIS,<br />
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br />
# See the License for the specific language governing permissions and<br />
# limitations under the License.<br />
#<br />
# This file is the build configuration for a full Android<br />
# build for toro hardware. This cleanly combines a set of<br />
# device-specific aspects (drivers) with a device-agnostic<br />
# product configuration (apps). Except for a few implementation<br />
# details, it only fundamentally contains two inherit-product<br />
# lines, full and toro, hence its name.<br />
#<br />
# Camera<br />
PRODUCT_PACKAGES := \<br />
    Camera \<br />
    Gallery<br />
# Tell compiler where our prebuilt folder is<br />
DEVICE_PREBUILT := /home/cdogg/ICS_SOURCE/device/samsung/toro/prebuilt<br />
# Tell compiler to build Superuser.apk<br />
PRODUCT_PACKAGES := \<br />
    Superuser<br />
# Include busybox and su binaries<br />
PRODUCT_COPY_FILES += \<br />
			    $(DEVICE_PREBUILT)/xbin/busybox:system/xbin/busybox \<br />
			    $(DEVICE_PREBUILT)/xbin/su:system/xbin/su<br />
# This is a script to automatically symlink busybox and su binaries on boot (the code for 91-busybox_linkage.sh is below)<br />
PRODUCT_COPY_FILES += \<br />
			    $(DEVICE_PREBUILT)/etc/init.d/91-busybox_linkage.sh:system/etc/inti.d/91-busybox_linkage.sh<br />
#if we do this after the full_base_telephony is included some of these don't get picked up..<br />
PRODUCT_COPY_FILES += \<br />
    device/samsung/toro/bcmdhd.cal:system/etc/wifi/bcmdhd.cal \<br />
    device/sample/etc/apns-conf_verizon.xml:system/etc/apns-conf.xml \<br />
    frameworks/base/data/etc/android.hardware.telephony.cdma.xml:system/etc/permissions/android.hardware.telephony.cdma.xml<br />
# Inherit from those products. Most specific first.<br />
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)<br />
# This is where we'd set a backup provider if we had one<br />
#$(call inherit-product, device/sample/products/backup_overlay.mk)<br />
# Inherit from toro device<br />
$(call inherit-product, device/samsung/toro/device_vzw.mk)<br />
# Set those variables here to overwrite the inherited values.<br />
PRODUCT_NAME := full_toro<br />
PRODUCT_DEVICE := toro<br />
PRODUCT_BRAND := Android<br />
PRODUCT_MODEL := Full AOSP on Toro-VZW<br />


----------



## mbroeders

Sorry, don't think I can be of any help, but you should change the typo in "$(DEVICE_PREBUILT)/etc/init.d/91-busybox_linkage.sh:system/etc/inti.d/91-busybox_linkage.sh"; instead of 'inti.d' it should read 'init.d'. Hope someone else can help you with the rest


----------



## JBirdVegas

So you have root but opening the SuperUser application causes FC?

There are lots of reasons it could start force closing, most of which you probably won't be able to fix without some extensive C++ and java skillz. If you are really wanting to know why an application if failing watch the logcat. Look for the stack trace it will talk about shutting down the VM. Read that and you may get some insite as to what is going on in there


----------



## doug piston

If its on a Galaxy Nexus change where the build installs SU. For whatever reason it seems to prefer to be in /bin instead of /xbin. I have no idea why but it fixed the FC issue for me.


----------



## skylordusa1

mbroeders said:


> So you have root but opening the SuperUser application causes FC?
> 
> There are lots of reasons it could start force closing, most of which you probably won't be able to fix without some extensive C++ and java skillz. If you are really wanting to know why an application if failing watch the logcat. Look for the stack trace it will talk about shutting down the VM. Read that and you may get some insite as to what is going on in there


Hey whats up JBird. Thanks for taking a look man. I appreciate it. Sorry for bothering you. Yeah seems as if I have root after I download term emulator and type su I get the allow deny su prompt. And I guess I should have explained better. Its actually not everytime I open the su.apk. It opens up fine but I found when I went in to the settings and did the check for su binary update it gave me the error su.apk has unfortunately stopped working and closed out. Could that be because the symlink script for busybox and su is broken as mbroeders pointed out above.

I will try correcting it and see if that solves my issue. Thanks again for taking a look.

While I got you guys here I also wanted to know the best place to get the gapps? I grabbed the gapps-ics-20120317-signed.zip from http://goo.im/gapps but my apps
do not auto restore after I boot up. Im wondering if that also has to do with this broken script also.

Sorry for being a total Noob and wasting your guys time. I wish I knew more. I need to study cause I love this stuff.

Is there a good general IRC channel I can go to when I have questions? Or are the forums the best way to get answers?


----------



## skylordusa1

doug piston said:


> If its on a Galaxy Nexus change where the build installs SU. For whatever reason it seems to prefer to be in /bin instead of /xbin. I have no idea why but it fixed the FC issue for me.


Hey whats up Doug thanks for coming back to the thread and helping.

So that would be as simple as changing



Code:


<br />
# Include busybox and su binaries<br />
PRODUCT_COPY_FILES += \<br />
						    $(DEVICE_PREBUILT)/xbin/busybox:system/xbin/busybox \<br />
						    $(DEVICE_PREBUILT)/xbin/su:system/xbin/su<br />

to



Code:


<br />
# Include busybox and su binaries<br />
PRODUCT_COPY_FILES += \<br />
						    $(DEVICE_PREBUILT)/xbin/busybox:system/xbin/busybox \<br />
						    $(DEVICE_PREBUILT)/xbin/su:system/bin/su<br />

Or am I way off?


----------



## doug piston

That would be correct.


----------



## skylordusa1

Ok cool. I got the build going after I corrected the script ([background=rgb(247, 247, 247)]$(DEVICE_PREBUILT)/etc/init.d/91-busybox_linkage.sh:system/etc/inti.d/91-busybox_linkage.sh) [/background][background=rgb(247, 247, 247)]If that doesnt work I will try to build again after changing the SU install to bin. Thanks again man.[/background]


----------



## doug piston

NP, and thank you for using code tags on the last post. Much easier to read.


----------



## skylordusa1

hahahah Yeah sorry about that. Im still a Noobert and picking things up as I go ahhahahaha. I really appreciate the help from all you guys.


----------



## skylordusa1

Ok so I fixed the script [background=rgb(245, 245, 245)]([/background][background=rgb(245, 245, 245)][background=rgb(247, 247, 247)]$(DEVICE_PREBUILT)/etc/init.d/91-busybox_linkage.sh:system/etc/init.d/91-busybox_linkage.sh) and the build completed again and I was able to boot up. Both Term emulator and Titaniumbackup requested root and I was prompted to allow or deny so looks like root is there. The only issue Im seeing now with it is when I open the Superuser app It works fine and everything in the settings of the app works except for when I click the Su binary v3.0.3.2 Tap to check for updates. Once I click that I get the Unfortunately, Superuser has stopped message and it closes the app. I will try to install the su binary in bin to see if that clears it up.[/background][/background]


----------



## skylordusa1

I have one quick question though do I also have to change the busybox_linkage.sh script in init.d?

It currently shows



Code:


<br />
for cmd in $ (busybox --list);do ln -s /system/xbin/ ; done; ln -s /sytem/xbin/su su;<br />

Show should I just edit the end to show bin as well?



Code:


<br />
for cmd in $ (busybox --list);do ln -s /system/xbin/ ; done; ln -s /sytem/bin/su su;<br />


----------



## JBirdVegas

skylordusa1 said:


> I have one quick question though do I also have to change the busybox_linkage.sh script in init.d?
> 
> It currently shows
> 
> 
> 
> Code:
> 
> 
> <br />
> for cmd in $ (busybox --list);do ln -s /system/xbin/ ; done; ln -s /sytem/xbin/su su;<br />
> 
> Show should I just edit the end to show bin as well?
> 
> 
> 
> Code:
> 
> 
> <br />
> for cmd in $ (busybox --list);do ln -s /system/xbin/ ; done; ln -s /sytem/bin/su su;<br />


You got it. But if superuser app keeps FCing post the stack trace it may be more useful in this circumstance.


----------



## skylordusa1

Thanks JBird. I tried to install su in bin instead of xbin. It compiled and when I booted up root was no longer there so not sure why that didnt work. So I moved it back to xbin and compiled and it booted up and root was back. Everything seems to work fine. The superuser.apk even works fine. Its only when I go into settings and hit that update su binary option. Once I hit that is when it closes. I will see if I can figure out what the stack trace is and how to get it hahahahha. If I can I will post it.

Thanks again for all your help guys. I know you all got way more important stuff to do other then help this noob out so I really appreciate it.


----------



## skylordusa1

Ok after searching a little im thinking I can get the stack trace by running logcat? I will give that a shot.


----------



## doug piston

Try manually moving SU to /bin with either ADB or something like rootExplorer. Reboot, check to see if you have root and then go into SuperUser.apk and attempt to update the binary. It should work, if it does that means I was incorrect on telling you about the script.

Its been a long time since I've used this method so me being incorrect is a very real possibility. That and I am screw ball.


----------



## JBirdVegas

skylordusa1 said:


> Ok after searching a little im thinking I can get the stack trace by running logcat? I will give that a shot.


adb logcat then copy and paste the block of it shutting down the VM. (From a full screen terminal its much easier to read then if not in full size)


----------



## skylordusa1

Ok I grabbed. Is this enough of it?



Code:


<br />
I/Su.PreferencesActivity( 2609): Elite not found, removing Elite preferences<br />
I/ActivityManager(  204): Displayed com.noshufou.android.su/.preferences.PreferencesActivity: +412ms<br />
D/OpenGLRenderer( 2609): Flushing caches (mode 0)<br />
D/dalvikvm(  595): GC_CONCURRENT freed 485K, 17% free 14506K/17415K, paused 5ms+5ms<br />
I/ActivityManager(  204): START {cmp=com.noshufou.android.su/.UpdaterActivity} from pid 2609<br />
D/AndroidRuntime( 2609): Shutting down VM<br />
W/dalvikvm( 2609): threadid=1: thread exiting with uncaught exception (group=0x40a581f8)<br />
E/AndroidRuntime( 2609): FATAL EXCEPTION: main<br />
E/AndroidRuntime( 2609): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.noshufou.android.su/com.noshufou.android.su.UpdaterActivity}: android.view.InflateException: Binary XML file line #23: Error inflating class fragment<br />
E/AndroidRuntime( 2609):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)<br />
E/AndroidRuntime( 2609):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)<br />
E/AndroidRuntime( 2609):  at android.app.ActivityThread.access$600(ActivityThread.java:123)<br />
E/AndroidRuntime( 2609):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)<br />
E/AndroidRuntime( 2609):  at android.os.Handler.dispatchMessage(Handler.java:99)<br />
E/AndroidRuntime( 2609):  at android.os.Looper.loop(Looper.java:137)<br />
E/AndroidRuntime( 2609):  at android.app.ActivityThread.main(ActivityThread.java:4424)<br />
E/AndroidRuntime( 2609):  at java.lang.reflect.Method.invokeNative(Native Method)<br />
E/AndroidRuntime( 2609):  at java.lang.reflect.Method.invoke(Method.java:511)<br />
E/AndroidRuntime( 2609):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)<br />
E/AndroidRuntime( 2609):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)<br />
E/AndroidRuntime( 2609):  at dalvik.system.NativeStart.main(Native Method)<br />
E/AndroidRuntime( 2609): Caused by: android.view.InflateException: Binary XML file line #23: Error inflating class fragment<br />
E/AndroidRuntime( 2609):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:697)<br />
E/AndroidRuntime( 2609):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)<br />
E/AndroidRuntime( 2609):  at android.view.LayoutInflater.inflate(LayoutInflater.java:489)<br />
E/AndroidRuntime( 2609):  at android.view.LayoutInflater.inflate(LayoutInflater.java:396)<br />
E/AndroidRuntime( 2609):  at android.view.LayoutInflater.inflate(LayoutInflater.java:352)<br />
E/AndroidRuntime( 2609):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)<br />
E/AndroidRuntime( 2609):  at android.app.Activity.setContentView(Activity.java:1835)<br />
E/AndroidRuntime( 2609):  at com.noshufou.android.su.UpdaterActivity.onCreate(UpdaterActivity.java:27)<br />
E/AndroidRuntime( 2609):  at android.app.Activity.performCreate(Activity.java:4465)<br />
E/AndroidRuntime( 2609):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)<br />
E/AndroidRuntime( 2609):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)<br />
E/AndroidRuntime( 2609):  ... 11 more<br />
E/AndroidRuntime( 2609): Caused by: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment com.noshufou.android.su.UpdaterFragment: make sure class name exists, is public, and has an empty constructor that is public<br />
E/AndroidRuntime( 2609):  at android.support.v4.app.Fragment.instantiate(Fragment.java:391)<br />
E/AndroidRuntime( 2609):  at android.support.v4.app.Fragment.instantiate(Fragment.java:359)<br />
E/AndroidRuntime( 2609):  at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:262)<br />
E/AndroidRuntime( 2609):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:669)<br />
E/AndroidRuntime( 2609):  ... 21 more<br />
E/AndroidRuntime( 2609): Caused by: java.lang.ClassNotFoundException: com.noshufou.android.su.UpdaterFragment<br />
E/AndroidRuntime( 2609):  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)<br />
E/AndroidRuntime( 2609):  at java.lang.ClassLoader.loadClass(ClassLoader.java:501)<br />
E/AndroidRuntime( 2609):  at java.lang.ClassLoader.loadClass(ClassLoader.java:461)<br />
E/AndroidRuntime( 2609):  at android.support.v4.app.Fragment.instantiate(Fragment.java:381)<br />
E/AndroidRuntime( 2609):  ... 24 more<br />
W/ActivityManager(  204):   Force finishing activity com.noshufou.android.su/.UpdaterActivity<br />
W/ActivityManager(  204):   Force finishing activity com.noshufou.android.su/.preferences.PreferencesActivity<br />
I/Process (  204): Sending signal. PID: 2609 SIG: 3<br />
I/dalvikvm( 2609): threadid=3: reacting to signal 3<br />
I/dalvikvm( 2609): Wrote stack traces to '/data/anr/traces.txt'<br />
W/ActivityManager(  204): Activity pause timeout for ActivityRecord{4173b310 com.noshufou.android.su/.UpdaterActivity}<br />
I/Process (  204): Sending signal. PID: 2609 SIG: 3<br />
I/dalvikvm( 2609): threadid=3: reacting to signal 3<br />


----------



## skylordusa1

JBird, Probably has nothing to do it with it but I just noticed when Im in the superuser.apk on my build the settings button at the top right is the default 3 dot ics menu button and when I press it a dropdown comes up with just preferences in it and when I click preferences it takes me to the settings menu of the su.apk . But when I restore back to Liquids/Your rom v1.25 and go into the superuser.apk the settings button at the top is an actual image of a wrench and when I click that it goes right into the settings menu. No dropdown. Both versions of the su.apk and su binary's say they are the same on both roms. Am I somehow using an older version of the su.apk or did you guys just make some changes/tweaks to the apk on your rom? hahahah Like I said probably has nothing to do with it. Im just grabbing at straws.

I did some searching on google and saw some people having the same issue with the superuser.apk a few months back but havent come across an actual solution yet. Will keep looking.


----------



## skylordusa1

I found this https://github.com/ChainsDD/Superuser/tree/dev when I switched to the dev branch and it looks like they updated the Android.mk 2 months ago and it says fix FC when checking for su binary update. And they also added proguard.flags 2 months ago that also says fix FC when checking. I know I can edit my Android.mk file in my current superuser.apk before I build but I see that it calls for that proguard.flags script/file. Not really sure where I would include/add that.


----------



## JBirdVegas

git clone -b dev

Only thing that changes is you specify that you want to clone the dev branch not the default branch.

And I'm glad they fixed it because class not found exceptions are a real pain even when you wrote the code... if someone else wrote it then finding the problem is extremely difficult.


----------



## skylordusa1

Booooom that worked. Thats good to know that I can grab that branch. Thanks for the help JBird. Thats 1 issue down out of 100 hahahaahaha.

Hey I had another question. Do I have to add something to the source before building so that when I flash the gapps the market will restore the apps on my account. 
I keep flashing the gapps (gapps-ics-20120317-signed.zip) I got from here http://goo.im/gapps after I flash my build but my apps never restore. Are these the right gapps


----------



## warriorforgod

Just tried to compile this on my crespo4g. Here is the error I am getting when running make -j4.



Code:


<br />
============================================<br />
PLATFORM_VERSION_CODENAME=REL<br />
PLATFORM_VERSION=4.0.4<br />
TARGET_PRODUCT=full_crespo4g<br />
TARGET_BUILD_VARIANT=userdebug<br />
TARGET_BUILD_TYPE=release<br />
TARGET_BUILD_APPS=<br />
TARGET_ARCH=arm<br />
TARGET_ARCH_VARIANT=armv7-a-neon<br />
HOST_ARCH=x86<br />
HOST_OS=linux<br />
HOST_BUILD_TYPE=release<br />
BUILD_ID=IMM76K<br />
============================================<br />
build/core/Makefile:25: warning: overriding commands for target `out/target/product/crespo4g/system/xbin/su'<br />
build/core/base_rules.mk:523: warning: ignoring old commands for target `out/target/product/crespo4g/system/xbin/su'<br />
No private recovery resources for TARGET_DEVICE crespo4g<br />
Docs droiddoc: out/target/common/docs/doc-comment-check<br />
Checking API: checkapi-last<br />
Checking API: checkapi-current<br />
Copy: out/host/linux-x86/usr/share/zoneinfo/zoneinfo.dat<br />
Copy: out/host/linux-x86/usr/share/zoneinfo/zoneinfo.idx<br />
Copy: out/host/linux-x86/usr/share/zoneinfo/zoneinfo.version<br />
target R.java/Manifest.java: Superuser (out/target/common/obj/APPS/Superuser_intermediates/src/R.stamp)<br />
make: *** No rule to make target `build/target/product/security/superuser.pk8', needed by `out/target/product/crespo4g/obj/APPS/Superuser_intermediates/package.apk'.  Stop.<br />
make: *** Waiting for unfinished jobs....<br />
system/packages/apps/Superuser/res/values/strings.xml:86: error: Resource entry info_elite_installed is already defined.<br />
system/packages/apps/Superuser/res/values/strings.xml:84: Originally defined here.<br />
system/packages/apps/Superuser/res/values-bg/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
system/packages/apps/Superuser/res/values-bg/strings.xml:58: Originally defined here.<br />
system/packages/apps/Superuser/res/values-da/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
system/packages/apps/Superuser/res/values-da/strings.xml:58: Originally defined here.<br />
system/packages/apps/Superuser/res/values-de/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
system/packages/apps/Superuser/res/values-de/strings.xml:58: Originally defined here.<br />
system/packages/apps/Superuser/res/values-es/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
system/packages/apps/Superuser/res/values-es/strings.xml:58: Originally defined here.<br />
system/packages/apps/Superuser/res/values-fi/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
system/packages/apps/Superuser/res/values-fi/strings.xml:58: Originally defined here.<br />
system/packages/apps/Superuser/res/values-ko/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
system/packages/apps/Superuser/res/values-ko/strings.xml:58: Originally defined here.<br />
system/packages/apps/Superuser/res/values-no/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
system/packages/apps/Superuser/res/values-no/strings.xml:58: Originally defined here.<br />
system/packages/apps/Superuser/res/values-pl/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
system/packages/apps/Superuser/res/values-pl/strings.xml:58: Originally defined here.<br />
system/packages/apps/Superuser/res/values-pt-rBR/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
system/packages/apps/Superuser/res/values-pt-rBR/strings.xml:58: Originally defined here.<br />
system/packages/apps/Superuser/res/values-pt-rPT/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
system/packages/apps/Superuser/res/values-pt-rPT/strings.xml:58: Originally defined here.<br />
system/packages/apps/Superuser/res/values-sk/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
system/packages/apps/Superuser/res/values-sk/strings.xml:58: Originally defined here.<br />
system/packages/apps/Superuser/res/values-zh-rCN/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
system/packages/apps/Superuser/res/values-zh-rCN/strings.xml:58: Originally defined here.<br />
system/packages/apps/Superuser/res/values-zh-rTW/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
system/packages/apps/Superuser/res/values-zh-rTW/strings.xml:58: Originally defined here.<br />
system/packages/apps/Superuser/res/values/styles.xml:28: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock.Light.DarkActionBar'.<br />
system/packages/apps/Superuser/res/values/styles.xml:31: error: Error: No resource found that matches the given name: attr 'absForceOverflow'.<br />
system/packages/apps/Superuser/res/values/styles.xml:29: error: Error: No resource found that matches the given name: attr 'actionBarStyle'.<br />
system/packages/apps/Superuser/res/values-large/styles.xml:18: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock.Light.DarkActionBar'.<br />
system/packages/apps/Superuser/res/values-large/styles.xml:21: error: Error: No resource found that matches the given name: attr 'absForceOverflow'.<br />
system/packages/apps/Superuser/res/values-large/styles.xml:19: error: Error: No resource found that matches the given name: attr 'actionBarStyle'.<br />
system/packages/apps/Superuser/res/values-large/styles.xml:24: error: Error: No resource found that matches the given name: attr 'windowContentOverlay'.<br />
system/packages/apps/Superuser/res/values/styles.xml:36: error: Error: No resource found that matches the given name: attr 'actionBarStyle'.<br />
system/packages/apps/Superuser/res/values/styles.xml:40: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.Sherlock.Light.ActionBar.Solid.Inverse'.<br />
system/packages/apps/Superuser/res/values/styles.xml:41: error: Error: No resource found that matches the given name: attr 'background'.<br />
system/packages/apps/Superuser/res/values/styles.xml:43: error: Error: No resource found that matches the given name: attr 'backgroundSplit'.<br />
system/packages/apps/Superuser/res/values/styles.xml:45: error: Error: No resource found that matches the given name: attr 'displayOptions'.<br />
system/packages/apps/Superuser/res/values/styles.xml:52: error: Error: No resource found that matches the given name: attr 'displayOptions'.<br />
system/packages/apps/Superuser/res/values/styles.xml:50: error: Error: No resource found that matches the given name: attr 'icon'.<br />
system/packages/apps/Superuser/res/values/styles.xml:57: error: Error: No resource found that matches the given name: attr 'actionBarStyle'.<br />
system/packages/apps/Superuser/res/values-v11/styles.xml:31: error: Error: No resource found that matches the given name: attr 'actionBarStyle'.<br />
make: *** [out/target/common/obj/APPS/Superuser_intermediates/src/R.stamp] Error 1<br />


----------



## JBirdVegas

Code:


<br />
cd $TOP<br />
rm -rf packages/apps/Superuser<br />
repo sync<br />
source build/envsetup.sh<br />
lunch<br />
make clean<br />
make otapackage<br />

it is having a problem with generating the resources into an R.java class make clean && repo sync should resolve your issue

or


Code:


git clone [URL=git://github.com/ChainsDD/Superuser.git]git://github.com/ChainsDD/Superuser.git[/URL] $TOP/packages/apps/Superuser

 instead of repo sync


----------



## warriorforgod

Worked like a charm. Thanks for the help.


----------



## scoobaspeaz

I think im having the same issue. However I tried make clean && repo sync and it did not solve my issue. I have have even pulled su from another rom thinking that might be whats causing it. This is for a JB build.

packages/apps/Superuser/res/values-zh-rTW/strings.xml:58: Originally defined here.
packages/apps/Superuser/res/values/styles.xml:28: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock.Light.DarkActionBar'.
packages/apps/Superuser/res/values/styles.xml:31: error: Error: No resource found that matches the given name: attr 'absForceOverflow'.
packages/apps/Superuser/res/values/styles.xml:29: error: Error: No resource found that matches the given name: attr 'actionBarStyle'.
packages/apps/Superuser/res/values-large/styles.xml:18: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock.Light.DarkActionBar'.
packages/apps/Superuser/res/values-large/styles.xml:21: error: Error: No resource found that matches the given name: attr 'absForceOverflow'.
packages/apps/Superuser/res/values-large/styles.xml:19: error: Error: No resource found that matches the given name: attr 'actionBarStyle'.
packages/apps/Superuser/res/values-large/styles.xml:24: error: Error: No resource found that matches the given name: attr 'windowContentOverlay'.
packages/apps/Superuser/res/values/styles.xml:36: error: Error: No resource found that matches the given name: attr 'actionBarStyle'.
packages/apps/Superuser/res/values/styles.xml:40: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.Sherlock.Light.ActionBar.Solid.Inverse'.
packages/apps/Superuser/res/values/styles.xml:41: error: Error: No resource found that matches the given name: attr 'background'.
packages/apps/Superuser/res/values/styles.xml:43: error: Error: No resource found that matches the given name: attr 'backgroundSplit'.
packages/apps/Superuser/res/values/styles.xml:45: error: Error: No resource found that matches the given name: attr 'displayOptions'.
packages/apps/Superuser/res/values/styles.xml:52: error: Error: No resource found that matches the given name: attr 'displayOptions'.
packages/apps/Superuser/res/values/styles.xml:50: error: Error: No resource found that matches the given name: attr 'icon'.
packages/apps/Superuser/res/values/styles.xml:57: error: Error: No resource found that matches the given name: attr 'actionBarStyle'.
packages/apps/Superuser/res/values-v11/styles.xml:31: error: Error: No resource found that matches the given name: attr 'actionBarStyle'.
make: *** [out/target/common/obj/APPS/Superuser_intermediates/src/R.stamp] Error 1
make: *** Waiting for unfinished jobs....


----------



## warriorforgod

Just tried this for a jellybean build as well and running into the same issue.


----------



## indy328

JBirdVegas said:


> Code:
> 
> 
> <br />
> cd $TOP<br />
> rm -rf packages/apps/Superuser<br />
> repo sync<br />
> source build/envsetup.sh<br />
> lunch<br />
> make clean<br />
> make otapackage<br />
> 
> it is having a problem with generating the resources into an R.java class make clean && repo sync should resolve your issue
> 
> or
> 
> 
> Code:
> 
> 
> git clone [URL=git://github.com/ChainsDD/Superuser.git]git://github.com/ChainsDD/Superuser.git[/URL] $TOP/packages/apps/Superuser
> 
> instead of repo sync


i too had a similar problem when compiling 4.1 for my galaxy nexus. so i began to repo sync and this is the first thing...


Code:


[email protected]:~/android$ rm -rf packages/apps/Superuser<br />
[email protected]:~/android$ repo sync<br />
error: '/home/blaine/android/.repo/repo/.git/clone.bundle' does not look like a v2 bundle file<br />
fatal: Could not read bundle '/home/blaine/android/.repo/repo/.git/clone.bundle'.<br />


----------



## indy328

ended up git clone-ing, make clean, and make otapackage. just started getting errors when it got to SU again. here is where the errors started:


Code:


<br />
home/blaine/android/packages/apps/Superuser/res/values/strings.xml:86: error: Resource entry info_elite_installed is already defined.<br />
home/blaine/android/packages/apps/Superuser/res/values/strings.xml:84: Originally defined here.<br />
home/blaine/android/packages/apps/Superuser/res/values-bg/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
home/blaine/android/packages/apps/Superuser/res/values-bg/strings.xml:58: Originally defined here.<br />
home/blaine/android/packages/apps/Superuser/res/values-da/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
home/blaine/android/packages/apps/Superuser/res/values-da/strings.xml:58: Originally defined here.<br />
home/blaine/android/packages/apps/Superuser/res/values-de/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
home/blaine/android/packages/apps/Superuser/res/values-de/strings.xml:58: Originally defined here.<br />
home/blaine/android/packages/apps/Superuser/res/values-es/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
home/blaine/android/packages/apps/Superuser/res/values-es/strings.xml:58: Originally defined here.<br />
home/blaine/android/packages/apps/Superuser/res/values-fi/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
home/blaine/android/packages/apps/Superuser/res/values-fi/strings.xml:58: Originally defined here.<br />
home/blaine/android/packages/apps/Superuser/res/values-ko/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
home/blaine/android/packages/apps/Superuser/res/values-ko/strings.xml:58: Originally defined here.<br />
home/blaine/android/packages/apps/Superuser/res/values-no/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
home/blaine/android/packages/apps/Superuser/res/values-no/strings.xml:58: Originally defined here.<br />
home/blaine/android/packages/apps/Superuser/res/values-pl/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
home/blaine/android/packages/apps/Superuser/res/values-pl/strings.xml:58: Originally defined here.<br />
home/blaine/android/packages/apps/Superuser/res/values-pt-rBR/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
home/blaine/android/packages/apps/Superuser/res/values-pt-rBR/strings.xml:58: Originally defined here.<br />
home/blaine/android/packages/apps/Superuser/res/values-pt-rPT/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
home/blaine/android/packages/apps/Superuser/res/values-pt-rPT/strings.xml:58: Originally defined here.<br />
home/blaine/android/packages/apps/Superuser/res/values-sk/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
home/blaine/android/packages/apps/Superuser/res/values-sk/strings.xml:58: Originally defined here.<br />
home/blaine/android/packages/apps/Superuser/res/values-zh-rCN/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
home/blaine/android/packages/apps/Superuser/res/values-zh-rCN/strings.xml:58: Originally defined here.<br />
home/blaine/android/packages/apps/Superuser/res/values-zh-rTW/strings.xml:60: error: Resource entry info_elite_installed is already defined.<br />
home/blaine/android/packages/apps/Superuser/res/values-zh-rTW/strings.xml:58: Originally defined here.<br />
home/blaine/android/packages/apps/Superuser/res/values/styles.xml:28: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock.Light.DarkActionBar'.<br />
home/blaine/android/packages/apps/Superuser/res/values/styles.xml:31: error: Error: No resource found that matches the given name: attr 'absForceOverflow'.<br />
home/blaine/android/packages/apps/Superuser/res/values/styles.xml:29: error: Error: No resource found that matches the given name: attr 'actionBarStyle'.<br />
home/blaine/android/packages/apps/Superuser/res/values-large/styles.xml:18: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock.Light.DarkActionBar'.<br />
home/blaine/android/packages/apps/Superuser/res/values-large/styles.xml:21: error: Error: No resource found that matches the given name: attr 'absForceOverflow'.<br />
home/blaine/android/packages/apps/Superuser/res/values-large/styles.xml:19: error: Error: No resource found that matches the given name: attr 'actionBarStyle'.<br />
home/blaine/android/packages/apps/Superuser/res/values-large/styles.xml:24: error: Error: No resource found that matches the given name: attr 'windowContentOverlay'.<br />
home/blaine/android/packages/apps/Superuser/res/values/styles.xml:36: error: Error: No resource found that matches the given name: attr 'actionBarStyle'.<br />
home/blaine/android/packages/apps/Superuser/res/values/styles.xml:40: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.Sherlock.Light.ActionBar.Solid.Inverse'.<br />
home/blaine/android/packages/apps/Superuser/res/values/styles.xml:41: error: Error: No resource found that matches the given name: attr 'background'.<br />
home/blaine/android/packages/apps/Superuser/res/values/styles.xml:43: error: Error: No resource found that matches the given name: attr 'backgroundSplit'.<br />
home/blaine/android/packages/apps/Superuser/res/values/styles.xml:45: error: Error: No resource found that matches the given name: attr 'displayOptions'.<br />
home/blaine/android/packages/apps/Superuser/res/values/styles.xml:52: error: Error: No resource found that matches the given name: attr 'displayOptions'.<br />
home/blaine/android/packages/apps/Superuser/res/values/styles.xml:50: error: Error: No resource found that matches the given name: attr 'icon'.<br />
home/blaine/android/packages/apps/Superuser/res/values/styles.xml:57: error: Error: No resource found that matches the given name: attr 'actionBarStyle'.<br />
home/blaine/android/packages/apps/Superuser/res/values-v11/styles.xml:31: error: Error: No resource found that matches the given name: attr 'actionBarStyle'.<br />
make: *** [out/target/common/obj/APPS/Superuser_intermediates/src/R.stamp] Error 1<br />
make: *** Waiting for unfinished jobs....<br />
<br />


----------



## Neutrino

JBirdVegas said:


> add these files to $TOP/build/target/product/security
> https://github.com/C...eruser.x509.pem
> https://github.com/C...y/superuser.pk8
> 
> if all goes well you should have a properly setup rooted aosp enviroment good luck guys


I am really new to this. Can someone help me understand how to add files such as these from github to my WORKING_DIRECTORY where I will be compiling the AOSP build.


----------



## yarly

Neutrino said:


> I am really new to this. Can someone help me understand how to add files such as these from github to my WORKING_DIRECTORY where I will be compiling the AOSP build.


1) download files

2) put them in WORKING_DIRECTORY/build/target/product/security

3) done


----------



## Neutrino

I have successfully compiled the code in the past. Lately, I have been stuck with a make Error 1 message. This continues to show up at the tail end of the process before my flash able images are created. For the life of me, I don't know where the code is faulting. Can someone help guide me through this?

Sent from my Nexus 4 using RootzWiki


----------



## JBirdVegas

Why would you take a blurry pic of your desktop instead of copying and pasting the exact text? Terminal commands input and output don't really fall in the close enough category. Kinda one of those exactly correct or completely wrong things.


----------



## Neutrino

I think I made some progress on the issue. I have been using my Mac to build the source in native OS X environment. I removed MacPorts and installed Homebrew instead. I searched on the net for similar issues others had come across. It appeared to be related to broken symbolic links between used/gsed. Here's a link to that info:

http://WWW.modaco.com/topic/343919-compiling-cm-on-os-x-lion

After switching to Homebrew, I had no problems building a stock ROM. I did run into a problem when I tried generating certificates for using Superuser. Every time I executed the command development/tools/make_security..., I would get an error message and the keys would not be generated. I wonder if this is related to problems with openssl.

I built a VM on my older Mac with Ubuntu 12.0.04. Everything works fine. I am curious how to resolve the problem on my newer Mac. That machine is running openssl 0.98r.

Sent from my Full AOSP on Toro-VZW using RootzWiki


----------

