Is bare metal Linux possible? - MTCD Android Head Units Q&A

Bit of a story here.
So I have been long into car hacking, doing all sorts of canbus related modifications to my Merc W203 model.
The stock radio is utter garbage by today's standard, and Xtrons do a ton of android head units for my car. (Either with an A35 CPU and 2gb ram, or Px5 CPU with 4gb ram).
I am wondering, would it be possible to COMPLETELY remove android from it, and instead boot something like archlinux-arm on it. I want to create some custom applications on it whilst also having full control over the entire OS (Hence the want for Linux, not android).
I do kernel development as well so I am not worried at all about devices not working, I can likely hack together a kernel driver for nonworking hardware on the unit.
I am simply looking if it is possible to wipe android and see if it's possible to use it as a bare bones PC.
Any help would be appreciated, before I bite the bullet and spend £250 on one!:laugh:

You still need the GUI and stuff like that.
Besides, Android "is" Linux! Much better, imo, to base it off of Android, to keep the ecosystem that that comes with.

FransUrbo said:
You still need the GUI and stuff like that.
Besides, Android "is" Linux! Much better, imo, to base it off of Android, to keep the ecosystem that that comes with.
Click to expand...
Click to collapse
I am pretty sure by he said 'bare bones' does not mean an (Linux kernel based) operating system with only an command line terminal (i.e. something that looks like MS-DOS).

My point is that native Linux doesn't HAVE "mobile GUI". It have X11, which is *NOT* (!!) suited for such a project..
So either have to port whatever GUI Android have back to Android, or write his own. Which is a *MASSIVE* (!!) undertaking..
Also, Linux isn't quite suited for mobile applications. That's why Android was created. It took all the good from Linux and made it fit a mobile application.. Reverse engineering or back porting all that work to Linux is just dumb..

FransUrbo said:
My point is that native Linux doesn't HAVE "mobile GUI". It have X11, which is *NOT* (!!) suited for such a project..
So either have to port whatever GUI Android have back to Android, or write his own. Which is a *MASSIVE* (!!) undertaking..
Also, Linux isn't quite suited for mobile applications. That's why Android was created. It took all the good from Linux and made it fit a mobile application.. Reverse engineering or back porting all that work to Linux is just dumb..
Click to expand...
Click to collapse
Wait does the OP mean he need some thing like postmarketOS(some kind of Linux distribution with mobile GUI)?

Of course he does!! What do you think "Linux" is?!
Linux is *JUST* (!!) the kernel! NOTHING else.
The *distribution* is everything else. Boot procedure (scripts, commands, filesystem tools - technically that's "The Userland" - the install procedure, the packaging etc etc). Then you put your GUI on top of that.
On top of that you have X11. Or "The GUI". TECHNICALLY, X11 require some more stuff, the window manager too actually be useful. Without it (the window manager), X11 is just an API to the graphical functions - "draw window border", "draw a close button" etc etc. Which is what the window manager utilises.
So: kernel <- userland <- X11 <- Window manager <- Graphical apps
Then all of that is packaged up in a need CD/DVD/Image to make it easily installed and used. And we call that "The Distribution".
This is how UN*X works and that's how LINUX works. Simple, portable and very useful. But not for a phone, tablet or, in this case, a car!
That's why Android was created. It is ALL of that, in ONE package! With thousands and probably millions of apps compiled for it. Do it yourself, and you have to write EVERY (!) app you need yourself - radio apps, navigation etc etc ad-finitum..
Because NO ONE/THING (except in very rare occasion) "talks" to the kernel. They "talk" to libraries (libc, libX11 etc) to do what they need. Which is why you need "The Userland". THEY (the libraries) then "talk" to the kernel (networking, filesystem, input, output etc) giving the apps a nice API - "Application Programming Interface". A set of functions and tools for applications to use, so they don't have to recreate "the wheel" every time.
Now, I'm not going to go deeper, unless you want me to . I do understand that the un-initated don't know the difference between "Linux" the-kernel and "Linux" the-everything. But this *IS* important, believe it or not..
The kernel is absolutely useless on its own. It can't do squat! It was never MEANT to be used on its own. It was designed and built to be used *with* a distribution - "GNU" in the large majority of cases..
Although it's possible to use bare-bones Linux with either your own distribution (MASSIVE amounts of work, I know, I've tried it!) or an existing one (Debian GNU/Linux, RedHat, SuSE etc - they all provide binaries and packages for a multitude of processors), none of them have all the goodies that Google Play Store have.
And none of them are really targeted towards a mobile graphical environment.
Raspbian for example, was made for the Raspberry Pi, but that is in 99% of cases a non-graphical environment (robots and media stations mostly). Most distributions is like that.
The Play store on the other hand is *specifically* targeted towards a mobile, graphical environment. As this is. I would be foolish to try to reinvent the wheel when Android already IS Linux+userland+GUI+distribution.
Keep in mind though that Android apps on Google Play is compiled for an ARM (ARM64) architecture! Meaning, whatever hardware utilised, MUST run on/with an ARM processor..
All this limits the hardware choices substancially.

