BeagleBone Black hardware access - Android Software Development

Hello
I have a BeagleBone Black and I'm thinking of using Android for my project. Android image is available at http://bbbandroid.sourceforge.net/
But since this is a hardware project I'd be needing access to the serial port. There is no way to do this using Java code so I was reading about JNI, HAL and all that stuff. HAL seems to be too complex for my needs.
So I have a very simple question: if I build a .so using JNI does it run as root so that I can play with mmap / gpios etc?
What is the easiest method (other than doing chmod to /sys/class/gpio in init.rc) to get root permissions in the native code?
I was thinking of implementing this as a two layer thing where there's a system process (which is started at boot, as root of course) and listens on a Unix Domain Socket. My Java app will connect to the unix socket and chat with the C binary. Is it possible?

Related

[Dev Request] Programming Question....

hey guys,
This is one of my first few apps for android (I've already done some rigorous stuff with sensor api and whatnot that im pretty comfortable with java).The thing is, i come from windows mobile and we had this thing called RAPI, which is a thing used to comunicate to activesync from c# in the computer. Is there some sort of thing like RAPI out therer for android? How would i approach in accessing the android information/file system without placing android in usb file system mode. Is there some sort of USB I/O example from computer/phone?
-Thanks
so...any help here?
What exactly are you trying to do? I'm not familiar with RAPI so I don't quite understand what you need. You can access the android file system (linux based) and all, but a stock android enforces user/group permissions as any unix filesystem does.

Does the Android SDK Emulator provide access to underlying Linux OS?

Dear experts,
I was intending to develop an application that configures iptables suitable for use on an android phone using the android SDK.
(I know Droid already exists, but would like to develop such an app as a beginner project).
Does the SDK provide access to the underlying linux OS of the SDK or must the SDK be jailbroken?
regards,
Patrick
paddyjoesoap said:
Dear experts,
I was intending to develop an application that configures iptables suitable for use on an android phone using the android SDK.
(I know Droid already exists, but would like to develop such an app as a beginner project).
Does the SDK provide access to the underlying linux OS of the SDK or must the SDK be jailbroken?
regards,
Patrick
Click to expand...
Click to collapse
Yes -, you can get linux shell access in the Android SDK emulators. You can root the emulator with the SuperUser app.
- jc
Thanks jc,
I managed to get the emulator running using Android 2.3 and eclipse.
I see from various forums that the emulator is supposed to work as root by default.If
If I run the following command in the terminal:
./adb root
I get the following:
adbd is already running as root
However, when I try and run the following apps DroidWall and Wireless Thether it complains about root privileges.
Note, when I first run Wireless Tether it complains that netfilter is not installed. But when I run it the second time, it complains about the su permissions. Surely the Android SDK comes with the basic linux security features, such as iptables?
That link you sent me, does it work for the version of android i am running?
The app must also know how to access root privilages
XDA App

[Q][Xposed] How to hook onto methods from classes not on the SDK?

I am trying to develop an Xposed module that requires hooking onto methods from classes that are not present on the SDK. From the debugging logs I can confirm that the method hooks are not called.
I have tried the following:
Registering the method hooks in handleLoadPackage, without providing the parameter list
Copying the whole class from AOSP and putting it in my module project with matching package name. Then register the method hooks with XposedHelpers.findAndHookMethod and provide the parameter list.
Any ideas? Is what I'm trying to do possible?

ADB device communication protocol

I am developing (currently in plan phase ) a framework to allow developers to connect to a remote android machine while working on eclipse.
The idea is, there will be a java program running on the developer's comp, which will behave as an emulator and pass all the adb commands to a remote machine (mac, windows, or linux: over net). There will be another java client app on that remote machine which will receive those commands and give them to the local adb demon (which in turn will give it to the connected android device).
This will allow remote debugging where direct port forwarding is not possible, like solving specific customer's issue.
Does such a framework already exist?
Where can I find the documentation on how to emulate an android device and how does adb demon communicates with the device?

[SCRIPT][CLI][ROOT]mnet: a wifi repeater with captive portal

https://github.com/mnet-repo/mnet
https://github.com/mnet-repo/mnet have been working on this and its at a point where others may find use of it. I made it on lingeage based ROMs both 15.1(oreo) and 16(pie). I don't keep stock ROMs longer than it takes to enable developer settings and OEM unlock, so stock will need supplental binaries most likely. I'm willing to help if I can and I give contact info.
This uses python, I modded py4a to serve my functions, no apks no gui level anything(other than terminal emulator and hackers keyboard of course)it's self contained. python baseHTTPserver and iptables is the base. Lineage provides hostapd, dnsmasq, iptables, iw, etc. It works on motorola, lg, and rockchip devices that i tested on, all with lineage 15.1+ environments kernel 3.14 + the rockchip uses mainline 5.x kernel. It also works in a debian chroot, ask me if your interested and ill share my linuxdeploy conf and postinstal script to pull it off. Im sure it would work in termux, but I personally dont use that.
Try it out, the portable python2.7(I did both 2.7 and 3.7 and will put its components in individual repos, pip and other modules such as flask could likely work and do work before modifications. I simply changed config files and libraries to one folder and psuedo relative paths) and portal script can be adapted to the android system hotspot or any other hotspot method. The mnet script is not limited to wifi repeating, for example I got it to tether from a bluetooth internet connection bnep0(something similar) and also ethernet, usb tether(rndis) interfaces. Just specify the interface and an addressort within the subnet assigned to it to host portal on. The html code can of course be changed to your needs.

Categories

Resources