yashsingh1/xdaforums huggingface dataset:
[Android Software Development] :
I have a question.

I have never done this before, so I apologize if it a stupid question.

android.git from any repo contains only default.xml.

I assume that repo sync reads that file and pulls everything declared in there.

Question is: Can I fork that git and customize it, remove apps i dont want, add other stuff etc. And then repo init my own version of that git?

Will that work?
[Android Software Development] TheByteSmasher:
No.. the repo script pulls everything declared in your Platform_Manifest folder's default.xml with whatever overrides are in local_manifest folder. However... If you want to fork a git repository, and mess with it then sync it, all you really need to do (assuming you have a github account and you're referring to it when you talk about forking) is declare a new remote in your local manifest, and override the AOKP folders you want to.

If you're essentially talking about creating your own ROM, Kanged from AOKP, and Modded, then keeping your fork up to date with AOKP source plus all your mods,, Then yeah, your idea should work but remember, the default.xml is written to pull from github/AOKP, not github/YOURNAME/YOURAOKP.. Get it?

BUT WHY FORK when you can use the local manifest to remove what you don't want and add what you do want????
[Android Software Development] :
My bad, I was looking at the CM git

So for example if I fork platform_manifest(yes i meant using github) and I remove all of the unneeded lines, for example I don't need this

**<project path="device/motorola/maserati" name="AOKP/device_motorola_maserati" remote="aokp" revision="jb-mr1" />

And I don't need any other device

My device is shooteru, so I would just add this for example:

<project path="device/htc/shooteru" name="johnnyslt/android_device_htc_shooteru" />

Than I would do repo init on my fork of platform_manifest

repo init -u git://github.com/pedja1/platform_manifest.git

I hope its more clearer now what I mean.
[Android Software Development] TheByteSmasher:
Do me a favor, hit me up on google talk or gchat (check your pm) and we'll iron it out, then I"ll update the thread.. I don't wan't to confuse anyone with less experience. :)
[Android Software Development] spc_hicks09:
Yes I got the AOKP at the end, everything compiled without errors from what I could tell. When I try to flash I just get "installation aborted, bad" that's it. Coming from Elemental X by Nitro.

Before flashing I obviously wiped everything, flashed the build, nothing. Just says "installation aborted, bad"

Maybe I messed up the signature somehow? I'll run it through dsixda's kitchen and get it resigned, see if that helps. Broken signature is the only thing I can think of.
[Android Software Development] TheByteSmasher:
What Recovery are you using? What device are you trying to flash for? Also can you upload it to a dropbox and pm me a link? I can take a look at it
[Android Software Development] spc_hicks09:
Using CWM Recovery. Flashing on a CDMA Galaxy Nexus.

Link: http://goo.im/devs/spc_hicks09/Gnex/aokp_toro_unofficial_Apr-10-13.zip
[Android Software Development] TheByteSmasher:
Cool.. I'll take a look at it.. Have you tried resyncing your repo and building another? Also, have you cherry-picked anything? I'm asking because your zip looks a little small...
[Android Software Development] spc_hicks09:
Haven't tried resyncing yet and I haven't cherry picked anything. I noticed it's 155MB but I thought that was normal. I'll try resyncing again. Maybe it was just a bad upload or something?
[Android Software Development] TheByteSmasher:
It's possible.. Did you flash the uploaded one or the one in your out folder?
[Android Software Development] spc_hicks09:
Uploaded one
[Android Software Development] TheByteSmasher:
Are they the same size?
[Android Software Development] VonEsch:
Beautiful guide. Very detailed:beer:

---------- Post added at 10:31 PM ---------- Previous post was at 10:29 PM ----------

Do you have schedtool installed to sign the apk files at the end?
[Android Software Development] spc_hicks09:
I think you're on to something. Checked the file I have online at goo.im and it's 155.02MB but the file in my home folder is 162.4MB so it must have been a bad upload.
[Android Software Development] TheByteSmasher:
:) Keep me posted.
[Android Software Development] pkelly517:
Great guide. I've been using a thread on Rootz for a few months, and have been building AOKP nightly, via a cron.

