How can I enable /dev/watchdog functionality when compiling Android from source? - Android Q&A, Help & Troubleshooting

I'm trying to compile Android for a dragonboard 410 clone, and would like to enable a firmware level functionality so that the device reboots if there is some kind of OS level failure.
I noticed on the Linux Github (Documentation/watchdog/watchdog-API.txt) that the Linux source has exactly what I'm trying to implement. (sorry, new user so can't post links)
I'm unfamiliar with compilation from source on Android, is there a compilation flag or option I can use to enable this functionality on Android?

Related

[Q] Android .mk makefiles, prebuilt tools, NDK roles

Hello,
I actually have successfully build some kernels. Mainly, this is the linux way:
- get kernel sources
- get hardware specific changes
- get the toolchain -> i'm using google prebuilt tree, with ARM tool chain 4.4.3 already compiled
- build with usual steps: def_config, configure, kernel, modules
All is ok.
Now, i found Android.mk files. Precisely, a previous kernel, with sensors related to my device, that i would like to port.
But here comes the trouble. I have hard time to do the link between Linux kernel for ARM and Android makefile. I don't see how it goes with my kernel, how i could compile this using the prebuilt tools i could grab from Google.
In short, how to include .mk files into a classic kernel ? What should i get in the end ? A module ? A replacement binary ? More precisely, what is exactly NDK and where it stands in the above layers ?
ARM Linux Kernel <--> Dalvik JVM <--> APK
Last, is it possible with Google prebuilt to compile the .mk without referencing your kernel ?
Thank you !
Thank you for your help
Damn ! Either the questions is too obvious, either it is too complex. Any help ?
Self reply: downloading the NDK is mandatory
- you can use your favorite toolchain, provided with the NDK
- you can embed the .mk into your application, for Eclipse / Android studio, it will use the NDK to compile

[Q] build native GNU/Linux apps X11, apache inside android - NO chroot or busybox

Hello all,
Is there a way to build the native android kernel for your device, to include other linux applications?
I would like to build X11 inside of android and use the existing GUI of android.
I'd also like to be able to compile other linux apps isde android as well.
all the searching I have is about linux inside of a chroot, and that's not what i'm looking for.
since android is build upon linux, then really it should only be a matter of runing a few scripts to call init files and other libraries?
I did see this "Build native GNU/Linux applications: the easy way"
But nothings been done since early 2012.
If I'm going to be compiling an android and its kernel for a device from scratch, then it makes sense to extend the linux to include the functionality to build native linux apps as well, right?

Code management when customising Android

