[Q] How to pull headers from my device - Android Q&A, Help & Troubleshooting

How do you pull the headers from an android device using Cyanogenmod 10? I am looking to compile an older overclocking kernel for the nook color from CM 7.x series and Can you use the headers from linux directly for Jellybean through the apt-get? Or are the headers specific to each device? Or do you have to develop with an Android debug bridge?
I ran a <uname -r> in the terminal emulator and got that the headers are named "3.0.8-gb0e1840" on this device.
This is my first time trying to compile and troubleshoot a module on an android device so any help or suggestions are welcomed. I have compiled modules under linux before which seem a lot easier. Thanks.

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?

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.

How can I enable /dev/watchdog functionality when compiling Android from source?

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?

[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