Error building environment for making ROMs from sources - Android Q&A, Help & Troubleshooting

I tried the following command to install a package:
Code:
sudo apt-get install libgl1-mesa-glx:i386
Getting error. Any solution? Should I use
Code:
libglapi-mesa-lts-saucy:i386
instead? plz help. I'm on Ubuntu 14.04.2

Related

[Q] sun-java6-jdk Ubuntu 11.10

It appears sun-java6-jdk has been removed from the Canonical repository. I added "http://archive.canonical.com/ lucid partner" to my sources, but the package is not there. Are there any alternative ways to install it?
There are quite plenty of ways actually:
1. Install from some ppa:
Code:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin
2. Download bin package from oracle site, but that's not ubuntu-way.
3. This one i like the most: create your own packages
http://www.techytalk.info/latest-oracle-sun-java-jdk-and-jre-6-on-ubuntu-operating-systems/
and in any case, don't forget to
Code:
sudo update-alternatives --config java
inflim said:
There are quite plenty of ways actually:
1. Install from some ppa:
Code:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin
2. Download bin package from oracle site, but that's not ubuntu-way.
3. This one i like the most: create your own packages
http://www.techytalk.info/latest-oracle-sun-java-jdk-and-jre-6-on-ubuntu-operating-systems/
and in any case, don't forget to
Code:
sudo update-alternatives --config java
Click to expand...
Click to collapse
It worked, Thank You!
No problem! Google rules

ROM build error

I'm building my first ROM from AOSP/Froyo branch (android-2.2.3_r2) on Ubuntu 12.04 and target 'emulator'.
In 'make' I had to solve several compatibilities that have been popped-up as fatal errors. But for this one:
frameworks/base/libs/utils/RefBase.cpp: In member function ‘void android::RefBase::weakref_type::trackMe(bool, bool)’:
frameworks/base/libs/utils/RefBase.cpp:483:67: error: passing ‘const android::RefBase::weakref_impl’ as ‘this’ argument of ‘void android::RefBase::weakref_impl::trackMe(bool, bool)’ discards qualifiers [-fpermissive]
make: *** [out/debug/host/linux-x86/pr/sim/obj/SHARED_LIBRARIES/libutils_intermediates/RefBase.o] Errorr 1
Click to expand...
Click to collapse
I didn't find any reference so far.
I have tried to relate the issue by editing the file frameworks/base/libs/utils/Android.mk as here
Code:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive
but it still doesn't work.
I appreciate your help!
Thanks
HTH others
Opariti said:
I'm building my first ROM from AOSP/Froyo branch (android-2.2.3_r2) on Ubuntu 12.04 and target 'emulator'.
In 'make' I had to solve several compatibilities that have been popped-up as fatal errors. But for this one:
I didn't find any reference so far.
I have tried to relate the issue by editing the file frameworks/base/libs/utils/Android.mk as here
Code:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive
but it still doesn't work.
I appreciate your help!
Thanks
Click to expand...
Click to collapse
EDITED:
I reply to myself because I've found the solution: everything is a matter of exactly following the toolchain and dev environment that is recommended by Android for each version.
As I'm using an upgraded Ubuntu system the solution is either to take the source code file by file and update to the new build tools or to downgrade the tools to the original ones. The first solution may take some months work, therefore, in my case, I've just done the following and eventually got a clean Froyo from source (which can be customized, of course):
$ sudo apt-get update
$ sudo apt-get install sun-java5-jdk
$ sudo update-alternatives --config javac (and select the 1.5 version)
$ sudo update-alternatives --config java (and select the 1.5 version)
install gcc-4.4 and g++-4.4, if they are not installed
$ apt-get install gcc-4.4
$ apt-get install g++-4.4
$ mkdir ~/bin, then
$ cd bin
$ ln -s /usr/bin/gcc-4.4 gcc
$ ln -s /usr/bin/g++-4.4 g++
Click to expand...
Click to collapse

[TIP] How to restore Ubuntu after python uninstall

