Importing cm apps to intellij - Android Q&A, Help & Troubleshooting

Hi guys don't know if this is the right thread to post my issue
"I want to import apps of the cm source code to edit them in the intillij (Android Studio)"
After successfully compiling the cm source code i decided to edit some apps
but when i tried this command "make idegen && development/tools/idegen/idegen.sh" from the cm_wiki on how to import apps to intillij it fails
the followed instruction :
croot
make idegen && development/tools/idegen/idegen.sh
Open Intellij
Click Open an existing Project
Navigate to ~/android/system
Choose android.ipr
Finish
Note: Should you be developing multiple branches of CyanogenMod, consider an alternative naming scheme for the .ipr & ipl files. this should be done before #2 above.
Rename .ipr: mv android.ipr CM12.ipr
Link .ipl: mv android.ipl CM12.ipl && ln -s CM12.ipl android.ipl
here is my output :
Code:
[email protected]:~/android/system$ make idegen && development/tools/idegen/idegen.sh
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=6.0.1
CM_VERSION=
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.2.0-35-generic-x86_64-with-Ubuntu-15.10-wily
HOST_BUILD_TYPE=release
BUILD_ID=MHC19Q
OUT_DIR=/home/owner/android/system/out
============================================
"ebtables is disabled on this build"
find: `dummy': No such file or directory
find: `dummy': No such file or directory
find: `dummy': No such file or directory
find: `dummy': No such file or directory
find: `dummy': No such file or directory
find: `dummy': No such file or directory
find: `dummy': No such file or directory
build/core/tasks/kernel.mk:186: **********************************************************
build/core/tasks/kernel.mk:187: * Kernel source found, but no configuration was defined *
build/core/tasks/kernel.mk:188: * Please add the TARGET_KERNEL_CONFIG variable to your *
build/core/tasks/kernel.mk:189: * BoardConfig.mk file *
build/core/tasks/kernel.mk:190: **********************************************************
make: Nothing to be done for 'idegen'.
#### make completed successfully (01:49 (mm:ss)) ####
Couldn't find host out directory. Make sure ANDROID_HOST_OUT is in your environment.
i couldn't find android.ipr is the root of the tree
please guys need help for this issue what causes this and how to solve it and thank you in advance

Please guys need help ! Posted 5 days ago without any reply.

What seems to work for me
cd <root of CM>
source build/envsetup.sh
croot
export PATH=<java1.7+>/bin:${PATH}
make idegen
export ANDROID_HOST_OUT=out/host/
development/tools/idegen/idegen.sh

Related

Compiling ICS for Ace, stuck at GPS module

Hi folks,
during the last days, i tried to compile ICS for the Ace. Due to the fact that we still don't have the ICS hardware files for cooper, i tried to do it with the GB configuration files from koolja and EmoBoiix3 (which are almost identical) using armv5te as Architecture. Meanwhile i could fix some compilation errors but i'm stuck now at the GPS Module because rpc/rpc.h can't be found. Including the standard rpc.h doesn't seem to fix the problem. Here's the start of ouput after 'make otapackage'
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.1
TARGET_PRODUCT=cooper
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv5te
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ITL41D
============================================
No private recovery resources for TARGET_DEVICE cooper
target thumb C++: gps.cooper <= hardware/qcom/gps/loc_api/libloc_api/loc_eng.cpp
hardware/qcom/gps/loc_api/libloc_api/loc_eng.cpp:45:21: error: rpc/rpc.h: No such file or directory
In file included from out/target/product/cooper/obj/include/libloc_api-rpc/inc/loc_api_rpc_glue.h:44,
from hardware/qcom/gps/loc_api/libloc_api/loc_eng.cpp:46:
out/target/product/cooper/obj/include/libloc_api-rpc/inc/loc_api_common.h:42: error: 'bool_t' does not name a type
out/target/product/cooper/obj/include/libloc_api-rpc/inc/loc_api_common.h:54: error: 'u_quad_t' does not name a type
out/target/product/cooper/obj/include/libloc_api-rpc/inc/loc_api_common.h:58: error: 'rpc_uint64' does not name a type
out/target/product/cooper/obj/include/libloc_api-rpc/inc/loc_api_common.h:60: error: 'rpc_uint64' does not name a type
out/target/product/cooper/obj/include/libloc_api-rpc/inc/loc_api_common.h:90: error: 'rpc_loc_position_valid_mask_type' does not name a type
out/target/product/cooper/obj/include/libloc_api-rpc/inc/loc_api_common.h:93: error: 'rpc_uint64' does not name a type
out/target/product/cooper/obj/include/libloc_api-rpc/inc/loc_api_common.h:143: error: 'rpc_boolean' does not name a type
out/target/product/cooper/obj/include/libloc_api-rpc/inc/loc_api_common.h:144: error: 'rpc_boolean' does not name a type
out/target/product/cooper/obj/include/libloc_api-rpc/inc/loc_api_common.h:158: error: 'rpc_boolean' does not name a type
... and so on ....
Any ideas, how to fix this or where to get the correct includes ?
Greetz, lagloose
I gave up on the gps module and completely omitted it .
Sent from my GT-S5830 using XDA App
Deleted

Trying to Build CM10 full-eng

I've successfully built cm10 from source for maguro. (Everything works nicely except the Google Talk app which keeps crashing, but I'll try to find out why later).
I'm building on OS X 10.8 (Mountain Lion), which required some changes in make files.
When trying to brunch full-eng, though, I'm getting the following:
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.1.1
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=darwin
HOST_OS_EXTRA=Darwin-12.0.0-x86_64-i386-64bit
HOST_BUILD_TYPE=release
BUILD_ID=JRO03C
OUT_DIR=out
============================================
grep: build/target/board/generic/recovery.fstab: No such file or directory
find: `src': No such file or directory
build/core/tasks/kernel.mk:65: **********************************************************
build/core/tasks/kernel.mk:66: * Kernel source found, but no configuration was defined *
build/core/tasks/kernel.mk:67: * Please add the TARGET_KERNEL_CONFIG variable to your *
build/core/tasks/kernel.mk:68: * BoardConfig.mk file *
build/core/tasks/kernel.mk:69: **********************************************************
make: *** No rule to make target `bacon'. Stop.
I would appreciate an insight on that.
Also - I'm trying to find a guide on the forums that will allow me to learn how to port CM10 to unsupported devices.
Thank you.
Code:
. build/envsetup.sh
lunch full-eng
mka
^Works fine.
brunch won't work on full-eng, it's intended to be used for cm_* only
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums & Read the Forum Rules
Thanks ✟
Moving to Q&A
cdesai said:
brunch won't work on full-eng, it's intended to be used for cm_* only
Click to expand...
Click to collapse
Great. Thank you for the quick response.

[Q] Android compilation issues

As a little personal learning project, I'm having a go at trying to build ICS AOSP for my phone (Haier W718).
To start off I copied the moto/stingray device folder and modified all the files/folders to fit my phone to the best of my ability, mainly due to the fact that I don't have much experience in this field yet, and I'm doing my best to learn.
I added the device to the lunch menu, and lunch loads the variables correctly. However, upon running
Code:
make -j6
, the compiler process spits out the following:
Code:
==============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.4
TARGET_PRODUCT=full_w718
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IMM67L
==============================================
build/core/base_rules.mk:166 *** abi/cpp: MODULE.TARGET.SHARED_LIBRARIES.libgabi++ already defined by abi/cpp. Stop.
Now, I can successfully compile Android for full_eng IF my device folder is not present.
For reference sake, I've attached my device folder as a .zip, if you wouldn't mind looking through the files.
Bump. No one can help?
I would recommend going into your build directory and go to build/core/base_rules.mk and editing that file and removing an extra references to MODULE.TARGET.SHARED_LIBRARIES.libgabi++. The error is telling you that MODULE.TARGET.SHARED_LIBRARIES.libgabi++ already defined in the abi/cpp build directory.

TWRP compilation error(s)

I'm having having problems compiling twrp using omni twrp-9.0 minimal manifest
I've fixed all errors up to this one
Code:
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
TARGET_PRODUCT=full_oscar
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-52-generic-x86_64-Ubuntu-18.04.2-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PQ3A.190605.003
OUT_DIR=/home/server/code/out
============================================
ninja: no work to do.
ninja: no work to do.
No need to regenerate ninja file
$(file </home/server/code/out/.module_paths/Android.mk.list) was changed, regenerating...
[4/156] including bootable/recovery/Android.mk ...
cat: external/busybox/busybox-full.links: No such file or directory
[85/156] including frameworks/base/Android.mk ...
find: ‘../opt/telephony/src/java/android/telephony’: No such file or directory
find: ‘../opt/telephony/src/java/android/telephony/gsm’: No such file or directory
find: ‘../opt/net/voip/src/java/android/net/rtp’: No such file or directory
find: ‘../opt/net/voip/src/java/android/net/sip’: No such file or directory
find: ‘../opt/telephony/src/java/android/telephony’: No such file or directory
find: ‘../opt/telephony/src/java/android/telephony/gsm’: No such file or directory
find: ‘../opt/net/voip/src/java/android/net/rtp’: No such file or directory
find: ‘../opt/net/voip/src/java/android/net/sip’: No such file or directory
[137/156] including system/core/Android.mk ...
sed: can't read development/sdk/plat_tools_source.prop_template: No such file or directory
sed: can't read development/sdk/plat_tools_source.prop_template: No such file or directory
[147/156] including system/sepolicy/Android.mk ...
system/sepolicy/Android.mk:79: warning: BOARD_SEPOLICY_VERS not specified, assuming current platform version
[156/156] including vendor/omni/Android.mk ...
BOARD_KERNEL_IMAGE_NAME not defined.
build/make/core/base_rules.mk:412: warning: overriding commands for target `/home/server/code/out/target/product/oscar/root/res/images/charger/battery_fail.png'
build/make/core/base_rules.mk:412: warning: ignoring old commands for target `/home/server/code/out/target/product/oscar/root/res/images/charger/battery_fail.png'
build/make/core/base_rules.mk:412: warning: overriding commands for target `/home/server/code/out/target/product/oscar/root/res/images/charger/battery_scale.png'
build/make/core/base_rules.mk:412: warning: ignoring old commands for target `/home/server/code/out/target/product/oscar/root/res/images/charger/battery_scale.png'
build/make/core/Makefile:28: warning: overriding commands for target `/home/server/code/out/target/product/oscar/system/lib/libcamera_client.so'
build/make/core/base_rules.mk:412: warning: ignoring old commands for target `/home/server/code/out/target/product/oscar/system/lib/libcamera_client.so'
vendor/omni/build/tasks/kernel.mk:435: warning: overriding commands for target `/home/server/code/out/target/product/oscar/kernel'
build/make/core/Makefile:28: warning: ignoring old commands for target `/home/server/code/out/target/product/oscar/kernel'
ninja: error: 'system/core/toolbox/ls.c', needed by '/home/server/code/out/target/product/oscar/obj/EXECUTABLES/toolbox_recovery_intermediates/ls.o', missing and no known rule to make it
23:13:51 ninja failed with: exit status 1
#### failed to build some targets (01:22 (mm:ss)) ####
When I go to the "system/core/toolbox/" directory there is no ls.c, as per the error log, but when I add it to toolbox it throws up a bunch of errors, and when is replace the entire directory with another one I found online it does the same.
Can anyone help me?
Did you find out a solution?
mauro235 said:
Did you find out a solution?
Click to expand...
Click to collapse
Nah

[Android12] build error libartservice/Android.bp:36:1

Does anyone experienced the same issue with android 12 source and knows how to fix it? So please, let me know
Code:
build/make/core/soong_config.mk:193: warning: BOARD_PLAT_PUBLIC_SEPOLICY_DIR has
been deprecated. Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead..
build/make/core/soong_config.mk:194: warning: BOARD_PLAT_PRIVATE_SEPOLICY_DIR ha
s been deprecated. Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead..
============================================
PLATFORM_VERSION_CODENAME=S
PLATFORM_VERSION=S
TARGET_PRODUCT=aosp_arm64
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.8.0-43-generic-x86_64-Ubuntu-20.04.1-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=AOSP.MASTER
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=device/generic/goldfish device/generic/goldfish-opengl
hardware/google/camera hardware/google/camera/devices/EmulatedCamera
============================================
[100% 1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b
out/soong -n out -d out/soong/build.ninja.d -globFile out/soong/.bootstrap/build
-globs.ninja -o out/soong/build.ninja Android.bp
error: art/libartservice/Android.bp:36:1: module "artservice" variant "android_c
ommon": depends on //libcore:art.module.api.annotations.for.system.modules which
is not visible to this module
You may need to add "//art/libartservice" to its visibility
19:15:11 soong bootstrap failed with: exit status 1
#### failed to build some targets (16 seconds) ####
Flominator said:
Does anyone experienced the same issue with android 12 source and knows how to fix it? So please, let me know
Code:
build/make/core/soong_config.mk:193: warning: BOARD_PLAT_PUBLIC_SEPOLICY_DIR has
been deprecated. Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead..
build/make/core/soong_config.mk:194: warning: BOARD_PLAT_PRIVATE_SEPOLICY_DIR ha
s been deprecated. Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead..
============================================
PLATFORM_VERSION_CODENAME=S
PLATFORM_VERSION=S
TARGET_PRODUCT=aosp_arm64
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.8.0-43-generic-x86_64-Ubuntu-20.04.1-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=AOSP.MASTER
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=device/generic/goldfish device/generic/goldfish-opengl
hardware/google/camera hardware/google/camera/devices/EmulatedCamera
============================================
[100% 1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b
out/soong -n out -d out/soong/build.ninja.d -globFile out/soong/.bootstrap/build
-globs.ninja -o out/soong/build.ninja Android.bp
error: art/libartservice/Android.bp:36:1: module "artservice" variant "android_c
ommon": depends on //libcore:art.module.api.annotations.for.system.modules which
is not visible to this module
You may need to add "//art/libartservice" to its visibility
19:15:11 soong bootstrap failed with: exit status 1
#### failed to build some targets (16 seconds) ####
Click to expand...
Click to collapse
Commenting for visibility. I ran into the same problem.
Make this change and see what happens:
https://android-review.googlesource.com/c/platform/libcore/+/1596234/1/JavaLibrary.bp
Having the same issue here. I am sync'ed to android-s-preview-1. Trying to build sdk_phone_x86_64.
I tried jherwig's patch, and hitting newer issues near the end of the build:
******************************
You have tried to change the API from what has been previously approved.
To make these errors go away, you have two choices:
1. You can add '@hide' javadoc comments (and remove @SystemApi/@TestApi/etc)
to the new methods, etc. shown in the above diff.
2. You can update current.txt and/or removed.txt by executing the following command:
m legacy.art.module.platform.api.stubs.source-update-current-api
To submit the revised current.txt to the main Android repository,
you will need approval.
******************************
Click to expand...
Click to collapse
Did the suggested update to current.txt, hitting more errors:
Code:
libcore/ojluni/src/main/java/java/time/zone/IcuZoneRulesProvider.java:24: error: cannot find symbol
import android.icu.util.AnnualTimeZoneRule;
^
symbol: class AnnualTimeZoneRule
location: package android.icu.util
libcore/ojluni/src/main/java/java/time/zone/IcuZoneRulesProvider.java:25: error: cannot find symbol
import android.icu.util.BasicTimeZone;
^
symbol: class BasicTimeZone
location: package android.icu.util
[...]
This is my first time building Android, I have very little idea what I am doing... Any help appreciated!
I seem to have unblocked myself by applying the following patches to libcore:
73100c6f663e668ab2e5e64b7d771e876d1c67fa <-- jherwig's patch
c5bf3e517d498b151f5dc4ebfc5b56463f747021 <-- for those missing Java time packages
273504366eb453fde7f1e593e45a33af67ef4203 <-- fix ioctlInt signature as expected by libs in frameworks
Code:
$ cd libcore
libcore$ git diff 73100c6f663e668ab2e5e64b7d771e876d1c67fa\^ 73100c6f663e668ab2e5e64b7d771e876d1c67fa |patch -p1
libcore$ git diff c5bf3e517d498b151f5dc4ebfc5b56463f747021\^ c5bf3e517d498b151f5dc4ebfc5b56463f747021 |patch -p1
libcore$ git diff 273504366eb453fde7f1e593e45a33af67ef4203\^ 273504366eb453fde7f1e593e45a33af67ef4203 |patch -p1
I still hit the issue where I am asked to run:
Code:
m legacy.art.module.platform.api.stubs.source-update-current-api
But, the build eventually completed. On to testing it now.
I really thought building from a release tag would go flawless, wth!? Did I not sync the repo properly?
jherwig said:
Make this change and see what happens:
https://android-review.googlesource.com/c/platform/libcore/+/1596234/1/JavaLibrary.bp
Click to expand...
Click to collapse
Thanks jherwig
Just apply this patch to platform/libcore
diff --git a/JavaLibrary.bp b/JavaLibrary.bp
index 92bbc6692e..ff82248452 100644
--- a/JavaLibrary.bp
+++ b/JavaLibrary.bp
@@ -1019,6 +1019,9 @@ java_system_modules {
// avoid introducing compile time cycles.
java_library {
name: "art.module.api.annotations.for.system.modules",
+ visibility: [
+ "//art/libartservice",
+ ],
srcs: [
":api_surface_annotation_files",
],
mbucchia said:
I seem to have unblocked myself by applying the following patches to libcore:
73100c6f663e668ab2e5e64b7d771e876d1c67fa <-- jherwig's patch
c5bf3e517d498b151f5dc4ebfc5b56463f747021 <-- for those missing Java time packages
273504366eb453fde7f1e593e45a33af67ef4203 <-- fix ioctlInt signature as expected by libs in frameworks
Code:
$ cd libcore
libcore$ git diff 73100c6f663e668ab2e5e64b7d771e876d1c67fa\^ 73100c6f663e668ab2e5e64b7d771e876d1c67fa |patch -p1
libcore$ git diff c5bf3e517d498b151f5dc4ebfc5b56463f747021\^ c5bf3e517d498b151f5dc4ebfc5b56463f747021 |patch -p1
libcore$ git diff 273504366eb453fde7f1e593e45a33af67ef4203\^ 273504366eb453fde7f1e593e45a33af67ef4203 |patch -p1
I still hit the issue where I am asked to run:
Code:
m legacy.art.module.platform.api.stubs.source-update-current-api
But, the build eventually completed. On to testing it now.
I really thought building from a release tag would go flawless, wth!? Did I not sync the repo properly?
Click to expand...
Click to collapse
I saw the same exact problem building the aosp_trout_x86-userdebug build target, and those git commits fixed it. Thanks.

Categories

Resources