building for un-existed device - Paranoid Android Q&A

hi, i followed this guide
https://forum.xda-developers.com/showthread.php?t=1863547
Is that guide still working ?
followed step by step but the kernel and the device/lge dont get automatically downloaded when i repo sync. Only vendor.
Also when i do breakfast it doesn't work , breakfast still see the path of my other repo and asks to find the device in a file not included in that guide.
Lastly of course brunch won't work without those files.....
The device i try build for is h815.
Thank you in advanced.
EDIT:
Could also copy paste the whole thing from the other repo i have here and only use the paranoid packages. That way i will still build paranoid , but ofc thats not the way i want to do it.

kessaras said:
hi, i followed this guide
https://forum.xda-developers.com/showthread.php?t=1863547
Is that guide still working ?
followed step by step but the kernel and the device/lge dont get automatically downloaded when i repo sync. Only vendor.
Also when i do breakfast it doesn't work , breakfast still see the path of my other repo and asks to find the device in a file not included in that guide.
Lastly of course brunch won't work without those files.....
The device i try build for is h815.
Thank you in advanced.
EDIT:
Could also copy paste the whole thing from the other repo i have here and only use the paranoid packages. That way i will still build paranoid , but ofc thats not the way i want to do it.
Click to expand...
Click to collapse
One way around this problem is to have your device tree on github and add it to the dependencies file either in the device repo, or add a (device_code_name).mk file to the vendor/pa/products/. Look at an existing device folder there for an example.

Related

*OUTDATED* ROM porting for kaiser/vogue [Linux] NOOB friendly!

