Errors when try to compile anything.... - Sony Xperia M4 Aqua

Hello guys, i have a problem and really want to solve it because i am bored of errors and i want to compile roms/recovery and other
I have successfully set up build evinrovment and downloaded cm 12 sources.
I have downloaded from github and synced via terminal the kernel of device and the device files.
But, when i do the command . /build/envsetup.sh terminal not show me "you're building on linux".
Anyway, if i do: lunch aosp_e2303-userdebug, same as suggested in vendorsetup.sh file of the device folder, linux give me that:
Don't have a product spec for "xxx" (xxx is for indicate the codename of device)
But i have all folders in /cm12/device
How can i solve it? Please help me....

Did you download the vendor files? Iirc they are not on github, they are on Sony's developer website. They are called device binaries or something like this. The m4 aqua is not on the list, but if you download one of the latest for any device you'll have the files there

Thank you, later i will try with these files... Now my ubuntu (not know why) not boot.

Related

Compiling AOSP from source

Hiya I am interested in compiling my own version of the android project from the latest sources for Hero but I am having a little bit of trouble, I have been attempting to follow this guide android.modaco.com/index.php?showtopic=301857&view=findpost&p=1179830 but it does not seem to make a lot of sense to me. For instance there is no .repo/local_manifest.xml file only a .repo/manifest.xml file and editing this as outlined gives me an error. Could somebody point me in the direction of a fairly noob friendly guide for this kind of stuff, thanks a lot.
Conb123
P.S Sorry about the dodgy link, newbie restrictions prevented me from formatting it properly
this should be in Q&A Section not development really. But im looking for this too! installed ubuntu using Wubi set up JDK,SDK testsign etc and repo but god knows how to do it all! I only want to port cyanogenROM
follow this: http://source.android.com/download
when you got everything synced you can basically type "make" and watch it compile for a while. i managed to do it with just above zero knowledge about compiling.
if you want the cyanogen sources try it with the according repo. i have zero idea about vendor overlays, as i needed to compile only the recovery (watched two hours of eclair compiling, then was told i need cupcake sources and can compile the recovery only...)
Yes I am aware of how to get sources and how to compile them, I am fairly well versed in linux. But I do not know how I can compile it into a usable rom for hero.
the result of the compiling are image files that can be flashed to the phone: system.img etc. you can extract them using unyaffs.
I ran the make command, but i really have no idea what to do from there. What is the end result of doing the first make command? Im fairly sure that it is not a single .img file you can flash onto your phone. You need to make a kernal if i am correct(anyone know how to do this?)
the result of the compiling is at least a system.img. if you compiled it correctly you can flash that to /system partition. further you need a boot.img, which also contains the kernel. the the rom-cooking howto in dev section how to create one, or just get one from a working rom.
fwiw, the .img files are in out/target/product/generic/ (although there probably is a device specific directory in there if you handled the vendor overlay correctly. <- this is just a guess, i have actually no idea).
Wanna link us to that how to thread? I cant seem to find a complete one with working links.
http://forum.xda-developers.com/showthread.php?t=551711

[Q] IntelAtom ZenFone 5 Kernel compilation issues

Hello everyone.
Im struggling with compiling kernel for ZenFone 5 ( A500CG ) with intel Atom on board.
Every guide on the net is about arm devices so basically i dont know which cross_compiler should be pointed using NDK R10.
Also i cannot pull out config.gz from my android device ( file simply does not exists.. ) and i have no idea which config file from souce kernel should i use..
Yet i found instruction in kernel package but im stuck on point 4:
#4 build 'minigzip' and 'openssl' modules
source build/envsetup.sh
lunch aosp_x86-eng
make minigzip openssl
Where can i find this build/envsetup.sh script??
its not in the git repo and i cant proceed with kernel compilation process due to error:
make: *** No rule to make target `out/host/linux-x86/bin/openssl', needed by `openssl'. Stop.
Could someone point me the right direction on this? I just would really like to have STK1160 driver working on my zenfone 5
Best Regards
The source build/envsetup.sh command is usually used to provide short commands (like lunch) which build an entire rom, but you don't need them for a kernel.
I'm not quite sure, if i'm right, but you need an crosscompiler, if you want to build code for another platform. And as far as I know, you want to build for the same architecture (X86) you're are building on (X86) so there is no need for an crosscompiler. ARCH=x86 should be enough.
And for the config files: Either you have a bigger file in your config folder (then you found your defconfig), or you just look which config files could match, depending on your board name and hardware configuration. If you know your Touchscreen controller, you could look, which defconfig has it enabled.
Hello !
i finally managed to compile my kernel !!
i end up with bzImage file and im trying to flash it on my device with no success..
i tried to use intel-boot-tools to create my custom boot.img but when i do fastboot flash boot i endup with error:
"boot flash failed"
i tried to flash some other custome kernel image found on google and it was successfull so my bootloader and is unlocked.
What am i doing wrong ??
I really need some help with that.. i cannot load stk1160.ko module because i cant flash properly updated kernel bzimage ..
friends no one guide it, long time i ask it
plz any one guide screenshot step by step

