ROM building (building time, sync build with device) - Android Software/Hacking General [Developers Only]

Hello,
Recently I downloaded the LineageOS 14.1 source code. I made some changes using IntelliJ but I find it a little cumbersome to test the source I wrote due to the following reasons:
1. I must always build the rom (building time around 20-25 minutes).
2. I have to reboot into recovery to flash the new rom
Is there any easier way to partially build the modified source and flash the changes to the device without rebooting?

Related

[Q] Snapshot of Android source

Hi!
I planning to create packages from Android SDK for some popular Linux distributions. However, most distro have a policy against repackaging third party binary packages (such as you can download from developer.android.com).
I would like use snapshot of Android source tree, because
- Android SDK not changes too fast
- repo utility fetches a very, really very lot of unneeded information (a whole history of all repository in android tree)
- It can increase a package build time a _lot_. As some autobuild solutions have a hard timeout for package building, I would like avoid using repo anyway.
So, the question is clear: is there somewhere a snapshot from the source tree?
hron84 said:
Hi!
I planning to create packages from Android SDK for some popular Linux distributions. However, most distro have a policy against repackaging third party binary packages (such as you can download from developer.android.com).
I would like use snapshot of Android source tree, because
- Android SDK not changes too fast
- repo utility fetches a very, really very lot of unneeded information (a whole history of all repository in android tree)
- It can increase a package build time a _lot_. As some autobuild solutions have a hard timeout for package building, I would like avoid using repo anyway.
So, the question is clear: is there somewhere a snapshot from the source tree?
Click to expand...
Click to collapse
I would like to know how to do this also.

[How To] Build CM12.1 and PAC ROM 5.1.1 and ROM2SD installation

There are no official CM12.1 and PAC ROM 5.1.1 builds for TF700T. Cyanogenmod is a ROM loved by many people. In addition to the features of Cyanogenmod, PAC ROM also cherry-picked good features of some other ROMs, like OmniSwitch and Pie Control. More importantly, Cyanogenmod may be the only ROM that applies security updates even to their old branches.
It turned out that it's not very difficult to build fully functional CM12.1 and PAC ROM 5.1.1 for TF700T from source. Just several extra steps in addition to the official guides.
Here is how I did it.
Official guides:
How To Build CyanogenMod For Asus Transformer Pad Infinity ("tf700t")
How to prepare and build PAC-ROM in Ubuntu 14.04 or higher
How to Compile PAC Rom and Port
Additional steps for both CM12.1 and PAC ROM 5.1.1:
After 'repo init ...', before 'repo sync', Put the attached 'roomservice.xml' in '.repo/local_manifests/' directory in the folder where you downloaded the source code. This will ensure device tree and kernel source will be downloaded from VanirAOSP and CyanogenMod during 'repo sync'.
I used 'repo sync -f --force-sync' instead of 'repo sync', so that it won't abort due to errors.
Download Vanir 5.1.1 for TF700T. You can either install it and follow the instructions to extract the proprietary blobs, or just extract the contents of the '/system/' directory of the zip file to '/vendor/asus/tf700t/' directory in the folder where you downloaded the source code.
Additional steps PAC ROM 5.1.1:
Follow this guide to prepare additional files. The ones I used are attached. Mostly, they are from PAC ROM 4.4.4 branch.
Extract the proprietary blobs as stated above, before execute './build-pac.sh tf700t'.
The whole process takes several hours.
With F2FS /data, they are quite smooth, as good as, if not better than ZOMBi-POP.
The only problem I noticed is that Blue-tooth is not working with CM kernel, but it's not a problem when using with _that kernel. You have to use ramdisk of CM12.1 though. If you are going to install the ROM to internal storage, then you have to follow these steps to make a boot.blob with that kernel and CM ramdisk then flash it through fastboot.
Maybe it's better to do ROM2SD installation if you run a ROM internally with that kernel. Just follow the instructions of @_that. Flash rom2sd1.zip, then the ROM, SuperSU, OpenGapps Arm Nano 5.1, then rom2sd2.zip. Attached are the ones I used. I added several files from ZOMBi-POP, and also several lines to ensure '/system' is mounted.
This method also works for other ROMs without ROM2SD support, like OmniROM, Vanir, KatKiss, etc.
Sometimes, I got error with this method. Then I just replaced '0p1' in '/META-INF/com/google/android/updater-script' with '1p3' and flash the ROM before rom2sd1.zip. The rest is the same.
Please feel free to ask any questions.
It seems that these two ROMs run better with internal installation and ext4 /data.
Until someone with the knowledge is willing to tweak the ROM for TF700T, L SPEED can make it run faster. Some people might also be interested in Extreme battery life.

Attempt to build LineageOS 15.1/16.0 with HW decoding

Hello,
I am currently trying to build a custom build of LineageOS 15.1
ATM I have followed the official LineageOS guide to compile and have added vendor repo from Steel01 Gitlab (CM-Shield)
Afterthat, I have applied the patch for exposing the arm libm intrinisics with repopick.
Compiling is success, the tablet can boot but Youtube 1080p/60fps videos are still laggy (a lot of dropped frames).
Do you know what other things can be done?
Edit: I am also trying to build 16.0 releases. Build successfully completed but cannot boot.
How this can be troubleshooted?
I had look at the kernel and recovery logs. Kernel log show strange errors but cannot say if these are the cause of the 'non-booting'

[GUIDE] How to build Lineage OS 19.1 for Moto Channel from source

