[Q] Building unofficial AOSPA ROM - Need Help - Samsung Galaxy Nexus

Good morning,
as per thread title I'm trying to build my first custom ROM.
As it is my first time ever trying this, instead of starting from scratch I decided to port an existing ROM to our device.
I decided to go for Paranoid Android (AOSPA) ROM, for two reasons: I previously used and liked very much the KitKat version, and there is currently no port of this ROM.
I read a lot of guides on how to do this, and while I learnt a lot, I'm still not quite sure on how to properly do this. So I thought I might ask for some help.
What I learnt so far is this:
1) Fork Paranoid Android's manifest and add compatible device and kernel repositories (I chose @MWisBest's device repo)
2) Fork Paranoid Android's vendor_pa project and add device support
3) Fork device tree and adapt some makefiles
What I still don't quite get is:
1) Apart for device-specific fixes, is this enough to TRY a build?
2) Regarding device, are there some specific fixes to make a working ROM? (e.g. I knew something about block-based OTAs so I disabled them following ParanoidAndroid's change #68 on Gerrit)
You can see my work on GitHub, search for my username Bruno3589 (I'm not allowed to insert URLs right now, I need to make >10 posts).
I'll try a build ASAP, but it might take a while since I'm limited in terms of internet connection and time.
Any help or suggestion is really appreciated!
Thanks in advance and have a good day
P.S. I know MWisBest's device unifies all variants (tuna) instead of making separate ones (maguro,toro,toroplus), I thought it would be useful to have a single build.

Related

Modifying Android's built-in apps

Hi guys!
I'm wondering what I'd have to do if I wanted to modify the built in apps inside Android..
I've got a HTC Hero running FroydVillain 1.5.0. Let's say... I want to modify the messaging app that's included, MMS.apk. I wouldn't know how to go about this, and I have a few questions...
Firstly, what sources exactly are used for building the built in apps for a given ROM? The source code link in the FroydVillain post, for example, is just for the kernel. The rest of the OS isn't there.
Secondly, I hear that in order to modify a built in app, you need to build the entire OS. If I just download all the code from Google official repo, and compile that, will it just... work on my phone, provided I use a kernel that is specific to my phone?
Lastly, are there any tips anyone has for someone who just wants to modify a couple of the built in apps? Is it possible to build them as standalone apps? Or import them into Eclipse?
I've had a search around the forum and the internets in general, and people have asked similear questions, but I've yet to find a good answer. This thread comes to mind: http://forum.xda-developers.com/showthread.php?t=635197
If anyone could help me, or point me in the direction of any help, that'd be awesome! Thanks!!
FunkTrooper said:
Hi guys!
I'm wondering what I'd have to do if I wanted to modify the built in apps inside Android..
I've got a HTC Hero running FroydVillain 1.5.0. Let's say... I want to modify the messaging app that's included, MMS.apk. I wouldn't know how to go about this, and I have a few questions...
Firstly, what sources exactly are used for building the built in apps for a given ROM? The source code link in the FroydVillain post, for example, is just for the kernel. The rest of the OS isn't there.
Secondly, I hear that in order to modify a built in app, you need to build the entire OS. If I just download all the code from Google official repo, and compile that, will it just... work on my phone, provided I use a kernel that is specific to my phone?
Lastly, are there any tips anyone has for someone who just wants to modify a couple of the built in apps? Is it possible to build them as standalone apps? Or import them into Eclipse?
I've had a search around the forum and the internets in general, and people have asked similear questions, but I've yet to find a good answer. This thread comes to mind: http://forum.xda-developers.com/showthread.php?t=635197
If anyone could help me, or point me in the direction of any help, that'd be awesome! Thanks!!
Click to expand...
Click to collapse
1) The whole sources for everything are there
http://github.com/ninpo
2) You can import the sources to eclipse, but I think you will need to build the entire tree, as opposed to just what you change
3) Apktool lets you do smali and resource edits on an APK. Without knowing what you aim to do, it's hard to guide you specifically.
Most apps are based on the sources provided by google. I assume you are talking about Froyo Hero ROMs (i.e. FroydVillain), which apps are generally built from the source of CyanogenMod. Specifically for FroydVillain, if you look around ninpo github you will see some packages with some changes to their code, although it does seem that many of the changes in recent releases are not there. I have actually PMed ninpo about this and hopefully this is only a technicality.... I assume that the other packages and apps (most of them) he just compiled off the CM sources without changes.
In any case, if you compile an app either from the CM source or from google's original sources, it should work just to copy the apk file - just make sure you use an appropriate ROM (i.e. Froyo ROM if you built it from Froyo sources). The reason to want the CM sources, is that if they have incorporated further fixes (over the google sources) you may want them.
Finally, some more practical advice: I would start with the google sources: http://source.android.com/source/index.html since I have found these instructions and explanations easier to begin with - it should be quite straight forward to build these sources on a linux machine (or VM).
Then you can also try to tackle the cyanogen source: http://wiki.cyanogenmod.com/index.php?title=Building_from_source currently missing instructions on how to build for hero. But if you only want to copy apks out of it, you can just build a generic build (like in the google souce).
If you have specific problems, ask and I'll try to help you.
Good luck.
pulser_g2 said:
1) The whole sources for everything are there
http://github.com/ninpo
Click to expand...
Click to collapse
For example where are all the changes to the dalvik code? I do not follow closely enough the changes in Froyd to point out other things which might be missing (if at all), but there are relatively few committed changes to the CM code. Specifically the dalvik code, ninpo mentioned hundreds of changes which caught my interest and are definitively not there.
The kernel sources do seem to be up to date always - been following that one closely .
Thanks for the advice I love this forum!
What I'm trying to do, in case you're wondering, ultimately, is to modify the built-in messaging application to give the user the option of sending a message by the normal method, or by using their provider's free webtext service, something that all the carriers seem to offer here in Ireland.
So, for example, you'd press the Send button, and you'd be able to select one of those methods. (of course, you'd have to have a data connection for the webtext). There's also be an interface for entering your login credentials for your carrier's website.
I'm doing this party because it would be very useful. I also feel that it would give me a good introduction to how you'd go about modifying Android. I mean, from a programming point of view, it shouldn't be *too* hard to do. I already have a simple standalone app that I made which can send a text message via an Irish carrier's webtext service. But it's all good experience to try to modify other people big codebases.
I have a good bit of experience with web application development, but my experience with other programming is a little more limited. I usually use PHP, where there's none of this compiling nonsense. You just write scripts and off they go!
So I'm gonna go off and see if I can set up an environment where I can build.. the OS, I guess.
If I was to take the vanilla official Google sources, would they work on my phone? Or would I have to use an official Google developer phone... or the emulator? Or maybe if I stopped writing here and investigated those links you've provided, I'd know that by know.
Brb, investigating
Yeh investigating and just trying to do it is usually the best way
To clarify what I was trying to say above: All the java code is obvious very portable - one of the big advantages of java. In the case of android it is compiled to an .apk file and this file should be, at the very least, portable to all android "devices" running this android version. So the apk you build (for example from the vanilla 2.2 sources) should work on the emulator (good for initial debugging) and any 2.2 ROMs.
erasmux said:
For example where are all the changes to the dalvik code? I do not follow closely enough the changes in Froyd to point out other things which might be missing (if at all), but there are relatively few committed changes to the CM code. Specifically the dalvik code, ninpo mentioned hundreds of changes which caught my interest and are definitively not there.
The kernel sources do seem to be up to date always - been following that one closely .
Click to expand...
Click to collapse
I'm currently on "vacation" from any and all Android development for a week. I'll be back after the weekend, at which time my modifications will be cleaned up and committed to git. The kernel is always current with my latest kernel release due to GPL obligations. The extra time away has also highlighted some changes I need to make both to the kernel and to my Android modifications when I get back.
Hacre said:
I'm currently on "vacation" from any and all Android development for a week. I'll be back after the weekend, at which time my modifications will be cleaned up and committed to git. The kernel is always current with my latest kernel release due to GPL obligations. The extra time away has also highlighted some changes I need to make both to the kernel and to my Android modifications when I get back.
Click to expand...
Click to collapse
Thanks Ninpo

[Q] [KERNEL] Apply realtime patches to kernel

Hi,
I am trying to apply the preempt_rt patches[2] in order to test the realtime performance of native code on an android device in a study project. The device I have for testing is the Galaxy Nexus.
People here seem to have managed to do that with a Xoom[1].
My starting point was the kernel of the current official (4.2.2) Android release (android-omap-tuna-3.0-jb-mr1.1). According to the version string it is based on linux 3.0.31, so I tried to patch it with the corresponding rt-patchset. Except for a few rejects that went fine. Most of them I could get fixed manually.
My problem atm is that there seem to be quite some backports from newer (3.3/3.4?) kernels, especially for the file "include/linux/plist.h" and "kernel/rtmutex.c" which change some function-declarations. Today I managed to compile the kernel with the "CONFIG_PREEMPT_BASIC" option set, but when I try to boot the phone it gets stuck during the Google-bootscreen. It does not show up as an adb device, so I can't get any output from the device.
For me the question is, how much of the Kernel is actually still 3.0.31, maybe it would be more suitable to use the rt_patches for more recent Linux-kernels?
I was also thinking about trying to patch the kernel the GNex was released with, because this one may be closer to the original Linux kernel (I checked, plist.h and rtmutex.c are not the original ones as well)?
Maybe someone else has a better idea what to test, because I am not overly familiar with all the different subbranches and development trees of Android yet. Any help or suggestions would be greatly appreciated.
Best regards,
Jan
PS: I would have posted this in the development section, but wasn't permitted to. Maybe a mod could move it?
PPS: It seems, I am also not allowed to include working links :-/
[1] Search for: "mauerer real time linux tag" to get the paper
[2] rt.wiki.kernel.org/index.php/CONFIG_PREEMPT_RT_Patch

For when a Replicant ROM for this mobile phone?

Hi.
Like me, people that own this mobile phone need to wait for huge efforts from people like Arco to develop a ROM with the last android version and the whole bug fixes and improvements of the OS.
After all that, we need to trust what developers could have done inside that same ROM, the same we get in this 'black market' and pray they didn't do any kind of malicious developments, this, if the source code/blobs didn't come with them already. Forgetting about the security side, if we look at the new features and upgrades of the same OS, again, we will need to wait for people like Arco to get time to develop all we want. So, my question is:
What need to be done for people that use this mobile phone to have the Replicant Android version?
Web references:
- replicant.us
- fsf.org/blogs/community/donate-to-replicant-and-support-free-software-on-mobile-devices
- linux.com/news/embedded-mobile/mobile-linux/759834-fully-free-android-rom-advances-to-jelly-bean/?&co=f000000013912s-1248979074
- wired.com/wiredenterprise/2013/10/replicant/
:good:
vcatpt said:
Hi.
After all that, we need to trust what developers could have done inside that same ROM, the same we get in this 'black market' and pray they didn't do any kind of malicious developments, this, if the source code/blobs didn't come with them already. Forgetting about the security side....
Click to expand...
Click to collapse
Seriously, do you expect this to be different with a Repilcant ROM?
There will be still a Dev behind this who will compile the ROM, add bugfixes and so on.
So if you are afraid of malware being added by a Dev, you can simply download the sources and compile your own ROM. No matter this is CM or Repilcant.
CM is open source and you can watch the entire code to what a Dev has done to it. There is no conspirancy and there is no need to become paranoic.
Therefore I do not see a single reason why a Replicant ROM should be better compared to Arcos CM releases.
I can't explain me better than the references I post in the first post. But for sure, if every project follow the philosophy that Replicant uses, development could improve so much about the SECURITY and so much about the TIME for the news features/improvements, is ridiculous what people need to wait to get an upgraded software (no question about any developer here ofc). And I know life is not perfect, but at some point things need to be done in a credible and systematic way, and this android variant with the name Replicant seems fine to me.
honeyx said:
Seriously, do you expect this to be different with a Repilcant ROM?
There will be still a Dev behind this who will compile the ROM, add bugfixes and so on.
So if you are afraid of malware being added by a Dev, you can simply download the sources and compile your own ROM. No matter this is CM or Repilcant.
CM is open source and you can watch the entire code to what a Dev has done to it. There is no conspirancy and there is no need to become paranoic.
Therefore I do not see a single reason why a Replicant ROM should be better compared to Arcos CM releases.
Click to expand...
Click to collapse
hum..
http://redmine.replicant.us/projects/replicant/wiki/SamsungGalaxyBackdoor
https://www.fsf.org/blogs/community/replicant-developers-find-and-close-samsung-galaxy-backdoor

making unofficial builds of ROMs for our device

hello,
I've noticed that there is a guide for building CM14 for the oneplus 3. Myself and others have been able to use it to make personal builds and to learn some things along the way.
I would imagine that the next step to progress to would be to make builds of ROMs that don't have a nougat/CM14 branch in their repo for our device. Its pretty easy to brunch, select your device, and wait for the build to finish. But I am very interested in learning how to build a ROM using a device tree from another repo.
I've noticed that @Eliminater seems to be very proficient at this, as he has built and posted unofficials of various ROMs.
I've been trying to teach/learn this myself through searching for guides, but havent been able to find anything that helps me get there 100% of the way.
I've been able to get as far as forking the device tree, editing the .mk and .dependencies files to match the format needed for the ROM I'm trying to build. I've also added the forked device tree and additional repos to the local_manifest. This has gotten me far enough that I have been able to do a successful "lunch", but I haven't gotten a build to finish. In fact, they fail pretty early on.
Is anyone able and willing to explain the process further?
Are there additional steps that I'm missing?
Or do you just need to be proficient enough to troubleshoot error after error when building?
Thanks in advance

Unofficial build help?

I'm trying to build for a device that has no known Android 10 device trees that I can find. I think I fleshed out the trees pretty well by following some sister/cousin devices and extracting a lot of stuff from the rooted phone itself, but my build fails at 2% due to a missing output file. The missing libdss.so file should be built as part of the kernel (whose source I have), but the build clearly isn't happening (or isn't happening in time to be recognized by the build system.)
I tried to build the kernel as a standalone module to see what might be wrong, and in trying to do that I can't seem to resolve all the issues with dependencies for cross-compilation to arm64. I've built for devices with existing trees by cherry-picking what I needed, but I've never built for something from the ground-up like this. I don't want to make the ROM with a pre-built kernel as the end-goal would be to become official. The attached image is the exact error I'm receiving, and the following links are to all of my source repositories that I'm using in addition to the Lineage17.1 base. Any help would be appreciated. I work as a full-time dev by day, I don't mind slogging around in some code if that's what I takes, I've just reached the end of my troubleshooting knowledge here and am not sure what the next step might be.
https://github.com/polaarbear/android_device_motorola_troika_sprout
https://github.com/polaarbear/android_device_motorola_universal9610-common
https://github.com/polaarbear/android_vendor_motorola_universal9610-common
https://github.com/polaarbear/android_kernel_motorola_universal9610

Categories

Resources