Building Android From Sources and GPS support and ROOT

Hi Everyone!

i was hoping to get here some giudelines on how to properly build android image for the DragonBoard 410c.

So far what i’ve tried was downloading the proprietary support package, cloning sources and after some fiddling with the build system setup, downloading ~~60GB of sources and compiling it all on a 2CPU (8 core) 96GB ram server for about 6 hours , successfully building the images, that were later flashed.

Now my problem is that even though in the release notes on the :
linux_android_board_support_package_vla.br_.1.2.4-01810-8x16.0-2

(is there a newer support package ? is there a pre-built sd card image that is built using this or newer support package ???)

it says that the GPS is validated, i could not get it to work.

i’ve tried to figure out which kernel module/s are responsible for the GPS and if they are loaded but failed.

the only loaded module in Android (LSMOD) was the wifi.
It could be that the proprietary modules were build in the kernel , but i could not find the (MAKE) kernel config file nor could i run the (MAKE MENUCONFIG) to see how and which things are build or not.

I’ve seen the thread here on the forum regarding the linux and android GPS issues, but i did not get the actual answers there.

Considering the release notes on the package above is GPS working on android or not ?
In the other thread its was mentioned to follow the Antenna guide, do i MUST do the antenna mod to enable GPS ? Because my understanding is that the board has a build it antenna.

The other thing is the ROOT access, installing the custom recovery and so on.

I see that i have some kind of root access, however say SuperSu tells me there is no (SU) binary. there is one, but i have no idea why its not suitable for SuperSu.

So is there a way to install SuperSu or similar software?

Is there a way to install custom recovery like TWRP???

And the last thing: is there a way to install gapps () ? – this is for testing purposes only .

Any info, suggestion and or advice is highly appreciated.

P.S. : im trying to build a IVI (carputer, carpc or whatever other name :)) and the GPS is kind of essential here :slight_smile:
i will be adding the can bus as well to control digital amplifier but this is at the later stages :slight_smile:

cheerio

Gleb

Hi Gleb

Re: “(is there a newer support package ? is there a pre-built sd card image that is built using this or newer support package ???)”
>> The latest SDCard image is always posted to the 96boards forum. You can find it in the 'Downloads ’ section here :
Direct link to the .zip file is : https://builds.96boards.org/releases/dragonboard410c/qualcomm/android/latest/dragonboard410c_sdcard_install_android*.zip

Re: “I see that i have some kind of root access, however say SuperSu tells me there is no (SU) binary. there is one, but i have no idea why its not suitable for SuperSu.”
>> This has intrigued me too. I do not know the reason why SuperSu fails on this image on which ‘adb root’ works.
Anyway,a used shared me the following tip. Can you try this at your end ?
If this works, we can update the documentation.
HOWTO.SuperSU on the DB410c

adb shell
adb su

use es explorer to extract the super su zip folder into /sdcard

cd /sdcard/UPDATE-SuperSU-v2.46
cp ./arm/chattr.pie /data/local/tmp/chattr.pie
chmod 0755 /data/local/tmp/chattr.pie
mount -o rw,remount /system
cp /sdcard/UPDATE-SuperSU-v2.46/arm/su /system/xbin/daemonsu
chmod 0755 /system/xbin/daemonsu
/system/xbin/daemonsu -d
cp /sdcard/UPDATE-SuperSU-v2.46/arm/su /system/xbin/su
chmod 0755 /system/xbin/su
exit
adb install Supersu.apk
>>

Reg:" is there a way to install gapps () ? — this is for testing purposes only ."
>> The DB410c Android Image does not include Google GApps because its licensing is different. (The same reason why Cynogenmod cannot build its ROMs with it).
I usually side load the GMS blobs that are available online.
Please read the disclaimer on them and install them .

Hi Sujai,

thanks for the quick reply.

Unfortunately SuperSu did not work after the instructions provided.

there were few things to mention :
running

  1. adb shell >> 0 login OK
    (now we are inside the device)
  2. adb su >> 1 command fails with adb help strings

so i’ve replaced the command this way : adb su >> su

this way i was able to continue

all is OK until :
/system/xbin/daemonsu -d

the command runs >> 0 OK
however i needed to remount the /system again as it was remounted back as RO after the above command.