Unable to build CM13 to Sony Xperia Z2 (sirius)

I've been using CM12.1 for couple of months, love it. Found some bugs and waited a few nightlies (few weeks per "nightly") and after that tried to make a bug report.... not accepted, because CM12.1 is not developed anymore. CM13 is not available for Z2, so I tried to build CM13 myself, following the guide found on cyanogenmod site. Sorry, as a new member, can't link that URL here... It fails... I have gone past that point to extract the proprietary "blobs" from my phone (running the mentioned CM12.1) and tried again the breakfast sirius command. I'm unable to paste results here, because being a new member... look the result from pastebin com with /mwBfxHEL behind the URL...
The reason seems obvious, missing that msm8974-common-vendor.mk file. Can't find it on my computer using "locate". Can't find it using google. Don't know how to fix this or get past this... Any help appreciated!
Nobody has build CM13 for Z2???
The issue you are describing likely results from the blob extraction for msm8974-common not operating correcty: Please execute (or re-execute) the extraction scrip in this folder of the device tree as well (should be device/sony/msm8974-common). Could you paste the output after running that script, please?
Diewi said:
The issue you are describing likely results from the blob extraction for msm8974-common not operating correcty: Please execute (or re-execute) the extraction scrip in this folder of the device tree as well (should be device/sony/msm8974-common). Could you paste the output after running that script, please?
Click to expand...
Click to collapse
OK, that advice helped. Tried 'breakfast sirius' again, it went longer, complained about something missing in shinano-common folder. Used your approach again and got past that one too. After that, 'breakfast sirius' succeeded. I tried 'brunch sirius' and it failed. Tried it again, it got longer before failing again... did "while [ $? -ne 0 ]; do !! done" to try building until it succeeds. After quite a while, I stopped it, ran brunch sirius command and copied the output to pastebin.
Take a look at pastebin.com/Qz4hq1aZ
Something about libta.so?
Flexy75 said:
OK, that advice helped. Tried 'breakfast sirius' again, it went longer, complained about something missing in shinano-common folder. Used your approach again and got past that one too. After that, 'breakfast sirius' succeeded. I tried 'brunch sirius' and it failed. Tried it again, it got longer before failing again... did "while [ $? -ne 0 ]; do !! done" to try building until it succeeds. After quite a while, I stopped it, ran brunch sirius command and copied the output to pastebin.
Take a look at pastebin.com/Qz4hq1aZ
Something about libta.so?
Click to expand...
Click to collapse
Should I extract the blobs from a Z2 with OEM firmware? I vaguely remember that TA refers to something to do with DRMs that you lose when you unlock the phone to be able to install other firmwares...
Sorry for the delay.
This is an issue with the vendor files. I think that th extrction scripts are somewhat outdated, or didn't the extraction script didn't find some files. There should be a repo on github which should provide you with the needed files. Another possibility would be to extract and mount the system image of a stock and let the script process these files (there is a cmdline switch for pointing the script to it: please have a look into this script for the according switch).
Hope this helps.
Diewi said:
Sorry for the delay.
This is an issue with the vendor files. I think that th extrction scripts are somewhat outdated, or didn't the extraction script didn't find some files. There should be a repo on github which should provide you with the needed files. Another possibility would be to extract and mount the system image of a stock and let the script process these files (there is a cmdline switch for pointing the script to it: please have a look into this script for the according switch).
Hope this helps.
Click to expand...
Click to collapse
OK, found the repo. Got all the files, got the build to succeed! Thank you very much! Just few more questions... There is not just one zip file in the directory... which one to install? How do I install the zip file the build created? Perhaps via booting to recovery and installing it from there? And how does it behave? Like a upgrade, or a clean install?

