[Guide]How to download/compile specific ROM parts - Galaxy S Plus I9001 Android Development

This is a tutorial about how to download and compile specific parts in aosp based roms (such as CM10)
Written for AOSP noobs like me a year ago.
Note: I wrote this tutorial actually for my blog, as a beginners repo/compile tut, but why not share here
Introduction:
Downloading rom sources is done with the tool “repo”, this is the most awesome downloader in existence. Not only it looks very cool, it also reaches top speed at all times. But it’s only for linux (which is good since when you are busy with aosp roms you should be on linux)
Why is it awesome? Since you decide yourself how many jobs (aka connections) you make with the server. This means you always will get top speed, there is probably no faster download method available on the Internet (except for speedtests, but they don’t count). Next to the downloading of specific parts it’s of course also handy to know how to actually compile them.
Download:
The easiest way of fetching for example a batch of AOSP apps is like this:
1. Choose the desired tag you want to use, in the example I will use android-4.2.2_r1
2. Now make a dir somewhere:
Code:
- mkdir ~/aosp-apps
- cd ~/aosp-apps
3. Download repo when not installed yet:
Code:
- curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
- chmod a+x ~/bin/repo
4. Enter the line that will download the initial manifest.
for AOSP:
Code:
- repo init -u https://android.googlesource.com/platform/manifest -b android-4.2.2_r1
Enter your name and email address and wait until it completes
for CM
Code:
- repo init -u https://github.com/Cyanogenmod/android -b cm-10.1
5. Go in the hidden “.repo” dir and change the manifest
Code:
- cd .repo
- gedit manifest.xml (if you don’t have decent text editor such as “gedit”, install it! “sudo apt-get install gedit”
)
For example when you only want to download the apps, just remove all lines that are not app related. simple as that:
Code:
<?xml version=”1.0″ encoding=”UTF-8″?>
<manifest>
<remote name=”aosp”
fetch=”..” />
<default revision=”refs/tags/android-4.2.2_r1″
remote=”aosp”
sync-j=”4″ />
<project path=”packages/apps/BasicSmsReceiver” name=”platform/packages/apps/BasicSmsReceiver” />
<project path=”packages/apps/Bluetooth” name=”platform/packages/apps/Bluetooth” />
<project path=”packages/apps/Browser” name=”platform/packages/apps/Browser” />
<project path=”packages/apps/Calculator” name=”platform/packages/apps/Calculator” />
<project path=”packages/apps/Calendar” name=”platform/packages/apps/Calendar” />
<project path=”packages/apps/Camera” name=”platform/packages/apps/Camera” />
<project path=”packages/apps/CellBroadcastReceiver” name=”platform/packages/apps/CellBroadcastReceiver” />
<project path=”packages/apps/CertInstaller” name=”platform/packages/apps/CertInstaller” />
<project path=”packages/apps/Contacts” name=”platform/packages/apps/Contacts” />
<project path=”packages/apps/DeskClock” name=”platform/packages/apps/DeskClock” />
<project path=”packages/apps/Email” name=”platform/packages/apps/Email” />
<project path=”packages/apps/Exchange” name=”platform/packages/apps/Exchange” />
<project path=”packages/apps/Gallery” name=”platform/packages/apps/Gallery” />
<project path=”packages/apps/Gallery2″ name=”platform/packages/apps/Gallery2″ />
<project path=”packages/apps/HTMLViewer” name=”platform/packages/apps/HTMLViewer” />
<project path=”packages/apps/KeyChain” name=”platform/packages/apps/KeyChain” />
<project path=”packages/apps/Launcher2″ name=”platform/packages/apps/Launcher2″ />
<project path=”packages/apps/LegacyCamera” name=”platform/packages/apps/LegacyCamera” />
<project path=”packages/apps/Mms” name=”platform/packages/apps/Mms” />
<project path=”packages/apps/Music” name=”platform/packages/apps/Music” />
<project path=”packages/apps/MusicFX” name=”platform/packages/apps/MusicFX” />
<project path=”packages/apps/Nfc” name=”platform/packages/apps/Nfc” />
<project path=”packages/apps/PackageInstaller” name=”platform/packages/apps/PackageInstaller” />
<project path=”packages/apps/Phone” name=”platform/packages/apps/Phone” />
<project path=”packages/apps/Protips” name=”platform/packages/apps/Protips” />
<project path=”packages/apps/Provision” name=”platform/packages/apps/Provision” />
<project path=”packages/apps/QuickSearchBox” name=”platform/packages/apps/QuickSearchBox” />
<project path=”packages/apps/Settings” name=”platform/packages/apps/Settings” />
<project path=”packages/apps/SoundRecorder” name=”platform/packages/apps/SoundRecorder” />
<project path=”packages/apps/SpareParts” name=”platform/packages/apps/SpareParts” />
<project path=”packages/apps/SpeechRecorder” name=”platform/packages/apps/SpeechRecorder” />
<project path=”packages/apps/Stk” name=”platform/packages/apps/Stk” />
<project path=”packages/apps/Tag” name=”platform/packages/apps/Tag” />
<project path=”packages/apps/VideoEditor” name=”platform/packages/apps/VideoEditor” />
<project path=”packages/apps/VoiceDialer” name=”platform/packages/apps/VoiceDialer” />
</manifest>
When done, save it and go a dir back in the terminal
Code:
- cd ..
6. Download the packages
Code:
- repo sync -j16 (-j16 stands for 16 jobs max. This is for around a 100mbit line)
(With my 60mb/s connection I get max speed 7.2mb/s at -j8)
The packages will be download as quickly as possible to your harddrive now.
Compile:
To compile the obtained packages separately you will need a AOSP environment (or CM/AOKP etc). When you have a succesfull environment which is able to compile for your device you may enter:
Code:
- source build/envsetup.sh
- lunch (now choose your device, for example, full_ariesve-userdebug)
- now you’re theoretically ready to compile
to compile an app on the easiest way:
Code:
- make Appname -j8
where “Appname” is the name of the folder placed in packages/apps/..
This also counts for “SystemUI” which is not in that folder.
Code:
- make Calculator -j8 (for example)
And the -j param again stands for the number of jobs, remember that this is compiling and not downloading, so the “standard rule” with this is, number of cores of your CPU + 1.
Which makes a regular quad core (-j5) but makes a i7 CPU with Hyper threading (-j9). When using -j16 for example there could be moments that your cpu will be overloaded so much that your mouse will lag all over the place.
(Linux forces the cpu to perform higher then it actually should, resulting in a very strange fan sound in my case)
When having trouble, when it stops or just nags about some useless stuff.
You should try using the “-k” param, this tells the make command to keep going when a non-critical error occurs.
Code:
- make Calculator -k -j8
When having issues with the local module tags, you should enter this:
Code:
- make Calculator -k LOCAL_MODULE_TAGS=optional -j8
To compile other parts you also need to enter the folder name, here are some examples from /frameworks/base
Code:
- make policy (the power menu and lockscreen)
- make framework (the initial framework files)
- make framework-res (the initial framework resources)
- make services (the services.jar file)
or more examples:
Code:
- make sdk (builds the android sdk)
- make modules (builds all modules)
- make installclean (removes all staging directories, such as out/target/product/boardname/system)
- make clean (removes the whole /out directory)
:silly:

