[How to] build CyanogenMod for the i9305 - Galaxy S III I9305 (4G LTE + 2GB RAM) Q&A, Help &

Start with the CyanogenMod build instructions for i9300
Wherever the guide says i9300, use i9305 instead!
When the guide tells you to install a CM 10.1 ROM on your rooted phone, before running extract-files.sh, you can use the build from codeworkx.
Follow the guide and stop before executing 'repo init'. Do instead:
$ repo init -u git://github.com/perchrh/android.git -b cm-10.1
This uses a device and vendor tree for the i9305 from teamdisgruntled, and a general samsung vendor tree from TheMuppets.
Follow the guide again, until the end.
Flash your phone with the resulting zip file cm-10.1*.zip
Reboot and you're done!
Thanks to xda-member vkggg for posting a similar guide for AOSP that got me started on my CM build.

Do you see the following when doing the 'breakfast' command?
Syncing dependencies
fatal: duplicate project CyanogenMod/android_device_samsung_smdk4412-common in /home/me/android/system/.repo/manifest.xml
android_device_samsung_smdk4412-common is part of the extra's added to the manifext.xml file and it is also included in the local_manifests/roomservice.xml file

mcampbellsmith said:
Do you see the following when doing the 'breakfast' command?
Syncing dependencies
fatal: duplicate project CyanogenMod/android_device_samsung_smdk4412-common in /home/me/android/system/.repo/manifest.xml
android_device_samsung_smdk4412-common is part of the extra's added to the manifext.xml file and it is also included in the local_manifests/roomservice.xml file
Click to expand...
Click to collapse
Thanks! That looks new. Probably -common wasn't included in the other file previously.
I've updated the dependency list to reflect this and the error should be gone now
Update: I've verified the fix. Note that if you had an error while doing repo init, another 'repo init' in the same directory may not work. In that case, remove the .repo directory or do the init in a new directory!

Related

[TUTORIAL] The Step-By-Step guide to build Cyanogenmod7 for the LG Optimus 2X