Question about compiiling TWRP for a new phone

Hi,
I'm totally new to android custom ROM development scene, and one of the first things I really wanted to do was to be able to create TWRP recovery for any device that I could possibly own.
As such, I started doing my research. I've read a lot of guides and the more I read the guides, the more I seem to get lost on what to do... :crying:
By far, the best guide I've read is this one :
https://forum.xda-developers.com/android/software/guide-how-to-compile-twrp-source-step-t3404024
So far I've 'repo sync'ed twrp-6.0 from 'minimal sources', so what I understand is that I have a build environment to build an android ROM, but now I have to tweak several files to match it to my device.
In the tutorial, it says that I need to have 3 directories set up correctly.
1. kernel
2. device
3. vendor
I have a device SM-J5108.
My first goal was to correctly set up the 'device' directory. So I set off to look for a pre-made 'device' that's similar to my model. I landed on this page.
https://github.com/TeamWin/android_device_samsung_j7ltespr
It's for Galaxy J7, but it had the simplest directory & file structure so I decided to use this one.
However, I think it would be wise to get configs for the BoardConfig.mk from this repository.
https://github.com/TeamWin/android_device_samsung_j5nltexx
Next, I would download the original firmware from somewhere like 'updato.com', and rip off the original kernel from that file. then I would replace the 'kernel' file in the repository with that one.
I would do the same with the ramdisk.
Up to this point, am I on the right track?
And another thing that questions me is since I've ripped off the kernel and ramdisk, is the '/home/username/NameOfTheFolder/kernel/vendor/devicename' folder from the guide not needed at all?
And the third folder in the guide, '/home/username/NameOfTheFolder/vendor/vendor/devicename'.
From my understanding, this folder needs to contain all proprietary libraries & .ko and other stuff specific to the device that is not mounted by the ramdisk.
And from this guide :
https://web.archive.org/web/2016111...ro#Collect_any_available_existing_source_code
It tells me to use 'extract-files.sh' to automate the process of extracting these files. But I'm not entirely sure if I can just use a universal 'extract-files.sh' for this.
Could I use 'extract-files.sh' from any Samsung device repository such as this one?
https://github.com/omnirom/android_device_samsung_i9300
Or do I have to build a new 'extract-files.sh' just for this device...?
After settings up these two folders, I should just
Code:
cd ~/NameOfTheFolder
source build/envsetup.sh
lunch
Type the number of your device and press enter. For example in my case the number 16 is my device
mka recoveryimage ---> This command will start the compilation of the recovery.
And a recovery image should be ready to be flashed on the device right?
Thanks!

Linux NOOB; Where to extract Device Tree, Vendor, Kernel?

I'm running Ubuntu 16.4 in VirtualBox and I'm trying to follow this guide for creating a custom ROM. Problem is, I am completely new to Linux and I'm literally copying and pasting command line. I don't understand what everything does. I'm just kind of doing it for now, learning as I go. So far, everything has worked fine. But now, I'm stuck at this part:
Now before starting with Building guide you have to Download your Device Identity That is has follows
1) Device Tree
2) Vendor
3) Kernel
The Above files are very Vital Parameters of building they specify your device and its Characteristics.
Now you might think from where you have to download those files?
Don't be confused its simple Search in our device forum for CM Tree and Kernel and Vendor. The Dev of CM for your Device forum will specify it in his ROM thread.
Click to expand...
Click to collapse
I found my device's device tree on github: https://github.com/j03lpr86/android_device_samsung_afyonltetmo
What do I do with it? Download the zip and put it somewhere and then extract it somewhere? If so, where? Or do I use the "Clone with HTTPS" link? If so, how do I execute it in the terminal?
Same questions with the vendor I found: https://github.com/j03lpr86/android_vendor_samsung_afyonltetmo
As for the kernel, what do I do for that? XDA doesn't have my device listed (Galaxy Avant). I downloaded the stock ROM from Sammobile. Do I extract kernel.img from that? If so, where do I place it?
There are just too many assumptions that the author of the guide makes and I don't understand what to do at this point.
have you looked on git hub for them?

Categories

Resources