Hello, I would like to share with you my little experience.
I had wrong python version for compiling android from source so I decided to reinstall it.
But I was such an idiot that I typed: sudo apt-get remove python
And it removed the part of my ubuntu, it was unuseable.
So here are my 3 golden advices:
1. Don't type that command: sudo apt-get remove python
2. If you want to update python just type sudo apt-get install python2.7 (v3 is not recommended for android compiling)
3. If you removed python but still you have access to terminal type those commands:
$ sudo apt-get install python
$ sudo apt-get install ubuntu-desktop
$ sudo reboot
Click to expand...
Click to collapse
It should restore your missing part of system (That's how I restored my Ubuntu 11.10) , you can loose some settings or small things but everything should be as before.

[TUTORIAL][DEV]Compile Kernel for Samsung Galaxy Grand Quattro[GUIDE]

Hi everyone,
In computing, the kernel is a computer program that manages input/output requests from software and translates them into data processing instructions for the central processing unit and other electronic components of a computer. The kernel is a fundamental part of a modern computer's operating system.
When a computer program (in this case called a process) makes requests of the kernel, the request is called a system call. Various kernel designs differ in how they manage system calls (time-sharing) and resources. For example, a monolithic kernel executes all the operating system instructions in the same address space to improve the performance of the system. A microkernel runs most of the operating system's background process in user space, to make the operating system more modular and, therefore, easier to maintain.
For computer programmers, the kernel's interface is a low-level abstraction layer.
Click to expand...
Click to collapse
Here I will provide you the way to compile Kernel for Samsung Galaxy Grand Quattro..
From the begining you have to have the following things for working with the Kernel Development
Code:
[LIST=1]
[*]Knowledge In C Programming Language(Elementary. but a bit more)
[*]Ubuntu Linux or Other Linux Distribuition (Must be 64-Bit)
[*]Working Internet Connection
[*]Knowledge to work with Git(I prefer this to work hasslefree and with Cleanliness)
[/LIST]
If those Above all Criteria are fulfilled by you jump onto This Tutorial
Setup your Linux
Download Ubuntu - > http://releases.ubuntu.com/13.10/ubuntu-13.10-desktop-amd64.iso
Install the Ubuntu 13.10 if you haven't then proceed
This guide applies to all variations of Ubuntu 13.10 Saucy Salamander 64 bit. Do not use the 32 Bit version. Also, PAY CLOSE ATTENTION when to use "sudo" and when to not. It can make things funky if you do something as root that you shouldn't.
Much thanks goes out to Google, ProTekk, Canonical, and everyone else that I read a random paragraph here and snippet there.
IF YOU ARE USING A VIRTUAL MACHINE, save yourself the trouble and check out my other post here. Otherwise continue on, brave soldier.
First, let's set up the correct JDK.
Many of you probably have some kind of wrong Java installed unless you're starting with a fresh Ubuntu base, and even then maybe.
Let's get rid of that. Copy and paste this into a Terminal window:
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Follow the instructions to remove OpenJDK. If you must keep it, it's possible. But I'm not going to tell you how to do it here. I don't want any chance of confusion or mistake.
Now copy and paste the following into the Terminal:
Code:
sudo add-apt-repository ppa:webupd8team/java
This will add the correct PPA to your system for updated builds of Java 6 JDK that are compatible with 13.10. No more unrecognized Java version errors! And it will update automatically with the rest of your system.
Next, we actually need to install the package. More copy-paste:
Code:
sudo apt-get update && sudo apt-get install oracle-java6-installer
Follow the on-screen instructions. You have to Accept the Licensing Agreement to complete the install. Hopefully no human centipede clauses.
Let's make sure the correct version of Java is activated, run the following Terminal command:
Code:
java -version
You should see something like the following:
Code:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)
Ok, back to a fresh Terminal prompt. Time for installing the guts to build stuff in Ubuntu:
Code:
sudo apt-get install git-core lzop ccache gnupg flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5 lib32z1 lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python gcc g++ cpp gcc-4.8 g++-4.8
When that is done installing, run the following command in your Terminal window:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
That's it on the package side of things.
You guessed it, time for more Terminal. This really is the easiest way, seriously. And it's totally worth it when you're basking in the glory of a bunch of people on XDA.
The binary for a program called "repo" will let you talk to git servers and download all that precious source code. That second part after the && allows it to be executable:
Code:
mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
Use your favorite text editor to open ~/.bashrc
I like nano:
Code:
sudo nano ~/.bashrc
At the very bottom, add the following line:
Code:
export PATH=~/bin:$PATH
Save it. In nano that would be Ctrl-O and then Enter. Then Ctrl-X to exit back to a prompt. Restart bash:
Code:
source ~/.bashrc
In the terminal, navigate to where you would like to store the Android source code. The directions below will make it in your home folder, but if you have limited space, you may want to create it somewhere else. Faster is better, i.e. SSD would be best, USB external is basically unusable. Here we go:
Please hit the "Thanks" button if this post helped you out![/QUOTE]
Downloading the Source and Compiling zImage
First make the directory on which you are going to Compile the Kernel in
Code:
$ mkdir Quattro
$mkdir kernel
$ cd Quattro/kernel
After moving into the Kernel download the Kernel source
Code:
$ git clone https://github.com/yajnab/android_kernel_samsung_msm8625.git -b 8625_samsung ./
After downloading has been completed(It will take an while as size is about 600 MB) you are ready to compile the Kernel.
Now to compile the zImage you need to issue these commands
Code:
$ make delos_defconfig
$ make -jx
(Here x is the number of cores your computer is having, if you are in dilemma its best to use -j2 to avoid overheating of your computer)
You will see various lines where the C files are getting compiled and the modules are made. At the end of the compilation you will find your zImage in the
Code:
arch/arm/boot/[COLOR="Blue"]zImage[/COLOR]
The zImage is your Kernel
So what is the difference bewteen zImage and the Kernel?
Answer:- zImage contains the drivers for your computer to work but you need something called Ramdisk which has to be repacked with the zImage to form a boot.img which can be flashed in your phone.
So what is the Ramdisk?
Answer:- Ramdisk are some files which contains some scripts which initiate your device settings for the kernel to boot up and to frame your device while its booting up.
Packing your boot.img and getting ready to flash it
So ready with the zImage right? Now get prepare to Flash it on your phone
To make the bootimage you need to make a new folder (Not in the folder where your kernel source is)
Lets name the folder as packing
Code:
$ cd ../../
$mkdir packing
$cd Quattro/packing
Lets download the Build Tools
Code:
$git clone https://github.com/yajnab/build_tools.git -b master tools
After the cloning is completed you need to get a boot.img from your stock ROM.
Do the Following things then
Copy the boot.img from the stock Rom to this directory
Copy the Compiled zImage to this directory
so on doing a $ ls it will end up like
Code:
[COLOR="SeaGreen"]/tools[/COLOR] boot.img zImage
On ending up with these do this following..
Code:
$ mkdir unpack
$ cd unpack
$ ../tools/unpackbootimg -i ../boot.img -o unpack
$ rm boot.img-zImage
$ cp ../zImage ./
$ mv zImage boot.img-zImage
$ ../tools/mkbootimg --kernel boot.img-zImage --cmdline 'androidboot.hardware=qcom loglevel=1 vmalloc=200M' --pagesize 4096 --base 0x00200000 --ramdisk_offset 0x01300000 --ramdisk boot.img-ramdisk.gz -o ../new-boot.img
Now download any of the flash-able Kernel zip files and do the following
Make a folder
copy the newboot.img found in the packing folder
from the flash-able zip take the META-INF folder and place with the boot.img
zip them up
Flash it in your phone
More Advacing things will go in here
Credits
I Convey my thanks to these Persons who have helped me in Many ways
My Computer
My BSNL Broadband Connection
My Samsung Galaxy Fit
My Father - Dr. Nachiketa Bandyopadhyay
My Soulmate - Darshana Chatterjee
Friend and Recognized Themer - Crytech
Booting Confimation - Gody
My Tester who inspired(forced in good language) for the kernel - Manoj Kumar
Developers
Adipat
Sakindia123
entropy512
Ezekel
faux123
doomlord
Linus Torvalds
Aditya Fattepurkar
Members of Galaxy Fit group and Linux and Programming Group
What about those *.dtb files? Do I need to copy kernel modules as well ?

