Problem with bootloop on netd and mdnsd - Android Q&A, Help & Troubleshooting

Hallo, any one know whats wrong with Jelly Bean AOSP netd, here is logcat:
Code:
I/Netd (10975): Netd 1.0 starting
E/BandwidthController(10975): runIptablesCmd(): failed /system/bin/iptables -t raw -N bw_raw_PREROUTING res=256
E/BandwidthController(10975): runIptablesCmd(): failed /system/bin/ip6tables -t raw -N bw_raw_PREROUTING res=256
D/MDnsDS (10975): MDnsSdListener::Hander starting up
D/MDnsDS (10975): MDnsSdListener starting to monitor
D/MDnsDS (10975): Going to poll with pollCount 1
E/Netd (10975): Unable to start MDnsSdListener (Success)
E/SocketListener(10975): Obtaining file descriptor socket 'mdns' failed: Success
E/NetdConnector( 2399): Communications error: java.io.IOException: No such file or directory
E/NetdConnector( 2399): Error in NativeDaemonConnector: java.io.IOException: No such file or directory
I/Netd (11140): Netd 1.0 starting
E/BandwidthController(11140): runIptablesCmd(): failed /system/bin/iptables -t raw -N bw_raw_PREROUTING res=256
E/BandwidthController(11140): runIptablesCmd(): failed /system/bin/ip6tables -t raw -N bw_raw_PREROUTING res=256
D/MDnsDS (11140): MDnsSdListener::Hander starting up
D/MDnsDS (11140): MDnsSdListener starting to monitor
E/Netd (11140): Unable to start MDnsSdListener (Success)
E/SocketListener(11140): Obtaining file descriptor socket 'mdns' failed: Success
Is these related to kernel or something related to android, many thanks for any hint!!!

Look this - same prob?
...add this section at the end of init.rc:
Code:
service mdnsd /system/bin/mdnsd
class main
user mdnsr
group inet net_raw
socket mdnsd stream 0660 mdnsr inet
disabled
oneshot
https://groups.google.com/forum/#!msg/android-platform/faAcGG4QOPo/MDMBeGuF8BkJ

akkufix said:
Look this - same prob?
...add this section at the end of init.rc:
Code:
service mdnsd /system/bin/mdnsd
class main
user mdnsr
group inet net_raw
socket mdnsd stream 0660 mdnsr inet
disabled
oneshot
https://groups.google.com/forum/#!msg/android-platform/faAcGG4QOPo/MDMBeGuF8BkJ
Click to expand...
Click to collapse
Yes I added already to init.rc before opened our thread! Not working! Seems something about iptables missing in kernel (see error about res=256 !)... res=256cause wrong command to iptables! Without these "res=256" command to iptables is ok, so what mean these "res"?

munjeni said:
Yes I added already to init.rc before opened our thread! Not working! Seems something about iptables missing in kernel (see error about res=256 !)... res=256cause wrong command to iptables! Without these "res=256" command to iptables is ok, so what mean these "res"?
Click to expand...
Click to collapse
Don't know either what "res" means. Maybe reserved, resolution, received... seems to be a buffer, frame or location.
So, but what i noticed is, you have command "-N bw_raw_PREROUTING", while the guy in my link used "-D bw_raw_PREROUTING".
As man-page of iptable says for -N, --new-chain chain "There must be no target of that name already".
And for command -D --delete chain rule-specification and --delete chain rulenum
"Delete one or more rules from the selected chain. There are two versions of this command: the rule can be specified as a number in the chain (starting at 1 for the first rule) or a rule to match."
This makes the difference, cause "res=256" is already "loaded"??
Or i don't understand anything? :silly:
For reference:
http://ipset.netfilter.org/iptables.man.html

Here http://ipset.netfilter.org/iptables.man.html I can not see anything related to "res" have no idea what these part of the command mean! For example:
/system/bin/iptables -t mangle -D bw_mangle_POSTROUTING res=256