Hello,
I have a question about the best way to manage an Android software project that will involve modifying core Android code.
My question is not a normal "how to do this in Android", but rather, concerns the code management process and the build procedure. Has anyone any experience with this, or can point me somewhere?
We are starting a project to implement an audio application on Android phones, the various ARM architectural flavours. This will involve modifying and extending the C/C++ code in the Media Framework library, plus some supporting Java code. In other words, relative to the complete Android codebase, the amount of code that will be affected is quite small. We will need to support various Android versions and various phone manufacturers and models per manufacturer. Our development process concerns using the pure AOSP as a basis, and initially targeting the Google Nexus as a reference platform. After that, customisations needed for real-world phones will be done in cooperation with the phone manufacturers.
From a code management viewpoint, my idea was to maintain a git repository for our Media Framework files, that will be branched for each maintained version of Android. Separately, we will check out from the Google AOSP repository the code for each supported version of Android, and overlay/merge our Media Framework code onto this codebase. The resulting codebase for each version of Android will be built targeted to the range of Android phones that we support, initially the reference Google Nexus.
Some development approaches that come to mind:
- For each Android version, we could patch Android's Media Framework with our code, and then maintain the entire merged AOSP in a local git repository. This would be a huge undertaking, when branches are included, but would at least guarantee that the codebase is always up to date. Howoever, merging our code changes across difference Android versions would be difficult.
- Another option is to only maintain our Media Framework files in a local git repository, branched for each Android version. Before building a specific Android version,we could checkout the Android version from the Google repository (or keep it cached locally on our build system or on developers' machines) and then patch Android's Media Framework files with our files.
Many thanks,
polomora

Can someone compile p2p_cli from the Android platform source for me? PIE problem

WiFi direct has a shell tool for doing configuration changes called "p2p_cli". I can't find a newer version compiled to run on Android 5.0 with the new PIE security requirement.
It seems to be part of the Android platform source code, here: https://android.googlesource.com/platform/external/wpa_supplicant_8/+/master/src/p2p
Reference on PIE compile:
http://stackoverflow.com/questions/...id-l-error-only-position-independent-executab
Some ROM developer can maybe compile it for me and provide a download of the binary? Thank you.

[CLOSED][LINUX] Arch Linux for ASUS MeMO Pad 7 (ME176C(X))

Arch Linux is an independently developed, x86-64 general-purpose GNU/Linux distribution that strives to provide the latest stable versions of most software by following a rolling-release model. The default installation is a minimal base system, configured by the user to only add what is purposely required.¹
NOTE: The Arch Linux packages are no longer updated. Consider taking a look at the postmarketOS port instead.
Introduction
With Android 5.0 (Lollipop), the ASUS MeMO Pad 7 (ME176C(X)) was updated with UEFI boot, making it possible to boot any Linux distribution on it. archlinux-me176c aims to make Arch Linux fully work on the ASUS MeMO Pad 7 (ME176C(X)). It provides additional packages and documentation for using Arch Linux on this device.
With me176c-boot, Linux can be installed in dual/multi boot configurations together with Android. Arch Linux is a minimal distribution, therefore most of the setup (partitioning, installing a desktop environment, ...) will be left up to you. However, it also allows you to customize it entirely to your liking, and configure it for any use case you can imagine.
Installation
Warning: Although the wiki article below provides many recommendations, at the end, setting up the installation will be left up to you. There is no step-by-step guide. If you have never used Arch Linux before, you may want to try it on a desktop PC or virtual machine first. You can easily brick your tablet if you don't know what you are doing!
All documentation is available in ASUS MeMO Pad 7 (ME176C(X)) - ArchWiki. As a wiki article, I encourage everyone to contribute and share their experiences with everyone else.
If you need any help or further suggestions, do not hesitate to ask in this thread!
FAQ
Can I use other Linux distributions on this tablet? Yes! However, you will need to set up more things manually. There are a few notes for this in linux-me176c: Porting - Using linux-me176c in other distributions
Source Code
Documentation: ArchWiki
Packages: archlinux-me176c (GitHub)
¹ Source: https://wiki.archlinux.org/index.php/Arch_Linux (GFDL 1.3)
XDA:DevDB Information
Arch Linux for ASUS MeMO Pad 7 (ME176C(X)), Tool/Utility for the Asus MeMO Pad 7
Contributors
lambdadroid
Source Code: https://github.com/me176c-dev/archlinux-me176c
Version Information
Status: No Longer Updated
Created 2019-04-02
Last Updated 2020-05-12
Reserved
Hi!
Seem awesome!
Do this have a full hardware accelerated graphics support?
Is this compatible with k013 ?
shim80 said:
Do this have a full hardware accelerated graphics support?
Click to expand...
Click to collapse
Yes. (It has Intel Graphics just like on normal Intel PCs, and therefore OpenGL and Vulkan support is provided by Mesa.)
shim80 said:
Is this compatible with k013 ?
Click to expand...
Click to collapse
Yes, K013 == ME176C(X).
Thanks for the answers.
Also, if wan't to go back to Android, can I do it?
shim80 said:
Also, if wan't to go back to Android, can I do it?
Click to expand...
Click to collapse
The recommended setup is to keep Arch Linux on an external SD card. Then you can have Android and Arch Linux installed at the same time ("dual boot").
@lambdadroid man when running
# pacman -Sy me176c
or trying to install base packages it says
error: me176c:signature from "lambdadroid is known trust error: failed to update me176c (invalid or corrupted database (GPG signature)
when running
$ pacman-key --finger keyid
it says pub
ed25519 2017-08-10 [sc] [expired: 2019-08-17] uid [expired]
should I try an offline instalation?
No longer updated
The binary repository has been down for a while now - I have no plans to update the Arch Linux packages again. This is mostly because I'm no longer using Arch Linux myself on the me176c / K013.
However, as a replacement a postmarketOS port with same functionality has been around for a while. Since it's much more comfortable to install (simply through Fastboot/SD card with a large number of selectable UI interfaces) I prefer it over Arch Linux at this point. I would recommend it to anyone who would like to use a more standard "Linux" distribution on me176c / K013.

Categories

Resources