THIS IS NOW OUTDATED!!
It uses the old sqsh method WITH a rootfs. So if you're using the NoMoRootfs method, this won't work. Please use the already complete builds in the Kaiser/Vogue threads as they are working the best at this moment.
DISCLAIMER:
I take no responsibility for anything that may happen to your phone/computer. Use at your own risk.
PURPOSE:
This is for informational/testing purposes. And for people to stop asking, "can somebody port X rom!!! PLZ!!!"
PREFACE:
I made this as a quick tool to port ROMs from the Dream/Sapphire forums to work with our phones. It's a very quick and dirty script I threw together using bash, so there's probably some problems with it. This tool is simply designed to make a copy of the Dream/Sapphire ROM. Once you get the setup, it's really easy and you'll be porting like crazy.
I did this all on Ubuntu 9.10 so things might not work properly if you're using another distro.
THANKS:
All credit goes to the people that made this possible, in no particular order...
dzo, vilord, mssmison, zen, enatefox, pmos, jamezelle, craig0r, cyanogen, and so many more. If I forgot you, I'm sorry, but you know if you helped in some way.
THE SETUP:
1) Download this file
2) Extract the folder to your desktop. Then copy and paste the following code into the terminal:
Code:
sudo mv -f $HOME/Desktop/Android/genext2fs /bin/genext2fs; sudo chmod 755 /bin/genext2fs; sudo dpkg -P squashfs-tools; sudo dpkg -i $HOME/Desktop/Android/squashfs-tools_3.3-7_i386.deb; sudo rm -r $HOME/Desktop/Android/squashfs-tools_3.3-7_i386.deb; sudo chmod 777 $HOME/Desktop/Android/*.build.script
3) Now go into synaptic package manager, search for squashfs-tools, select it and under Package, check Lock Version so that way it won't try to update.
4) Now cruise over to the Dream android development forum or the Sapphire android development forum and download the ROM you would like to port. Place the zip file in the Android folder. (no need to rename)
5) Place any .apk's you would like built into the system in the Apps folder.
ADVANCED SETUP:
If you would like to tweak the system before building, open the script in a text editor and you'll find a line to uncomment that will halt the script until you are ready.
HOW TO RUN:
Either run the script from a terminal
Code:
./$HOME/Desktop/Android/HERO.build.script
or
./$HOME/Desktop/Android/Donut.Build.script
Or double click and Run in Terminal
You will get a prompt for your password to use the sudo command. THIS IS NOT SAVED ANYWHERE OR MAGICALLY SENT TO ME. It is just to get the system.sqsh setup for you to use.
You will now see a Donut/Hero folder inside the Android folder. Inside that will be a nice little system.sqsh with the date ready to boot!
*Rename to system.sqsh when you put on your SD card*
Grab the latest basefiles from vogue-android and you're good to go.
~~~~~~ To get an output of what's happening run in a terminal as described above but add " > build.txt" and you'll see a txt file in the Android folder. ~~~~~~~
CHANGING SYSTEMS:
If you want to port a new rom, replace the .zip.
UPDATES:
1) Download the updates from HERE
2) Extract to the Android folder overwriting if necessary.
3) Copy and paste the following code into a terminal:
Code:
sudo chmod 777 $HOME/Desktop/Android/*.script
CLEANUP:
If you follow the advanced setup and/or accidentally closed the terminal before the build finishes, run the cleanup script. This will unmount everything that might be mounted and delete all folders that are made during the process.
DOWNLOADS:
If you're too lazy or just want a quick link:
Main "Android porting" folder
Updates
Input, testers, bugs, and tweaks to the scripts are appreciated!
FAQ:
Why does my system.sqsh not work?
Most likely cause is that you're not using the correct version of squashfs-tools. You'll have to find version 3.X for the distro you're using. Version 4.X will NOT work!!!
When I try to boot a system.sqsh I just made I keep getting something about android power wake locks. WTF?
You're probably trying to port an eclair or cyan ROM. These don't work at the current state. Hopefully soon I'll get these working.
Will update more when they arise.
CHANGELOG:
11-27-09:
-Created a cleanup script in case the terminal is closed during the build process.
-Bug fixes in Donut and Hero scripts
11-24-09:
-Added an Apps folder for apk's you want built into the system.
-Bug fixes in scripts
11-22-09:
-Combined everything needed into a zip file
-WAY easier to setup
11-20-09:
-Added feedback to make more user friendly
-Append time to system.sqsh
loserskater said:
Input, testers, bugs, and tweaks to the scripts are appreciated!
Click to expand...
Click to collapse
Will try today... Downloading
Tried and working. Had to change the script for it work with ubuntu version that i use. Thanks this is really great
garynsa said:
Will try today... Downloading
Tried and working. Had to change the script for it work with ubuntu version that i use. Thanks this is really great
Click to expand...
Click to collapse
What did you change?
Glad to see it's working.
loserskater said:
What did you change?
Glad to see it's working.
Click to expand...
Click to collapse
hI
For some reason I cannot use -a in the genext2fs command. Had to remove that..
One of the Donut is working. Couldnt get the Cyanogen build working . Struggling with hero build also.
Will try again in the next couple of days and post results.
Thanks
garynsa said:
hI
For some reason I cannot use -a in the genext2fs command. Had to remove that..
One of the Donut is working. Couldnt get the Cyanogen build working . Struggling with hero build also.
Will try again in the next couple of days and post results.
Thanks
Click to expand...
Click to collapse
Make sure you use the genext2fs that I referenced.
That one works with -a and might take care of some issues. try that and see if it works.
Updated script to now move system to a Hero or Donut folder.
Working on the cyanogen build now...
EDIT: Here's a cyanogen script that gets it to boot, but sits at a black screen. I haven't had much time to test it so it might boot further than that if you leave it. If somebody wants to test this out or tweak it in some way go for it.
It uses the donut.sqsh in the Android folder so you shouldn't have to do anything with it except make it executable.
EDIT 2: Still working on cyan builds... that script didn't work.
great job i like to see stuff like this to motivate people!!! also note this will work with any donut or hero build from the sapphire forum
jamezelle said:
great job i like to see stuff like this to motivate people!!! also note this will work with any donut or hero build from the sapphire forum
Click to expand...
Click to collapse
Good point, forgot to mention that. Updated first post.
I'm hoping it will help people start to learn to tweak system's. But I have a slight feeling wer're going to start seeing a lot of "MLIGN/DWANG/etc's Android Rom" threads from random people.
Hi
Was able to port the DWANGs build using your script. Thanks a lot for making life this simple. Howev3er, hero build is still not working. Tried your genesxt2fs. Is it possible to get the links to correct base hero version to use? I tried magic and normal version. It keeps giving me black screen and doesnt completely boot. I think the base hero version is not the right one i am using
Thanks
OK, I think I figured out the problem. The apps folders weren't copying over from the data folder to the system folder correctly. Testing now, and will update first post with new scripts.
EDIT: Finally got the Hero builds working correctly. You should still be able to use any hero.sqsh.
loserskater said:
OK, I think I figured out the problem. The apps folders weren't copying over from the data folder to the system folder correctly. Testing now, and will update first post with new scripts.
EDIT: Finally got the Hero builds working correctly. You should still be able to use any hero.sqsh.
Click to expand...
Click to collapse
Hi
The new script is great.. I was able to get the hero to boot I still have 2 check a few thing willl post later in the night with more
Thanks a lot
garynsa said:
Hi
The new script is great.. I was able to get the hero to boot I still have 2 check a few thing willl post later in the night with more
Thanks a lot
Click to expand...
Click to collapse
Glad to see its working. Thanks for the feedback!
Most things working
Hi
was able to get the hero ported and a few things worked
1. Calls
2. SMS
3. Wifi (getting ips)
4. Working with partition rootfs (speed quite great with this)
Not working
1. Camera
2. GPS
I am using he ION build to build the hero roms (based on the inputs of Zen). May be I need to use another hero rom for the camera to work? I recommend that the links to the recommended build to be used as template (donut, hero...) be updated on the first thread to make it easy for others to have a single starting platform
garynsa said:
Hi
was able to get the hero ported and a few things worked
1. Calls
2. SMS
3. Wifi (getting ips)
4. Working with partition rootfs (speed quite great with this)
using u
Not working
1. Camera
2. GPS
I am using he ION build to build the hero roms (based on the inputs of Zen). May be I need to use another hero rom for the camera to work? I recommend that the links to the recommended build to be used as template (donut, hero...) be updated on the first thread to make it easy for others to have a single starting platform
Click to expand...
Click to collapse
If using a hero.sqsh doesnt fix the problem it sounds like it might be the rootfs (probably not copying over correctly). Ill take a look at it when I get home and update the first post with hero/donut.sqsh's.
Im also thinking about combing the 2 into just one script and youll be able to just type which build you want when you run it. What do you think? Or is the 2 seperate scripts more convenient?
loserskater said:
If using a hero.sqsh doesnt fix the problem it sounds like it might be the rootfs (probably not copying over correctly). Ill take a look at it when I get home and update the first post with hero/donut.sqsh's.
Im also thinking about combing the 2 into just one script and youll be able to just type which build you want when you run it. What do you think? Or is the 2 seperate scripts more convenient?
Click to expand...
Click to collapse
Personally i prefer the separate scripts mainly because each requires a different base templates. However if you prefer to combine them may be have sub-folders within the main so that the work happen for each port within the sub-folder.
Few suggestions if you like (please ignore if not correct.. being a non-programmer of linux I can be a bit off )
1. Let the folder names be requested at start and use them
2. If possible to put in a log of the run to check if there were issue or not (because i use double-click to run the script sometimes there is a problem that i face if i dont watch the window. for now i have put some waits to check the errors. Had this issue while testing to port one)
If I can help (except on coding as I dont know it.. generally change the script just enough to work... )
Queries/questions
1. Is there a way to test the build on the comp itslef rather than to keep booting on the phone (takes a lot of time and the phone is not usable all that time...)
Thanks for all the work
garynsa said:
Personally i prefer the separate scripts mainly because each requires a different base templates. However if you prefer to combine them may be have sub-folders within the main so that the work happen for each port within the sub-folder.
Few suggestions if you like (please ignore if not correct.. being a non-programmer of linux I can be a bit off )
1. Let the folder names be requested at start and use them
2. If possible to put in a log of the run to check if there were issue or not (because i use double-click to run the script sometimes there is a problem that i face if i dont watch the window. for now i have put some waits to check the errors. Had this issue while testing to port one)
If I can help (except on coding as I dont know it.. generally change the script just enough to work... )
Queries/questions
1. Is there a way to test the build on the comp itslef rather than to keep booting on the phone (takes a lot of time and the phone is not usable all that time...)
Thanks for all the work
Click to expand...
Click to collapse
I'll try to make the script more user friendly with prompts if something doesn't happen correctly. And also work on naming folders.
But first I want to figure out the camera/gps issues...
There isn't a way to boot it on the comp that I know of. I'll upload blank data.img's for each build so that they'll boot faster but other than that I think moving to SD Card and booting is the only way. But once all these bugs get sorted out, you won't have to do it as often!
EDIT: Which folders would you like to name? Just where the system.sqsh gets stored?
loserskater said:
I'll try to make the script more user friendly with prompts if something doesn't happen correctly. And also work on naming folders.
But first I want to figure out the camera/gps issues...
There isn't a way to boot it on the comp that I know of. I'll upload blank data.img's for each build so that they'll boot faster but other than that I think moving to SD Card and booting is the only way. But once all these bugs get sorted out, you won't have to do it as often!
EDIT: Which folders would you like to name? Just where the system.sqsh gets stored?
Click to expand...
Click to collapse
Hi
Thanks for the answers. For me it should be both (but the starting folder is main. Other can be a sub-folder like u have now to be renamed as choice)
garynsa said:
Hi
Thanks for the answers. For me it should be both (but the starting folder is main. Other can be a sub-folder like u have now to be renamed as choice)
Click to expand...
Click to collapse
Are you referring to the Android folder? Or just a folder where everything is kept when it runs?
loserskater said:
Are you referring to the Android folder? Or just a folder where everything is kept when it runs?
Click to expand...
Click to collapse
Android folder... but its not a big deal as one can easily change it while startign the script

[Q] Building cyanogenmod for grouper does not produce the cm-[something].zip

I followed the instructions in the wiki to build a CM image for the grouper. When I do a "brunch grouper", I did not observe any errors, but there wasn't a recovery.img or a CM-[something].zip file as mentioned in the instructions.
What do I need to do in order to build those files? Looking at android/system/build/core/Makefile, I see targets like "recoveryimage" and "recoveryzip". Do I have to do something like "make recoveryimage" and "make recoveryzip" in order to get those files?
I searched on the XDA forums and on the net, but could not find anything similar to this.
Edit 1:
Doing a "make recoveryimage" created the recovery.img file but "make recoveryzip" did not create the CM-[something].zip
Thanks.
Building CM
bump
Generating CM*.zip file
Sarvavyapi said:
I followed the instructions in the wiki to build a CM image for the grouper. When I do a "brunch grouper", I did not observe any errors, but there wasn't a recovery.img or a CM-[something].zip file as mentioned in the instructions.
What do I need to do in order to build those files? Looking at android/system/build/core/Makefile, I see targets like "recoveryimage" and "recoveryzip". Do I have to do something like "make recoveryimage" and "make recoveryzip" in order to get those files?
I searched on the XDA forums and on the net, but could not find anything similar to this.
Edit 1:
Doing a "make recoveryimage" created the recovery.img file but "make recoveryzip" did not create the CM-[something].zip
Thanks.
Click to expand...
Click to collapse
I was able to generate the zip file. The main issue was that Ubuntu by default uses OpenJDK while Cyanogenmod needs Oracle JDK. Downloading and using Oracle JDK and following rest of the steps mention in this xda-developers forum thread (http://forum.xda-developers.com/showthread.php?t=2634726) generated the zip file. Also make sure that you have plenty of swap space (atleast as much as your ram or twice of that if possible)

Bootloop after flashing AOSP 8.0.0 to Pixel XL.

Hello everyone. I have a problem.
I'm building AOSP 8.0.0_r11 for Pixel XL and when I flash the result zip I'm getting a bootloop.
How am I building?
1) Select java 1.8
2) cd AOSP_8.0
3) source build/ensetup.sh
4) lunch aosp_marlin-userdebug
5) make -j9 updatepackage
6) wait a couple of hours
7) PROFIT
I know the ROM needs vendor blobs, I have them downloaded, extracted and extracted from .sh files.
How does the bootloop look?
Power On->Message about unlocked bootloader->0.5 second of white screen with Android on it-> reboot->repeat.
How do I flash the ROM?
I tried:
1) fastboot update -w aosp_marlin-img-eng.user.zip
and
2) extracted everything from zip and fastboot flash --slot _a PARTITION IMG_FILE
What am I doing wrong? Did anyone have success in building AOSP for this phone?
Did you "make clobber" after installing the drivers? If not, run it then try your make command again.
Alternatively, try "make otapackage" instead of "updatepackage" and then flash it in fastboot.
Also, why are you using the -j9 parameter?
noidea24 said:
Did you "make clobber" after installing the drivers? If not, run it then try your make command again.
Alternatively, try "make otapackage" instead of "updatepackage" and then flash it in fastboot.
Also, why are you using the -j9 parameter?
Click to expand...
Click to collapse
I did "make clobber". It just removes the build directory like "make clean". And this step is redundant if you never built the system before (with or without binaries).
Why make -j9? Because it shows better performance than just make. I know the build system should get the cores number and set the number of build threads, but for some reasons it doesn't do it very well.
P.S. I tried to "make" without -j9 and it is MUCH slower than with -j9.
Are you using the most updated fastboot and adb and sure your computer's variables aren't using an older one also? That was my issue when flashing Oreo.
buru898 said:
Are you using the most updated fastboot and adb and sure your computer's variables aren't using an older one also? That was my issue when flashing Oreo.
Click to expand...
Click to collapse
I'm using those that come with Android Studio 2.3.3 updated to latest versions of all components. That's not the problem with slots support - everything flashes without errors.
Slavon-93 said:
Hello everyone. I have a problem.
I'm building AOSP 8.0.0_r11 for Pixel XL and when I flash the result zip I'm getting a bootloop.
How am I building?
1) Select java 1.8
2) cd AOSP_8.0
3) source build/ensetup.sh
4) lunch aosp_marlin-userdebug
5) make -j9 updatepackage
6) wait a couple of hours
7) PROFIT
I know the ROM needs vendor blobs, I have them downloaded, extracted and extracted from .sh files.
How does the bootloop look?
Power On->Message about unlocked bootloader->0.5 second of white screen with Android on it-> reboot->repeat.
How do I flash the ROM?
I tried:
1) fastboot update -w aosp_marlin-img-eng.user.zip
and
2) extracted everything from zip and fastboot flash --slot _a PARTITION IMG_FILE
What am I doing wrong? Did anyone have success in building AOSP for this phone?
Click to expand...
Click to collapse
More than those blobs are necessary. Look at a invisibleks marlin lineageos device tree to get an idea of what files need to extracted and put in vendor.
Make clobber also cleans out configuration files, in case some of them had been created before the drivers/binaries have been extracted. Speaking of binaries again, did you install the Qualcomm ones?
My build environment is a i7 3770, with 8gb ram, and two blues in raid 0. To get my build compiled correctly, I had to disable ninja and I used -j8.
******
Tomorrow, I'll run a update and build Oreo on my machine from a clean directory and I'll get back with times before end after ccache is filled.
npjohnson said:
More than those blobs are necessary. Look at a invisibleks marlin lineageos device tree to get an idea of what files need to extracted and put in vendor.
Click to expand...
Click to collapse
Well, I don't know about Pixel, but when I had some experience in building AOSP for Nexus 5, Nexus 6, Nexus 9, binaries from Google and Qualcomm were a required minimum to get system booted. And if I wanted to get rid of some errors in logcat, I had to add some additional libraries, but the system booted and worked.
noidea24 said:
Speaking of binaries again, did you install the Qualcomm ones?
Click to expand...
Click to collapse
Yes, of course. I went to google binaries section, selected marlin 8.0.0 and downloaded two .sh files - one from Google, and the other from Qualcomm. Then I extracted them and got a vendor forder which has google_devices/marlin and qcom/marlin folders inside.
I'm curious to know how your process to flash the rom zip works? I've been sitting on a rom build for days because I can't get Twrp to work properly. Also, if your worried about your blobs/vendors the repos are starting to show up on GitHub.
cjkacz said:
I'm curious to know how your process to flash the rom zip works? I've been sitting on a rom build for days because I can't get Twrp to work properly. Also, if your worried about your blobs/vendors the repos are starting to show up on GitHub.
Click to expand...
Click to collapse
I'm sorry if I misundestood the question. I don't undestand why you should need TWRP because you just get the sources, get the blobs, compile them and get a zip file which can be flashed with fastboot command. So, no TWRP in this process is needed. I still don't know how all these ROM creators make zips for flashing with TWRP...
So I was able to get AOSP booting using the basic steps and blobs provided from the script. Even was able to activate the always on display
Zavon said:
So I was able to get AOSP booting using the basic steps and blobs provided from the script. Even was able to activate the always on display
Click to expand...
Click to collapse
Can you, please, describe in details these things:
1) What Linux did you use for building?
2) What revision of AOSP 8.0.0 did you download?
3) What version of blobs did you use?
4) Did you just download the 2 blobs .sh files to the root of the sources and execute them?
5) What AOSP configuration did you choose for building? (I mean aosp_marlin-userdebug or aosp_marlin_svelte-userdebug or aosp-sailfish-userdebug)
6) What command did you use for building?
7) Did you use ccache?
8) Did you flash Google Factory image of Oreo before flashing AOSP?
9) What command did you use to flash?
Slavon-93 said:
Can you, please, describe in details these things:
1) What Linux did you use for building?
2) What revision of AOSP 8.0.0 did you download?
3) What version of blobs did you use?
4) Did you just download the 2 blobs .sh files to the root of the sources and execute them?
5) What AOSP configuration did you choose for building? (I mean aosp_marlin-userdebug or aosp_marlin_svelte-userdebug or aosp-sailfish-userdebug)
6) What command did you use for building?
7) Did you use ccache?
8) Did you flash Google Factory image of Oreo before flashing AOSP?
9) What command did you use to flash?
Click to expand...
Click to collapse
I'm using a base ubuntu vm I built with 2 cores and 8gb ram. I used r11 if memory serves correct. I used the scripts from google and extracted from the factory image. The configuration I used is 21 (marlin-userdebug). I just used make -j8. Could careless about an update zip. And the factory image was on before I flashed using fastboot.
Side note, I also have ElementalX and SuperSU installed. suhide was giving me issues and I just have to figure out the Gapps (I'm a cop so time is hard to come by). I also enabled always on display but just remembered to enable the burnin protection

Cannot compile kernel

I am planning to compile my own kernel for my device, I have seen relative guides and such but I am unable to compile even the stock one by xiaomi.
1)Has anyone got any success compiling such kernel.
2)Can you describe step by step your set-up the install.
What I have tried by now
1) Download and unpack Kernel source by xiaomi
2) Getting the 4.9 toolchain
3) Now my commands
export CROSS_COMPILE= (toolchain path (this is correct as no error has popped up))
export ARCH=arm64
export SUBARCH=arm64
Make clean
Make mrproper
Make ranchu64_defconfig (probably wrong)
Make -j4
About the error: Since trying for over two weeks of no success I abandoned it, but I do remember that make was saying error 2 if that somehow helps.
-Thank you for your time my fellow developers!
MimoPakou said:
I am planning to compile my own kernel for my device, I have seen relative guides and such but I am unable to compile even the stock one by xiaomi.
1)Has anyone got any success compiling such kernel.
2)Can you describe step by step your set-up the install.
What I have tried by now
1) Download and unpack Kernel source by xiaomi
2) Getting the 4.9 toolchain
3) Now my commands
export CROSS_COMPILE= (toolchain path (this is correct as no error has popped up))
export ARCH=arm64
export SUBARCH=arm64
Make clean
Make mrproper
Make ranchu64_defconfig(it's probably wrong)
Make -j4
About the error: Since trying for over two weeks of no success I abandoned it, but I do remember that make was saying error 2 if that somehow helps.
-Thank you for your time my fellow developers!
Click to expand...
Click to collapse
UPDATE: After some time, I figured out 2 things
1)The defconfig I was using is wrong, but I
have searched the folders and no other file
works (So how do I find my defconfig?)
2)Turns out that for my particular device the
exported files need to be outside of the
kernel, as doing that continued the
compiling process only to be stopped by a
file that wasn't found:
(built-in.o located in /arch/arm64/kernel/ )
(and this makes me suspicious about my defconfig)

Unable to build kernel from source, what i'm missing?

Hello to all!
I'm an heavy oneplus user, currently with Nord, but i'm try to use my old but Gold Oneplus 3 to run Klipper+Moonraker+Fluidd.
Klipper side everything is perfect, still remains one big issue: there is no kernel compiled for OP3 which has USB_SERIAL_CH341 driver enabled.
I'm trying to build but without success. Here is what i've done under Linux Mint latest version.
First of all i've installed a lot of packages, i cant remember all because i used various guides since initially i was not able neither of finish compilation.
Then i've downloaded:
kernel source: https://github.com/lin16-microg/android_kernel_oneplus_msm8996/tree/lin-16.0-mse2
from this ROM thread, which is the rom im still using: https://forum.xda-developers.com/t/...ened-lineageos-16-0-for-oneplus-3-3t.4034869/
initially i've tried to use EVAgcc toolchain, but it was impossible to finish to build. Then i switched to AOSP toolchains:
32bit: https://android.googlesource.com/pl...inux-androideabi-4.9/+/refs/heads/pie-release
64bit: https://android.googlesource.com/pl...64-linux-android-4.9/+/refs/heads/pie-release
With Them i was able to compile from source, but before doing i modified the file called "lineageos_oneplus3_defconfig" by adding "USB_SERIAL_CH341=y" just under the "USB_SERIAL=y" in order to have the serial driver compiled and loader (if i have understood right?).
to build i've used from inside kernel source cloned directory:
>make clean
>make mrproper
>ARCH=arm64 SUBARCH=arm64 CROSS_COMPILE=googletoolpath/bin/aarch64-stuffs- CROSS_COMPILE_ARM32=googletoolpath/bin/arm-stuffs- make O=out lineageos_oneplus3_defconfig
>ARCH=arm64 SUBARCH=arm64 CROSS_COMPILE=googletoolpath/bin/aarch64-stuffs- CROSS_COMPILE_ARM32=googletoolpath/bin/arm-stuffs- make O=out Image -j2
in this way i've obtained an Image (not a zimage since with zimage returned error).
Then i unpacked the stock boot.img with Android Image Kitchen, substituted boot.img-kernel file (which is an archive..?) with the compiled image renamed.
Finally i repacked everything.
Tried to flash the repacked boot img but no boot, the phone returns to fastboot screen.
I've noticed that my newboot.img is around 25mb insted of around 12mb like the stock one present in the Rom.zip
Probably the error resides in how i've managed to unpack and repack the kernel image..
Do someone see some heavy error which can cause the problem? What can i try?
From a side, as automation engineer, i want to learn and try to do it by myself, but on the other side, if someone is able to compile it for me with serial CH341 driver enabled a beer is assured.
Thanks all to have read up to now and for any advice
not sure that's important but you forgot to gzip kernel before repacking. I recommend to compile with configuration of running kernel from device /proc/config.gz first.
alecxs said:
not sure that's important but you forgot to gzip kernel before repacking. I recommend to compile with configuration of running kernel from device /proc/config.gz first.
Click to expand...
Click to collapse
I've to try because it is not gzipped by default, the problem is that I don't found all in one scripts or config file as the one mentioned by you. I would never thought that rebuild a kernel were so tricky.

Categories

Resources