How to include files in Build - Android

I am working on a custom BBBAndroid build. The kernel will have a custom USB gadget driver. This driver will communicate with a Linux User space daemon via Netlink socket and save data to file. My question is how to include this daemon in the BBBAndroid build process and have it start automatically?

Related

[Q] Building Android Linux Kernel without usb gadget stack

Hello,
My question is, is it possible to build the linux kernel for an android device without the usb gadget driver built-in? My motivation and what I have tried thus far is listed below.
I am attempting to emulate the behavior of connecting and disconnecting an android phone from a given host. I have looked through many methods to try to emulate this behavior, and the solution I am working on now is:
1. build a kernel WITHOUT support for usb gadget
2. build a kernel module that supports usb gadget
3. put together an application to insmod/rmmod the resulting kernel module
I have done all three parts, and now I am seeing kernel panics. In particular there are two actions that result in kernel panics
1. Plug android device WITHOUT usb gadget support into a host (the enumeration must be causing the panic)
2. insmod and rmmod the kernel module, then insmod it again (kernel module name is android.ko and the resulting kernel log messages that happen just before panic are below)
[ 257.163085] sysfs: cannot create duplicate filename '/devices/platform/omap/musb-omap2430/musb-hdrc/gadget/lun0'
[ 257.163177] Modules linked in: android(+) [last unloaded: android]
I am working with the Samsung Galaxy Nexus. I have verified the kernel building process and the module building process by making a stock kernel and a simple kernel module. So the issue IS particularly with the usb gadget driver module and/or the kernel without built-in android gadget usb.
I have also used a Ellysis USB analyzer to see at what point in enumeration the device is crashing. Unfortunately, enumeration does not even begin without the built-in usb gadget module.
Best,
Ryan

[q] adb issue, need help

Hi friends ,
I just cannot get rid of the issue with the 8 things I tried (see below). I need your help pls, it has taken me alot of time and still unsolve.
I am running on window7, 64bits. I am building the "hello world" program and follow the instruction from Andriod developer website. At first, everything went well including the installation. I even manage to run the program on my Samsung S5. However, in a while, I notice something is wrong after I edited the code, so I delete and re-install the SDK and ADT package, objective is to bring the code back to the same factory state. I had tried installing both version of 32bits and 64bits Eclipse package but encounter the following problem when i click RUN as Android application:
******************** Return the following txt: ************************
The connection to adb is down, and a severe error has occured.
You must restart adb and Eclipse.
Please ensure that adb is correctly located at 'D:\ADT\sdk\platform-tools\adb.exe' and can be executed.
**********************************************************************
I did the following troubleshooting:
1) Restart the computer and my phone (samsung S5)
2) Check that there is a connection icon on my PC (USB connected between phone and PC)
3) Update adb in the SDK using the SDK manager
4) Make sure i go to the "help-->Install new software" in the Eclipse and key in the dl-ssl weblink every time i re-install the Elipsce package.
5) Make sure I click "help-->check for update" in the Eclipse every time i re-install the Elipsce package.
6) Checked that I am the adminstrator of my PC
7) Run command at command prompt. I did the follwoing steps:
a. Close the Eclipse if running
b. Go to the Android SDK platform-tools directory in Command Prompt
c. type adb kill-server
************************* Return the following txt ************************
* server not running *
--> adb server is out of date. killing...
ADB server didn't ACK
* fail to start daemon *
**********************************************************************
d.then type adb start-server
Return the same txt as above.
8) I suspect some other process is occupying the port 5037 which the adb access. So I attempt to find the PID (process id) of the process which occupied the port 5037 by giving the command "D:\Android\sdk\platform-tools>netstat -aon|findstr 5037"
************************ Return the following txt *****************************
TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 3640
TCP 127.0.0.1:5037 127.0.0.1:50506 TIME_WAIT 0
TCP 127.0.0.1:5037 127.0.0.1:50507 TIME_WAIT 0
**********************************************************************
Then I go to PC Task Manager, but there is no PID with 3640.
I also type at command prompt the below:
tasklist /fi "pid eq m3640
************************* Return the following txt ************************
No task are running which match the specified criteria
**********************************************************************
Seems that the adb is not responding to any re-installation, or restarting of PC and device. The task manager shows PID 3640 but couldn't see any process related to it.
I am a electronics engineer and much a novice in this field of computer.
pls help

Linux Mint ADB sees my phone as 'offline' & how to 'untrust' computer

After connecting the phone via usb cable, "adb devices" command lists :
$ adb devices
List of devices attached
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
FA3BSWG00401 offline
1) First time it asked whether to trust this computer and I checked 'always trust this computer'. Is there a way to untrust a specific computer / make it ask again ?
2) plugging the cable to my older SGS3 works fine :
$ adb devices
List of devices attached
4df1d4650790afdf device
Has anybody encountered this before ?
Additional info :
$ adb version
Android Debug Bridge version 1.0.32
Revision 57224c5cff69-android
I'm using Linux Mint 17.2, NuSense 6 (Lolipop)