another amazing tutorial made by you.. THANKS !!

This is huge! Thanks brood!

Laurentyu1995 said:
another amazing tutorial made by you.. THANKS !!
Click to expand...
Click to collapse
You're welcome, I will keep em comming
educk said:
This is huge! Thanks brood!
Click to expand...
Click to collapse
Thanks, and you're welcome
o, btw, added link to aosp tags and removed links in code

broodplank1337 said:
You're welcome, I will keep em comming
Thanks, and you're welcome
o, btw, added link to aosp tags and removed links in code
Click to expand...
Click to collapse
Great job !! Might want to clean it up and fix up the few mistakes. Also, not sure if you did it on purpose or not but you gave the 4.2 branch of AOSP and 4.1 of CM. Other than that, great guide brood!!

Xistance said:
Great job !! Might want to clean it up and fix up the few mistakes. Also, not sure if you did it on purpose or not but you gave the 4.2 branch of AOSP and 4.1 of CM. Other than that, great guide brood!!
Click to expand...
Click to collapse
Thanks . the actual tutorial (on my site) only includes the AOSP example, I added the CM example here but didn't thought about making them match versions, however, I will change it ^^.

Related

[SOLVED] install failed shared user incompatible

EDIT 31aug2012: also this message appears if there is no "classes.dex" in the apk
Hi,
When you try to install certain apk you might get this error when using "adb install something.apk"
Andoid creates "shared users" like app_1 app_3 etc for packages you install. These UID's are like 10001, 10002, 10003 etc.
Sometimes the administration of these shared users gets messed up and you get error messages like:
INSTALL_FAILED_SHARED_USER_INCOMPATIBLE
The shared user administration is kept in /data/system:
-rw-rw-r-- system system 129933 2011-08-15 12:08 packages.xml
How to solve? You need a rooted phone and adb:
adb shell chmod 666 /data/system/packages.xml
adb pull /data/system/packages.xml
Now edit (notepad++) and remove the shared user in question xml block from the file:
Code:
<shared-user name="com.navngo" userId="10000">
<sigs count="1">
<cert index="4" />
</sigs>
<perms>
<item name="android.permission.READ_PHONE_STATE" />
<item name="android.permission.DISABLE_KEYGUARD" />
<item name="android.permission.INTERNET" />
<item name="android.permission.WRITE_EXTERNAL_STORAGE" />
<item name="android.permission.ACCESS_FINE_LOCATION" />
<item name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<item name="android.permission.ACCESS_COARSE_LOCATION" />
<item name="android.permission.READ_CONTACTS" />
<item name="android.permission.WRITE_CONTACTS" />
<item name="android.permission.ACCESS_NETWORK_STATE" />
<item name="android.permission.WAKE_LOCK" />
<item name="android.permission.MODIFY_AUDIO_SETTINGS" />
</perms>
</shared-user>
adb push packages.xml /data/system
adb shell rm /data/dalvik-cache/*
adb reboot
Now you should be able to install that apk.
Cheers
This problem might also be solved using ad uninstall command. (only for user apps)
Lets keep the same program as above as an example the you type from a dos box:
adb uninstall com.navngo.igo.javaclient
Now install it again. You need to know the package name. You can open the apk with winrar/zip and view the AndroidManifest.xml file. There you see the package name.
Cheers
thanks
thanks,
that's helped me to install new dolphin browser on mine superpad tablet pc
Hi,
I want to use android:sharedUserId="android.uid.system"
Then I get this error: Installation error: INSTALL_FAILED_SHARED_USER_INCOMPATIBLE
I removed the system uid following this procedure
It didn't work though
How to use system level privilege? I am working with hardware video codec, without system privilege. I am facing the same problem here : developer.nvidia.com/archived-tegra-forums/forum/android-how-call-libpvnvomxso-successfully
Any suggestion/idea would be welcome
The deleted "android.uid.system" in packages.xml comes back after reboot.
Hi,
I followed the instructions to remove section of android.uid.system in packages.xml. But after reboot, I felt that this file was re-generated and overwritten by system itself. I still can't install my app due to the same incompatible error.
Any help? Thanks!
Comment out shared-user name="android.uid.shared" xml block
mylifeisjourney said:
Hi,
I followed the instructions to remove section of android.uid.system in packages.xml. But after reboot, I felt that this file was re-generated and overwritten by system itself. I still can't install my app due to the same incompatible error.
Any help? Thanks!
Click to expand...
Click to collapse
Hi,
It worked for me... All you want to do is just comment out the block of XML elements under <shared-user name="android.uid.shared" userId="10012">
Note: I have "Su" permission in my Device.
This is is how i did
<!-- <shared-user name="android.uid.shared" userId="10012">
<sigs count="1">
<cert index="3" />
</sigs>
<perms>
<item name="android.permission.USE_CREDENTIALS" />
<item name="com.google.android.googleapps.permission.GOOGLE_AUTH.mail" />
<item name="android.permission.WRITE_EXTERNAL_STORAGE" />
<item name="com.google.android.googleapps.permission.GOOGLE_AUTH.cp" />
<item name="android.permission.GET_ACCOUNTS" />
<item name="android.permission.READ_CONTACTS" />
<item name="android.permission.WRITE_CONTACTS" />
<item name="com.google.android.googleapps.permission.GOOGLE_AUTH" />
<item name="android.permission.READ_SYNC_STATS" />
<item name="android.permission.READ_PHONE_STATE" />
<item name="android.permission.READ_SMS" />
<item name="android.permission.MODIFY_PHONE_STATE" />
<item name="android.permission.WRITE_SETTINGS" />
<item name="android.permission.INTERNET" />
<item name="android.permission.SUBSCRIBED_FEEDS_READ" />
<item name="android.permission.VIBRATE" />
<item name="android.permission.SUBSCRIBED_FEEDS_WRITE" />
<item name="android.permission.WAKE_LOCK" />
<item name="android.permission.CALL_PRIVILEGED" />
</perms>
</shared-user> -->
mylifeisjourney said:
Hi,
I followed the instructions to remove section of android.uid.system in packages.xml. But after reboot, I felt that this file was re-generated and overwritten by system itself. I still can't install my app due to the same incompatible error.
Any help? Thanks!
Click to expand...
Click to collapse
same here, after I change the file and reboot it restore the line
no one?
android.uid.system (id 1000) is used for installing packages and I think this trick only works for 10.000 and higher id's.
Use google to find out more about the problem: https://www.google.com/search?num=40&hl=en&q=android.uid.system
Cheers
never mind
Okey, I did a small research to find out why my app was force closing everytime after I removed android:sharedUserId="android.uid.system" from AndroidManifest.xml.
It turned out that it doesn't have permission to force stop packages(it's a system monitor).
I have checked the androidmanifest.xml and everything looks correct to me. When installing, only wake lock and internet permissions are granted. I have attached the txt file... I hope somebody can help me out of here.
Thanks man This helped. A lot.
install failed shared user incompatible
Hi,
I have decompiled an APK using apktool. And changed one file "stings.xml" The language was in Chines and I just replaced all Chines text with English. Now I recompiled that APK using apktool. Then I signed that APK with JARSIGNER. Then I zipaligned the APK.
Even after that I was geeting "install failed shared user incompatible".
Then I used method told in this thread. But still having the same problem.
These are starting line of Menifist.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest android:sharedUserId="android.uid.system" android:versionCode="1" android:versionName="1.0" package="com.android.ktcit"
xmlns:android="http://schemas.android.com/apk/res/android">
<application android:label="@string/app_name" android:icon="@drawable/icon" android:name="KTCITApp">
<receiver android:label="@string/app_name" android:name=".KTCITBootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</receiver>​
Could anyone help me out?
LLegend thanks a ton buds... helped me fix gmaps
It's the 1st time I encounter such problem. Fortunately got your solution . Thank you!
not worked for me
installing google calendar on i9100 4.0.4 simplistic V i have error
"incompatible wit other apps using same user id"
Hi, all. I'm desperately trying to understand what's going on here, but my programming/coding skills are nil. I've run into a shared user ID error with Google Calendar... How exactly would I use this technique to fix that?
Same here, can anyone please explain what should I do in simple words? I have this same problem and i'll be glad if you explain what is adb and those other comands, I have rooted tablet
Plz?...........
I was thinking that I could simply make the edit on boot, but it seems to regenerate every time an attempt is made to install. Everything can be hacked, there must be a way

[Resolved] [Q] Local directoryies in local_manifest

I am currently using the following in my local_manifest file:
<remote name="local"
fetch="ssh://localhost/home/phylu/android/" />
/home/phylu/android/... is where my local git clones are. Is it possible to use just a directory there? I would prefer not to connect to my server via ssh each time, as I have to enter a password everytime, which is a bit annoying with repo.
After the 3rd day trying, I finally figured the correct way out:
Code:
<remote name="local"
fetch="file:///home/phylu/android" />

[Q] Updating a configuration xml file of an installed apk

Hi,
Is there any way to add/update a configuration xml file to an app already installed on an Android 4.2+ device?
The purpose of this would be to eliminate the setup process for technologically impaired users.
Case in point: an application through which the user can send data over wifi/3g to an IIS server, the user will have to configure the server address/location, username and password (which is generally void if it's not requested otherwise), the location of the actual data file that must be synced.
All i want to do is eliminate the part where the user has to set-up anything else but his username.
The configuration file is located in </Data/Data/application.name/files> and it's called application.config.xml
Could it be added in an apk which will act as an update?
The devices will not be rooted and the config.xml file will be different (different servers), depending on the users' location so it can't be hardcoded in the sync application.
This is the actual content of the .xml file once the settings have been made, the sync app generates a blank config.xml file during the installation.
Code:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="ClientLocation" value="/storage/emulated/0/clientapp_00" />
<add key="Username" value="User Name" />
<add key="Password" value="d41d8cd98f00b204e9800998ecf8427e" />
<add key="ServerLocation" value="Http://192.168.0.101:55541/server/sync.aspx" />
<add key="Compression" value="True" />
<add key="ServerConnections" value="Sync Serv,Http://192.168.0.101:55541/server/sync.aspx" />
<add key="Language" value="en" />
<add key="SyncApk" value="Sync.apk" />
<add key="SyncPackage" value="Data.Sync" />
</appSettings>
</configuration>
Thanks in advance!
Any help guys?

[Completed] [Q] How to add admob ads on html based android app

I have created an app using just html/css.
The app is build by html.I followed this guy's tutorial.As i can't publish the link I am publishing his tutorial ..
Are you a web designer or you can HTML,CSS and Java Script? If your answer is Yes, You can make android app with HTML, CSS and Java scripts knowledge! In this post I’ll show you how can you make an Android app with Just HTML css with phone gap.
What you have need
adt-bundle ( 32 bit windows version download) You can download for your OS platform here
PhoneGap ( Download )
An Android phone.
Procedure:
Open adt-bundle folder and open eclips
Create an android project by eclips
Extract PhoneGap and copy the cordova-2.9.0.js file.
In left side click on Package Explorer and paste the cordova-2.9.0.js file in assets>www folder
Copy cordova-2.9.0.jar file and paste it in Libs folder like as image below
phone gap app develop
Now open the MainActivity.java file from src folder. In this file replace the public class MainActivity extends Activity line with public class MainActivity extends DroidGap
write super.loadUrl(Config.getStartUrl()); in the place of setContentView()
eclips ide
Now add this code in AndroidMainfest.xml file at <uses-sdk…/> and <application…/> tags
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:resizeable="true"
android:anyDensity="true" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
android mainfest file
refresh the project. Now create a index.html file in assets>www folder. The app will show you whatever you write in index.html file. You can add more html file link with index.html file like as a website.
After following his guide I succeded to create an android app using basic html/css.
But now I got a problem.I can't add admob ads on the app.I tried a lot but eclips shows atleast 1 problem rather I can't add admob ads on my apps.
plz help me?/
nissan0808 said:
I have created an app using just html/css.
plz help me?/
Click to expand...
Click to collapse
Hi there,
As the rules said this is not a support forum, but rather a place to get some help by being pointed to the right thread.
The mission of XDA Assist is to provide basic help to those who have tried searching but can't find what they are looking for and need assistance. This is not a "helpdesk" providing technical assistance but more to point you in the correct direction with your problem. Perhaps you can't find posts on how to root your phone, install custom recovery or maybe you have questions about how to navigate and use features on the site.
Click to expand...
Click to collapse
In other way, you can ask for help in this area General discussion > Questions and Answers or for more detailed help try to read carefully this forum Development Tools

[Guide] How to Build Your Own Custom ROM [athene]

Hello guys. I will show you how to build LineageOS to Moto G4 Plus.
You have to build in a Linux system. I prefer Ubuntu 16.04 in this guide.
The lines which is starting with $ are commands you should write but you won't write $'s.
1- First, open the terminal and write this command to download packages which are necessary for building.
Code:
$ sudo apt-get install bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop maven openjdk-8-jdk pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32readline6-dev lib32z1-dev
2- Write this commands to download the repo which is using for download sources.
Code:
$ mkdir -p ~/bin
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
3- Create a directory and open it. I will​ create los, you can create what you want.
Code:
$ mkdir ~/los
$ cd ~/los
4- Set your username and email.
Code:
$ git config --global user.name "YourUserName"
$ git config --global user.email "YourEmail"
5- Select the repo what you want to download. I will download LineageOS repo now, you can download what you want.
Code:
$ repo init -u https://github.com/LineageOS/android.git -b cm-14.1
To build another ROM, go to ROMs manifest in Github and copy the link. Then add .git to link.
cm-14.1 is our branch, you can change it.
6- Sync your repo.
Code:
$ repo sync --force-sync
7- Create a roomservice.xml in /los/.repo/local_manifests
8- Write this in your roomservice.xml. And save it. You can change or add your device trees here. I will use these trees
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- Device Trees -->
<project name="LineageOS/android_device_motorola_athene" path="device/motorola/athene" remote="github" revision="cm-14.1" />
<project name="LineageOS/android_kernel_motorola_msm8952" path="kernel/motorola/msm8952" remote="github" revision="cm-14.1" />
<project name="TheMuppets/proprietary_vendor_motorola" path="vendor/motorola" remote="github" revision="cm-14.1"/>
<project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" revision="cm-14.1" />
</manifest>
9- Sync the repos again.
Code:
$ repo sync --force-sync
10- Write this commands before building.
Code:
$ . build/envsetup.sh
$ breakfast athene
11- Set cache. I recommend setting min. 50 GB cache for increase speed. I'll set 100 GB.
Code:
$ export USE_CCACHE=1
$ prebuilts/misc/linux-x86/ccache/ccache -M 100G
12- State you're going to use Java 8.
Code:
$ export EXPERIMENTAL_USE_JAVA8=true
13- Start building.
Code:
$ brunch athene
14- If you build successfuly, you can find your lineage-athene-unofficial-xxxxxxx.zip in /los/out/target
15- Finished.
Credits: @asderdd
Nice tutorial! I have a small question though. When I try to make a LineageOS build I always get an error, something about java being out of memory. I have tried several things to solve the problem but nothing really worked, like manually setting the java memory heap size on Jack Server. My machine's specs are: Intel Core i5 3450 quad core @ 3.4Ghz, 6GB RAM and a nVidia GTX 520. Yes my machine is old but that doesn't mean it's incapable of making builds, right?
Using the following is much easy imo, instead of modifying the manifest.
git clone url -b branchname directory
---------- Post added at 10:21 AM ---------- Previous post was at 10:19 AM ----------
TheSauceTesters said:
Nice tutorial! I have a small question though. When I try to make a LineageOS build I always get an error, something about java being out of memory. I have tried several things to solve the problem but nothing really worked, like manually setting the java memory heap size on Jack Server. My machine's specs are: Intel Core i5 3450 quad core @ 3.4Ghz, 6GB RAM and a nVidia GTX 520. Yes my machine is old but that doesn't mean it's incapable of making builds, right?
Click to expand...
Click to collapse
What linux distro are you using? Consider using soemthing light weight like Ubuntu Gnome or Kubuntu. Also, how are you alloting the RAM to Jack and did you do the same in the .bashrc ?
tywinlannister7 said:
Using the following is much easy imo, instead of modifying the manifest.
git clone url -b branchname directory
---------- Post added at 10:21 AM ---------- Previous post was at 10:19 AM ----------
What linux distro are you using? Consider using soemthing light weight like Ubuntu Gnome or Kubuntu. Also, how are you alloting the RAM to Jack and did you do the same in the .bashrc ?
Click to expand...
Click to collapse
I am using Ubuntu 16.04. I used the following guide to manually set the java memory size:
http://stackoverflow.com/a/37515468/5708385 and I also did the same in .bashrc
TheSauceTesters said:
I am using Ubuntu 16.04. I used the following guide to manually set the java memory size:
http://stackoverflow.com/a/37515468/5708385 and I also did the same in .bashrc
Click to expand...
Click to collapse
Found the things in the Stackoverflow link, a bit complicated; this is all you need, # refers to the GB of RAM you can allot. Type this in terminal and add it to your .bashrc file. Relogin/Reboot to make sure it gets implemented in bash.
Code:
export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx#G"
On a 6GB machine, 5 GB should be the max, provided that you're not using your machine while the ROM is building. :good:
I just reinstalled ubuntu and now it gives me fetch errors when it's trying to fetch the projects mentioned in roomservice.xml. The error says "Error: Exited sync due to fetch errors."
--Update
I manually cloned the 2 projects with git clone into their destinated directories.
@TheSauceTesters try this command
repo sync -j$( nproc --all ) --force-sync -c --no-clone-bundle --no-tags --optimized-fetch --prune
why do we need to sync repo twice? and will it take the same time the 2nd time too? cuz i started at 4:30 in the evening, still stuck at repo syncing the 1st time itself. till 19 gb downloaded
///TheNexus/// said:
7- Create a roomservice.xml in /los/.repo/local_manifests
8- Write this in your roomservice.xml. And save it. You can change or add your device trees here. I will use these trees
Click to expand...
Click to collapse
Hi, thanks for the tutorial. After adding the trees in roomservice.xml I get the following error with "brunch athene" (after sourcing envsetup.sh and breakfast etc...):
Code:
fatal: duplicate path device/motorola/athene in /home/robert/android/building/RR/.repo/manifest.xml
I have tried using a roomservice.xml from elsewhere ( I forget where now) which looks like:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="LineageOS/android_device_motorola_athene" path="device/motorola/athene" remote="github" />
<project name="LineageOS/android_kernel_motorola_msm8952" path="kernel/motorola/msm8952" remote="github" />
<project name="LineageOS/android_external_bson" path="external/bson" remote="github" />
<project name="LineageOS/android_external_stlport" path="external/stlport" remote="github" />
<project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" />
<project name="LineageOS/android_packages_resources_devicesettings" path="packages/resources/devicesettings" remote="github" />
</manifest>
and the repo sync is fine but I get build errors. The latest being:
Code:
Starting build with ninja
ninja: Entering directory `.'
ninja: error: '/home/robert/android/building/RR/out/target/product/athene/obj/lib/libtime_genoff.so.toc', needed by '/home/robert/android/building/RR/out/target/product/athene/obj/SHARED_LIBRARIES/libandroid_servers_intermediates/LINKED/libandroid_servers.so', missing and no known rule to make it
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
Running the extract-files.sh script and getting files from an athene device running 14.1 makes no difference to the above error. Any advice on this?
cheers
Robert
Libtime_genoff is in vendor/motorola/athene/proprietary/lib/ check if it's missing or not, and also check if there's an Android.mk in the base folder that has the instructions for compiling libtime_genoff.so
It's there in the Muppets repository...
nlpl931 said:
Libtime_genoff is in vendor/motorola/athene/proprietary/lib/ check if it's missing or not, and also check if there's an Android.mk in the base folder that has the instructions for compiling libtime_genoff.so
It's there in the Muppets repository...
Click to expand...
Click to collapse
Thanks for your reply! I managed to get past that - it turned out I had a backup file in local_manifests/ that was giving me the duplicate path message, so I was able to add Muppets and repo sync went well. It also compiled and I got a zip of ~390M. Unfortunately it failed to boot - there was a "failed to load kernel" , "your device didn't start properly" etc. I flashed an ElementalX kernel and it booted just fine so I am not sure what went wrong. A boot.img was made BTW, about 8M.
grepper
grepp0r said:
Thanks for your reply! I managed to get past that - it turned out I had a backup file in local_manifests/ that was giving me the duplicate path message, so I was able to add Muppets and repo sync went well. It also compiled and I got a zip of ~390M. Unfortunately it failed to boot - there was a "failed to load kernel" , "your device didn't start properly" etc. I flashed an ElementalX kernel and it booted just fine so I am not sure what went wrong. A boot.img was made BTW, about 8M.
grepper
Click to expand...
Click to collapse
Try reverting the 'drop custom dtbtool' commit for athene - that commit for Lineage OS is https://review.lineageos.org/#/c/176309/ It's caused similar boot failure behaviour for other ROMs (as an aside, are you running a G4 Plus?) I'm not sure how to revert commits locally (i guess git revert will do it? https://git-scm.com/docs/git-revert)
echo92 said:
Try reverting the 'drop custom dtbtool' commit for athene - that commit for Lineage OS is https://review.lineageos.org/#/c/176309/ It's caused similar boot failure behaviour for other ROMs (as an aside, are you running a G4 Plus?) I'm not sure how to revert commits locally (i guess git revert will do it? https://git-scm.com/docs/git-revert)
Click to expand...
Click to collapse
Awesome, thanks, that worked! I did a "git revert --no-commit 3a10bd4" in .device/motorola/athene/ . All is well now. Hopefully they will get that fixed because I'm a bit flummoxed about how to use a branch to stop my revert from being overwritten.
And yes, I am using a Moto G4 plus.
cheers,
Robert
You can use 'git stash' command to save your local changes.
Then after syncing from the remote repo, you can run 'git stash pop' to merge your local changes with the version that you synced provided there are no real conflicts with your modifications...
nlpl931 said:
You can use 'git stash' command to save your local changes.
Then after syncing from the remote repo, you can run 'git stash pop' to merge your local changes with the version that you synced provided there are no real conflicts with your modifications...
Click to expand...
Click to collapse
Thanks, I was considering that approach before someone on #lineageos-dev said doing a branch was the right way. Personally I'd rather something simple like your idea rather than a more complicated solution I am unlikely to use very often or remember next time
On another note, while my zip installed and booted fine, I find I am getting quite a few app force closes (bluemail, atlas browser to name a few).. Not sure why, perhaps I was unlucky timing wise. This was on a clean flash with caches cleared. Guess I'll wait a bit and try again.
If any developer types are interested I can post the logcat.
cheers,
Rob
grepp0r said:
On another note, while my zip installed and booted fine, I find I am getting quite a few app force closes (bluemail, atlas browser to name a few).. Not sure why, perhaps I was unlucky timing wise. This was on a clean flash with caches cleared. Guess I'll wait a bit and try again.
If any developer types are interested I can post the logcat.
Click to expand...
Click to collapse
Never mind, its working now - installed after syncing on June 24th. I think I may have messed something up on my system by installing an incompatible development package. which I uninstalled now. Though you would think that it wouldn't compile rather than compiling successfully and giving me the errors I had. Anyway, it works fine now.
hey everybody I am trying to build PA for athene and I have downloaded PA sources by reference flag from Lineage sources but i am getting this error while breakfast command
build/core/product_config.mk:239: *** _nic.PRODUCTS.[[vendor/pa/products/athene/pa_athene.mk]]: "vendor/cm/config/common_full.mk" does not exist. Stop.
** Don't have a product spec for: 'pa_athene'
** Do you have the right repo manifest?
Will somebody plz tell me the workaround for that , it will be very kind of you
Are you using LineageOS device tree?
If so, look for the file lineage.mk in device/Motorola/athene and change the
"vendor/cm/config/common_full.mk" line to "vendor/pa/main.mk"
You see the build system is searching for LineageOS specific vendor config file whereas it should be looking for PA config...Hence the error. Hope this will fix it. Check this link
https://pastebin.com/9k71H45q
nlpl931 said:
Are you using LineageOS device tree?
If so, look for the file lineage.mk in device/Motorola/athene and change the
"vendor/cm/config/common_full.mk" line to "vendor/pa/main.mk"
You see the build system is searching for LineageOS specific vendor config file whereas it should be looking for PA config...Hence the error. Hope this will fix it. Check this link
https://pastebin.com/9k71H45q
Click to expand...
Click to collapse
Thanks a lot mate....It worked:good:
Although when i try to build it asks for libqc-skia missing and no known rule defined
hello friends I am trying to build PA for our device but the Lineage device tree is giving me a lot of errors......I am a newbie......so plz someone provide me a link for the AOSP device tree for our device....

Categories

Resources