[ROM] Ubuntu touch 15.04 Vivid Vervet Attempt

1st Step before doing something I 'll tell:
Do not install Ubuntu yet before I test the installer here.
2nd of all:
I will test in the next 3 days the boot.img images already uploaded.
3rd:
I will tell which boot.img is working or not.
4th
Code:
Unzip the installer, get vivid vervet file.
sudo fastboot flash boot boot.img (the working file)
back to recovery (TWRP)
adb devices if not working - sudo adb kill-server ; sudo adb start-server;
adb devices
With the installer extracted
./Ultra-rootstock-installer system.img vividvervet.taz.gz file (of course armhf)
Instructions to build after I have pushed the repos into my personal github
Code:
sudo apt-get install phablet-tools android-tools-adb android-tools-fastboot
sudo apt-get install git gnupg flex bison gperf build-essential \
zip bzr curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386 schedtool \
g++-4.8-multilib
sudo apt-get install bzr git git-core lzop
pip install launchpadlib
Code:
git global --config user.name "$user"
git global --config user.email "user email"
mkdir /home/$user/ubuntu
phablet-dev-bootstrap -c ubuntu
cd ubuntu
git clone https://github.com/vic3t3chn0/kernel_amami.git kernel/sony/togari
source build/envsetup.sh
lunch aosp_c6833-eng
make -j cpu_thread
-------------------------------------------------------------------------------------------------------
http://d-h.st/ODU
are the new files to test.
http://d-h.st/0S4]
it's the new build, already now built
I got the Ubuntu touch working through the adb root then adb shell.
I got in but now I got screwed the rom inside adb shell.
Updating the topic when I will have pics from the screen, not adb shell in. Perhaps, tomorrow adb shell screenshots here.
New kernel defconfig I think it's now the correctly file fix.
android terms now removed.
Compiling right now with those patches, I wish the boot.img fixed in the end. After that recovery.img will be fixed.
One at a time.
Hi there everyone of the Sony Xperia Z Ultra forum.
Wednesday for testing from myself is coming... After testing it the news will come...
It's coming...
Code:
sudo apt-get install phablet-tools android-tools-adb android-tools-fastboot
sudo apt-get install git gnupg flex bison gperf build-essential \
zip bzr curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386 schedtool \
g++-4.8-multilib
sudo apt-get install bzr git git-core lzop
pip install launchpadlib
My github vic3t3chn0 in Saturday will have the updated ubuntu Z Ultra repositories up.
Attempting testing from me will come out wednesday.
Even not tested yet. I've decided to test on Saturday and not tomorrow.
Here it is for everyone who wanted, and with a hurry to test the images and Ubuntu phone OS.
My updated link for this new way:
http://d-h.st/jIgS
BACK to android:
Code:
sudo fastboot flash boot /directory_back_android/boot.img
sudo fastboot reboot
For my images built:
Code:
sudo adb kill-server
sudo adb start-server
adb devices
adb reboot bootloader
sudo fastboot flash boot /directory_file/boot.img
sudo fastboot flash recovery /directory_file/recovery.img
sudo fastboot boot /directory_file/recovery.img
bzr branch lp:project-rootstock-ng
cd project-rootstock-ng
./rootstock-touch-install vivid-preinstalled-touch-armhf.tar.gz /directory_file/system.img
sudo fastboot flash recovery
For wednesday follow this code tag:
Code:
sudo adb kill-server
sudo adb start-server
adb devices
adb reboot bootloader
sudo fastboot flash boot boot.img
sudo fastboot flash recovery recovery.img
sudo fastboot boot out/target/product/togari/recovery.img
bzr branch lp:project-rootstock-ng
cd project-rootstock-ng
./rootstock-touch-install vivid-preinstalled-touch-armhf.tar.gz out/target/product/togari/system.img
sudo fastboot flash recovery
For the build:
I will release the new images for Sony Z Ultra fastboot mode very soon.
I will update the device folder to do the upper code for compliant and howto fix dtb boot.img fastboot.
It's coming...
ROM Link old:
http://d-h.st/NVOP
Please reply the issues even the working stuff here on this topic.
It's coming, after my flashing I'll tell more. For now, any question straight to Q&A please.
New dev-host files are coming too.
Use this link beneath for Working in Progress fixing zip flasher:
http://d-h.st/Im3K
It's only for case studying. It broke in the middle of the setting up all things.
Fixing can be used any boot.img I gave because it's ready to Ubuntu.
Fixing the zip will be an effort to give to our community an Ubuntu working Rom.
Thank You so much.
Don't forget to Donate. Thank You so much.
Great! Anyone can make it (at lest) system and data as zip for multiboot?
Sent using C6833 - Resurrection Remix/GreatDevs v2
I will, but first corrections on the fastboot images.
And I will include here on the topic the github necessary repos and the changes too.
Yes, I won't forget the multiboot version.
Anyone test it? Thanks a lot op. I'll give it a shot in a day or so to see how it is, looks pretty sweet.
I would test but I have no computer. Waiting for flashable zip etc.
Same here, I am willing to give it a try but waiting for flashable zip.
Sent from my C6802
I guess I'll be the guinea pig. I'll test this later and report back bugs and what works.
I'm willing to test, but is this just a hacked together version or is there hope it will work?
I want to have a try but still don't know how to install
Unlock bootloader and flash using fastboot as first post says (similar like flashing kernel without using flashtool or recovery)
Sent using C6833 - AICP/GreatDevs
ch3mn3y said:
Unlock bootloader and flash using fastboot as first post says (similar like flashing kernel without using flashtool or recovery)
Sent using C6833 - AICP/GreatDevs
Click to expand...
Click to collapse
do it in ubuntu desktop?? *.tar.gz cant be flashed useing recovery ? how to do
In Ubuntu desktop use this instructions:
sudo apt-get install wget
ROOTFS="vivid-preinstalled-touch-armhf.tar.gz"
wget -c "http://cdimage.ubuntu.com/ubuntu-touch/daily-preinstalled/current/$ROOTFS" -O "$OUT/$ROOTFS"
$ROOTSTOCK_DIR/rootstock-touch-install "$OUT/$ROOTFS" "$OUT/system.img"
astronfestmon said:
In Ubuntu desktop use this instructions:
sudo apt-get install wget
ROOTFS="vivid-preinstalled-touch-armhf.tar.gz"
wget -c "http://cdimage.ubuntu.com/ubuntu-touch/daily-preinstalled/current/$ROOTFS" -O "$OUT/$ROOTFS"
$ROOTSTOCK_DIR/rootstock-touch-install "$OUT/$ROOTFS" "$OUT/system.img"
Click to expand...
Click to collapse
Only these commad?
Yes it is.
I'll test it Saturday, when i'm done of the exams at college.
Sent from my Xperia Z Ultra using XDA Free mobile app
Type these what's the next? Reboot to recovery?
Just type on Ubuntu desktop those commands.
Than reboot. No reboot to recovery it won't be needed.
With my system image flash as I said through the new method.
Sent from my Xperia Z Ultra using XDA Free mobile app
Can I use Ubuntu desktop on VMware? Just connect my phone and type these four commad and reboot to system? Don't need to put other files to phone or computer? Thanks very much. Sorry for my poor English.
Yes you can on VMWare.
Power on the VM, connect the device.
And follow my instructions. When are done, reboot the Z Ultra.
Sent from my Xperia Z Ultra using XDA Free mobile app
Here is 01:41 I'll go to sleep.I'll try it again wait for my good news.
Okay. That's fine.
If the boot doesn't work I'll fix on Saturday.

Categories

Resources