First of all, I want to thank the official Motorola contributor SyberHexen for the precious advice he gave me thorugh the process. All the credits go to him for the hard work he's been doing for our community through the years.
DISCLAIMER:
I take no responsibility whatever for any kind of damage that might occur by following the steps below. Building an unofficial ROM using "what worked for another person" and costantly updated sources includes a high risk of making your phone unstable, bricked or causing loss of data. Remember to back up your data before flashing the rom. The guide may contain errors or not be fully compatible with future PRs on the original source, so DO IT AT YOUR OWN RISK.
WHAT YOU NEED:
- SyberHexen's unofficial build and Moto Ocean partitioning file
- A Unix\Linux system (haven't tested it on WSL, sorry)
- 300/350GB of available disk space
- at least 16 GB of RAM
In case your machine doesn't fit the requirements, you might consider a dedicated cloud Linux device (I used an AWS EC2)
STEPS:
- Follow the official Lineage OS build guide for Motorola Channel up to the Turn on caching to speed up build section.
- For the Initialize the LineageOS source repository section, use the following Repo command:
repo init -u https://github.com/LineageOS/android.git -b lineage-19.1 (and NOT 18.1, as indicated)
- Follow the indications as in the Prepare the device-specific code section
- enter the device path and remove the channel folder, as some blocking changes have not been pulled into the main repo (this might become unnecessary as soon as Andrew Hexen's changes are merged into the LineageOS repo):
cd ~/android/lineage/device/motorola/ && rm -rf channel
- get the device specific content from the updated Hexen repo, rename the folder and check the branch is lineage-19.1:
git clone https://github.com/SyberHexen/android_device_motorola_channel.git
mv android_device_motorola_channel channel
cd channel
git checkout lineage-19.1
- install Python3 and python3-protobruf if not already on the system (the package named python-protobruf indicated on the following step is not available on most recent systems anymore)
- extract the proprietary files from SyberHexen's April ROM following this guide (Payload section)
- go back to the official Lineage OS build guide and follow the steps from the Start the build section on. Consider that building from source might require a few hours.
- boot your phone on Fastboot, and flash SyberHexen's ocean_gpt.bin file (fastboot flash boot ocean_gpt.bin)
- boot into Recovery Mode and sideload the Lineage OS rom you just compliled. If you use the gapps, reboot into Recovery Mode and sideload the respective package (MindTheGapps-12.1.0-arm64-20220416_174313 worked great for me)
Congratulations, your freshly built unofficial ROM should be up and running!

trying to get lineage 20 to boot on both xperia 1 and 5

so yeah, i trying to build lineage os 20 to boot on both xperia 1 and 5, but right now it didn't boot. based on testers
here's the proof
xperia 5 :
https://github.com/lolipuru/device_sony_bahamut
https://github.com/lolipuru/vendor_sony_bahamut
xperia 1 :
https://github.com/lolipuru/device_sony_griffin
https://github.com/lolipuru/vendor_sony_griffin
kumano common tree :
https://github.com/lolipuru/device_sony_sm8150-common
https://github.com/lolipuru/vendor_sony_sm8150-common
kernel :
https://github.com/lolipuru/kernel_sony_sm8150
these tree is very different than currently tree, due to no longer rely on stock vendor. and camera already fix to works with newer android
first time i tried it give me black screen , with hwcomposer 2.4 not running. but with rebased tree it didn't boot at all (and both tree are rebased on same pdx206, which i currently own.)
without pstore or console ramoops it's hard to know the real issues
should i open donation to buy device (xperia 1 or 5 is fine, since it share same hardware) to fix the issues? (i already have tester, but seem like i need ramoops or console ramoops log for point out the real issues)
actually i didn't want to open for donation, until ferdian (who maintain xperia 1 twrp), told me to try)
I build kernel for griffin with both your kernel source and Sjll's kernel source.
I found a strange(?) thing: If I build kernel without "techpack/audio", everything works well expect audio (Yep, drop audio kernel so audio dead), but If I build kernel with "techpack/audio", then I got bootloop, surfaceflinger and hwcomposer dead.
This is TOO Strange.....I tested on my Xperia 1 (802SO), not only your kernel source but also Sjll's kernel source have this issue.
And another strange thing is that the kernel source is working well for bahamut (Xperia 5) :\
Okay, I just find that two strange things.So I guess here are something strange with Sony's Open Archive
Do you need dmesg or something else? I got griffin but I have no idea with this issue.
RealNoobKanger said:
I build kernel for griffin with both your kernel source and Sjll's kernel source.
I found a strange(?) thing: If I build kernel without "techpack/audio", everything works well expect audio (Yep, drop audio kernel so audio dead), but If I build kernel with "techpack/audio", then I got bootloop, surfaceflinger and hwcomposer dead.
This is TOO Strange.....I tested on my Xperia 1 (802SO), not only your kernel source but also Sjll's kernel source have this issue.
And another strange thing is that the kernel source is working well for bahamut (Xperia 5) :\
Okay, I just find that two strange things.So I guess here are something strange with Sony's Open Archive
Do you need dmesg or something else? I got griffin but I have no idea with this issue.
Click to expand...
Click to collapse
Sjll source have main issues,
first, it's mostly modify kernel with stock dtb (due to rom built "without" vendor at all, so it still using stock vendor)
second, even you manage to fix it. but most of blobs are pretty outdated now (espepcially camera blobs, you still need to do a manually patch)
i tried with full source build, yea. it booted but blacked screen due to hwc 2.4 isn't running at all. (when i was address all missing blobs, it doesn't boot)
* kernel is pretty fine, it can boot to twrp but i didn't want to use it (due to nature of a/b twrp, so it broke many things if you use with sjll source.) so i tell ferdian to do an installer script
i already have a chat with creamdraft and bbn about this, seem like that issues isn't easy to deal with

Categories

Resources