Profile cover photo
Profile photo
Alex Boyd

Are there any good resources out there on how to develop a System / Privileged application with Android Studio / gradle ?

Post has attachment

Post has attachment

Post has attachment
When trying to merge manifest files, I noticed that everything works the way I want, but the lint fails because of DuplicateActivity.

In both manifests I have the same Activity, 1 has the fully qualified name and the other one has the relative name.  If I change them both to  relative names they aren't merged.  Should lint fail in this scenario?

I made an example project you can find it .

Am I doing something wrong?  Is there someway I can leave lint on and still merge those correctly?

Post has attachment

In my CI builds run on Jenkins, I have a step that downloads the sdk if it doesn't exist on the machine, then it will download and update everything that is required.  I have the build working on my macbook, and on a fresh vagrant ubuntu machine, but when I run it on the Jenkins host, it always fails.

I have this in a shell script that should download all the necessary android tools I need.

expect -c 'set timeout -1;
spawn android update sdk --all --filter build-tools-20.0.0,platform-tools,android-20,extra-android-support,extra-google-m2repository,extra-android-m2repository --no-ui;
expect {
    "Do you accept the license" {
        exp_send "y\r"

catch wait result
exit [lindex \$result 3]'

It is just an expect script that accepts the licenses automatically.  The line in question is

android update sdk --all --filter build-tools-20.0.0,platform-tools,android-20,extra-android-support,extra-google-m2repository,extra-android-m2repository --no-ui

The output on the build machine is ...

Error: Ignoring unknown package filter 'build-tools-20.0.0'
Error: Ignoring unknown package filter 'android-20'
Error: Ignoring unknown package filter 'extra-google-m2repository'
Error: Ignoring unknown package filter 'extra-android-m2repository'

Those ID's exist inside the sdk, so I am kind of lost, any ideas?

Post has attachment

I have been googling around and trying to figure out how to pass in gradle arguments in the command line.  Is there an easy way to disable proguard from the command line?

I have tried './gradlew clean assembleRelease -Pandroid.buildTypes.release.runProguard=false`

Post has attachment

I am really struggling to figure out why the multicast UDP I am using in my application is not working on a raspberry pi.  Any ideas or troubleshooting tactics would be greatly appreciated.

Thanks in advance for the help.

I haven't narrowed things down enough to know if my issue is because of debian, raspbian specifically, or if I am just missing a something completely.

I have a python application that uses multicast UDP to let other devices on the network know that my application is up and running and available at a specific IP address.

The UDP multicast group is and port is 9131.  If I run tcpdump, I can see that the packet I am trying to send is actualy sending out data, but I never see anything come through on other machines on the network.

There are other devices that uses this same kind of "beacon" with same multicast group and port and I can see those packets come through on other machines.  The router has no firewall, and I am really kind of out of options at this point.

Below is the basic diagnostics I know how to run.  The bad udp chksum looks like it's probably not helpful, but I don't really know anything about that.

Output of ifconfig

    eth0      Link encap:Ethernet  HWaddr b8:27:eb:b2:79:12  
              inet addr:  Bcast:  Mask:
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1682 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1686 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:119105 (116.3 KiB)  TX bytes:169570 (165.5 KiB)

Output of tcpdump while app is running

        tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
    03:29:15.722653 IP (tos 0x0, ttl 1, id 0, offset 0, flags [DF], proto UDP (17), length 221) > [bad udp cksum 0xae84 -> 0xaabe!] UDP, length 193
        0x0000:  4500 00dd 0000 4000 0111 cb66 c0a8 0207  E.....@....f....
        0x0010:  efff fafa 8237 23ab 00c9 ae84 414d 5842  .....7#.....AMXB
        0x0020:  3c4d 4143 2d41 4444 523d 6238 3a32 373a  <MAC-ADDR=b8:27:
        0x0030:  6562 3a62 323a 3739 3a31 323e 3c2d 5555  eb:b2:79:12><-UU
        0x0040:  4944 3d32 3032 3438 3135 3937 3537 3734  ID=2024815975774
        0x0050:  3930 3e3c 2d53 444b 436c 6173 733d 5574  90><-SDKClass=Ut
        0x0060:  696c 6974 793e 3c2d 4d61 6b65 3d69 5275  ility><-Make=iRu
        0x0070:  6c65 426f 783e 3c2d 4d6f 6465 6c3d 5265  leBox><-Model=Re
        0x0080:  6d6f 7465 426f 783e 3c2d 5265 7669 7369  moteBox><-Revisi
        0x0090:  6f6e 3d30 2e31 3e3c 2d50 6b67 5f4c 6576  on=0.1><-Pkg_Lev
        0x00a0:  656c 3d47 4350 4b30 3032 3e3c 2d43 6f6e  el=GCPK002><-Con
        0x00b0:  6669 672d 5552 4c3d 6874 7470 3a2f 2f31  fig-URL=http://1
        0x00c0:  3932 2e31 3638 2e32 2e37 3a38 303e 3c2d><-
        0x00d0:  5374 6174 7573 3d52 6561 6479 3e         Status=Ready>
    1 packet captured
    1 packet received by filter
    0 packets dropped by kernel

Output of netstat while program is running

    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    udp        0      0 *                           1510/dhclient   
    udp        0      0 *                           2089/python     
    udp        0      0    *                           1510/dhclient   
    udp        0      0*                           1911/ntpd       
    udp        0      0   *                           1911/ntpd
Wait while more posts are being loaded