munjeni said:
Here http://ipset.netfilter.org/iptables.man.html I can not see anything related to "res" have no idea what these part of the command mean! For example:
/system/bin/iptables -t mangle -D bw_mangle_POSTROUTING res=256
can not see any reference to these res in iptables
Click to expand...
Click to collapse
I'm looking around for this res and only saw that it is sometimes 256 or 756.
No description at all, yet.
I also found some other guys, having same problems with "Netd 1.0 starting", after putting that lines above into init.rc
This one - https://groups.google.com/forum/?fromgroups=#!topic/renesas-emev-osp/XSdLmPgD9Og
sayed
Code:
BTW - Kernel needs a rebuild too.
And another one - https://groups.google.com/forum/?fromgroups=#!topic/android-building/3qDAbPjnHJc
Code:
1. fastboot -w flashall # This was my initial full system flash after changing the kernels.
2. adb reboot-bootloader
3. fastboot flash system
Step 3 seemed to have done it.

Will try with Tuna JB kernel (quota2)...
Edit:
Think I found a problem, maybe? See:
~ # strace -c netd
strace -c netd
iptables: Chain already exists.
iptables: Chain already exists.
iptables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables: Bad rule (does a matching rule exist in that chain?).
ip6tables: Bad rule (does a matching rule exist in that chain?).
iptables: Bad rule (does a matching rule exist in that chain?).
ip6tables: Bad rule (does a matching rule exist in that chain?).
iptables: Too many links.
iptables: Too many links.
ip6tables: Too many links.
iptables: Too many links.
ip6tables: Too many links.
iptables: Chain already exists.
iptables: Chain already exists.
iptables: Chain already exists.
iptables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
iptables v1.4.11.1: Couldn't find target `penalty_box'
Try `iptables -h' or 'iptables --help' for more information.
ip6tables v1.4.11.1: Couldn't find target `penalty_box'
Try `ip6tables -h' or 'ip6tables --help' for more information.
Click to expand...
Click to collapse
Found some posts on google about "res", these res comming after part of command "--penalty_box res=blabla" so I think "res" is part of subcomand penalty_box ? Will research more, curently nothing found for penalty_box in kernel... researching...

Ok. But what are those "chain already exist" and "no chain/target/match by this name" ? Is there something running in circle?
Edit:
This "already exist" normaly indicates you are try to create the chain more than once. (iptables -N chain name)
For the other prob, maybe it helped to look what tables exists with "iptables -L" ?
Sent from my MT27i using xda app-developers app

Got it!!!
http://img850.imageshack.us/img850/5403/device20121209123052.png
http://img231.imageshack.us/img231/3299/device20121209123124.png
http://img803.imageshack.us/img803/4497/device20121209123143.png
http://img838.imageshack.us/img838/2312/device20121209123024.png
http://img545.imageshack.us/img545/4383/device20121209123117.png

munjeni said:
Got it!!! Problem was missing part of netd in init.rc... finally:
JellyBean... booted!!!
http://img850.imageshack.us/img850/5403/device20121209123052.png
http://img231.imageshack.us/img231/3299/device20121209123124.png
http://img803.imageshack.us/img803/4497/device20121209123143.png
http://img838.imageshack.us/img838/2312/device20121209123024.png
http://img545.imageshack.us/img545/4383/device20121209123117.png
Click to expand...
Click to collapse
Great news. Will you share your sources? I would like to try JB on my U.

Source code is bassed on FXP CM9, but I have no working source because there was a lot of fails so I fixed these things by manyally copying libs, headers ...etc, I am not able to colect all changes, its on my computer! Android source I used is AOSP jb-dev branch! If something fail on your build ask me I will help you to get these rom booted! Android build is not useable in any way because have missing audio, missing sdcard ...etc, we can not do more without help by Sony! We need to ask Sony to give us new brebuilts compatible with JellyBean, ot to give us source code for these things, for example libhardware, libsensors, libaudio, at_core, libril, ste_omxcomponents...!

munjeni said:
Source code is bassed on FXP CM9, but I have no working source because there was a lot of fails so I fixed these things by manyally copying libs, headers ...etc, I am not able to colect all changes, its on my computer! Android source I used is AOSP jb-dev branch! If something fail on your build ask me I will help you to get these rom booted! Android build is not useable in any way because have missing audio, missing sdcard ...etc, we can not do more without help by Sony! We need to ask Sony to give us new brebuilts compatible with JellyBean, ot to give us source code for these things, for example libhardware, libsensors, libaudio, at_core, libril, ste_omxcomponents...!
Click to expand...
Click to collapse
Thanks a lot. Yes, I know that a lot of things missing for jb, but i would like to try cm10 in my U. Could be better if sony give us sources, but i think we won't get it. And i think we can't use new prebuilts while we don't get the first official jb rom.

munjeni said:
Got it!!!
http://img850.imageshack.us/img850/5403/device20121209123052.png
http://img231.imageshack.us/img231/3299/device20121209123124.png
http://img803.imageshack.us/img803/4497/device20121209123143.png
http://img838.imageshack.us/img838/2312/device20121209123024.png
http://img545.imageshack.us/img545/4383/device20121209123117.png
Click to expand...
Click to collapse
Hi,
facing the same problem...
Can you please share the solution? Tired of searching for it.
Thanks in advance.

Related

[Q] libpcap static linking errors

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.

OpenVpn on samsung Galaxy S WI-FI G70 (yp-G70CB)

Hi i have samsung YP-G70
i have been into kernel modules few days but without luck, i need help with compiling TUN.KO
Linux localhost 2.6.35.7-G70XWKP2-CL580645 #2 PREEMPT
Fri Sep 16 11:44:47 KST 20
11 armv7l GNU/Linux
at least i need 2.6.35.7 SDK for yp-g70
i tryied one from opensource.samsung but its for different kernel
I downloaded the kernel source tarball from opensource.samsung.com yesterday and it is the same version as you list above (YP-G70-WW_GB_Opensource.zip).
What version are you seeing?
Also what does "uname -r" give you on the device, as that extra stuff tacked on the end of the kernel version may cause you problems when you create a new kernel + modules (otoh it may not), in which case you'll need to afair modify the kernel Makefile to tack the extra characters on so the module and kernel versions match.
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 35
EXTRAVERSION = .7
NAME =Yokohama
this is original makefile
uname -r gives me
2.6.35.7-G70XWKP2-CL580645
then this is how it will looks like ?
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 35
EXTRAVERSION = .7-G70XWKP2-CL580645
NAME =Yokohama
sorry for stupid question but i'm destroyed from compiling again and again modules 2 day in a row
Yes exactly.
Presumably you''ve also run "make menuconfig" (after either adjusting the Makefile's ARCH and CROSSCOMPILER variables in the file, or by passing them on the command line along with the make command) to enable tun and make sure that anything it requires is also enabled?
Once you've done that I'd expect you're ready to go. If you get kernel oopses then we can work out what's wrong from there.
my step-by-step
i downloaded arm-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
downloaded YP-G70-WW_GB_Opensource.zip
exported paths and stuff
then vi Makefile
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 35
EXTRAVERSION = .7-G70XWKP2-CL580645
NAME = Yokohama
then make menuconfig
selected tun as module
then make modules
downloaded tun.ko, tun.o to tab
insmod tun.ko
and at this step tab show me an error
insmod: init_module 'tun.ko' failed (Exec format error)
insmod: init_module 'tun.o' failed (Exec format error)
insmod tun.ko
insmod: init_module 'tun.ko' failed (Exec format error)
# uname -r
uname -r
2.6.35.7-G70XWKP2-CL580645
Are you sure that's the right cross-compiler version, because I think you need an older version... (check the README in the kernel source tarball for the exact version.)
hmm then this is what i need
1. Visit codesourcery, download and install Sourcery G++ Lite 2009q3-68 toolchain for ARM EABI.
but on their site, they have only new release
can you help me with this ?
ok i found exatly that version mentioned in README
but now make modules give me error
/bin/sh: /opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi-gcc: No such file or directory
make[1]: *** [kernel/bounds.s] Error 1
hmm it looks like its because in .../bin/ there is only arm-none-eabi-gcc
ok i found line in Makefile and edited it to
CROSS_COMPILE ?= /opt/toolchains/arm-2009q3/bin/arm-none-eabi-
now ist completed
i now going to test it on tab
Fluffinko said:
ok i found line in Makefile and edited it to
CROSS_COMPILE ?= /opt/toolchains/arm-2009q3/bin/arm-none-eabi-
now ist completed
i now going to test it on tab
Click to expand...
Click to collapse
same error
insmod tun.ko
insmod: init_module 'tun.ko' failed (Exec format error)
i give up 0:08 , i tried diferent crosscompiler , many setting but without luck, i hope that some of you can help me.
after i succcessfully compile tun.ko i post it here for you guys
See what dmesg says about the module not loading.
Are you sure you need to compile the module? I've just looked at menuconfig for the device and it seems to have TUN/TAP enabled (built-in rather than a module)
I'm using the YP-G70-WW_GB_Kernel source and the venturi_eur_defconfig config as specified in the kernel source README.
lardman said:
See what dmesg says about the module not loading.
Are you sure you need to compile the module? I've just looked at menuconfig for the device and it seems to have TUN/TAP enabled (built-in rather than a module)
I'm using the YP-G70-WW_GB_Kernel source and the venturi_eur_defconfig config as specified in the kernel source README.
Click to expand...
Click to collapse
in dmesg there is no error
i see in /dev/ there is tun & dun device
but how to use it with open vpn ?
maybe related to another problem, i tryed on tab
INSMOD (module that is loaded) and it gave me same problem,
i think this can be related to busybox, i tried different versions but it will show me same error message, is there any other way to load module ?
OPENVPN
yes i have right, busybox is problem with modprobe and stuff i have found workaround
after 10h testing and reading manuals....
VPN.sh
------------------------------------------------------------
su -c "PATH=/system/xbin:$PATH" - #path for ifconfig
su -c "mkdir /dev/net" - #fixing tunctl problems
su -c "ln -s /dev/tun /dev/net/tun" - #linking tunctl for new location
su -c "tunctl" - # create tap0 device
su -c "ifconfig tap0 192.168.1.222" - # set manual IP for tap0 device
su -c "openvpn /sdcard/openvpn/config/FlamcoNet.ovpn" - # openvpn config
------------------------------------------------------------
there is problem with open vpn, it have problem assigning DHCP ip address to tap0
i don't know why

[Q] kmemleak backtrace return address

I have been learning to use kmemleak and I have an issue resolving the refrences in the backtrace section.
Code:
backtrace:
[<c0282458>] create_object+0x12c/0x2b4
[<c0a38540>] kmemleak_alloc+0x48/0x80
[<c027d5d0>] kmalloc_order_trace+0x4c/0xf0
[<c065f5c0>] mass_storage_function_init+0x590/0xd08
[<c06691b4>] android_bind+0x21c/0x814
Code:
$ arm-linux-androideabi-addr2line -f -e vmlinux c06691b4
android_bind
android.c:?
I am expecting the '?' to be a number in the last line 'android.c:?'
Can someone suggest how to get the proper results?

[Q&A] [DEV] Docker template for building CyanogenMod

Q&A for [DEV] Docker template for building CyanogenMod
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [DEV] Docker template for building CyanogenMod. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
Docker issues?
I'm running Windows 10 and I've installed Docker on my device. Everything works until I use the "./run.sh" command. It keeps returning:
Code:
invalid value "c:\\Users\\booge_000\\docker-cyanogenmod\\android;C:\\Program Files (x86)\\Git\\home\\cmbuild\\android" for flag -v: \Users\booge_000\docker-cyanogenmod\android;C:\Program Files (x86)\Git\home\cmbuild\android is not an absolute path
See 'c:\Program Files\Boot2Docker for Windows\docker.exe run --help'.
Is there any way I can fix this?
spenceboy98 said:
I'm running Windows 10 and I've installed Docker on my device. Everything works until I use the "./run.sh" command. It keeps returning:
Code:
invalid value "c:\\Users\\booge_000\\docker-cyanogenmod\\android;C:\\Program Files (x86)\\Git\\home\\cmbuild\\android" for flag -v: \Users\booge_000\docker-cyanogenmod\android;C:\Program Files (x86)\Git\home\cmbuild\android is not an absolute path
See 'c:\Program Files\Boot2Docker for Windows\docker.exe run --help'.
Is there any way I can fix this?
Click to expand...
Click to collapse
Hmm, I haven't tried this out with Windows (10 and older). I'm surprised that you can even run run.sh because that is a Unix shell script.
However if this really works then it's probably just a problem of setting the right paths for the shared volumes. I suggest that you remove the two "-v ..." parameters from run.sh and see if that helps.
Most likely I don't think that your problem is specific to my Docker project, it's rather a general issue with Docker on Windows. So you might ask on the Docker forum: https://forums.docker.com/
You can also install Ubuntu 14.04 (e.g. inside a VirtualBox machine) and install it there. This will work for sure!
Now I'm using VirtualBox with Ubuntu 14.04. I'm syncing the source files and now it's giving me:
Code:
Fetching projects: 99% (552/557) fatal: Not a git repository: '/home/cmbuild/android/.repo/projects/system/netd.git'
error: Cannot fetch CyanogenMod/android_system_netd
error: Exited sync due to fetch errors
spenceboy98 said:
Now I'm using VirtualBox with Ubuntu 14.04. I'm syncing the source files and now it's giving me:
Code:
Fetching projects: 99% (552/557) fatal: Not a git repository: '/home/cmbuild/android/.repo/projects/system/netd.git'
error: Cannot fetch CyanogenMod/android_system_netd
error: Exited sync due to fetch errors
Click to expand...
Click to collapse
Delete the netd.git folder and sync again.
michael_ch said:
Delete the netd.git folder and sync again.
Click to expand...
Click to collapse
It keeps recreating the folder and giving me the same error.
spenceboy98 said:
It keeps recreating the folder and giving me the same error.
Click to expand...
Click to collapse
Hmm really can't reproduce. Some things to try:
"repo selfupdate" - make sure that repo is up to date
"repo sync -j 1" - sync with only 1 concurrent connection
"repo sync --force-sync" - overwrite an existing git directory if it needs to point to a different object directory
michael_ch said:
Hmm really can't reproduce. Some things to try:
"repo selfupdate" - make sure that repo is up to date
"repo sync -j 1" - sync with only 1 concurrent connection
"repo sync --force-sync" - overwrite an existing git directory if it needs to point to a different object directory
Click to expand...
Click to collapse
Okay, I've tried that and it gives me the same error. I've tried deleting the netg file while syncing and then it just gives me this:
Code:
Fetching projects: 72% (394/546) Fetching project CyanogenMod/android_system_netd
fatal: Not a git repository: '/home/cmbuild/android/.repo/projects/system/netd.git'
fatal: Not a git repository: '/home/cmbuild/android/.repo/projects/system/netd.git'
error: Cannot fetch CyanogenMod/android_system_netd (GitError: CyanogenMod/android_system_netd pack-refs: fatal: Not a git repository: '/home/cmbuild/android/.repo/projects/system/netd.git'
)
Traceback (most recent call last):
File "/home/cmbuild/android/.repo/repo/main.py", line 513, in <module>
_Main(sys.argv[1:])
File "/home/cmbuild/android/.repo/repo/main.py", line 489, in _Main
result = repo._Run(argv) or 0
File "/home/cmbuild/android/.repo/repo/main.py", line 162, in _Run
result = cmd.Execute(copts, cargs)
File "/home/cmbuild/android/.repo/repo/subcmds/sync.py", line 672, in Execute
fetched = self._Fetch(to_fetch, opt)
File "/home/cmbuild/android/.repo/repo/subcmds/sync.py", line 363, in _Fetch
self._FetchProjectList(**kwargs)
File "/home/cmbuild/android/.repo/repo/subcmds/sync.py", line 254, in _FetchProjectList
success = self._FetchHelper(opt, project, *args, **kwargs)
File "/home/cmbuild/android/.repo/repo/subcmds/sync.py", line 297, in _FetchHelper
optimized_fetch=opt.optimized_fetch)
File "/home/cmbuild/android/.repo/repo/project.py", line 1181, in Sync_NetworkHalf
no_tags=no_tags)):
File "/home/cmbuild/android/.repo/repo/project.py", line 1960, in _RemoteFetch
self.bare_git.pack_refs('--all', '--prune')
File "/home/cmbuild/android/.repo/repo/project.py", line 2668, in runner
p.stderr))
error.GitError: CyanogenMod/android_system_netd pack-refs: fatal: Not a git repository: '/home/cmbuild/android/.repo/projects/system/netd.git'
I'm going to try to start again from scratch while booting from a disc and see if that makes a difference.
spenceboy98 said:
Okay, I've tried that and it gives me the same error.
Click to expand...
Click to collapse
Hmm, I wonder if one of your local manifest files includes a wrong repository?
What is the output of this:
Code:
grep -ri "netd" .repo/*manifest*
spenceboy98 said:
I'm going to try to start again from scratch while booting from a disc and see if that makes a difference.
Click to expand...
Click to collapse
Ok, let me know! In any case, your problem is clearly not Docker related...
michael_ch said:
Hmm, I wonder if one of your local manifest files includes a wrong repository?
What is the output of this:
Code:
grep -ri "netd" .repo/*manifest*
Ok, let me know! In any case, your problem is clearly not Docker related...
Click to expand...
Click to collapse
I encountered the same error "fatal: Not a git repository: 'xxxxxx/.repo/projects/external/blktrace.git'" and google brought me here.
I tried to delete the blktrace.git, but after I resync it with "repo sync -j1", it created the blktrace.git again and threw the same error out. Then I tried to update the repo, but failed. And the result of "grep -ri "netd" .repo/*manifest*" is like this in the picture.
BobbyCurry said:
I encountered the same error "fatal: Not a git repository: 'xxxxxx/.repo/projects/external/blktrace.git'" and google brought me here.
I tried to delete the blktrace.git, but after I resync it with "repo sync -j1", it created the blktrace.git again and threw the same error out. Then I tried to update the repo, but failed. And the result of "grep -ri "netd" .repo/*manifest*" is like this in the picture.
Click to expand...
Click to collapse
No matter what, it has nothing to do with the Docker image. Besides this, it's really hard for me to help with this because I'm not able to reproduce the issue.
I suggest that you're trying to debug the problem on your own. Run "git fetch" in the corresponding directories and see if that helps, etc.
Good luck!

Building kernel for Google Pixel 3 - Syntax error: "(" unexpected

Following theese instructions on the AOSP site "Building Kernels"
repo init -u android.googlesource.com/kernel/manifest -b android-msm-bluecross-4.9-pie-qpr1
repo sync
sh build/build.sh //This command throws an error.
sh build/build.sh
build/build.sh: 97: build/build.sh: Syntax error: "(" unexpected
This is line 97:
function rel_path() {
So it triggers on the parenthesis. Ive googled a little back and forth. And as far as I can tell - this error triggers because of missing shebang line. The document starts with a shebang line:
#!/bin/bash
Not sure whats wrong - Should I roll back to 18.04 or 14.04?
Distributor ID: Ubuntu
Description: Ubuntu 18.10
Release: 18.10
Codename: cosmic
michaelburrow189 said:
Following theese instructions on the AOSP site "Building Kernels"
repo init -u android.googlesource.com/kernel/manifest -b android-msm-bluecross-4.9-pie-qpr1
repo sync
sh build/build.sh //This command throws an error.
sh build/build.sh
build/build.sh: 97: build/build.sh: Syntax error: "(" unexpected
This is line 97:
function rel_path() {
So it triggers on the parenthesis. Ive googled a little back and forth. And as far as I can tell - this error triggers because of missing shebang line. The document starts with a shebang line:
#!/bin/bash
Not sure whats wrong - Should I roll back to 18.04 or 14.04?
Distributor ID: Ubuntu
Description: Ubuntu 18.10
Release: 18.10
Codename: cosmic
Click to expand...
Click to collapse
Welcome to the wonderful world of missing android documentation! rel_path appears to be a deprecated function of realpath. This is all stackexchange knows about it, and the android developer website gives me nothing useful. The only suggested fix I found is to try installing realpath and coreutils again.
Run,
sudo apt-get install coreutils
sudo apt-get install realpath
Then try building again. If you still get an error at the parentheses, then try putting a space between rel_path() so it's rel_path (). If you still get an error after that, then I'm out of ideas. I sincerely wish you luck navigating the horrible mess that is android source code.
Spaceminer said:
Welcome to the wonderful world of missing android documentation! rel_path appears to be a deprecated function of realpath. This is all stackexchange knows about it, and the android developer website gives me nothing useful. The only suggested fix I found is to try installing realpath and coreutils again.
Run,
sudo apt-get install coreutils
sudo apt-get install realpath
Then try building again. If you still get an error at the parentheses, then try putting a space between rel_path() so it's rel_path (). If you still get an error after that, then I'm out of ideas. I sincerely wish you luck navigating the horrible mess that is android source code.
Click to expand...
Click to collapse
Code:
sudo apt-get install realpath
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package realpath is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
manpages-pl manpages-fr-extra
E: Package 'realpath' has no installation candidate
Code:
type -a realpath
realpath is /usr/bin/realpath
Installing manpages-pl and manpages-fr-ekstra did work though.
But it is throwing me the same parenthesis error as before. Thanks though! I thought building the clean kernel would work kind'a smooth.

Categories

Resources