yashsingh1/xdaforums huggingface dataset:
[Android] desalesouche:
diff --git a/services/camera/libcameraservice/api1/CameraClient.cpp b/services/camera/libcameraservice/api1/CameraClient.cpp

index afaf12a..772c952 100644

--- a/services/camera/libcameraservice/api1/CameraClient.cpp

+++ b/services/camera/libcameraservice/api1/CameraClient.cpp

@@ -711,6 +711,7 @@ status_t CameraClient::sendCommand(int32_t cmd, int32_t arg1, int32_t arg2) {

enableMsgType(CAMERA_MSG_STATS_DATA);

} else if (cmd == CAMERA_CMD_HISTOGRAM_OFF) {

disableMsgType(CAMERA_MSG_STATS_DATA);

+#if 0

} else if (cmd == CAMERA_CMD_METADATA_ON) {

enableMsgType(CAMERA_MSG_META_DATA);

} else if (cmd == CAMERA_CMD_METADATA_OFF) {

@@ -718,6 +719,7 @@ status_t CameraClient::sendCommand(int32_t cmd, int32_t arg1, int32_t arg2) {

} else if ( cmd == CAMERA_CMD_LONGSHOT_ON ) {

mLongshotEnabled = true;

} else if ( cmd == CAMERA_CMD_LONGSHOT_OFF ) {

+#endif

mLongshotEnabled = false;

disableMsgType(CAMERA_MSG_SHUTTER);

disableMsgType(CAMERA_MSG_COMPRESSED_IMAGE);

--

you might need to move the #if 0 to fix the CAMERA_CMD_HISTOGRAM_OFF error
[Android] saintxseiya:
Hi,

first off all awesome introduction to building my own rom.

I am stuck on some points, maybe someone could help me out?

i wrote my own local_manifests.xml and synced the Repo again.

trying to execute the get-prebuilts does not work, as it is not available in the vendor/cm folder?

and also compiling fails mostly with different faults, so that i have to rerun brunch :(:(:(
[Android] desalesouche:
cm12 does not have prebuilts apk any more
[Android] saintxseiya:
Thanks!

Then this would be my last error:

make: *** No rule to make target `/root/cm12/out/target/product/klte/obj/lib/libtime_genoff.so', needed by `/root/cm12/out/target/product/klte/obj/SHARED_LIBRARIES/libandroid_servers_intermediates/LINKED/libandroid_servers.so'. Stop.

make: *** Waiting for unfinished jobs....

checked vendor, kernel and device folder, everything is in place.

Any idea on that? :)
[Android] desalesouche:
give me copy on pastebin of your boardconfig.mk there must be a line related to that error
[Android] tobitege:
ccache -c

make clobber

are the commands I had used to "fix" the same error
[Android] saintxseiya:
[MENTION=4479868]desalesouche[/MENTION]

Hmmm cannot find the file ? Where should it be located?

[MENTION=4877142]tobitege[/MENTION]

tried it, but did not wolrk out :(
[Android] genesixxbf3:
remove your framework file then repo (i had it last day that what i did and then it worked well )
[Android] saintxseiya:
[MENTION=5776465]genesixxbf3[/MENTION]

do you meand the whole frameworks folder?
[Android] fritzcola:
Thanks but i dont understand what to do? Or can anyone else do it for me, if yes what files do you need?
[Android] genesixxbf3:
yep and resync
[Android] saintxseiya:
same fault :(
[Android] desalesouche:
if you observe the diff file i sent you, you can see that that line lead to the file where you have to do change:diff

diff --git a/services/camera/libcameraservice/api1/CameraClient.cpp b/services/camera/libcameraservice/api1/CameraClient.cpp

the line beginning with a + show you what is added to the file and where.

i added two patch that fix the problem,

open them, observe them and you will understand what to do

note:

that patch(0001-Camera-fixes-for-u8800pro.patch) must be copied in frameworks/av

that patch(0004-Fix-for-METADATA-errors.patch) must be copied in frameworks/base

how to apply patch

Just run script copy to dir and

ex: patch -p1 -N -i 0001-Camera-fixes-for-u8800pro.patch

if patch doesn't apply well you will have to manually fix

i upload you a framework/av patched file so you can see what i did for it according error you have.
[Android] desalesouche:
it seems that is the fix?

http://xdaforums.com/showpost.php?p=50434710&postcount=3

check if it works for you?
[Android] saintxseiya:
[MENTION=4479868]desalesouche[/MENTION]

you are the man! :) With all the new stuff i learned, just missed, that my local manifest was trying to sync kk sources instead of L :D

Seems to work for now :)

We will see
[Android] aoleary:
What was the error you got when setting "USE_CUSTOM_AUDIO_POLICY" in "BoardConfig.mk" to "0" ??

That seems to be the only solution I could find also..
[Android] DiamondJohn:
It simply appears to step over the error, and move onto the next missing (or not included) component.Hopefully this would trigger someting, but I would guess that MotoDoze is Motorola specific. Even if you have some idea of where to look? I have a working LOS14.1 and a crDroid that builds, but is buggy when running

ninja: error: '/home/ubuntu/android/DirtyUnicorns/out/target/common/obj/JAVA_LIBRARIES/org.cyanogenmod.platform.internal_intermediates/classes.jack', needed by '/home/ubuntu/android/DirtyUnicorns/out/target/common/obj/APPS/MotoDoze_intermediates/with-local/classes.dex', missing and no known rule to make it

The full log of both failures, and the commands I basically run (except an extra envsetup not being logged): https://www.hastebin.com/avedudebuy.rb

I also have the starting part of the working hammerhead build at: https://www.hastebin.com/uvuzojuwax.rb

---------- Post added at 05:05 PM ---------- Previous post was at 04:43 PM ----------

Not what I want to do, but I thought I would just test if I exclude MotoDoze from the build (didnt want to start a never ending list of excluding) and it started to build, but failed at 4%: https://www.hastebin.com/eduxajasaj.erl

Which looks like it failed on the"blur" feature you mentioned earlier.:p now to find exactly where I turn this off.

device/motorola/qcom-common/overlay-cm/frameworks/base/core/res/res/values/config.xml:52: error: Resource at config_deviceHardwareWakeKeys appears in overlay but not in the base package; use <add-resource> to add.
device/motorola/qcom-common/overlay-cm/frameworks/base/core/res/res/values/config.xml:57: error: Resource at config_forceAnalogDeskDock appears in overlay but not in the base package; use <add-resource> to add.
device/motorola/qcom-common/overlay-cm/frameworks/base/core/res/res/values/config.xml:58: error: Resource at config_forceAnalogCarDock appears in overlay but not in the base package; use <add-resource> to add.
device/motorola/qcom-common/overlay-cm/frameworks/base/core/res/res/values/config.xml:62: error: Resource at config_uiBlurEnabled appears in overlay but not in the base package; use <add-resource> to add.

---------------edit------------

found the config file referencing the above 3 items. Setting value to zero didn't help, but commenting out the config line in config.xml did the trick and its off again. now at 11% and counting:good:
[Android] Techie Android:
Nope. The problem was memory as it says in my log. Any clue on how I would add -Xmx6G to the building process? Or maybe increase the Garbage Collection overhead limit?
[Android] spookcity138:
https://xdaforums.com/showthread.php?p=70106713

Run step 2 before you build or add it to your bashrc/zshrc to make it permanent.
[Android] Techie Android:
Thank you kindly sir. It looks like this time it'll work. What is the benefit of adding it to my bashrc? What part and where would I add it in there?

---------- Post added at 06:51 PM ---------- Previous post was at 06:44 PM ----------

@spookycity138

Nope it failed. But this one's a little different.

Note: Recompile with -Xlint:unchecked for details.

Building with Jack: out/target/common/obj/JAVA_LIBRARIES/android-support-v13-ics-mr1_intermediates/classes.jack

touch out/target/common/obj/JAVA_LIBRARIES/org.apache.http.legacy_intermediates/classes.dex.toc

Building with Jack: out/target/common/obj/JAVA_LIBRARIES/android-opt-bitmap_intermediates/classes.jack

# In case value of PACKAGES is empty.

Building with Jack: out/target/common/obj/JAVA_LIBRARIES/owasp-html-sanitizer_intermediates/classes.jack

Out of memory error (version 1.2-rc4 'Carnac' (298900 f95d7bdecfceb327f9d201a1348397ed8a843843 by android-jack-team@google.com)).

GC overhead limit exceeded.

Try increasing heap size with java option '-Xmx<size>'.

Warning: This may have produced partial or corrupted output.

build/core/java.mk:730: recipe for target 'out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex' failed

make: *** [out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex] Error 41

make: *** Waiting for unfinished jobs....

Build failed!

Total time elapsed: 9 minutes (562.512612866 seconds)

---------- Post added at 06:54 PM ---------- Previous post was at 06:51 PM ----------

I added this extra line:

tmpfs /tmp tmpfs nodev,nosuid,size=8G 0 0

to my fstab file.

And ran this in my build directory. Still failed.

1 export USE_NINJA=false

2 export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx6G"

3 ./prebuilts/sdk/tools/jack-admin start-server

4 ./rom-build bacon

---------- Post added at 06:55 PM ---------- Previous post was at 06:54 PM ----------

I have 8GB of RAM and a 10GB Swap file.

---------- Post added at 07:04 PM ---------- Previous post was at 06:55 PM ----------

I disabled the GC overhead limit. Let's see what happens...
[Android] spookcity138:
Weird, I only have 4GB of RAM and 4 swap. Those commands work for me. I'll occasionally get the out of memory error (very rarely) but its always been solved by stopping and restarting jack. I don't know why you're having these issues with double the RAM I have. I certainly wish you luck!
[Android] Techie Android:
Aw man. Not want I was hoping to hear... Maybe I'll be able to fix it though.

---------- Post added at 07:12 PM ---------- Previous post was at 07:10 PM ----------

Currently it's hardly using any RAM. I wonder if it'll work without GC heap limit.

I stand corrected. Jack started compiling and I'm at 3.6GB
[Android] spookcity138:
Maybe if that doesn't work try with just 4GB,although you should be able to use 6 I'd think with 8GB of physical RAM.

export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4096m"

Also,the benefit of adding that to your bashrc (once you get it all sorted) would be that you won't need to do it manually before you build...And you can just add it at the bottom of your bashrc.
[Android] Techie Android:
Ah okay.

Well this looks familiar, as if adding -XX:-UseGCOverheadLimit did nothing...

Install: out/host/linux-x86/bin/mkbootfs

Install: out/host/linux-x86/framework/dumpkey.jar

Building with Jack: out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex

Copying: out/target/common/obj/JAVA_LIBRARIES/icu4j_intermediates/classes.jar

Copying: out/target/common/obj/JAVA_LIBRARIES/ims-common_intermediates/classes.jar

Copying: out/target/common/obj/JAVA_LIBRARIES/telephony-ext_intermediates/classes.jar

18 warnings generated.

Copying: out/target/common/obj/JAVA_LIBRARIES/voip-common_intermediates/classes.jar

Building with Jack: out/target/common/obj/JAVA_LIBRARIES/android-support-v13-mnc_intermediates/classes.jack

Building with Jack: out/target/common/obj/JAVA_LIBRARIES/cr_intermediates/classes.jack

GEN /home/austin/aospa/out/target/product/bacon/obj/KERNEL_OBJ/Makefile

#

# configuration written to .config

#

make[1]: Leaving directory '/home/austin/aospa/kernel/oneplus/msm8974'

make[1]: Entering directory '/home/austin/aospa/kernel/oneplus/msm8974'

CHK include/linux/version.h

make[1]: Leaving directory '/home/austin/aospa/kernel/oneplus/msm8974'

Building with Jack: out/target/common/obj/JAVA_LIBRARIES/inputmethod-common_intermediates/classes.jack

Building with Jack: out/target/common/obj/JAVA_LIBRARIES/latinime-common_intermediates/classes.jack

Out of memory error (version 1.2-rc4 'Carnac' (298900 f95d7bdecfceb327f9d201a1348397ed8a843843 by android-jack-team@google.com)).

GC overhead limit exceeded.

Try increasing heap size with java option '-Xmx<size>'.

Warning: This may have produced partial or corrupted output.

build/core/java.mk:730: recipe for target 'out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex' failed

make: *** [out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex] Error 41

make: *** Waiting for unfinished jobs....

Build failed!

Total time elapsed: 14 minutes (865.741553802 seconds)

---------- Post added at 07:23 PM ---------- Previous post was at 07:22 PM ----------

http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html#par_gc.oom

---------- Post added at 07:26 PM ---------- Previous post was at 07:23 PM ----------

-Xmx4096m Isn't it case sensitive? -Xmx4096M would be right, right?
[Android] spookcity138:
Well,if using 4Gb doesn't work the only other thing I can think of is to change the ”jack.server.max-service=4" in your jack config file to "jack.server.max-service=2" I can't recall if I needed to do this as well or not.

Edit:

I use the exact command I posted. I just know it works for me fine.
[Android] Techie Android:
Oh okay.

---------- Post added at 07:34 PM ---------- Previous post was at 07:29 PM ----------

Let me try it with these modifications...

---------- Post added at 07:40 PM ---------- Previous post was at 07:34 PM ----------

BTW. I forgot to tell you, ./prebuilts/sdk/tools/jack-admin start-server has not worked for me, however ./prebuilts/sdk/tools/jack-admin kill-server does so what I've been doing is after it fails I'll kill it and try again. I figure it probably didn't matter because it would start during the build anyways.

---------- Post added at 07:41 PM ---------- Previous post was at 07:40 PM ----------

It just says "Jack server failed to (re)start, try 'jack-diagnose' or see Jack server log" when I try to start it
[Android] spookcity138:
Hmm,interesting. It sounds like you may have some other jack related issues. Gonna have to hope someone else csm help with that if so. I've always found jack to be somewhat of a pain if you experience issues with it.
[Android] Techie Android:
Plus it's depreciated now: https://source.android.com/source/jack. :/

---------- Post added at 08:07 PM ---------- Previous post was at 08:06 PM ----------

And that stuff I tried last didn't work...
[Android] linusdan:
I'll try it today.

While to the code, there were changes only to the insertion of the device in the path 'device / pa' and insertion of the missing scripts (kernel, hardware, dependencies).

Thank you!
[Android] DiamondJohn:
EDIT: I think I worked it out. In Lineage there is a folder system/sepolicy which contains a mention of the missing reference, which is not present in the DIrtyUnicorns path.

I am building DirtyUnicorns for a non-official; device.

I am getting the following error (1st of many....)

"rmt_storage.te:2:ERROR 'attribute rmt_placeholder is not declared' at token ';' on line 39362:"

When I look in this file, the first line contains a reference to rmt_placeholder. When I look at these "te" files, the ones that succeed normally have their items defined in the "contexts" files in the same directory. There are no other references to "rmt_placeholder" :(

More details at https://www.hastebin.com/gusapecudi.vbs

I did further searching on the web, and found the following commit by some random guy which looks to me as if he simply deleted the file: https://github.com/ShadySquirrel/an...mmit/b1a66f3bbfa0a6d39612dcd2cc394ec94b152ea4 NB: just deleting this file lets it build a little further on until it hits another te file with a problem, then another, then ...

What makes this all more confusing is that I build two other ROMs based on this same device tree and they therefore contain "rmt_storage.te", but they do not fail to build :confused:

Late last night I got commando on the file and deleted it, and the build went on; but not much further as it had a similar error on another te file. Why is DU failing while LineageOS succeeds?
[Android] DiamondJohn:
So now I hit another roadblock at 82% :mad:

https://www.hastebin.com/ijuraxiwun.cs

So its complaining that "hardware/qcom/display/msm8960/libgralloc/ionalloc.cpp:76:18: error: no member named 'heap_id_mask' in 'ion_allocation_data'; did you mean 'heap_mask'?"

It appears to have copied the files from hardware/qcom/msm8960/original-kernel-headers/ yet the correct files appear to be at hardware/qcom/msm8960/kernel-headers/ So to keep it moving long, I copied the files from "kernel-headers" into "original-kernel-headers", but I don't see why its choosing the incorrect directory? any ideas where I should look to fix this properly?

Once I do the above fudge, i then get a similar error on "device/motorola/qcom-common/power/power.c:189:10: error: use of undeclared identifier 'POWER_HINT_CPU_BOOST'"

https://www.hastebin.com/binonepave.js

I also "fundged" this by copying across the power.h from the lineage directory (which had the definition of these constants) was that the correct thing to do?:confused:

Now, I am on something I dont know how to correct (even fudge) :crying:

"hardware/qcom/display/msm8960/libcopybit/copybit_c2d.cpp:1390:40: error: non-constant-expression cannot be narrowed from type 'uint32_t' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing]
struct copybit_rect_t dr = { 0, 0, dst->w, dst->h };
^~~~~~

wider log at https://www.hastebin.com/dabisuneri.cs

Anyone have an idea?
[Android] Techie Android:
YES! I fixed it!

using prebuilt boot.img from IMAGES...

boot size (12294144) is 73.28% of limit (16777216)

(' running: ', 'java -Xmx2048m -Djava.library.path=out/host/linux-x86/lib64 -jar out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp/tmp_JmlaX out/target/product/bacon/pa_bacon-7.2.2-DEV-20170815.zip')

done.

Package Complete: out/target/product/bacon/pa_bacon-7.2.2-DEV-20170815.zip

Total time elapsed: 35 minutes (2159.948367524 seconds)

I got to thinking about that error with the GC and thought about my java version, sure enough "java -version" said I had openjdk-9 so I purged everything and then installed the latest default jre and jdk which was version 8. tried running the build without any modifications and it failed. After I tried again with the modifications it worked!
[Android] spookcity138:
Hah,its always the simplest of things it seems. Congrats on the build!
[Android] quake73:
Easiest solution to these warnings that break the build is to tell the compiler to ignore them. In your case, add -Wno-c++11-narrowing to local_cppflags in the android.mk file. Or, remove -Werror if there is one.
[Android] desalesouche:
Hi, i think you simply need that commit. i found solution in 2 minutes googling: " struct copybit_rect_t dr = { 0, 0, dst->w, dst->h };"

https://github.com/LineageOS/androi...mmit/2290eb44470d74d5e23dd83ca381611858a0d264

hope this will help you.

edit; i think you have to update some files in kernel side to fix all your display error.

https://github.com/LineageOS/androi...58/drivers/media/platform/msm/vidc/msm_smem.c

you should investigate your drivers/media/platform/msm/vidc history and do missing commits. the first thing you need to work on is the kernel.

it needs regular update.

that commit should fix your problem with ion and heapmask:

https://github.com/LineageOS/androi...mmit/41caebbf89fe1219cfd5368cdab6f99a9dde4e58
[Android] DiamondJohn:
Its good to know how to let it go full steam ahead and find out how many other issues await me.

I have been using LineageOS as my source from which to update from. I actually ended up finding and correcting the include from lineage source. I have all the source locally and build for the same device (working build and kernel used for other builds as well; its an official LOS14.1 buildl). However, I hit another snag that is harder to resolve, so I am walking away for a while and coming back to it later. Thanks.
[Android] hyperterminal:
:confused:
[Android] desalesouche:
here is the way i was doing: and it was working....

don't know nowadays... :confused:

. build/envsetup.sh

export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4g"

./prebuilts/sdk/tools/jack-admin kill-server

./prebuilts/sdk/tools/jack-admin start-server

export WITH_SU=true <- this is to get rooted rom

brunch cherry
[Android] spookcity138:
Yeah,that's pretty much exactly what I do. I just don't use ninja either as it consumes a bit more RAM and when you only have 4GB you need to do all you can to conserve it. I just use a zsh alias to do all the work as opposed to needing to type all that. You could also create a script.
[Android] Louis1977:
help please..

ninja: error: '/home/mint/Cosmic-OS/out/target/common/obj/JAVA_LIBRARIES/org.cyanogenmod.platform.internal_intermediates/classes.jack', needed by '/home/mint/Cosmic-OS/out/target/common/obj/APPS/CMActions_intermediates/with-local/classes.dex', missing and no known rule to make it

make: *** [build/core/ninja.mk:152: ninja_wrapper] Error 1

make: Leaving directory '/home/mint/Cosmic-OS'
[Android] rajit:
cant able to start jack-server. tried with xx2g/4g and alll the fix avaibalr. building nougat. help me

5mbps net speed

i5 intel

8gb ram

2tb hd
[Android] xenreon:
The ROM you're compiling doesn't have cmsdk which cmactions asks for so either remove cmactions or try to manually add in stuff that's needed into the tree, kinda like this commit

Elaborate with details?
[Android] Arjun KalyanRam:
Hey I am noobie in building ROMs and I planed to build so my question my phone moto x (ghost) does not have 7.1 source codes and kernal at lineage or at cynogenmod ..the only place I have is Xperiance 11.1 so can I build a ROM based on Xperiance 11.1 ?? Sry if it was dumb !!

And I have a macbook air late 2015

Core i5 5th gen

4gb ram

And the damn thing is only 128 GB of ssd so can I build this in external drives ?? Will it cause any problem !!
[Android] xenreon:
If the xperience device specific sources are available then you should be able to modify them and build other aosp based roms fine.

The hardware though is a different story, 4gb RAM is really weak for building nougat (reading this thread will tell you that) and an ssd isn't recommended as it'll eventually die thanks to a relatively short lifespan, and external drives will be a bigger hindrance.
[Android] Arjun KalyanRam:
The source codes are too large in size so downloading as zip file and then extracting it will it make any problem ?
[Android] xenreon:
No it shouldn't be a problem if compression/extraction process goes correctly, you might wanna check skadoosh for that purpose.

What however will be a problem is your hardware, in the least swapping out the ssd for a mechanical drive would be needed.
[Android] Arjun KalyanRam:
Nope I planed to do the build in my other lap

With Sony E series

i7 3612qm

8gb

750 GB sata not aware of the rpm

radeon 7500/7600
[Android] rajit:
try this

export USE_NINJA=false
[Android] DiamondJohn:
I have two VBox environments on Win7 64b on which I build. One of them is sitting on an external USB2 (ie slow) portable drive. I haven't had any noticeable problems; apart from speed. It originally took 70 minutes to build N (after the very first build had built the ccache). My other VBox PC on internal drives takes 35min to build MM. However, I have 24GB memory and an overclocked, hyperthreaded quad core CPU.
[Android] aoleary:
How to find Quick Unlock commit

Hi.

I have gotten Dirty Unicorns running successfully on my D855, but would like to add some features that it are missing.

I would like to add the Quick Unlock option, where once one has typed in the correct PIN, it automatically unlocks the device, without having to click the OK button..

I know the security risks etc, but if I would like to add this feature.

AOSP-Extended has implemented the Quick Unlock feature, but how do I find the relevant code that pertains just to Quick Unlock and only import that code?

Here are the relevant files (I think):

https://github.com/AospExtended/pla...rc/com/android/settings/SecuritySettings.java

https://github.com/AospExtended/pla...a5fc399595d009c910c/res/values/ex_strings.xml

TIA
[Android] dev.kasibhatla:
Please help

I built the rom and it flashed successfully but wouldn't run. I got a log of /proc/kmsg. Including a pastebin link with this message. Please view and suggest corrections to make my rom functional. The booting process doesn't start. Please help

Thanks

Pastebin link