I wanted to build AdAway into my ROM, so I followed the steps. I got the source to go where it needed, but it wouldn't compile due to a conflict with dnsmasq. That was fine, but I wanted to make sure it wasn't in my setup. So I tried a harmless build. I tried to build the Github mobile client. Again, the source downloaded where it belonged, the build completed, but there was no Github app in the output .zip.

The core.mk DOES have the correct name, case, etc under PRODUCT_PACKAGES.

The source code is in ~/aokp_jb/packages/apps/Github.

What simple, little thing am I missing?

Thanks
[Android Software Development] TheByteSmasher:
Could be in the .mk file in the GitHub folder, not building it. Let me get back to my pc and I'll take a look.
[Android Software Development] pkelly517:
That's likely it.

There a file (README.md) that tells me maven is used for building. So, as a rule, I'll need an Android.mk (or something like it) in order to make it build?
[Android Software Development] TheByteSmasher:
Yup... I have all the info you'll need, but it's on my pc at home. :(
[Android Software Development] pkelly517:
Thanks. No rush. I'm still in a 'proof of concept' phase.

But the info may be helpful to everyone.

As for AdAway, I'll probably make a separate build a few hours prior to the aokp build, and dump the .apk into the prebuilt directory. I've already learned stuff today. That makes it a good day.
[Android Software Development] TheByteSmasher:
Yeah, the prebuilt is handy for when you can't get something to build, or until you figure out how, assuming it's possible. Some require different toolchains that aokp doesn't provide. Do you know how to extract an APK from your device to put in the prebuilt folder?
[Android Software Development] pkelly517:
Oh yeah. I've been modifying gapps for at least a year, in order to get Wallet and onto my Gnex.
[Android Software Development] TheByteSmasher:
The * items are the ones you do they may not be present... (obviously don't add the * itself)

Android.mk in App folder (i.e. packages\apps\LockClock)

LOCAL_PATH := $(call my-dir)

*LOCAL_MODULE_TAGS := optional

include $(CLEAR_VARS)

LOCAL_STATIC_JAVA_LIBRARIES := android-common

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_PACKAGE_NAME := packagename

LOCAL_CERTIFICATE := platform

include $(BUILD_PACKAGE)

include $(call all-makefiles-under,$(LOCAL_PATH))

*Add to build/target/product/core.mk under PRODUCT_PACKAGES

LockClock \
[Android Software Development] arunmcops:
Getting Error (GT-P3110) galaxty tab 2

make: *** No rule to make target `device/samsung/omap4-common/bltsville/ticpu/lib/android/libbltsville_ticpu.', needed by `/home/arun/aokp/out/target/product/p3110/obj/lib/libbltsville_ticpu.'. Stop.

What changes will be needed in make file to solve it as all the files are present in the required folder?

Android.mk

LOCAL_PATH := $(call my-dir)

#Copying libbltsville_ticpu.BV_CPUVERSION.so
include $(CLEAR_VARS)
BV_CPUVERSION :=$(shell ls $(COMMON_PATH)/bltsville/ticpu/lib/android/libbltsville_*.*.so|\
sed 's/device\/samsung\/omap4-common\/bltsville\/ticpu\/lib\/android\/libbltsville_ticpu.//')
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_MODULE := libbltsville_ticpu.$(BV_CPUVERSION)
LOCAL_SRC_FILES := lib/android/libbltsville_ticpu.$(BV_CPUVERSION)
LOCAL_MODULE_PATH:= $(TARGET_OUT_VENDOR)/lib
include $(BUILD_PREBUILT)

#Creating SymLinks
#libbltsville_ticpu.so -> libbltsville_ticpu.BV_CPUVERSION.so
#libbltsville_cpu.so -> libbltsville_ticpu.so
SYMLINKS := $(TARGET_OUT_VENDOR)/lib/libbltsville_ticpu.so
$(SYMLINKS): TICPU_BINARY := ./libbltsville_ticpu.$(BV_CPUVERSION)
$(SYMLINKS): $(LOCAL_INSTALLED_MODULE) $(LOCAL_PATH)/Android.mk
@[URL="http://xdaforums.com/member.php?u=279333"]ECHO[/URL] "Symlink: $@ -> $(TICPU_BINARY)"
@[URL="http://xdaforums.com/member.php?u=4143519"]mkdir[/URL] -p $(dir $@)
@[URL="http://xdaforums.com/member.php?u=1516568"]rm -rf[/URL] $@
$(hide) ln -fs $(TICPU_BINARY) $@
@cp -afr $(COMMON_PATH)/bltsville/ticpu/lib/android/libbltsville_ticpu_license.txt $(TARGET_OUT_VENDOR)/lib
ALL_DEFAULT_INSTALLED_MODULES += $(SYMLINKS)

SYMLINKS1 := $(TARGET_OUT_VENDOR)/lib/libbltsville_cpu.so
$(SYMLINKS1): LINK_BINARY := ./libbltsville_ticpu.so
$(SYMLINKS1): $(LOCAL_INSTALLED_MODULE) $(LOCAL_PATH)/Android.mk
@[URL="http://xdaforums.com/member.php?u=279333"]ECHO[/URL] "Symlink: $@ -> $(LINK_BINARY)"
@[URL="http://xdaforums.com/member.php?u=4143519"]mkdir[/URL] -p $(dir $@)
@[URL="http://xdaforums.com/member.php?u=1516568"]rm -rf[/URL] $@
$(hide) ln -fs $(LINK_BINARY) $@
ALL_DEFAULT_INSTALLED_MODULES += $(SYMLINKS1)

# for mm
all_modules: $(SYMLINKS) $(SYMLINKS1)
[Android Software Development] arunmcops:
This error also

PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.2.2
TARGET_PRODUCT=aokp_p3110
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.5.0-17-generic-x86_64-with-LinuxMint-14-nadia
HOST_BUILD_TYPE=release
BUILD_ID=JDQ39
OUT_DIR=/home/arun/aokp/out
============================================
[COLOR=DarkRed]grep: /bltsville/gcbv/version.h: No such file or directory
ls: cannot access /bltsville/ticpu/lib/android/libbltsville_*.*.so: No such file or directory[/COLOR]
[Android Software Development] reinsn:
Thanks for the detailed guide. Contains a lot of infos missing in other instructions.
[Android Software Development] TheByteSmasher:
include $(BUILD_PREBUILT)?? have you tried include $(BUILD_PACKAGE) also add include $(call all-makefiles-under,$(LOCAL_PATH)) and you didn't seem to specify a local package name... What does this package do?
[Android Software Development] BlownFuze:
TBS, just wanted to post real quick to express my gratitude for this guide. This thread was a huge help for me getting AOKP built for my device. Thank you for sharing your knowledge here. :beer:
[Android Software Development] alteredlikeness:
Anyone else get a goofy framework-res.apk in the recent builds?

I can not decompile/re-compile mine with apktool - it gives me some strange warnings when installing the framework:

C:\Zed\Ed\progs\Apk_Manager_5.0.2\other>apktool if aokpframework-res.apk
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: drawable-nodpi-v8-ERR0
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: drawable-v8-ERR1
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: drawable-hdpi-v8-ERR2
I: Framework installed to: C:\Users\losers\apktool\framework\1.apk

C:\Zed\Ed\progs\Apk_Manager_5.0.2\other>apktool if aokpoldframework-res.apk
I: Framework installed to: C:\Users\losers\apktool\framework\1.apk

The aokpframework-res.apk is from my June 4 build, and the aokpoldframework-res.apk is from my May 31 build. And, yes, I am using the newest version of apktool (1.5.2). And if I do get it to recompile, it puts me in a bootloop

I only found this out when I was trying to disable the battery charging LED that comes on at 70%..

Also, thanks for the guide - didn't know this was here..

EDIT: Answered here: http://xdaforums.com/showpost.php?p=42275426&postcount=1827
[Android Software Development] iurnait:
This is an amazing guide.

So i compiled the rom and flashed it, but now im running into a rather odd problem with the touchscreen. the touchscreen doesnt respond to touches but the capacitative buttons do light up
[Android Software Development] TheByteSmasher:
Did you flash Gapps? What device? How did you put the ROM on the phone?
[Android Software Development] iurnait:
The Samsung galaxy player 5.

i flashed via adb sideload, and then flashed gapps.

the first time i only wiped both caches, but the same thing occured even after a full wipe
[Android Software Development] TheByteSmasher:
What's the code name for that device?
[Android Software Development] iurnait:
venturi

Device tree:

https://github.com/iurnait/android_device_samsung_venturi
[Android Software Development] TheByteSmasher:
Uh.... so you're trying to build AOKP for an unsupported device?
[Android Software Development] iurnait:
Yea
[Android Software Development] TheByteSmasher:
I applaud your effort, but... there's a little more to it than adding the device folder... ie vendor specific stuff... not sure where CM keeps it...
[Android Software Development] iurnait:
I've modified the vendor files and added most of the stuff necessary, I think. The build actually booted up and everything seemed to be working, except the touchscreen. But I think that the touches are still being recognized, because the capacitative lights light up when I touch the screen.
[Android Software Development] TheByteSmasher:
And the kernel?
[Android Software Development] iurnait:
https://github.com/iurnait/android_kernel_samsung_venturi
[Android Software Development] rob54321:
Thanks so much for a great tutorial, especially the cherry picking. Everything worked for me on a nexus7 and tf101.

Rob
[Android Software Development] TheByteSmasher:
Awesome! Spread the Building Love!
[Android Software Development] TheByteSmasher:
The Poll at the top is private so, be honest! :)
[Android Software Development] BlownFuze:
No need for privacy here. Lol

I voted yes, not because I'm lazy (lawwwl), but because I'm not sure exactly what I can safely script in my process.

So seeing what you suggest with examples might help me streamline things a bit.

Thanks again for your work here. :good:
[Android Software Development] Chromium:
Great guide. I was wondering how would i go about editing the rom source code. Do i just directly open up the java files and do what i want?

Im scared that if i maybe make a syntax error and then try to compile and the build breaks, that i wont be able to easily revert my changes.

Maybe a simple guide on how to properly go about editing the source?
[Android Software Development] TheByteSmasher:
That would be a programming lesson I think... But to alleviate your fears, if you screw up you can just do a git reset and checkout and that should revert your document, but basically, yes, editing the xml and Java files will affect the ROM.. If you're really nervous, you can copy out the file you want to modify, then if the build breaks just put the copy back in
[Android Software Development] Chromium:
Thanks, that all i needed :good:
[Android Software Development] LaserChicken:
I keep getting an error after "make clobber" about needing java 1.6. How do I put 1.6 on Ubuntu 13?
[Android Software Development] TheByteSmasher:
Did you follow this guide or another?
[Android Software Development] Chromium:
Ok well sure enough I've managed to break the build after making some changes. Would I do a git reset and checkout on the whole repo or just the files that I've made changes to?
[Android Software Development] TheByteSmasher:
You've got a couple of options... you can do that in the folders you changed stuff in, or, if you still can't figure out what did it... you can OPEN your AOKP folder, ensure you are NOT looking at hidden files (so the .repo folder doesn't get deleted too) and delete the contents. If the .repo folder is still intact, next sync, it'll repopulate your AOKP folder with "pure" files... it doesn't take as long as the initial sync since it's basically copying from local... I recommend the first way first...
[Android Software Development] Chromium:
Ok thanks,ill go with the first method, since im pretty sure what I know what i messed up.

Do I just cd to the folder and run "git reset" and then "git checkout". What if its just one particular file rather than a whole folder?
[Android Software Development] TheByteSmasher:
One file, you can generally either change back, delete it or just do the reset/checkout, like it says at the end of section 6: git reset --hard HEAD && git clean -f && git checkout aokp/jb-mr1. Yeah, just CD into it
[Android Software Development] Fouad1013:
Im getting this same problem, it says i have java version 1.6.0_27 and i need 1.6.0, how do i fix that, im also on Ubuntu 13.04 and i followed this guide.
[Android Software Development] TheByteSmasher:
Try this:

Remove all the Java related packages (Sun, Oracle, OpenJDK, IcedTea plugins, GIJ):

sudo apt-get update
apt-cache search java | awk '{print($1)}' | grep -E -e '^(ia32-)?(sun|oracle)-java' -e '^openjdk-' -e '^icedtea' -e '^(default|gcj)-j(re|dk)' -e '^gcj-(.*)-j(re|dk)' -e 'java-common' | xargs sudo apt-get -y remove
sudo apt-get -y autoremove

Purge config files:

dpkg -l | grep ^rc | awk '{print($2)}' | xargs sudo apt-get -y purge

Remove Java config and cache directory:

sudo bash -c 'ls -d /home/*/.java' | xargs sudo rm -rf

Remove manually installed JVMs:

sudo rm -rf /usr/lib/jvm/*

Remove Java entries, if there is still any, from the alternatives:

for g in ControlPanel java java_vm javaws jcontrol jexec keytool mozilla-javaplugin.so orbd pack200 policytool rmid rmiregistry servertool tnameserv unpack200 appletviewer apt extcheck HtmlConverter idlj jar jarsigner javac javadoc javah javap jconsole jdb jhat jinfo jmap jps jrunscript jsadebugd jstack jstat jstatd native2ascii rmic schemagen serialver wsgen wsimport xjc xulrunner-1.9-javaplugin.so; do sudo update-alternatives --remove-all $g; done

THEN install Java Again...

Use the codes under section 4 under the required section... the first 2 are sufficient... then reboot, try again and tell me if it works...
[Android Software Development] Chromium:
Ive got another question. Say the build breaks, so i decide to make some changes to fix it. After making the adjustments can I save myself some time by just rerunning the build, or should i do a make clobber and completely restart the build?

Thanks for you help.
[Android Software Development] TheByteSmasher:
Well, honestly, you can try without making clobber... but, likely you'll need too... Try it... if the build builds... you'll most likely be OK... for production releases though, it's always good to make clobber...
[Android Software Development] Fouad1013:
Im still getting the same thing
[Android Software Development] TheByteSmasher:
OK... where (what directory) are you making clobber? Have you already built successfully?
[Android Software Development] Fouad1013:
the main aokp_jb directory
[Android Software Development] TheByteSmasher:
Additionally, you can try to install java using these directions:

http://www.liberiangeek.net/2012/11/install-oracle-java-jrejdk-6-in-ubuntu-12-10-quantal-quetzal/

This should also work in 13.04
[Android Software Development] Fouad1013:
It worked, Thank you so much.
[Android Software Development] TheByteSmasher:
Great, I'll add it to the OP for others with issues.
[Android Software Development] Chromium:
Today after making some changes over the past week, i tried to do a repo sync to update my code. I got an error saying:

error: Your local changes to the following files would be overwritten by checkout:
all the files that i edited
Please, commit your changes or stash them before you can switch branches.
Aborting

Can i commit everything by running "git commit -a" from the root of my source? Or is there a better way to do this. I basically just want all my changes to stay, while updating my code. Thanks in advance.
[Android Software Development] TheByteSmasher:
Honestly, I'm not sure.. I've always done it on a per folder basis... if you do the git add and git commit in the root folder and you see all the changed you've made, that should work, but, if not go folder by folder... in this case though, it probably cited a specific folder or file. In other words, the only one it's looking to change
[Android Software Development] rob54321:
Hi,

Thanks again for the tutorial that works fully for all my android devices, is noob proof. I have been a software developer for my working career but am relatively new to Android. There is so much more I want to know but there is one critical thing:

I have built several roms AOKP, AOSP etc all done using your tutorial.

When I build a rom I repo sync and then build the latest rom.

How do I build a rom based on a previous version of AOKP? For example there is milestone-1, how could I build that? There is no milestone-1 branch or would it be a tag that I should checkout?

Thanks for a cool tutorial.

SOME SAY "MAKE LOVE NOT WAR"

I SAY "MAKE ROMS NOT LOVE"
[Android Software Development] TheByteSmasher:
Hmm... well, there is no real tag to check out. It's sort of arbitrary. The team decides... OK this is a good point to call it M1... no more commits will be merged until after we compile for all devices, test and release... So... I'm not sure, why would you want to do that anyway?
[Android Software Development] Chromium:
yep you were right. it cited two specific folders (packages/apps/settings and packages/apps/trebuchet.) So i went into those directories and ran "git add -A" and then "git commit -m 'message' ". I then ran repo sync and it completed however once it finished it said my commits had been discarded! This is the exact output:

Fetching projects: 100% (368/368), done.
Syncing work tree: 100% (368/368), done.

packages/apps/Settings/: discarding 1 commits
packages/apps/Trebuchet/: discarding 1 commits

I freaked out and checked the files and sure enoguh it removed all my changes. I thought that the point of repo sync was to update your code base while keeping your local changes. Or am i wrong? Anyways is there a way to get my changes back?
[Android Software Development] TheByteSmasher:
Why not git commit -a, also, Did you make copies first?
[Android Software Development] Chromium:
When i used git commit -a, i selected the files and pressed ctrl+O and then it asked for a commit message. I entered one, then pressed y to save, and finally ctrl+x to exit. But it gave an error saying: commit aborted you cant have an empty commit message. Even though in entered one. So i used git commit -m, which did the job immediatly without any hassle. Was that my mistake?

Yes copied the files out of the repo before doing this stuff. Should i just copy them back?

lol, im never running repo sync again :p
[Android Software Development] TheByteSmasher:
Yes, you'll sync again... I've never put a message and never gotten an error... maybe that was the problem... as for syncing... I'll P.M.you.
[Android Software Development] creeve4:
Any plans to add a section for building with the Linaro toolchain?
[Android Software Development] Chromium:
+1, Im interested in this too :)
[Android Software Development] spleef:
would be interested in that as well... this guide is spot on very detailed and the op is extremely helpful..thanks bud
[Android Software Development] k2wl:
i am trying to build aokp for i9082

i m using cm10.1 source

i am getting following error..

INSTALL drivers/char/broadcom/gist.ko
INSTALL drivers/char/broadcom/sigmorph.ko
INSTALL drivers/net/wireless/bcmdhd/dhd.ko
INSTALL drivers/scsi/scsi_wait_scan.ko
DEPMOD 3.0.31
Warning: you may need to install module-init-tools
See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt
make[1]: Leaving directory `/home/k2wl/aokp_jb/kernel/samsung/i9082'
mdpath=`find /home/k2wl/aokp_jb/out/target/product/i9082/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; ko=`find $mpath/kernel -type f -name *.ko`; for i in $ko; do /home/k2wl/aokp_jb/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-strip --strip-unneeded $i; mv $i /home/k2wl/aokp_jb/out/target/product/i9082/system/lib/modules/; done; fi
mdpath=`find /home/k2wl/aokp_jb/out/target/product/i9082/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; rm -rf $mpath; fi

Following is complete error

http://pastebin.com/Ngz2Ltui

PLZ somebody help me...