Everything "is possible". In theory. In practice though, I'd say the answer is "no". It is simply to much work to get it working. For absolutely no benefit.

With that being said... Bare Android on the other hand!! Now THAT is an idea.
Get your Android kernel source and compile it for the specific hardware you're using and then your Android distribution, set it up juuuuuuust so and you'll get what I (and probably everyone always wanted - a non-bloated piece of ... well, we've all seen them.

Related

How About Android for Desktops...

Another discussion where I posted a version of this led me to thinking that this might make for an interesting topic all on its own.
How would you envision a port of android made specifically for Desktop/Laptop environments, and do you think such an OS would be appealing to the average user?
_______________________________
As I envision it, ChromeOS should be folded into Android 4.0 and Google should build a version of the combined OS for Desktops.
The idea would be to create a common ecosystem of apps and usage environment accross multiple device categories, ad have it all interconnected through Google products and other apps running in the background.
I envision something that boots instantly right into ChromeOS while the rest of the Android system boots up in the background, thus allowing you virtually immediate cloud based functionality on the desktop. You could even choose to ONLY boot into chrome, say if you needed to look up something quickly online and didn't want to fully turn on a computer that has been turned off.
The chrome side of things would be very similar to ICS for tablets and would be deeply linked to all things google as well as relying on versions of the same Google apps that run on mobile, but optimized for ICS and taking advantage of larger screen dimensions. I envision touch interface to be retained for those who have touch sensitive screens, but also better keyboard and touchpad/mouse controls than currently exist. Lastly I would bundle a Google fork of Libre office specifically designed to have deep automatic integration with Google docs and Google+, but allowing users to have local editing control.
I would love to have such a system and have a common ecosystem between my phone, tablet and desktop/laptop, much how Apple currently does with IOs devices and MacOS and how Microsoft is planning to do with Windows 8 and WP8. unlike those ecosystems, this would run variants of the same OS, as opposed to different OSs made to work together, thus being able to take advantage of current built up knowledge and the existing android market.
Imagine if Google did the entire thing open sourced and released it to desktop and laptop OEMs.
A guy can dream right? If only there was a way to have a bunch of people pitch it to Google.
What do you guys think and how would you envision such an OS?
Android is already going to be merged with the Linux kernel in version 3.3 (with improved power management in 3.4)
nejc121 said:
Android is already going to be merged with the Linux kernel in version 3.3 (with improved power management in 3.4)
Click to expand...
Click to collapse
you sure about that? From what I've read Android is going to provide it's drivers and both Android and linux are going to provide patches to each other's kernels (with Power management being addressed in later versions of the linux kernel (3.4?). The Android kernel will remain (at least for now) a fork of the linux kernel.
Still that doesn't really address the subject of this thread.
Santeno said:
As I envision it, ChromeOS should be folded into Android 4.0 and Google should build a version of the combined OS for Desktops.
I envision something that boots instantly right into ChromeOS while the rest of the Android system boots up in the background, thus allowing you virtually immediate cloud based functionality on the desktop.
Click to expand...
Click to collapse
Yeah i too dream of Google using all the OS & games tech experience they have gained from Android to bootstrap a full desktop OS.
My personal fantasy is that the under no circumstances include any of the Chrome Cloud based nonsense. But focus quite heavily on games and multimedia, offer an OS that delivers content & gaming rather than try going head to head on productivity (where they would get owned).
Am not going to go into my objections to the cloud concept, lots of geeks my age & older well remember the mainframe model from the 70's and the cloud suffers many of the same inherent flaws IMHO.
I addition my fantasy involves ARM leveraging the experience with the multi-cores they have developed to produce an ARM desktop CPU arrays, as am a big fan or clusters and arrays, render farms etc.
I have to confess being serious i don't see either happening since both would be attempting to breaking into markets they are inexperienced in and where entrenched competitors already have a tough obstacle course laid out, plus pretty deep war chests.
But the main issue with a Google desktop OS, IMHO to succeed, i think it would have to be capable of some kind of half decent x86 emulation ........... But hey we are talking 'The Brothers Grimms Tales of Silicone Valley' here anyways.
Its possible to do so now, albeit not the same experince you get on your phone or tablet due to lack of driver support Its how i checked out 4.0 before I got it on my Asus Transformer Prime. Worth a try!
(Im new to XDA so I cannot post links, however google "android x86 download" and its the first link.)
There are ready is a port of android that works on desktops that these guys are working on over at http://www.android-x86.org/.

[Dev] Who wants to port ZGrom or GMenu2x?

Here's a link to the project:
http://code.google.com/p/zgrom/
A cut&paste from the page:
ZGrom is a gaming oriented distribution for Sharp Zaurus PDA devices. It's a console based distribution built around the Gmenu2X SDL GUI. ZGrom has a wide selection of quality emulators, game engines and apps. Currently, ZGrom only supports the following Zaurus models:
•C-1000 - Akita
•C-3000 - Spitz
•C-3100 - Borzoi
•C-3200 - Terrier
ZGrom comes with GINGE. In a nutshell, GINGE enables ZGrom users to run unmodified GP2X binaries. Some of the emulators and game engines that come with ZGrom are plain, unmodified GP2X binaries that execute on Zaurus devices via the GINGE static loader.
A link to the gmenu2x page:
http://mtorromeo.github.com/gmenu2x/
A cut&paste from the page:
GMenu2X is a frontend application targeted at embedded devices, originally developed for the GP2X and successively ported to other devices.
GMenu2X provides an easy to use interface with quick access to the games and applications of the device trough links similar to those found on PC's desktops.
Its interface is fully customizable with skins.
Other features include: built-in selector for emulators, manuals and readmes integration, built-in overclocker, gamma and volume configuration, ram timings tweaker.
I started working with these but like with other projects... i'm short on time these days. The last of my efforts had a working kernel for these, only a keymap was needed to give to the zgrom developer to build a rootfs, and for someone to text and debug.
IMO the better way would be focusing on developing Android distro, because probably most people are still waiting for working Android on our beloving UNI! Anyway, your efforts are great and mainly because of you UNI developing is still alive!!! Good luck!!
l2tp said:
IMO the better way would be focusing on developing Android distro, because probably most people are still waiting for working Android on our beloving UNI! Anyway, your efforts are great and mainly because of you UNI developing is still alive!!! Good luck!!
Click to expand...
Click to collapse
Lol, I know, I’m taking a break waiting for another project to finish up:
http://forum.xda-developers.com/showthread.php?t=1948803
I’m working on shrinking android now; deleting unneeded library’s and functions to lower memory/processor requirements and running processes. This OS is better suited for people who don’t use their universal as a phone and only have 64mb of ram. I don’t have time to work on this either, the question “Who wants to port ZGrom?” wasn’t rhetorical; I really want someone to pick up where I left off porting it. And android for universals is mostly done all hardware except the cams work. Power saving, gprs, sound on both ends of the call all work… I just need to trim and speed it up….and learn some arm assembly to add in iwmmxt optimizations.
I understand that 64 MB of RAM is too little to run any recent Android version (and by recent I mean higher than 2.2), so it'd be good if there was some alternative OS to bring life to old Universals with the standard RAM - even if that new 'life' doesn't including phone abilities. I don't think the PXA 27x CPUs aren't really that optimized to run Android either (Android can be slow on ARMv6, let alone ARMv5). I'm not telling you to give up on the Android thing; just trying to make people realize notime can't focus forever on something that can't be further optimized... but if it can, then just go ahead
In that sense, I support any development efforts towards something that's not Android.
Also, the work done in porting recent Linux kernel versions can be used not only in Android but in any other Linux-powered OS porting. I may have a go at it... once I format my computer with a bigger ext4 partition (currently out of space to install any kind of cross-compiling tools or SDK) - and this can get delayed for several months.
I was playing around with my Universal (with a dead battery), running old Linux distros on it (with things like Qtopia and Opie), when I started thinking if there wasn't a more recent thing to run other than Android. Then I remembered I had promised to try to port this thing once I got my computer formatted...
Actually I have already formatted my computer and now I have a mostly free >250 GB ext4 partition. I'll only be able to start working on this in the beginning of July, however.
This seems like the perfect use for a Uni that doesn't survive when it isn't charging.

[Q] Is the Dinosaur Extinct?

I like this phone. Feels good in my hand. Did the job fine with Froyo. When the GB update never came, rooted it and began a new hobby (obsession?). Now running a 4.4.4 Omnirom. Works mostly quite well. Doubtful if there will ever be Lollipop.
I do not need a quad-core screamer. This is a mobile phone and information device. I am not playing Grand Theft Auto on it, and if I spend time viewing my favorite flicks, there will be no battery left when I need to phone home. Wife will not be happy (unless here battery is also dead for similar reasons so will never know).
However, more and more apps will not run. Armv6 is definitely on the outs, even though some providers still sell such phones. Running old Maps version, Google Now does work, sideloaded, with an online-voicesearch-wrapper. Not bad, in all.
But maybe time to get a newer device. Or maybe another OS ...
Android was designed to be a Java-based Linux. Apps written would simply install and run on any hardware. No need to compile for that Atom or other chip. Simply played. The way it was supposed to be. (Gnu Linux depends on Gnu C and C++ compilers, and every distro needs to maintain app package variants for various HW architectures. Android was to be the alternative with one app store ...)
and then, devs started incorporating pre-compiled JNI (Java Native Interface) components. These are compiled (using the Gnu compilers?) for specific architectures. Read Armv7. Lets out our devices, Intels, etc. It is too much trouble to maintain multi-architecture apps this way. Armv6 is obviously obsolete, so goes by the wayside entirely. Most apps are not opensource even if I were to compile them myself.
This destroys the whole idea of Android and Google is the worst offender. How long till that shiny ridiculously priced flagship ends up like our device? How long to only 64 bit is supported (definitely need 64-bit on a ... phone!)? How long till Armv8, 9, .... Maybe time to forget about Android all together. Google is the prime offender.
Problem is that Windows and Ubuntu both need compiled Apps (though QML and HTML5 should be portable). Both do look good. Put in the Dalvik VM, just like Java gets installed on any distro, and made in the shade, can keep the more reasonable apps. Gnu tools should be available for Ubuntu.
Do not know whether this is the place for this tirade, but ... what say you?

[Firefly] [ROCKCHIP] [ITX-3588J] ITX-3588J ARM Android/Linux Dual "Deskphone" Progress

First off, I wanted to say I posted a few threads about this thing here asking questions about stuff I needed to get it working in the way I'd like and I'd want to thank you because I have made a lot of progress in getting it to be what I'd like it to be. I also don't know if this is the best forum to post this report because it's neither a question nor necessarily a tutorial but rather a summary and description of work already done so far, and especially because this device, while it sure runs Android (very well!) does not fit into any of the categories on this site neatly.
The story so far
This post concerns my experience working with the ITX-3588J, a board released just a few months ago by the Chinese manufacturer Firefly (or T-Chip Intelligent Technology Co. Ltd, based in Zhongshan) that is in the coveted mini-ITX form factor which means it can actually fit into a small-size desktop computer case and indeed has enough compute power to theoretically - and perhaps not so theoretically! - function as an honest desktop system with an ARM processor: namely the - also very new - Rockchip RK3588 system-on-a-chip.
About two months ago, I was looking into acquiring a new kind of computer to replace my somewhat longer on the tooth x86 machine that would be compact, low-power, and easy to transport while also being a fully capable desktop. And I certainly didn't want Apple. I had seen some very small form x86 desktops before, but I also knew there were many boards - like Raspberry Pi - that featured the ARM processor. Not content with the Pi, which is still very weak for this application at least when compared against modern software, I wanted to see if there was something else by now in a similar vein, and when I saw this board I thought it was an amazing option, esp. given I have not yet found a peer. Many ARM single-board devices exist but this is the only one I've found so far that looks to be in a proper desktop form factor and sporting a processor powerful enough to work at that level.
So I got the board, a case, and - noting it had SATA ports - a cheap 250 GB SSD, and put it all together ... and fired it up! And to my surprise, it booted up Android! Which was a real shocker because I generally thought this'd be like another PC board, not having had much experience with this ecosystem beyond phones, so that it would just give the usual "OS not found" stuff. Nope - pre-loaded on the board. Very minimal, very bare-bones though, not even the Google Play and similar essentials required for a usable Android experience. Yet with the little bit I had, I couldn't help but notice it was extremely fluid, responsive, and snappy, moreso than my aging 2018 era x86 box. Moreover, it was very, very interesting (and exciting!) to see Android booted onto a full-size monitor screen like Linux or Microsoft Windows - and actually and surprisingly, to see that it didn't look and feel all that bad!
However, of course, I wanted more. First, I wanted a fully-featured installation of Android. Second, I wanted to run Linux on it - especially given that, a short while later, I found that the board manufacturers were offering a stock Ubuntu 20.04 to be installable to it. Although, in the early stages, I didn't know how to do this at all, and then soon after learned how to reflash the embedded MMC chip to change the OS. And I did so, trying the Ubuntu and finding it also very performant, but not liking either that it was not quite the newest version but also more that it was mutually exclusive with Android - so far.
And that would begin a long - and at many times frustrating, especially given how much information out there is not at all tuned to a device like this being pressed into this application - learning journey toward exploring topics as diverse as how ARM processors and SoCs work under the hood, U-Boot, kernel features, the Firefly-Rockchip developer kit - and having to essentially single-handedly discover many of that kit's ins and outs given there was pretty much no documentation - and more, ultimately leading to where I've got it to now.
What it can do at this point
And that is, right now, I have it sitting here, loaded up with the stock Android 12 and Ubuntu 20.04 - with the former on the eMMC and the latter on the SSD hard drive. On the Android side, Google Play is now loaded and functional, though Google Chrome is not (it crashes with a "Telephony is null" exception for some reason, which seems to suggest for some reason it's trying to act like it's on a phone but isn't). Zoom - an app that I really, really wanted to have (and why I wanted to keep Android around on it) - works and works smoother and cleaner than my 2018 x86 Linux clunker. On the Ubuntu side, though, things are not yet coming - mostly because of seeming inability to use U-Boot to boot from the SSD. I managed to install GRUB, and given that Firefly's generous board SDK provides the full U-Boot source code was able to recompile it with the necessary "bootefi" command enabled which is not present in stock, but nonetheless alas this U-Boot seems to have its SATA support bugged or incomplete, because it would crash immediately upon trying to initialize that subsystem.
Where I'd like to go with it
Obviously, full dual boot of Android and Ubuntu, so getting U-Boot to boot the GRUB resident on the hard drive, is the biggest issue so far, and that means investigating whatever is the problem (or not?) in its SATA subsystem. Getting Google Chrome working on Android is another important step. Moreover - though it would cost extra money that I do not have right now - there's the very interesting possibility, owing to the fact that it has a built in M.2 slot on the board, and alluded to in the title - that the device could be made to act as a cell phone. And finally, the possibility of upgrading to a newer version of Ubuntu (ideally 22.04) - however from what I know so far, it looks like this will have to wait because the stock Linux kernels do not currently support the RK3588 fully - though I'd suggest the Linux kernel developers really should take a look at the SDK that came with this thing because it has lots of code in it including for the kernel, all under GPL.
Final note
One of the most interesting things I've learned from this project, and mentioned earlier, is just how well Android seems to work as a desktop OS. While there have apparently been some attempts to port it to x86, this is perhaps one of the first devices that is desktop-workable and which runs it natively. And one of the things I find that's nice about it is that ironically, because all the apps are designed for small screens, when they are run on a very big screen (and this monitor is not "very big" even by today's monitor standards, being a used and earlier LCD type), they are extremely easy on the eyes and have minimal UI clutter when compared to a typical desktop app on most Linux WMs and on MS Windows.
If you want to know more about the details, or anything else, feel free to ask any questions you might have!
UPDATE:
I believe I may have found an easier way to dual-boot Linux with Android, and that consists of configuring a custom ROM that will put both kernels, and GRUB, on the board's eMMC, while the rootfs for both OSes is placed on the hard disk. Will be seeing how it works.
UPDATE:
I have almost completed the custom ROM! I have now both Android and at least the base system for Ubuntu 20.04 (Kernel 5.10.66) bootable with Android now storing user data on the hard drive; though I'm still running into some hardware initialization issues in the latter that are keeping me from actually installing the desktop system. With regard to the Ubuntu system, there is some interesting issue in that for some reason the provided SDK kernel, which I had to rebuild, seems to build more Android-like because it wants to look in "/vendor" for some things related seemingly to the networking facilities, and it is possible this is preventing me from bringing up wifi, which I need in order to download the rest of the system.
But lots of progress overall - it seems that a full-fledged ARM desktop running simultaneously Android and Ubuntu is within reach to be wrung from this board!
Ignore my request for an update in another post. Seems you like you moving along. I don't need dual boot, just a working Android 12 with GPlay and Chrome. Did you get Chrome to work?
mebalzer said:
Ignore my request for an update in another post. Seems you like you moving along. I don't need dual boot, just a working Android 12 with GPlay and Chrome. Did you get Chrome to work?
Click to expand...
Click to collapse
Thanks. Yeah, I want to say that I have pretty successfully gotten Android 12 working on it for sure, but Ubuntu is proving much more difficult due to graphics support issues, and I'm not sure if it will be possible until RK3588 is supported in the mainline Linux kernel tree which is still something under development. And yes! I got Chrome to work Everything works, actually - it's great as an Android system, though obviously Android is kinda funny to use as a desktop OS. I am wondering if I can't get a "pseudo" Linux using something like Linux Deploy in lieu of running it natively, at least until the kernel development catches up with this new processor.
(FWIW, I'm posting this post from that machine while it is running A12. )
Good to see someone else is interested in it, though. What are you planning on using yours for?
Insofar as getting Android 12 to work w/GApps - it depends on if you want to do it purely on the eMMC or you want to also put user data on an attached hard drive like I did. In either case, the best option, I feel, is to create a custom ROM - I could provide custom ROMs for it for download, but don't know because of Google's licensing conditions around the GApps and have heard of people getting in trouble with Google for distributing custom ROMs for phones that have GApps in them. You basically need to unpack the stock Android image, unpack the "super.img", then load the apps from a package like NikGApps into the "product" partition (NOT "oem" - that was a big mistake), then repack everything and flash to the eMMC again. You will need the board SDK from Firefly for all this as it has the custom ROM-packing and flashing tools.
Alternatively, it is possible to manually install the NikGApps GApps using the Android console - as it's a fully unlocked system, obtaining root access is trivial: just put it into Developer mode and you will find the root access in the "Developer options..." menu under "System".
Shimmy99 said:
Insofar as getting Android 12 to work w/GApps - it depends on if you want to do it purely on the eMMC or you want to also put user data on an attached hard drive like I did. In either case, the best option, I feel, is to create a custom ROM - I could provide custom ROMs for it for download, but don't know because of Google's licensing conditions around the GApps and have heard of people getting in trouble with Google for distributing custom ROMs for phones that have GApps in them. You basically need to unpack the stock Android image, unpack the "super.img", then load the apps from a package like NikGApps into the "product" partition (NOT "oem" - that was a big mistake), then repack everything and flash to the eMMC again. You will need the board SDK from Firefly for all this as it has the custom ROM-packing and flashing tools.
Alternatively, it is possible to manually install the NikGApps GApps using the Android console - as it's a fully unlocked system, obtaining root access is trivial: just put it into Developer mode and you will find the root access in the "Developer options..." menu under "System".
Click to expand...
Click to collapse
Thanks I will keep this in mind. See my reply to you other reply on another post as well.
I would to run gplay as well please send me instruction the nikapps github doesnt say nothing

Development Environment Setup: Hardware?

Asking this question because the attempt to get TWRP on my device is becoming a compound problem as the distance to being able to build it approaches 1. Otherwise known as the law of inverse noobness: Hindsight is always 20/20. Personally, not even half way to 1 in being able to do this, as am fairly new to doing things at the operating system level of programming. Not brand-new though, and knowing how and where to look things up helps, so if you have hints or can point me in the right direction that'd be great. First question is sort of along the lines of "how do you setup your dev environment" if you want to make it modular? More precisely:
So right now, the build page for AOSP concerning my device says to use Ubuntu 14.04 and do all those things to set it up for that. Do I need to do that in order to get TWRP built for my device? To have it set up the same way as the AOSP advises? Having a different computer for each dev environment would be a bit much, but running them in qemu seems even more ridiculous. Perhaps a better idea is to set up a "build environment" on bootable USB sticks that do all the work? That would simply a lot of things, like not having to swap out hard drives, and being able to easily clone a USB drive to "just work" and build AOSP/TWRP at will on any computer.
For reference, it is the Moto G Power (2021) "Sofia" device. They've released sources for it, but not much development going on. So learning how to do this for my device might just unlock TWRP (and with it, probably the Nethunter kernel/chroot environment) for other devices not yet supported.
Help me, help you. Thanks.
(Have other questions, too).
Why not use WSL2?
How to install Linux WSL2 on Windows 10 and Windows 11
The latest version of the Windows Subsystem for Linux is a significant upgrade; for most, it's now easier than ever to install.
www.windowscentral.com
jwoegerbauer said:
Why not use WSL2?
Click to expand...
Click to collapse
I don't use windows.
Bump.
Asking this because it seems that, being new to programming and having no formal training, I'm missing something from tutorials (like the TWRP git page, or some of the tutorials here on this forum that haven't been updated since 2013) and other material that might be thought to be "known" or "implied" and I just can't seem to understand what. Because when I go to build projects or whatever, following tutorials to the letter, still end up with errors and other problems that aren't covered in the tutorial. Part of that problem is installing dependencies, and then having them conflict with other installed things, like having two of python and three versions of java. So having a "build environment" to prevent conflicts is something that wasn't taught, but learned through trial and error, but that isn't the only problem I'm having.
McChadwicke said:
For reference, it is the Moto G Power (2021) "Sofia" device.
Click to expand...
Click to collapse
Hmm. I have the same model, but it's "borneo".
Did you build TWRP for your device? Any pointers or tips?
I usually just modify stock recovery to have rooted, permissive ADB.
I really don't need more than that in a recovery.
I haven't done much with my GP21 since the Firehose loader is restricted.
Renate said:
I usually just modify stock recovery to have rooted, permissive ADB.
I really don't need more than that in a recovery.
I haven't done much with my GP21 since the Firehose loader is restricted.
Click to expand...
Click to collapse
Not sure why the last reply didn't quote you...
Setting up a build environment is an evolving problem. As of this writing it seems the Ubuntu team is switching to a "pro version" system, a paywall, for some services...
Also, AOSP recommends Ubuntu 14 for a build environment. Gave up trying to run it from USBs lol, it is running on a dedicated system. But android-sdk is no longer available in apt, while running Ubuntu 14.04 + latest updates? So went to check why and now AOSP is using its own system for build environment setup and management. Tried running it in Ubuntu 14, but gave errors with the setup script provided.
Seeing now if I can't get the android sdk to run in Mint-XFCE... Will check back. TWRP build page says I need these things to build it (TWRP), right?
Also, how much of the preinstalled vendor crud can be pruned before it breaks?
Thanks.
Edit: reference on the TWRP guide I'm using is https://forum.xda-developers.com/t/...ompile-twrp-from-source-step-by-step.3404024/ (posted 2016)
I think that all build environments are getting more restricted.
"Just do it OUR way" seems to be the new corporate slogan.
I build Android apps without Android Studio, Gradle or an IDE.
Renate said:
I think that all build environments are getting more restricted.
"Just do it OUR way" seems to be the new corporate slogan.
I build Android apps without Android Studio, Gradle or an IDE.
Click to expand...
Click to collapse
Does TWRP have its own build control system? Considering all these changes, should it?
To keep things isolated, clean and manageable on host system, that has no dev tools
or anything extra besides standard desktop stuff. (under main linux distros)
#1 For smallest , fastest deployment of various build/dev environments i use schroot
on devuan/debian , it is a system to manage/automate the use of chrootable containers.
like regular manual chroot but most thigs are automated/preconfigured with
just a few commands and config files.
Basicaly a new root filesystem (userspace) that is independent of hosts root filesystem and just
uses hosts kernel (or as much/little acces to kernel as you give it trough schroot config files)
has its own packages and dependencies and will only see specific sections of hosts filesystem sections you give it access to like say /src/myproject from host. can be a separate /home
or shared with host, all depends on your config.
Using debootstrap to create the filesystems for containers of specific distributions/verions.
Or can just manualy copy an install and rip out the kernel etc...
(Can install ubuntu userspace in debian with debootstrap , if need be.)
(like lineageOS was hard to find all the correct/matching dev tools under devuan, so ubuntu it was)
#2 For something a bit beefier LXC on top of libvirt.
(regular chroot wont run services, or have its own networking , LXCs can , with some extra configuration)
#3 For when you just need an actual full blown VM os installation use KVM/qemu on top of libvirt .
(like installing 15 year old redhat 5.1 in a container wont work, kernels and main libs too far apart)
(or anything that is just too different from current linux kernel , other OS s etc...)
virt-manager is nice for graphicaly managing VMs and LXCs
#1 But schroot is essential and will suffice for more then 90% if not whole 100% of your needs.
if you want a clean host system from being clobbered by constant installing and testing and such . Keeps the environment contained in its own filesystem namespace , have as many as you need .
start fresh,rollback,clone etc.............
Once configured just start another tab in a terminal emulator and schroot in to the container
and your main host system in unaffected, always clean .
#4 Running all of this on top of ZFS takes it a step up, to the next level of effeciency.
zfs helps quite a bit with cloning,branching,snapshots, rollbacks but not essential,
like git versioning for things that are too big for or are not made for git management
(but is another system on to itself to learn, so ignore it if new to linux )
just cloning a 300Mb-1Gb base bootstrap install folder takes no time on regular filesystem on ssds .
With these 3 tools , you can have 10s if not 100s of different environments on a single host
quickly deployable once you get to know the procedures. all usable at the same time without
reboot,
#5 The most important is learning how to hunt for the right version of tools and all of the
dependencies and the correct versions of those , as each project will have their own
and will base it on their own distribution of choice at a specific point in time.
(by being able to install/test/restart in container makes this whole process , easier)
you can test many different ideas at the same time , and merge what works in
to your own dev-build-env for a specific project.
(like hunting down correct tutorial for specific/old/obscure phone and a rom and recovery
and rooting tools associate from a time long past. using wayback machine to source
correct versions of each , as normal web has erased them )
even used schroot to install games for nephew from untrusted sources without hesitation,
and just delete the container when done, but that was a bit more involved as proprietary
nvidia drivers had to be installed on host and partially in containers.
dandudikof said:
To keep things isolated, clean and manageable on host system, that has no dev tools
or anything extra besides standard desktop stuff. (under main linux distros)
#1 For smallest , fastest deployment of various build/dev environments i use schroot
on devuan/debian , it is a system to manage/automate the use of chrootable containers.
like regular manual chroot but most thigs are automated/preconfigured with
just a few commands and config files.
(like hunting down correct tutorial for specific/old/obscure phone and a rom and recovery
and rooting tools associate from a time long past. using wayback machine to source
correct versions of each , as normal web has erased them )
Click to expand...
Click to collapse
neat. schroot looks like a solution. answers a lot of questions, anyway. that last part scares me though. using the wayback machine to source things jeez. there's gotta be a better way, but probably not unless i want to do it myself which will only add time to "the project".
McChadwicke said:
neat. schroot looks like a solution. answers a lot of questions, anyway. that last part scares me though. using the wayback machine to source things jeez. there's gotta be a better way, but probably not unless i want to do it myself which will only add time to "the project".
Click to expand...
Click to collapse
That was just worse case scenario if you get in to very obsolete/old/abandoned stuff (10-20 year old) projects/hardware etc...
dandudikof said:
10-20 year old
Click to expand...
Click to collapse
yeah some of the hardware is in that range. actually upgraded one of the old rigs (because parts are cheap) from an athlon to a phenom lmao thing has 16gb ram, it is stacked now with top of the line things from that era. keeping it around for nostalgia's sake at this point since it still works.
xmrig gets abysmal hash rates, not even worth running on older hardware.

Categories

Resources