then installink the apk >>0 OK
however when running it the supersu complained again that there is no suitable SU binary installed and that supersu can not install it, and if you just upgraded to android 5 i need to re-root the device.

+++what about the GPS? any idea how can i see if the gps sensor is actually active (loaded modules, via an app,) i’ve tried aida64 no mention of gps there so i assume the drivers are not working

just in case the build of android im running now (i’ve tried the one i’ve build, and now im on the “stock” 96boards august build)

thanks

gleb

one more thing, is there a guide for how to build android image from google source and just adding the needed proprietary binaries to the kerlnel??

cheers

“adb root” restarts adb as root. This works on engineering and debug builds. Since the dragonboard Android is not intendend for an end user, this feature is still enabled. The rom also comes with the AOSP version of “su”. This is the version as google distributes it, and only allows shell user to become root. This su is included again because this is a engineering build of the rom. If you want other apps to be root, then you’d need to install their su binary along with all their other dependencies.

As far as custom recovery goes, I have built TWRP and it is hosted on github https://github.com/giantpune/twrp_dragonboard410c . My repo has a prebuilt recovery.img if you dont want to download and compile all the sources. Its not extensively tested, but I was able to flash gapps, xposed, etc. I have the play store working and Netflix streaming movies at a piddly 480p quality.

For the GPS query -
>> Our software team pointed me to the following guide: “Adding U.FL Antenna Connectors to DragonBoard™
410c and Validating GPS on Android” which is shared in the developer.qualcomm.com website.
Link : https://developer.qualcomm.com/hardware/dragonboard-410c/tools
Please note - As mentioned in the AppNote, the procedure works only for newer boards which have Shields populated on the processor.

Reg query on compiling from AOSP:
What would be the benefit of compiling an image from the AOSP sources?
As far as i know , the AOSP source can only build the 'Nexus 'devices. If you want to build factory ROM for any non-Nexus device (like the DB410c) there is a lot of plumbing required. Which is taken care in the DB410c Android release you get from Qualcomm Innovation Inc’s Codeaurora website…

thanks
Sujai.

Hey giantpune,

“adb root” restarts adb as root. This works on engineering and debug builds. Since the dragonboard Android is not intendend for an end user, this feature is still enabled. The rom also comes with the AOSP version of “su”. This is the version as google distributes it, and only allows shell user to become root. This su is included again because this is a engineering build of the rom.

i thought that something alog those lines is the case, thanks :slight_smile:

ill see what i can do about the proper su binaries and how to install them :slight_smile:

could you tell me what is the situation with the GPS on your board and android ? does it work ?

oh and thanks for the twrp, ill give it a go :slight_smile:

regarding the netflix’s resolution… is it the wifi bandwidth or the video acceleration problem ?

cheers

g.

Hey Sujai,
i just got my board few days ago, is there a board revision number somewhere that i can confirm to make sure that

Shields are populated on the processor
?

does this mean simply the metal covers over the microchips ? arduino and its shields changed the way my brain works :)))

i’ve seen this guide and from the looks of it i have the newer board.

as a followup question to the guide:

doesnt gps work without this MOD ? or its simply that without the external antenna the gps receiver does not get ANY signal at all?

regarding compiling from AOSP: im just exploring the options :slight_smile:

and as im fairly new to android building im trying to get the gist of how things are done and what exactly codeaurora changes / does :slight_smile:

cheers

g.

As far as the netflix situation goes, I’m not sure what the cause is. Watching the “example short 23.976” video, it will work its way up to “BITRATE: 750kbps RES: 512x384 PAR: 4:3” and not go any higher. Doesn’t matter if I use wifi or a 100mbit ethernet adapter. Using ‘top’ shows that the cpu is hovering around 9%, so that doesnt seem to be the bootleneck.

GPS:

We have faced the same issue … that GPS is not working even it is mentioned in Release note (Shields or not Shields)

Do one thing Connect external antenna (need some hardware rework) as internal antenna is not working (dont no why)
we have resolved GPS issue with external antenna.

NOTE: No change require in software
Please expect a delay in response. as i traveling with minimum bandwidth of internet :slight_smile:

Shweta Mishra

Hi Shweta Mishra

thanks for the info…

did you just follow the guide for the uFL external antenna ?