SELinux prevents an android app from reading a serial device file

I use a Galaxy S5 (G900H) with rooted Android 5.0.
I am connecting a serial device to it via USB using cdc-acm driver (compiled in the kernel) and trying to read it from my android application, It works fine on other devices (older and newer).
When connecting the device, the device file /dev/ttyACM0 is created but when trying to read from it I receive an error Permission denied.
When running
Code:
setenforce 0
and setting SELinux to Permissive mode - everything works fine and the app reads the device file successfully.
After connecting the USB in Enforcing mode, the dmesg says:
Code:
cdc_acm 2-1:1.0: usb_probe_interface
cdc_acm 2-1:1.0: usb_probe_interface
cdc_acm 2-1:1.0: This device cannot do calls on its own. It is not a modem.
cdc_acm 2-1:1.0: ttyACM0: USB ACM device
I tried making a new policy using audit2allow but couldn't find any "denied" message to use in order to create an "allow" rule.
Is there any way to use the device file via my app without setting SELinux to permissive? I can edit the kernel and make a new one if needed, but I really prefer not to.
Thanks!

[HELP]compile cv1 kernel userdebug[HELP]

I have been trying to compile a userdebug kernel for months now and i finally got a kernel built but it would not boot. Well it booted but just to the splash screen.
This is a build for the LM-X210ULM. Im wanting to be able to use it a rooted phone to debug my other phones and possibly root them. I would also like to be able to build kernels and roms on my device which is prohibited in the user builds.
Ok the first issues i ran across after a non working kernel were LGE_USB_HOST_LIST_INPUT warnings which were easily taken care of by removing the items it said were missing dependencies.
Next are the SND_SOC_CONFIGS which i just removed the ITEMS listed as having missing dependencies.
But im still getting warnings about drivers/soc/qcom/kconfig which has something to do with fatal errorr and the value of the function being outside its normal paramaters. So i marked the defconfig line as not set for the error being fatal.
Now all of a sudden im getting fatal errors that stop my compilation having to do with the built-in.o file not being in the EDIDX out put and i grepped EDIDX and nothing was found
Please help me
i was wrong on grepping the exdid stuff but i did earlier and the only way i found to fix both errors was to go into the .config and unset arm_unwind.
I dont know what that will do to a working kernel but it compiles. Also i switched to the linux msm-3.18 source by caf since his toolchain works and gw? His source is less buggy,
But even after adding dependencies from the lg build i still am not producing a working image zImage or zImage-dtb
Ok i spent last night compiling ovet and over again. I compiled my kernel in about 8 different ways including using the defconfigs unaltered. But still i produce a Image zImage and zimage-dtb. I have renamed each image boot.img-kernel and repacked my boot.image and flashed it via fast boot. Each time it goes past the bootloader and hangs.
well here it is my actual 2nd compiled kernel for cv1 devices. Duhjokers laughter boot image with the upset clown kernel.
I figured out the non-booting issue problem kind of in a round about way. Part of it recompressing the boot.img after placing the kernel inside. For some reason fastboot is giving me a remote fail for anything 32mb. The kernel packed and patched by magisk is 34mb.
The other thing i think is that the compiler signs the kernel image as its being compiled but the boot.img itself will need some kind of signing itself so magisk comes into play there as tops patching system resigns the boot.img as it patches it.
Othet than that its good to go.
Features are set at
Fastcharge
Full OTG usb host and slave
performace rated w cpu governor
rcu boost
Smb
pre-empt
Handle panic
cma
Swap
auto wakelocks
loop device
Tun
Rndis
Rmnet
Spi
Pin control for msm devices
Devtmpfs
Ntfs
Ext4
ext2
ext3
vfat
Smb charging
Otg charging
Media and camera support
Confugured for
msm8916
msm8917
msm8920
msm8937
msm8940
msm8953
Debug android
Debug windows
Debug mass storage
Debug most generic gpio
Debug most generic ACM
Debug most generic
Debug usb gadget
Debug mutexes and spinlocks
Full encryption support and so much more
This baby is packed full of the latest features to help you debug most items around your house and full of the latest features for calling and internet. Enjoy
Im back and better than ever with the jokerfish kernel. Its killer!! SMILE
Ok i cant get force fast charge to show up in sys/kernel and its drivung me crazy. Huhuh.
Its compiling. I see the object files. i first used phy-msm-usb that wasnt showing up so retrofitted msm-otg into the mix per standard orrder back in the day but nothing. Every thing works all features are go but no fastcharge.
Could some one help me stop my compiling madness
Oh yea heres the flashable zip....

Categories

Resources