aMpeX proudly presents:
The Step-By-Step guide for building CM7
for the Optimus 2X​
Disclaimer:
I'm taking no responsibility for any damage that might occur to your phone or your PC
This guide illustrates how to setup an UBUNTU 11.04 equipped PC to build CM7 from source
It does not provide any support beyond that operating system, so if you insist on using other
Linux distributions, either adapt the guide yourself or look elsewhere.
Moreover I'm not providing any support for any problems that might occur during the course
of this guide, if they are not introduced by faults within the guide itself. I will only
troubleshoot the activities that this guide is based upon and won't be able to help with your
general linux problems. Feedback however is greatly appreciated.
Reposting this on other forums:
Feel free to post this guide on other forums. I'd like to be given credit though. Thanks
I am new to this myself, but I thought I'd share my findings after successfully building my first kang.
News & changelog:
v0.92 2011/06/01 Fix:
Added "change directory" before init repository (thanks to peewster)
v0.91 2011/05/31 Fix:
Fixed PATH exports (thanks to bhanvadia)
v0.9 2011/05/31 Initial release:
Still much formatting to be done, typos possible. Leave me some feedback if you encounter them.
Alright, so you want to build your own CM7 KANG's ?
Step 0: The starting point + info
When you start this guide, I assume that you just installed your Ubuntu 11.04 copy to your PC and set up all the drivers to your hearts content.
All commands are supplied, as they would be typed in from a USER ACCOUNT, if you operate from the root account, you will
have to add /home/<yourusername> to the most commands. I suggest, after performing the actions required by root, that you log out by typing
Code:
exit
What you need:
A working copy of Cyanogenmod7 installed on your phone
A PC with Ubuntu 11.04 installed (NOTE: If you're about to install Ubuntu from scratch, use the 64Bit version.
I can build CM7 on a 32Bit OS just fine. But AOSP for example won't build beyond Froyo on 32Bit.
At least 20GB of free space (including space required for the operating system itself)
A considerably fast internet connection (syncing the repo takes everal Gbs)
At least 3 hours of time.
All done? Then let's get started:
Step 1: Install the Java JDK
Go to System → Administration → Synaptics Package Manager
Here, we have to enable the partner repositories.
Go to Settings → Repositories → Other Software → Tick Canonical Partners and hit Close
Now push the „Reload“ button, and use the Search button to find the sun-java6-jdk package
tick the box in front of it and choose „Mark for installation“ and accept the following dialogue.
Click the „Apply“ button. Accept the dialogues, you now have the Java JDK installed.
Step 2: Install the Android SDK
Go here and download this.
Extract the archive to a directory of your choice.
Open a Terminal, navigate to the „tools“ subfolder and run the AVD Manager using ./android
In the new Window hit „Available Packages“ tick the „Android Repository“ and select „Install selected“
Once thats done, close everything up, time for step 3.
Step 3: Set up udev
The description from the CyanogenMod wiki struck me as being a slightly bit overkill, and, while it might be necessary for other devices, for LG phones this works just fine:
Create a new file on your desktop named
Code:
99-android.rules
and fill them with the following content:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666"
This will enable the debugging for LG devices, if you have time, it won#t hurt to add the other vendors. Just add another line
like above and replace the „1004“ with the appropriate vendor ID from http://developer.android.com/guide/developing/device.html (scroll to the bottom)
Log in as root using
Code:
sudo su
and paste our file to
Code:
/etc/udev/rules.d
using the terminal (cp)
Set permissions for the file using
Code:
chmod a+r /etc/udev/rules.d/99-android.rules
Now would probably be a good time to check if adb is working correctly.
But first, lets update the PATH so we can type „adb“ anywhere on the file system.
Navigate to your user home directory, press CTRL+H to show hidden files and edit the
Code:
.bashrc
file by adding the following
Code:
export PATH="/home/<yourusername>/<path to the android SDK >/platform-tools/:${PATH}"
export PATH="/home/<yourusername>/bin/:${PATH}"
(The 2nd line is necessary for later)
NOTE:This only enable the use of adb everywhere when logged in with your username. When working as root, you'll have
to add a separate line with /home/<yourusername> in front of the path above.
You have to log out and in again for the changes to take effect.
Now check if you can see your phone with
Code:
adb devices
Alright, still awake? Good, because now it gets interesting
Step 4: Install build packages and create directories
Since we already installed the JDK this command differs a bit from the Cyanogen Wiki:
For 32 and 64 Bit
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool
For 64 Bit only
Code:
sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.4-multilib g++-4.4-multilib
Now we need 2 directories
Code:
mkdir -p ~/bin
mkdir -p ~/android/system
Almost there ….
Step 5: Install the repository
Now we need our repo binary:
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
(credits to p.valenta for notifying me of the adress change)
NOTE: You may need to reboot now
Change to your previously created directory:
Code:
cd ~/android/system/
Initialize the repository:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
Enter your Name, eMail adress and select if you want colors or not.
AND NOW THE FINALE
Code:
repo sync -j16
Get yourself a BIG coffee, because this is going to take MUCH MUCH time, because basically you are now checking out all there is to CyanogenMod.
But wait, we're not done yet. Hang on
Step 6: Getting proprietary files for the Optimus 2X
For this step, you need an O2X with a running Cyanogenmod build, so if you're still on stock, this is the time to flash Cyanogenmod for the first time.
Connect your phone to your PC via USB and
navigate to the device tree in your repo folder:
Code:
cd ~/android/system/device/lge/p990/
and run
Code:
./extract-files.sh
This will extract some libs from your device. But sadly, not all of them (build will still fail) but we will fix this now.
Go to
Code:
https://github.com/koush/proprietary_vendor_lge/tree/gingerbread/p990
and click the download button on the right.
Extract the „p990“ folder located in the subfolder
Code:
/koush-proprietary_vendor_lge-a43238f/
in the archive to
Code:
~/android/system/vendor/lge/
Step 7: Get latest ROMManager
I know I must be annoying the sh** out of you by now, but hang in there
Code:
~/android/system/vendor/cyanogen/get-rommanager
Step 8: BUILD F***ING EVERYTHING
Now this is what you've been waiting for huh?
Sync the repository again:
Code:
cd ~/android/system/
repo sync
Build the ROM
Code:
. build/envsetup.sh && brunch p990
Wait
When everything is finished, your KANG will be stored in
Code:
~/android/system/out/target/product/p990/
And THATS IT!
Congratulations, you have just built your own CM7 KANG, don't forget to share it to other nightly testers
Cheers aMpeX
Useful stuff and tools:
SH script by bhanvadia, tailored to the directories introduced by this tutorial:
Download here
Extract anywhere and make it executable by typing
Code:
chmod +x kang.sh
Create shortcut to the output directory of your KANGs
Type
Code:
ln -s ~/android/system/out/target/product/p990/ <your desired shortcut location>
nice guide, really liked it.
too bad there were none when I started making my kangs.
btw: I use mac it is bit different for mac. but nothing its missing.
Here is file you keep on you desktop to make it work without any typing of commands after you setup your computer working directory as per guide by aMpeX.
and check post #2 for making that file executable.....
kang.sh
bhanvadia said:
nice guide, really liked it.
too bad there were none when I started making my kangs.
btw: I use mac it is bit different for mac. but nothing its missing.
add "~/android/bin/" to path too so you can "repo sync" from anywhere.
just a suggestion... can upload build.sh file on here to make it easy.
something like
1. for clean and build
2. for repo sync
open file and press your options.
thats what I use...
Click to expand...
Click to collapse
That's why the guide states its for ubuntu. I found that even the Cyanogenmod Wiki entries don't work completely for the latest ubuntu (with g++ and gcc 4.3 not being available anymore, also hat huge problems with the java jdk at first)
I'll add the additional PATH variables as you suggested. Thank you.
aMpeX said:
That's why the guide states its for ubuntu. I found that even the Cyanogenmod Wiki entries don't work completely for the latest ubuntu (with g++ and gcc 4.3 not being available anymore, also hat huge problems with the java jdk at first)
I'll add the additional PATH variables as you suggested. Thank you.
Click to expand...
Click to collapse
Here is file you keep on you desktop to make it work without any typing of commands after you setup your computer working directory as per guide by aMpeX.
PS: aMpeX can you just test that file??? just repo sync or rom manager update options.
awesome guide !!! thanks aMpeX !
seems to be working, after you chmod+x the sh file that is. My Repo Sync is stuck at 1%, but I doubt its related to your file.
I'll add it to the 2nd post
aMpeX said:
seems to be working, after you chmod+x the sh file that is. My Repo Sync is stuck at 1%, but I doubt its related to your file.
I'll add it to the 2nd post
Click to expand...
Click to collapse
modified my mac file i use to fit to your setup of directories, just changed directories. ...
yeah then it would work, hope it make it more easy
GET the KANGs flowing...........
aMpeX said:
Useful stuff and tools:
SH script by bhanvadia, tailored to the directories introduced by this tutorial:
Download here
Extract anywhere and make it executable by typing
Code:
chmod +x kang.sh
Create shortcut to the output directory of your KANGs
Type
Code:
ln -s ~/android/system/out/target/product/p990/
Click to expand...
Click to collapse
Download link is sending to wrong post still....
now it should work like this....
http://forum.xda-developers.com/showpost.php?p=14310172&postcount=5
copy
http://forum.xda-developers.com/showpost.php?p=14310172&postcount=5
Can you please also state that it only works on 64bit builds of ubuntu and not 32bit...
Renegade_Rulez said:
Can you please also state that it only works on 64bit builds of ubuntu and not 32bit...
Click to expand...
Click to collapse
Aside from what you can read on the net, my KANGs build perfectly fine on Ubuntu 32Bit
No reason to not install 64Bit though. I'll add a remark in the first post.
Edit: After some asking and digging, read this:
http://twitter.com/#!/CM_arcee/status/75677847712309249
So while standard Gingerbread cannot be built by 32Bit, the CyanogenMod7 repository can.
is this meant to download a lot of stuff for different phones? mine is downloading a lot of stuff at step 5 and it's taking forever..
Imperticus said:
is this meant to download a lot of stuff for different phones? mine is downloading a lot of stuff at step 5 and it's taking forever..
Click to expand...
Click to collapse
It will download files for each and every phones supported by CyanogenMod, thats why its called cyanogen repo, not just P990 repo, but mostly you will use stuff thats required by your phone.
and its suggested to have 15 - 20 GB free, as it takes a lot....
3.5 GB is just "out" folder when it compiles for one device (P990)......
bit of a noob.. done everything..when I try to make the build using build/envsetup.sh i get permission denied
Any help please?
copy/paste the command from the tutorial
there is a leading dot and space before "build
Code:
. build/envsetup,sh && brunch p990
Thank's for the tutorial but i allways get no gsm function build
logcat -b radio
RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING error: com.android.internal.telephony.CommandException: RADIO_NOT_AVAILABLE
Click to expand...
Click to collapse
or
Couldn't find 'rild' socket; retrying after timeout
Click to expand...
Click to collapse
What baseband are you using? Make sure that the lge-ril.so is in your proprietary files
aMpeX said:
What baseband are you using? Make sure that the lge-ril.so is in your proprietary files
Click to expand...
Click to collapse
Thank's for repy.
lge-ril.so is in and generally i flash my build coming from cyano #31 (405) and mcr18 (405)
So...405
Possibly (if you synced the proprietary repository by koush AFTER you ran extract-files.sh) your ROM still includes the lge-ril for 0218.
Try reflashing the ril with the methods provided in this forum.
Other than that, I have no idea what might be causing your problems.
old ril file from koush files do work on 405 baseband too, but you feel better performance with new ril. with old ril you may loose signals sometime.
delete your vendor/lge/p990 folder, and download again from koush's files and put it back there. make sure your directories are in order
example: for lib-ril.so in as below
like ~/android/system/vendor/lge/p990/proprietery/lib/

[Q] Build instruction for Xdandroid for the X1

Hi
I am working on the Kovsky kernel at the moment, but would really like to be able to make changes to the Andoid part of the system as well. Does anyone have build instructions for the XDAndroid system?
I have done cross compiling to various platforms before, so the part I need is:
*What sources to download
*What commands to run
As I didn't get any feedback I have decided to figure it out for myself and publish as I go along:
To get the sources follow the instructions at:
xdandroid.com/wiki/Getting_the_Source
mkdir ~/xdandroid
cd ~/xdandroid
repo init -u git://gitorious.org/xdandroid/manifest.git -b gingerbread
repo sync
Now I have lots of code, and the next step is found at:
xdandroid.com/wiki/Build_Configuration
What I need is a "buildspec.mk" file. If anyone has one that has been used for NAND compiles feel free to share
I have now realized that all the ROMS have been compiled based on CyanogenMod7 source that have separate repositories from xdandroid.
Sp3dev created a repo for some of the kovsky files he used in november last year at: https://github.com/astarasikov/device_kovsky
Next up is integrating them into the cyanogen tree and creating vendor files based on leo/dream
I am starting to piece everything together now. I am still not able to compile it, but I am getting closer:
Here are some steps that have only been tested on an Ubuntu system:
1. Follow the steps here http://wiki.cyanogenmod.com/wiki/HTC_Dream_&_Magic:_Compile_CyanogenMod_(Linux) down to "Install the Repository"
Code:
# 2. Install repository by running (This will take several hours):
cd ~/android/system/
repo init -u git://github.com/CoolRunnerII/android.git -b gb-release-7.2
repo sync
# 3. get the propriatary files from a running phone connected by usb by running. You may need root to do this:
cd ~/android/system/device/htc/kovsky/
./extract-files.sh
# 4. copy vendor file to correct place by running:
cp device/htc/kovsky/cyanogen_kovsky.mk vendor/cyanogen/products
# 5. Get Rom-manager by running
~/android/system/vendor/cyanogen/get-rommanager
# 6. sync repo again by running:
cd ~/android/system/
repo sync
# 7. get ready for compile with:
. build/envsetup.sh
lunch cyanogen_kovsky-eng
# 8. Start compile with:
make
Great news.Hope you can finish it!
Compile now runs to the end
On my system the compile runs to the end when doing the steps above. I have not started packageing it yet, but everything seems to compile correctly.
The other guides recoment running "make bacon" witch are supposed to create a "over the air" OTA package. This crashes when I try it. If anyone has some good information as to how the final packages is supposed to be please share. all the other CM7 roms have folder in the zip fil called META-INF that contain the update script. The .zip-file created by running make does not.
I just added Alex's fork of the gps library from xdandroid to the manifest.
If someone could try the steps above and report to me wether it works on their system or not I would be very thankfull. My goal is to create a streamlined rom build directly from source. That way getting the last issues out of the way should be possible even without guys like Alex working on it.
CoolrunnerII said:
I just added Alex's fork of the gps library from xdandroid to the manifest.
If someone could try the steps above and report to me wether it works on their system or not I would be very thankfull. My goal is to create a streamlined rom build directly from source. That way getting the last issues out of the way should be possible even without guys like Alex working on it.
Click to expand...
Click to collapse
very very nice job!!!!!! currently downloading kovsky repos to check if i can build but it will take hours with slow connection and i've little time cause of exams...
btw: if someone has problems with syncing cause of slow internet repo sync -f is a nice option
EDIT:
in time i'm going to improve cwm recovery (currently porting cwm-touch to another device...)
EDIT2: any chance to add wpa repo to existing working directory?
btw: you could also use a local_manifest.xml for the additional repos... (just if you don't already know ) (would be more official???)
i can't test cause i don't know how to add wpa repo
this should be in android development section... you posted here cause of limited posts right? btw thanks a lot for missed call fix
Yes I posted here due to limited rigths.
I'll start a new thread in the developer section now that I can
Cool runner the rhodium android development forum has a 7.2 build but I don't know how to make work for our device. I pm the maker he said I can use his rom

[GUIDE] How to build CM10.1 (Android 4.2.1) for the Nexus 4 (mako)

This is a guide to build cyanogenmod 10.1 (Android 4.2.1) for Google Nexus 4. This guide is for linux. I will add a guide to build on mac soon, but the basic principle is the same.
Preparation
You need a fully working build environment. If you don't have one running already, you can follow the official android guide on how to set up build environment. Follow the easy steps in the guide.
Check this guide by sylentprofet about how to get the build environment set up.
Your build environment is now set? Good, let's start!
Get the sources
Start by creating a new working directory for CM10.1. You can create this anywhere on your workstation.
Code:
$ mkdir ~/cm10.1
$ cd ~/cm10.1
£ mkdir -p bin
Initialize Repo for Android CM10.1 (Android 4.2.1):
Code:
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
and enter your credentials if needed.
Download the sources:
Code:
$ repo sync
Wait until it is finished. It will take a long time, depending on your internet connection.
Obtain the device build files and proprietary files:
To do this create a file named 'local_manifest.xml" in the .repo folder. This is a hidden folder, so you have to allow your visualisation of hidden files, alternatively run "open .repo" code from terminal. Or you can just run the code below to create the file directly into the folder.
Code:
$ gedit ~/cm10.1/.repo/local_manifest.xml
For Mac you can use:
Code:
$ touch ~/cm10.1/.repo/local_manifest.xml
Paste the following lines into the file:
Code:
<manifest>
<project name="TheMuppets/proprietary_vendor_lge.git" path="vendor/lge" remote="github" revision="cm-10.1"/>
<project name="CyanogenMod/android_device_lge_mako" path="device/lge/mako" remote="github" revision="cm-10.1"/>
<project name="CyanogenMod/lge-kernel-mako" path="kernel/lge/mako" remote="github" revision="jellybean"/>
</manifest>
Save the file. And rerun the code:
Code:
$ repo sync
Download the necessary pre-builts:
Code:
$ ~/cm10.1/vendor/cm/get-prebuilts
That's all the sources ready now.
Edits for mac only
If you try building now you will get elf errors when the kernel is being compiled. There are different way for fix this, but I'm using this method.
Go to /kernel/lge/mako/scripts/mod/ folder, open the file 'mk_elfconfig.c' and replace
Code:
#include <elf.h>
with
Code:
#include "elf.h"
. Do the same in the file named 'modpost.h'. Next download the attached file named 'elf.h' and copy to the same folder. You are now ready to build.
Building CyanogenMod
Run the following command:
Code:
$ . build/envsetup.sh
and build by running:
Code:
$ brunch mako
Credits:
CyanogenMod team
Raum1807
Weow, your nice.
I was compiling CM10.1 for my mako and I have this following error
what about that ?
[[email protected] system]# . build/envsetup.sh && brunch mako
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/armv7-a/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/lge/mako/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including vendor/cm/vendorsetup.sh
including sdk/bash_completion/adb.bash
including vendor/cm/vendorsetup.sh
File "<string>", line 1
import os,sys; print os.path.realpath(sys.argv[1])
^
SyntaxError: invalid syntax
File "build/tools/roomservice.py", line 37
print "Device %s not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod)." % device
^
SyntaxError: invalid syntax
** Don't have a product spec for: 'cm_mako'
** Do you have the right repo manifest?
No such item in brunch menu. Try 'breakfast'
[[email protected] system]#
Click to expand...
Click to collapse
Happened to me too. Re run ". build/envsetup.sh" and then "brunch mako". Worked for me the second time.
Edit: didn't read the post carefully, looks more like a build environment error
Sent from my Nexus 4 using xda app-developers app
Downgraded make, git and perl on my Arch Linux. Now works
I've just added this guide to the Nexus 4 Complete Index
Sent from my GT-I9100 using xda premium
Good to see another O2X convert here
Good guide, might start building my own stuff again for this phone.
Cannot seem to get past this:
build/core/product_config.mk:189: *** _nic.PRODUCTS.[[device/*/mako/cm.mk]]: "frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk" does not exist. Stop.
** Don't have a product spec for: 'cm_mako'
** Do you have the right repo manifest?
Any ideas?
Is there a guide on how to do cherry picks? Im interested in developing
Sent from my Nexus 4 using xda premium
dosangst said:
Cannot seem to get past this:
build/core/product_config.mk:189: *** _nic.PRODUCTS.[[device/*/mako/cm.mk]]: "frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk" does not exist. Stop.
** Don't have a product spec for: 'cm_mako'
** Do you have the right repo manifest?
Any ideas?
Click to expand...
Click to collapse
Check if you have the file "phone-xhdpi-2048-dalvik-heap.mk" in your repo.
jarjar124 said:
Is there a guide on how to do cherry picks? Im interested in developing
Sent from my Nexus 4 using xda premium
Click to expand...
Click to collapse
Go go the gerritt review site, click on 'cherry-pick' and the copy the code displayed underneath. On terminal direct to the required folder and then paste the code on terminal. So if the change is in 'frameworks_base', do 'cd ~/cm10.1/frameworks/base' and then paste the code.
This might help..
https://android.googlesource.com/pl...815362c/build/phone-xhdpi-2048-dalvik-heap.mk
dosangst said:
Cannot seem to get past this:
build/core/product_config.mk:189: *** _nic.PRODUCTS.[[device/*/mako/cm.mk]]: "frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk" does not exist. Stop.
** Don't have a product spec for: 'cm_mako'
** Do you have the right repo manifest?
Any ideas?
Click to expand...
Click to collapse
Imperticus said:
Check if you have the file "phone-xhdpi-2048-dalvik-heap.mk" in your repo.
Go go the gerritt review site, click on 'cherry-pick' and the copy the code displayed underneath. On terminal direct to the required folder and then paste the code on terminal. So if the change is in 'frameworks_base', do 'cd ~/cm10.1/frameworks/base' and then paste the code.
Click to expand...
Click to collapse
I finally got Cm10.1 to build correctly on my own after days and days of troubleshooting. I wish I would have seen this guide earlier! I am having one slight problem though. Every time I sync, it hangs at 99%(353/356). It always hangs up on the last 3 projects. Everything builds fine. I think it has something to do with prop files. I've tried pulling them from the phone and using "The Muppets" github in local_manifest.xml, but it makes no difference. It hangs every time. I've let it sit for hours and nothing. It was syncing all the way through just fine, but a couple days ago it stopped and hasn't synced properly since. If anyone has any ideas I'd greatly appreciate it! Thanks.
how do i move the file when it is done compiling? it says" The file "cm-10.1-20121222-UNOFFICIAL-mako.zip" cannot be handled because you do not have permissions to read it." Also when I do get it out to desktop with this command " sudo cp -r cm-10.1-20121222-UNOFFICIAL-mako.zip '/home/jarman/Desktop' " I dont have permission to read and write it. Any help?
jarjar124 said:
how do i move the file when it is done compiling? it says" The file "cm-10.1-20121222-UNOFFICIAL-mako.zip" cannot be handled because you do not have permissions to read it." Also when I do get it out to desktop with this command " sudo cp -r cm-10.1-20121222-UNOFFICIAL-mako.zip '/home/jarman/Desktop' " I dont have permission to read and write it. Any help?
Click to expand...
Click to collapse
sorry i'm more familiar with mac, not linux.Try 'sudo chmod -R 755 cm-10.1-20121222-UNOFFICIAL-mako.zip'
jarjar124 said:
how do i move the file when it is done compiling? it says" The file "cm-10.1-20121222-UNOFFICIAL-mako.zip" cannot be handled because you do not have permissions to read it." Also when I do get it out to desktop with this command " sudo cp -r cm-10.1-20121222-UNOFFICIAL-mako.zip '/home/jarman/Desktop' " I dont have permission to read and write it. Any help?
Click to expand...
Click to collapse
Why don't you set your build folder in the home directory?
Thanks for the guide was wondering how to make the switch as I was building CM10.
Anyone having luck building in Ubuntu 12.04, Just curious as I am on 10.4 (x64) as advised by Google but that update button is begging me to press it. Also will upgrading from 10.4 to 12.04 destroy my Android/CM build enviroments or will everything remain in tact??
Thanks for the help.
kjacksonmusic said:
Thanks for the guide was wondering how to make the switch as I was building CM10.
Anyone having luck building in Ubuntu 12.04, Just curious as I am on 10.4 (x64) as advised by Google but that update button is begging me to press it. Also will upgrading from 10.4 to 12.04 destroy my Android/CM build enviroments or will everything remain in tact??
Thanks for the help.
Click to expand...
Click to collapse
It should work on 12.04, as the cyanogenmod official guides are written for that version of ubuntu. I can't say whether the build environment will remain the same or not.
kjacksonmusic said:
Thanks for the guide was wondering how to make the switch as I was building CM10.
Anyone having luck building in Ubuntu 12.04, Just curious as I am on 10.4 (x64) as advised by Google but that update button is begging me to press it. Also will upgrading from 10.4 to 12.04 destroy my Android/CM build enviroments or will everything remain in tact??
Thanks for the help.
Click to expand...
Click to collapse
There are different packages to set up the build environment in 12.04 that are listed on googles site. They work. You can upgrade, but you would have to install the new packages. They also work on 12.10 fyi.
I was wondering if anyone has successfully set up the build environment in Mint 14? The packages for 12.04 won't install. If anyone can help, I would be grateful.
Sent from my Nexus 4 using Tapatalk 2
In case anyone is following my upgrade, I upgraded to 12.04 and my Android Working Directory still compiles and builds as well as cm10.1:good:.
Thanks for the help.
kjacksonmusic said:
In case anyone is following my upgrade, I upgraded to 12.04 and my Android Working Directory still compiles and builds as well as cm10.1:good:.
Thanks for the help.
Click to expand...
Click to collapse
Even builds just fine for me on 13.04 mate. Just using the 12.04 required packages.
@OP - could you do a guide on how to build AOSP rom and adding in features from CM?
Many thanks!

[Q] Compiling Error .../android.git is HTML?

I just got everything working for the first time finally and I'm not sure how to get around this. Every compiling/building guide says to execute the following with appropriate URL and branch, but it gives me the (second) below.
Code:
repo init –u git://github.com/user/android.git –b cm-10.2
Code:
[email protected]:~/android/omni$ repo init -u git://github.com/mike64221/android.git -b android-4.4
/home/mike/bin/repo: line 1: syntax error near unexpected token `newline'
/home/mike/bin/repo: line 1: `<!DOCTYPE html>'
I just can't figure it out. Could anyone help?
Yes, I am (attempting) to build Omni.
Hopefully there'll be some possible solutions by morning so I can go ahead and let it work during school.
Your best shot is to post this at android q&a forum where thousand's more will have access to see and help

[ROM][10.0][Xiaomi Mi 9][UNOFFICIAL]LineageOS 17.1 CLEAN, STOCK [2020-07-10]

** Standard Disclaimer: Unlocking your Bootloader will Void your Warranty. I take no responsibility for this or for any bricked devices. These thing should go without saying at this point, but there they are. If you are here, I assume you are familiar with LineageOS, TWRP, and moving from MIUI to AOSP-based ROMs**
**Download Link Updated to build 2020-07-10**
TL;DR:
This is a Clean, Stock LineageOS Build for Xiaomi Mi 9 (cepheus) that does NOT include any GApps, MicroG, or Signature Spoofing.
What you choose to add/modify after installing this ROM is entirely up to you.
All,
I wanted to distance myself from Google as much as possible, so I decided to build LineageOS from the source.
I used the LineageOS source they provide via GitHub, available here.
I also use the Proprietary Blobs for the Cepheus Device Tree from Demon000's GitHub, available here.
To get current version to build, I also needed to add the LineageOS/android_hardware_xiaomi source to my local manifest and use the repopicks Cozzymy13 includes in the OP of his ROM's thread. [Thanks k1l for and Cozzymy13 for pointing out these additions!]
The result is a stock build of LineageOS 17.1 for the Cepheus device. In the spirit of LineageOS, this does not include Signature Spoofing. You will need to use Xposed or some other method if you desire that functionality.
This also does not include MicroG or any other additional applications. This is pure LineageOS, built on 2020-07-10.
NanoDroid patcher works well for anyone who wants to add MicroG support. You will still need to use Xposed or similar if you want Signature Spoofing as NanoDroid does not offer a patch for Android 10 as of this build.
Feel free to provide download mirrors.
What Works:
Pretty much everything from what I can tell
Fingerprint Sensor it working like a champ so far.
DT2W/DT2S
NFC Seems to be working but I don't have a device to test against
Known Issues:
You tell me...
Install:
From TWRP:
1) Wipe Date (standard wipe)
2) Flash lineage-17.1-20200710-UNOFFICIAL-cepheus.zip
3) Format Data (Wipe -> Format Data -> type "yes"
3b) - OPTIONAL - Flash Magisk Zip for Root
4) Reboot to system
Alternate Install Steps for Full MicroG with Signature Spoofing:
From TWRP:
1) Wipe Date (standard wipe)
2) Flash lineage-17.1-20200710-UNOFFICIAL-cepheus.zip
3) Format Data (Wipe -> Format Data -> type "yes"
3b) - OPTIONAL - Flash Magisk Zip for Root
4) Reboot to system (ignore any errors about missing Google Services)
5) Reboot to TWRP
6) Flash NanoDroid Patcher (either the Full package or you can customize per the instructions in the NanoIx link below)
7) Reboot
8) Install the Magisk Module for Xposed Framework and the EDXposed.ZIP as per the instructions in the Xposed link below)
9) Reboot to activate the new Module
10) Within the EDXposed App, Install the FakeGApps Module
11) Reboot to activate the new Module
As everything I really care about is working in this build, I do not plan to devote much, if any, time to "supporting" this release. I just thought I'd share my clean 17.1 LineageOS in case anyone else is interested.
Download:
LineageOS 17.1 Unofficial (Built: 2020-07-10) md5sum: 1c340fc16a6fbc7586d0a856acb9c600
NanoDroid Patcher (optional): NanoIx
Magisk Root (optional): Magisk
XPosed for Android 10 - Magisk Module (optional): Xposed
Just found a new bug:
Wireless Hotspot will not start.
Can anyone confirm if this is an issue with other LineageOS build for this device?
Messed around too much and had to re-flash. Afterwards, I could not get apps to register with MicroG Cloud Messaging, so some notifications were not working.
If anyone runs into this issue, just get a root shell and run this command:
Code:
adb shell
su
am broadcast -a android.provider.Telephony.SECRET_CODE -d android_secret_code://2432546 --receiver-include-background
This will register the current user with Cloud Messaging. You can verify this works with the "Push Notification Tester" app in the Aurora Store.
This knowledge comes to you courtesy of lxp over on the MicroG Github
Using for 3 days now, and is working good, i don't use MicroG and no google apps. Nice work
Using it for second day, and everything seems fine, hotspot working too.
Only problem is with Revolut app which say it's incompatible app, are there any workaround?
Btw. Good job, thanks!
Simonell said:
Using it for second day, and everything seems fine, hotspot working too.
Only problem is with Revolut app which say it's incompatible app, are there any workaround?
Btw. Good job, thanks!
Click to expand...
Click to collapse
I'm not familiar with that App. Is it working on other AOSP-based ROMS?
It looks like Mobile Banking app. I don't have an account to really test; nor do I have the energy to try and troubleshoot individual apps.
Are you by chance running it on a rooted install? If you have rooted this ROM, that could be why you are having trouble with that Banking App. I know they tend to not like rooted phones.
I have been happy with this build since I compiled it on the 25th, but I may update and compile from current source. It I do, I can make it available for you to try.
Of course, if it is broken on other LineageOS builds, or if you are rooted, I would expect it to still complain on this build, too.
If you rooted with Magisk, there is a Magisk Hide option in the Magisk Manager app that may let you hide your root from that specific banking app.
photonmedia said:
I'm not familiar with that App. Is it working on other AOSP-based ROMS?
It looks like Mobile Banking app. I don't have an account to really test; nor do I have the energy to try and troubleshoot individual apps.
Are you by chance running it on a rooted install? If you have rooted this ROM, that could be why you are having trouble with that Banking App. I know they tend to not like rooted phones.
I have been happy with this build since I compiled it on the 25th, but I may update and compile from current source. It I do, I can make it available for you to try.
Of course, if it is broken on other LineageOS builds, or if you are rooted, I would expect it to still complain on this build, too.
If you rooted with Magisk, there is a Magisk Hide option in the Magisk Manager app that may let you hide your root from that specific banking app.
Click to expand...
Click to collapse
It's working after root and Hide in Magisk Manager. I was confused because it was showing up as "Incomaptible with device" in google play store, after rooting it's installed. Thanks!
Could you send commands which you used to compile ROM? I have some free space on my home server, maybe I could set up Jenkins with auto building. Is it possible to get auto update working?
Simonell said:
It's working after root and Hide in Magisk Manager. I was confused because it was showing up as "Incomaptible with device" in google play store, after rooting it's installed. Thanks!
Could you send commands which you used to compile ROM? I have some free space on my home server, maybe I could set up Jenkins with auto building. Is it possible to get auto update working?
Click to expand...
Click to collapse
ThePiGuy already has a great overview of building for unsupported/unofficial devices here
You'll need to install all the base requirements on your build distro before you proceed. This includes the adb and fastboot tools, the build packages, and the java versions as mentioned in this LineageOS build guide for one of their other Xiaomi "supported" devices.
What I post here is basically my method of pulling the relevant info from the two build guides above to get a successful build for the Xiaomi Mi 9 (cepheus).
I will say as for the Requirements, it really needs to be 16GB of RAM. I tried building in a VM with 8GB multiple times and it failed due to running out of memory. This could just be because I run on SSDs and do not use SWAP space/files...
When it comes to your Proprietary Blobs, I pulled mine from Demon000's Github Source
You will need these repos, and we will cover these steps further down:
vendor_xiaomi
kernel_xiaomi_sm8150
device_xiaomi_cepheus
device_xiaomi_sm8150_common
When performing the "ccache -M $G" command I used:
Code:
ccache -M 50G
Now let's create your base folder where you want to make all the magic happen. Be sure to have plenty of storage available. In my case, I needed about 200GB.
Code:
mkdir -p ~/android/lineage
cd ~/android/lineage
When performing your repo init commands, reference branch 17.1:
Code:
repo init -u https://github.com/LineageOS/android.git -b lineage-17.1
Sync the repo to your current working directory, in this case the lineage folder you created above (which should still be your working directory):
Code:
repo sync
This will pull down 100+GB of files, so this takes quite some time.
Following along, you should be in your folder called "lineage" where you ran your repo init and repo sync commands. In my case this is:
Code:
~/android/lineage/
Attached is my manifest file called "cepheus.xml" that references the Demon000 github source.
Place this cepheus.xml file here:
Code:
~/android/lineage/.repo/local_manifests/cepheus.xml
(creating the local_manifests folder if necessary)
Now you need to complete the build of your device tree.
You will clone each of the four repositories above into their respective locations in the device tree:
vendor_xiaomi -> ~/android/lineage/vendor/xiaomi/
kernel_xiaomi_sm8150 -> ~/android/lineage/kernel/xiaomi/sm8150
device_xiaomi_cepheus -> ~/android/lineage/device/xiaomi/cepheus
device_xiaomi_sm8150_common -> ~/android/lineage/device/sm8150_common
Note: Be sure to check each of those four locations and make sure the contents of the repository are in those folders, not, for example: ~/android/lineage/device/sm8150_common/device_xiaomi_sm8150_common. You don't want the repo contents within that extra subfolder...
In my case, I created the necessary directory structure and changed to that directory, then cloned the repo and moved the contents from the subfolder created by the clone operation into the correct location.
Code:
mkdir -p ~/android/lineage/vendor/xiaomi/
cd ~/android/lineage/vendor/xiaomi
git clone https://github.com/Demon000/vendor_xiaomi.git
mv vendor_xiaomi/* .
rm -r vendor_xiaomi
Code:
mkdir -p ~/android/lineage/kernel/xiaomi/sm8150
cd ~/android/lineage/kernel/xiaomi/sm8150
git clone https://github.com/Demon000/kernel_xiaomi_sm8150.git
mv kernel_xiaomi_sm8150/* .
rm -r kernel_xiaomi_sm8150
Code:
mkdir -p ~/android/lineage/device/xiaomi/cepheus
cd ~/android/lineage/device/xiaomi/cepheus
git clone https://github.com/Demon000/device_xiaomi_cepheus.git
mv device_xiaomi_cepheus/* .
rm -r device_xiaomi_cepheus
Code:
mkdir -p ~/android/lineage/device/xiaomi/sm8150_common
cd ~/android/lineage/device/xiaomi/sm8150_common
git clone https://github.com/Demon000/device_xiaomi_sm8150_common.git
mv device_xiaomi_sm8150_common/* .
rm -r device_xiaomi_sm8150_common
Now return to your base lineage folder:
Code:
cd ~/android/lineage
Now that you have init'd and synced your repo and pulled your proprietary blobs into their respective folders, you are ready to build with the brunch command:
Code:
export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
export USE_CCACHE=1
ccache -M 50G
source build/envsetup.sh
brunch lineage_cepheus-userdebug
For me, I have no idea how long this took to complete as I left it running overnight. I would imaging at least 4 hours on my i5 device. Once it's done, you should have a TWRP-flashable zip and an OTA zip in the ~/android/lineage/out folder.
Note: If after compiling for some time, the process fails with errors, it should provide you with information on how to track down the error. In my case, I ended up with it stopping with a failure a couple times, but I just re-ran the above brunch command and it picked up where it left off, eventually completing successfully. YMMV
I'm sure there are cleaner, simpler ways of going about this, but I'm just getting my feet wet with current Android source. I haven't really done any sort of Android "development" since the days of KitKat...
photonmedia said:
ThePiGuy already has a great overview of building for unsupported/unofficial devices here
You'll need to install all the base requirements on your build distro before you proceed. This includes the adb and fastboot tools, the build packages, and the java versions as mentioned in this LineageOS build guide for one of their other Xiaomi "supported" devices.
What I post here is basically my method of pulling the relevant info from the two build guides above to get a successful build for the Xiaomi Mi 9 (cepheus).
I will say as for the Requirements, it really needs to be 16GB of RAM. I tried building in a VM with 8GB multiple times and it failed due to running out of memory. This could just be because I run on SSDs and do not use SWAP space/files...
When it comes to your Proprietary Blobs, I pulled mine from Demon000's Github Source
You will need these repos, and we will cover these steps further down:
vendor_xiaomi
kernel_xiaomi_sm8150
device_xiaomi_cepheus
device_xiaomi_sm8150_common
When performing the "ccache -M $G" command I used:
Code:
ccache -M 50G
Now let's create your base folder where you want to make all the magic happen. Be sure to have plenty of storage available. In my case, I needed about 200GB.
Code:
mkdir -p ~/android/lineage
cd ~/android/lineage
When performing your repo init commands, reference branch 17.1:
Code:
repo init -u https://github.com/LineageOS/android.git -b lineage-17.1
Sync the repo to your current working directory, in this case the lineage folder you created above (which should still be your working directory):
Code:
repo sync
This will pull down 100+GB of files, so this takes quite some time.
Following along, you should be in your folder called "lineage" where you ran your repo init and repo sync commands. In my case this is:
Code:
~/android/lineage/
Attached is my manifest file called "cepheus.xml" that references the Demon000 github source.
Place this cepheus.xml file here:
Code:
~/android/lineage/.repo/local_manifests/cepheus.xml
(creating the local_manifests folder if necessary)
Now you need to complete the build of your device tree.
You will clone each of the four repositories above into their respective locations in the device tree:
vendor_xiaomi -> ~/android/lineage/vendor/xiaomi/
kernel_xiaomi_sm8150 -> ~/android/lineage/kernel/xiaomi/sm8150
device_xiaomi_cepheus -> ~/android/lineage/device/xiaomi/cepheus
device_xiaomi_sm8150_common -> ~/android/lineage/device/sm8150_common
Note: Be sure to check each of those four locations and make sure the contents of the repository are in those folders, not, for example: ~/android/lineage/device/sm8150_common/device_xiaomi_sm8150_common. You don't want the repo contents within that extra subfolder...
In my case, I created the necessary directory structure and changed to that directory, then cloned the repo and moved the contents from the subfolder created by the clone operation into the correct location.
Code:
mkdir -p ~/android/lineage/vendor/xiaomi/
cd ~/android/lineage/vendor/xiaomi
git clone https://github.com/Demon000/vendor_xiaomi.git
mv vendor_xiaomi/* .
rm -r vendor_xiaomi
Code:
mkdir -p ~/android/lineage/kernel/xiaomi/sm8150
cd ~/android/lineage/kernel/xiaomi/sm8150
git clone https://github.com/Demon000/kernel_xiaomi_sm8150.git
mv kernel_xiaomi_sm8150/* .
rm -r kernel_xiaomi_sm8150
Code:
mkdir -p ~/android/lineage/device/xiaomi/cepheus
cd ~/android/lineage/device/xiaomi/cepheus
git clone https://github.com/Demon000/device_xiaomi_cepheus.git
mv device_xiaomi_cepheus/* .
rm -r device_xiaomi_cepheus
Code:
mkdir -p ~/android/lineage/device/xiaomi/sm8150_common
cd ~/android/lineage/device/xiaomi/sm8150_common
git clone https://github.com/Demon000/device_xiaomi_sm8150_common.git
mv device_xiaomi_sm8150_common/* .
rm -r device_xiaomi_sm8150_common
Now return to your base lineage folder:
Code:
cd ~/android/lineage
Now that you have init'd and synced your repo and pulled your proprietary blobs into their respective folders, you are ready to build with the brunch command:
Code:
export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
export USE_CCACHE=1
ccache -M 50G
source build/envsetup.sh
brunch lineage_cepheus-userdebug
For me, I have no idea how long this took to complete as I left it running overnight. I would imaging at least 4 hours on my i5 device. Once it's done, you should have a TWRP-flashable zip and an OTA zip in the ~/android/lineage/out folder.
Note: If after compiling for some time, the process fails with errors, it should provide you with information on how to track down the error. In my case, I ended up with it stopping with a failure a couple times, but I just re-ran the above brunch command and it picked up where it left off, eventually completing successfully. YMMV
I'm sure there are cleaner, simpler ways of going about this, but I'm just getting my feet wet with current Android source. I haven't really done any sort of Android "development" since the days of KitKat...
Click to expand...
Click to collapse
Thanks! I will try this guide at the weekend, and post results
Simonell said:
Thanks! I will try this guide at the weekend, and post results
Click to expand...
Click to collapse
For what it's worth, I just successfully compiled an updated build today, but it fails to boot after flashing. Had to go back and flash my 2020-01-25 build from the OP.
YMMV
.
stock mi 9 camera works or not on this rom? because i don't raelly like gcam.
ahmadharith said:
stock mi 9 camera works or not on this rom? because i don't raelly like gcam.
Click to expand...
Click to collapse
I was able to install ANXCamera and their ANXCustLibsQ_160.DisloyalInnocentVelvetworm.zip Libraries and it works fine for me. Sometimes Portrait mode freezes, but I never use that anyway...
https://github.com/XEonAX/ANXCamera
us23heep said:
Hello friends!
Sorry my poor english. I am stuck 5 days with this error. Google cant answer. Please can you tell me if what I am doing wrong?
Error always say ... depends on undefined module
Try 1: pastebin.com/33nmpQLU
Try 2: pastebin.com/n3gxTXgY
Try 3: pastebin.com/7Lre4ZiF
Standard manifests:
repo init -u https://github.com/LineageOS/android.git -b lineage-17.1
local_manifests:
pastebin.com/kt4ES0d4
Thank you :good:
Click to expand...
Click to collapse
It seems like maybe it is not seeing some or all of the device tree files it needs. You may try manually downloading those device files an putting them in the appropriate folders as I mentioned I did in the steps I posted.
I built this yesterday using the instructions above... thanks a lot for those photonmedia!
Some of the instructions were wrong, ie a _ instead of a - in a dir name, but easy fixed.
After that, the entire build completed with 0 errors.
I didnt end up with a ZIP file though, just a approx 400MB "build-lineage_cepheus.ninja" file?
MWPau said:
I built this yesterday using the instructions above... thanks a lot for those photonmedia!
Some of the instructions were wrong, ie a _ instead of a - in a dir name, but easy fixed.
After that, the entire build completed with 0 errors.
I didnt end up with a ZIP file though, just a approx 400MB "build-lineage_cepheus.ninja" file?
Click to expand...
Click to collapse
did you first
Code:
breakfast cepheus
and then
Code:
brunch cepheus
?
the .zip is actually in the
/out/target/product/cepheus/ folder.
I did *exactly* as was instructed above...
Code:
cd ~/android/lineage
export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
export USE_CCACHE=1
ccache -M 50G
source build/envsetup.sh
brunch lineage_cepheus-userdebug
MWPau said:
I did *exactly* as was instructed above...
Code:
cd ~/android/lineage
export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
export USE_CCACHE=1
ccache -M 50G
source build/envsetup.sh
brunch lineage_cepheus-userdebug
Click to expand...
Click to collapse
My understanding is that the breakfast command is not necessary when you are building for unofficial devices and manually populating the necessary device tree files; you skip to the brunch step.
That is per the other guide I referenced in my instructions and how I was able to build this release.
I have not tried to pull and build an updated version as of this time.
k1l said:
the .zip is actually in the
/out/target/product/cepheus/ folder.
Click to expand...
Click to collapse
I missed this at the end of your reply :/
Yup, it's in there. Thanks
Code:
838M -rw-r--r-- 2 root root 838M Feb 25 01:31 lineage-17.1-20200224-UNOFFICIAL-cepheus.zip
photonmedia said:
For what it's worth, I just successfully compiled an updated build today, but it fails to boot after flashing. Had to go back and flash my 2020-01-25 build from the OP.
YMMV
Click to expand...
Click to collapse
Same for me. Have been trying to get it sorted the last few days, i dont know whats going on.
Original OP build works ok.

Categories

Resources