i did some soldering today, following the part for the passive antenna.
unfortunately nothing has changed.

i dont know if this is relevant but:

/system/bin/loc_launcher
CANNOT LINK EXECUTABLE DEPENDENCIES: library “liblowi_wifihal_nl.so” not found
CANNOT LINK EXECUTABLE DEPENDENCIES: library “liblowi_wifihal_nl.so” not found
CANNOT LINK EXECUTABLE DEPENDENCIES: library “liblowi_wifihal_nl.so” not found
CANNOT LINK EXECUTABLE DEPENDENCIES: library “liblowi_wifihal_nl.so” not found
CANNOT LINK EXECUTABLE DEPENDENCIES: library “libasn1cper.so” not found
CANNOT LINK EXECUTABLE DEPENDENCIES: library “liblowi_wifihal_nl.so” not found
CANNOT LINK EXECUTABLE DEPENDENCIES: library “liblowi_wifihal_nl.so” not found
CANNOT LINK EXECUTABLE DEPENDENCIES: library “libasn1cper.so” not found
CANNOT LINK EXECUTABLE DEPENDENCIES: library “libasn1cper.so” not found
[XTIA-inet-agent-cs] _process failed 4
[XTIA-inet-agent-cs] _process failed 4
[XTIA-inet-agent-wwan-pos] _process failed 4
[XTIA-inet-agent-wwan-pos] _process failed 4
[XTIA-inet-agent-wwan-pos] _process failed 4
[XTIA-inet-agent-wwan-pos] _process failed 4
[XTIA-inet-agent-tile] _process failed 4
[XTIA-inet-agent-cs] _process failed 4
[XTIA-inet-agent-cs] _process failed 4
[XTIA-inet-agent-pos] _process failed 4
[XTIA-inet-agent-tile] _process failed 4
[XTIA-inet-agent-pos] _process failed 4
[XTIA-inet-agent-pos] _process failed 4
[XTIA-inet-agent-pos] _process failed 4
[XTIA-inet-agent-tile] _process failed 4
[XTIA-inet-agent-tile] _process failed 4
CANNOT LINK EXECUTABLE DEPENDENCIES: library “libasn1cper.so” not found
CANNOT LINK EXECUTABLE DEPENDENCIES: library “libasn1cper.so” not found
CANNOT LINK EXECUTABLE DEPENDENCIES: library “libasn1cper.so” not found

the .so files that are in the support package are 32bit and the system requires the 64bit module.

Hey Giant!
anything specific regarding the twrp_recovery ?
fastboot flash recovery twrp-recovery.img

>>

adb reboot recovery

anything else ?

cheers

For the twrp, I didn’t even bother to flash it. Just boot it when you need it.

adb reboot bootloader
fastboot boot recovery.img

It takes a few minutes to boot, so be patient. To control it, you can disconnect the microUSB and use a mouse, or you can use adb.

adb push supersu.zip /tmp
adb shell twrp install /tmp/supersu.zip
adb push gapps.zip
adb shell twrp install gapps.zip

Hey listen,
what type of antenna did you install ?

active or passive ?

Im currently on passive and i have no luck what so ever.

what version of android are you running?

Cheers

g.

Regarding root access (su)… please do yourselves a favor and DO NOT use that spyware blob supersu.

We have been working very hard to make a proper open source root for ALL Android devices, which would include DB410C.

I’ve downloaded the 20.7MB recovery.img file and used “fastboot boot recovery.img” to boot it on my 410c; I get the following normal output:

downloading ‘boot.img’…
OKAY [ 0.637s]
booting…
OKAY [ 0.106s]
finished. total time: 0.743s

Then nothing. No HDMI output with the TWRP recovery menu, nothing from “adb devices”. None of the lights on the board are lit. Any suggestions for debugging this? Anyone else having this issue? Thanks for trying to get TWRP on the dragonboard! I appreciate it a lot!

How long did you wait? The img on my github works on all of my dragonboards. It does take longer than expected to boot up.

I’ve given it over 10 minutes a few times now; I was quite patient. Should I see any LED activity? I looked at the binary with ‘vi’ just to make sure it wasn’t downloading in the wrong format because of the browser but I also fetched it with Safari, Chrome and wget just to make sure. The image file looks like other TWRP image files.