[Q] libpcap static linking errors - Android Q&A, Help & Troubleshooting
Hello,
I have downloaded the libpcap in external folder from android source code using the Git and
repo. I used the toolcains of ndk (android-ndk-r5b) to compile the library following these
steps:
./configure --prefix=path-to-android-src/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
make clean
make
make install
and then a file libpcap.a is produced.
I have make a simple sniffer using libpcap (sniffer.c). When I try to compile it, these errors occur:
agcc sniffer.c libpcap.a
sniffer.c:9:18: error: pcap.h: No such file or directory
sniffer.c:19: warning: 'struct pcap_pkthdr' declared inside parameter list
sniffer.c:19: warning: its scope is only this definition or declaration, which is probably not what you want
sniffer.c: In function 'processPacket':
sniffer.c:23: warning: incompatible implicit declaration of built-in function 'printf'
sniffer.c:24: error: dereferencing pointer to incomplete type
sniffer.c:26: error: dereferencing pointer to incomplete type
sniffer.c:33: error: dereferencing pointer to incomplete type
sniffer.c: In function 'main':
sniffer.c:45: error: 'pcap_t' undeclared (first use in this function)
sniffer.c:45: error: (Each undeclared identifier is reported only once
sniffer.c:45: error: for each function it appears in.)
sniffer.c:45: error: 'descr' undeclared (first use in this function)
sniffer.c:46: error: 'PCAP_ERRBUF_SIZE' undeclared (first use in this function)
sniffer.c:62: warning: incompatible implicit declaration of built-in function 'printf'
sniffer.c:66: warning: incompatible implicit declaration of built-in function 'fprintf'
sniffer.c:66: error: 'stderr' undeclared (first use in this function)
sniffer.c:72: warning: incompatible implicit declaration of built-in function 'fprintf'
when I try to produce the object code in advance:
agcc -c sniffer.o sniffer.c
the same errors occured.
Can someone explain me how to solve this problem?
here is the alias of agcc I use in bashrc file:
./configure --prefix=/home/petsas/projects/mobile-attacks/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/
Also, I have attached a file with the outputs of the commands above: configure, make and make install.
Thank you in advance!
I used the options -I and -L to specify the include and library files, and these errors are gone now..
Here is my new error log:
agcc --static -I /home/petsas/projects/mobile-attacks/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/include -L /home/petsas/projects/mobile-attacks/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/lib -o sniffer sniffer.c libpcap.a
/home/petsas/projects/mobile-attacks/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: libpcap.a(pcap-linux.o): Relocations in generic ELF (EM: 3)
/home/petsas/projects/mobile-attacks/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: libpcap.a(pcap-linux.o): Relocations in generic ELF (EM: 3)
/home/petsas/projects/mobile-attacks/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: libpcap.a(pcap-linux.o): Relocations in generic ELF (EM: 3)
libpcap.a: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
any ideas?
I'm not 100% sure, but if you want to build native library for android you shouldn't use ./configure script. You should create Android.mk file and build library using it. Android.mk file is a native build environment for Android.
Refer to android-ndk\docs\ANDROID-MK.html for more information.
Yeah!
Thank you Zuljin!!!
I put the libpcap direcotry into the android-ndk-r5b/samples, I modified a bit the Android.mdk
and the structure of the direcotry, so as to look like the other ones inside the samples dir and
I used the ndk-build command inside the android-ndk-r5b direcory:
ndk-build -C samples/android-ndk-r5b
All worked fine! I was able to produce a libpicap.so file, and put it in the phone using the
commands:
in android:
# su
# mount -o,rw remount /dev/block/mtdblock4 /system/lib
in my Desktop:
$ adb push libpcap.so /system/lib/
I made a simple sniffer, I compiled and linked with the libpcap.so and works perfectly in
my HTC Hero!
Hi,
I have also trying to build this libpcap on Android.
I have downloaded the source from platform_external_libpcap and put all these files under jni directory for a android-ndk project (default) and tried building using ndk-build script.
But nothing happens but the control returns plainly without compiling the .so or .a file.
Can you tell me how you organized the folders in ndk project.?
regards,
Vijayan
Hello Vijayan,
You have to make a directory i.e. libpcap and then inside this directory,
you've got to create another one named as jni and put there all the source
files, as you have done. Then, inside this directory (jni) create a file named as
Android.mk so that it contains the follow lines:
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:=\
/bpf_dump.c\
/bpf/net/bpf_filter.c\
/bpf_image.c\
/etherent.c\
/fad-gifc.c\
/gencode.c\
/grammar.c\
/inet.c\
/nametoaddr.c\
/optimize.c\
/pcap.c\
/pcap-linux.c\
/savefile.c\
/scanner.c\
/version.c
LOCAL_CFLAGS:=-O2 -g
LOCAL_CFLAGS+=-DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -Dlinux -D__GLIBC__ -D_GNU_SOURCE
LOCAL_MODULE:= pcap
LOCAL_MODULE_FILENAME:= libpcap
LOCAL_LDLIBS := \
-ldl
include $(BUILD_SHARED_LIBRARY)
Then, you only have to type this command:
ndk-build -C <path-to-jni-direcotry>
That's all! Now, inside the libpcap directory, and in the path:
libpcap/libs/armeabi/ should have been created the file you want:
libpcap.so
Let me know if you have any problems,
Thanasis
Hi,
Thanks. Now I'm able to compile the libpcap.so.
using this .so I have compiled the jpcap-0.7 (C source fiiles) to generate libjpcap.so.
Then I have created my Sniffer Application on Android. I have added the jpcap.jar, jpcap.so and libpcap.so in the lib folder of my Application.
But when I call this line
NetworkInterface[] devices = JpcapCaptor.getDeviceList();
am getting the following runtime error:
FATAL EXCEPTION: main
java.lang.UnsatisfiedLinkError: getDeviceList
at jpcap.JpcapCaptor.getDeviceList(Native Method)
at com.example.snifferapp.SnifferApp.onCreate(SnifferApp.java:26)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Click to expand...
Click to collapse
Can you tellme What is going wrong here ?
Thanks.
Vijay
Yes, I had the same problem with you when I tried to make a sniffing application
using another one known java wrapper of libpcap: the jNetPcap, and particularly
I couldn't get the devices through this call: Pcap.findAllDevs(alldevs, errbuf);
That's because, even if you have root privileges on the console of the phone, as
you have a rooted phone, you cannot raun an application as root. That's not possible.
You can do that, only if your application is signed with the key of the platform, that is
of the Android OS that runs inside your phone.. So, the only way is to built by yourself
the Android OS and put it into the mobile. And then you have to sign your application
with the key that you have used to sign the OS.
For more information you can look here:
http://stackoverflow.com/questions/5966603/jnetpcap-on-android-problem-with-findalldevs-method
Hi,
Thanks for your reply.
But its very confusing.
Can you tellme, Whether Its possible to run a client application into Android which can monitor the network traffic in the device by anymeans?
If then what are all the possible ways. (like jpcap, etc....)
My idea is to develop a simple client application. I cannot think of building the whole Android OS and loading it into each device.
Hope to get a reply.
Thanks,
Vijay
I haven't done it before, because I only experience with native
programs that do network monitoring..
I think there are two simple solutions here. The first one is what exactly
Shark does: A tcpdump is running in the background that produces
traffic traces (pcap files) and you can develop an application that in periodic
time intervals reads these files and produce some outputs to the user.
The other one solution I can imagine is to develop again a native sniffer in
C with libpcap and then for each packet you receive or better for a batch of
packets you receive, you can send it through sockets to you application for
further processing..
Hope that helps..
FYI: There is a new application in Android called faceniff that does the work of
firesheep. That is you can hijack web sessions from facebook users. How is it
possible this application to monitor the web traffic of the phone? I think that
uses a native sniffer for this.. I am not sure, but it is not open source..
Hi, I did the steps as you described above:
Create a dir 'libpcap' with subdir 'jni'
Download the 'platform_external_libpcap' from 'github.com/android/platform_external_libpcap' (based on original libpcap version 0.9.8) and put the files at 'libpcap/jni'
Change the 'Android.mk' (see post number 6 of this thread)
run 'path/to/ndk-build -C path/to/libpcap/ndk' (android-ndk-r6)
When I do the last step of this list no 'libpcap/libs/armeabi/libpcap.so' will be produced but I get this output (I can reproduce this behavior on ubuntu 10.04 x86_64 and on debian i586):
> <user>@<host>:~/android/libpcap$ path/to/android-ndk-r6/ndk-build -C /home/<user>/android/libpcap/jni
> make: Entering directory `/home/<user>/android/libpcap/jni'
> SharedLibrary : libpcap.so
> /home/<user>/android/libpcap/obj/local/armeabi/objs/pcap//grammar.o: In function `pcap_parse':
> /home/<user>/android/libpcap/jni/y.tab.c:1711: undefined reference to `pcap_lex'
> collect2: ld returned 1 exit status
> make: *** [/home/<user>/android/libpcap/obj/local/armeabi/libpcap.so] Error 1
> make: Leaving directory `/home/<user>/android/libpcap/jni'
Does someone know what this error means and how to solve this problem?
daim0nas said:
Yeah!
Thank you Zuljin!!!
I put the libpcap direcotry into the android-ndk-r5b/samples, I modified a bit the Android.mdk
and the structure of the direcotry, so as to look like the other ones inside the samples dir and
I used the ndk-build command inside the android-ndk-r5b direcory:
ndk-build -C samples/android-ndk-r5b
All worked fine! I was able to produce a libpicap.so file, and put it in the phone using the
commands:
in android:
# su
# mount -o,rw remount /dev/block/mtdblock4 /system/lib
in my Desktop:
$ adb push libpcap.so /system/lib/
I made a simple sniffer, I compiled and linked with the libpcapp.so and works perfectly in
my HTC Hero!
Click to expand...
Click to collapse
Can you post your libpcap for us please.
Related
Howto get WiFi running on Ubuntu
Hey, first of all, thanks to ph84 for helping me getting the wireless drivers running and all the others who take part on developing Linux on Folio 100. After this HowTo you'll be able to use wireless on your Folio! Just follow this post, but add "build-essential" to the --seed part of the rootstock command to get gcc basic libraries for building applications on the folio! Download the latest version of the compat wireless drivers and the firmware Put the sd-card/usb-stick in your computer where you extracted your rootstock image to Extract the wireless drivers source to whatever directory you want Copy the folio kernel source to /lib/modules/2.6.32.9/build Extract the ath6kl folder from the firmware tar-file to /lib/firmware Rename the bdata.SD31.bin to bdata.CUSTOM.bin (needs root access) Then safely plug out your sd-card/usb-stick, put it into your folio and start it Open up a shell and browse to the folder where you extracted the driver source to ($ cd /home/ubuntu/compat-wireless-2.6.39-rc1-3/) select the drivers ($ ./scripts/driver-select ath6kl) build the driver ($ make) install the driver ($ sudo make install) restart and your wireless adapter should be present in network manager The only problem which is still open is that you aren't able to connect to your WPA-Access-Point directly. You have to add your Wireless-LAN manually in the network manager.. Have fun with that Hope we will get the sound and so on running soon!
Thx to erazor & ph84... they had make a great job.
hey EraZoR could you post the files from the build please? i dont have my folio handy and i only have the driver there... it should be some files called compat-wireless*.so or so... also, the firmware would be really usefull. then i can put that in the howto and users dont have to compile for themselves (which takes about 700mb for sources and a lot for build-essential)...
Hi there first of all thanks for your great work, I'm trying to get wifi working on my ubuntu installation but i got stuck at step 10 when builiding the drivers. Do I have to copy any additional files or change settings? make runs into these errors: Code: make -C /lib/modules/2.6.32.9/build M=/home/Philipp/compat-wireless-2.6.39-rc1-3 modules make[1]: Entering directory `/lib/modules/2.6.32.9/build' ERROR: Kernel configuration is invalid. include/linux/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it. WARNING: Symbol version dump /lib/modules/2.6.32.9/build/Module.symvers is missing; modules will have no dependencies and modversions. make[1]: Leaving directory `/lib/modules/2.6.32.9/build' it would be great if you could provide your buit files, I don't have to compile them myself though
Saint9192 said: Hi there first of all thanks for your great work, I'm trying to get wifi working on my ubuntu installation ... Click to expand... Click to collapse How have you installed ubuntu? I don't found *.rar file to complete ph84 howto.
gipposat said: How have you installed ubuntu? I don't found *.rar file to complete ph84 howto. Click to expand... Click to collapse I didn't found it either, so just left this step out . I have used the attached .zip file to flash the tablet. I found this one in a post from ph84 in DerArtem's Linux HowTo in this forum when I tried to create a root file system using rootstock, I got an error while installing xulrunner, so I left out the Code: --seed xubuntu-desktop parameter and just added the build-essential package via chroot. result: I don't have a GUI but I'm able to log into an runnig ubuntu
gipposat said: How have you installed ubuntu? I don't found *.rar file to complete ph84 howto. Click to expand... Click to collapse I did a ubuntu-minimal with the seed command and got a running Ubuntu system but only with shell access. Sent from my HTC Desire using XDA Premium App
°EraZoR° said: Hey, ... Copy the folio kernel source to /lib/modules/2.6.32.9/build ... Click to expand... Click to collapse Hi, I haven't in my *.img file a folder /lib/modules/2.6.32.9/build, I just have /lib/modules; I have to create it or am I missing something? Of what is shown on the link folio kernel source, I have to copy all or just the kernel folder? Thanks
gipposat said: Hi, I haven't in my *.img file a folder /lib/modules/2.6.32.9/build, I just have /lib/modules; ... Click to expand... Click to collapse Same thing for me.
You shuld just create the folder. As for what to download, there shuld be a link somewhere near the top of the page that says "download" and that will give you all you need. (The file list you see below is what is in the download, it is the source for the kernel and all the modules it needs) Sent from my HTC Desire using XDA Premium App
Problem with make driver I used rootstock with only "--seed build-essential", I got a .img file and created a sdcard. Then I have added wifi driver just like this HowTo; I have created a new "/2.6.32.9/build" folder and I copied all "folio kernel source". So I have a running Ubuntu system (only with shell access) but at step 10 when builiding the drivers I have this error: "config.mk:204: WARNING: CONFIG_CFG80211_WEXT will be deactivated or not working because kernel was compiled with CONFIG_WIRELESS_EXT=n. Tools using wext interface like iwconfig will not work. To activate it build your kernel e.g. with CONFIG_LIBIPW=m." FATAL: Could not load /lib/modules/2.6.32.9/modules.dep: No such file or directory. FATAL: Could not load /lib/modules/2.6.32.9/modules.dep: No such file or directory. ... What did I do wrong? Thanks
gipposat;13007124 said: ... when builiding the drivers I have this error: "config.mk:204: WARNING: CONFIG_CFG80211_WEXT will be deactivated or not working because kernel was compiled with CONFIG_WIRELESS_EXT=n. Tools using wext interface like iwconfig will not work. To activate it build your kernel e.g. with CONFIG_LIBIPW=m." FATAL: Could not load /lib/modules/2.6.32.9/modules.dep: No such file or directory. FATAL: Could not load /lib/modules/2.6.32.9/modules.dep: No such file or directory. ... Click to expand... Click to collapse I get exactly the same errors
when running on your folio, do a $cp /proc/config.gz /some/dir $tar xvf /some/dir/proc.gz $cp /some/dir/.config /your/folio/sources/ and retry the build. otherwise it "looks" like you dont have that stuff built into the kernel because were using our own kernel configuration (because its a folio ) good luck
Hello, I get this error when I try to build the driver : CC /home/azer/w/compat/compat.mod.o /home/azer/w/compat/compat.mod.c:8: error: variable ‘__this_module’ has initializer but incomplete type /home/azer/w/compat/compat.mod.c:9: error: unknown field ‘name’ specified in initializer /home/azer/w/compat/compat.mod.c:9: warning: excess elements in struct initializer /home/azer/w/compat/compat.mod.c:9: warning: (near initialization for ‘__this_module’) /home/azer/w/compat/compat.mod.c:10: error: unknown field ‘init’ specified in initializer /home/azer/w/compat/compat.mod.c:10: warning: excess elements in struct initializer /home/azer/w/compat/compat.mod.c:10: warning: (near initialization for ‘__this_module’) /home/azer/w/compat/compat.mod.c:14: error: unknown field ‘arch’ specified in initializer /home/azer/w/compat/compat.mod.c:14: error: ‘MODULE_ARCH_INIT’ undeclared here (not in a function) /home/azer/w/compat/compat.mod.c:14: warning: excess elements in struct initializer /home/azer/w/compat/compat.mod.c:14: warning: (near initialization for ‘__this_module’) make[2]: *** [/home/azer/w/compat/compat.mod.o] Error 1 make[1]: *** [modules] Error 2 make[1]: Leaving directory `/lib/modules/2.6.32.9/build' make: *** [modules] Error 2 Click to expand... Click to collapse Can somebody help to solve the problem please?
ph84 said: when running on your folio, do a $cp /proc/config.gz /some/dir $tar xvf /some/dir/proc.gz $cp /some/dir/.config /your/folio/sources/ Click to expand... Click to collapse This didn't work for me I still get the "kernel configuration invalid error" Could somebody help me
gipposat said: I used rootstock with only "--seed build-essential", I got a .img file and created a sdcard. Then I have added wifi driver just like this HowTo; I have created a new "/2.6.32.9/build" folder and I copied all "folio kernel source". So I have a running Ubuntu system (only with shell access) but at step 10 when builiding the drivers I have this error: "config.mk:204: WARNING: CONFIG_CFG80211_WEXT will be deactivated or not working because kernel was compiled with CONFIG_WIRELESS_EXT=n. Tools using wext interface like iwconfig will not work. To activate it build your kernel e.g. with CONFIG_LIBIPW=m." FATAL: Could not load /lib/modules/2.6.32.9/modules.dep: No such file or directory. FATAL: Could not load /lib/modules/2.6.32.9/modules.dep: No such file or directory. ... What did I do wrong? Thanks Click to expand... Click to collapse Type "sudo depmod -a" in a console, press enter and voilà.
zoken4 said: Type "sudo depmod -a" Click to expand... Click to collapse thanks zoken4 that worked like a charm , do you have any suggests about the invalid kernel configuration error i mentioned before
Saint9192 said: thanks zoken4 that worked like a charm , do you have any suggests about the invalid kernel configuration error i mentioned before Click to expand... Click to collapse You're welcome. For the configuration error, you have to run "sudo make oldconfig && make prepare" in "/lib/modules/2.6.32.9/build/". In a terminal : "cd /lib/modules/2.6.32.9/build/", and then "sudo make oldconfig && make prepare". You'll maybe also have to run "sudo make scripts" after that.
ok I'll give it a try and report back
Ok I have the same error that all of you... What are we doing wrong ?????? Solutions ?? ?! thanks !
[Q] [CM10.2] libhardware_legacy not compiling because of wifi
Hi! I'm trying to compile my first cyanogen rom for my Galaxy 3 (i5800). I downloaded the Android source from androidarmv6 and the device folder from marcellusbe's repo and i edited it to include samsung fimg drivers (original device folders has openfimg which IMHO is still not good for daily usage because of lag, very limited opengles support etc...) and the device configuration and filesystem table to support MTD converted phones. At first compiling went pretty good i just got some: "Thumb does not support this addressing mode *" that i fixed by adding Code: LOCAL_CFLAGS += -marm to involved Android.mk however after resolving those errors it started compiling host libraries and it started giving TONS of no such file or directory errors, but compilation didn't stop so i didn't touch anything, then this error appeared and i can't find any patch/solution/workaround: Code: target thumb C: libhardware_legacy <= hardware/libhardware_legacy/wifi/wifi.c hardware/libhardware_legacy/wifi/wifi.c: In function 'update_ctrl_interface': hardware/libhardware_legacy/wifi/wifi.c:473:5: warning: suggest parentheses around assignment used as truth value [-Wparentheses] hardware/libhardware_legacy/wifi/wifi.c: In function 'wifi_start_supplicant': hardware/libhardware_legacy/wifi/wifi.c:894:20: error: dereferencing pointer to incomplete type hardware/libhardware_legacy/wifi/wifi.c:911:26: error: dereferencing pointer to incomplete type make: *** [/home/francesco/cm10_port/cm_armv6/out/target/product/apollo/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates/wifi/wifi.o] Error 1 I also downloaded the latest wifi.c from cyanogen github but nothing. Someone knows how to resolve this? Thanks in advance!
[Q] Cross compiling Python module using Android gcc Long bit error
I am attempting to compile Python along with the modules "openssl pil zope2" for Android using the "Python-for-android" project (https://github.com/kivy/python-for-android). However it is not successful and errors out with the below error: Code: Getting distribution for 'zope.security==3.7.4'. In file included from /home/zac/Documents/Projects/Apps/python-for-android/build/hostpython/Python-2.7.2/Include/Python.h:58:0, from src/zope/security/_proxy.c:19: /home/zac/Documents/Projects/Apps/python-for-android/build/hostpython/Python-2.7.2/Include/pyport.h:849:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)." [B]#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."[/B] ^ src/zope/security/_proxy.c: In function 'init_proxy': src/zope/security/_proxy.c:1006:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] Py_INCREF(&SecurityProxyType); ^ error: Setup script exited with error: command 'arm-linux-androideabi-gcc' failed with exit status 1 An error occurred when trying to install zope.security 3.7.4. Look above this message for any errors that were output by easy_install. While: Installing test. Getting distribution for 'zope.security==3.7.4'. Error: Couldn't install: zope.security 3.7.4 What I am wondering is if anyone else has ever had a similar issue when trying to use the Android gcc, I have build zope.security just fine using the ARM gcc so it is not a platform issue but some bug/issue with the provided Android gcc in the NDK
Generate an Android App Bundle (*.aab) from the command line
I want to generate an app bundle via the command line[manually]. I have many other modules apart from the app module. I tried to compile manually each feature module something like this, not sure whether this is the right way. aapt2 compile project/feature_moduel1/src/main/res/**/* -o compiled_resources aapt2 compile project/feature_moduel2/src/main/res/**/* -o compiled_resources after this when I tried with the below command for AAPT2 to convert the app's manifest and compiled resources into the protobuf format aapt2 link --proto-format -o output.apk -I android_sdk/platforms/android_version/android.jar --manifest project_root/module_root/src/main/AndroidManifest.xml -R compiled_resources/*.flat --auto-add-overlay Getting errors like: aapt2 W 11-01 14:40:21 6340 125576 ApkAssets.cpp:138] resources.arsc in APK '/Users/<user_name>/Library/Android/sdk/platforms/android-29/android.jar' is compressed. root_project/feature_module/src/main/res/drawable/btn_toggle_bg.xml:3: warn: generated id 'android:id/background' for external package 'android'. root_project/feature_module/src/main/res/drawable/btn_toggle_bg.xml:6: warn: generated id 'android:id/toggle' for external package 'android'. warn: removing resource ...:array/drawer_title_array without required default value. .....and so on Does anyone Face similar issues with the above scenario Or any other better approach which I can go for?
unrecognized option '-EL' android kernel build
I'm trying to build an android kernel. On every build I get a few errors: /usr/bin/as: unrecognized option '-EL' clang-16: error: assembler command failed with exit code 1 (use -v to see invocation) warning: field 'cgrp' with variable sized type 'struct cgroup' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end] struct group cgrp; warning: unused function 'dump_workqueue' [-Wunused-function] static void dump_workqueue(void) {} I've already tried a lot. No more ideas and information on the Internet. Please help me how to solve this. I use clang-r475365b, gcc android-11.0.0_r48 and linux mint for building. My Kernel: https://github.com/OnePlusOSS/android_kernel_oneplus_sm8250/tree/oneplus/SM8250_R_11.0 I will add my build script (.sh) and full log to the files. I took it from here, but the solution presented there did not help Thanks for any help!