How do you run a java app as root? Calling SU only works for that shell...
On Monday, July 16, 2012 9:35:31 PM UTC-5, Melissa Silverio wrote:
>
>
> I'm trying to implement the use of a Java native library called "JNetpCap"
> which
> works with the handling of network packets.
>
> I installed the libjnetpcap.so and the jnetpcap.jar in my application.
> Also I ran the application as root.
>
>
> After making the capturing of the packets with "tcpdump" and saving it to a
> "output.pcap" file, i tried to use to manipulate the packets jnetpcap ..
> This is the code i used:
>
> end = new ArrayList packets ArrayList ();
> Pcap.openOffline pcap packet = ("/ sdcard / output.pcap", errbuf);
>
> JPacketHandler handler = new JPacketHandler () {
>
> / / Defining the action That Will Be Performed Each time a packet is
> / / Read for the file.
> / / @ Override
> public void nextPacket (JPacket packet, String user) {
> packets.add (packet);
> }
> packet.dispatch (-1, handler, null);
> packet.close ();
>
> and here are the errors it returns:
>
> android.os.Looper.loop (Looper.java: 123)
> android.os.Handler.dispatchMessage (Handler.java: 99)
> jnetpcap.Pcap.dispatch (Unknown Source)
> ....
>
> What are the steps for using Java native libraries in Android?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en