LG Optimus S: 4.4 KitKat?

skinbark

Well-known member
Nov 22, 2013
289
0
0
Visit site
Re: 4.4 KitKat?

Code:
andyopie150@Dell-OptiPlex-GX620DT:~/android/system$ source build/envsetup.sh
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/goldfish/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/lge/thunderc/vendorsetup.sh
including vendor/cm/vendorsetup.sh
including sdk/bash_completion/adb.bash
including vendor/cm/bash_completion/git.bash
including vendor/cm/bash_completion/repo.bash
andyopie150@Dell-OptiPlex-GX620DT:~/android/system$ lunch cm_thunderc-userdebug Looking for dependencies
Dependencies file not found, bailing out.

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.1
CM_VERSION=11-20131209-UNOFFICIAL-thunderc
TARGET_PRODUCT=cm_thunderc
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv6-vfp
TARGET_CPU_VARIANT=arm11
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.8.0-34-generic-x86_64-with-Ubuntu-13.04-raring
HOST_BUILD_TYPE=release
BUILD_ID=KOT49E
OUT_DIR=/home/andyopie150/android/system/out
============================================

andyopie150@Dell-OptiPlex-GX620DT:~/android/system$ lunch

You're building on Linux

Lunch menu... pick a combo:
 1. aosp_arm-eng 		 7. cm_goldfish-userdebug 
 2. aosp_x86-eng 		 8. cm_goldfish-user 
 3. aosp_mips-eng 		 9. mini_mips-userdebug 
 4. vbox_x86-eng 		 10. mini_x86-userdebug 
 5. mini_armv7a_neon-userdebug 	 11. cm_thunderc-eng 
 6. cm_goldfish-eng 		 12. cm_thunderc-userdebug 

Which would you like? [aosp_arm-eng] 12
Looking for dependencies
Dependencies file not found, bailing out.

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.1
CM_VERSION=11-20131209-UNOFFICIAL-thunderc
TARGET_PRODUCT=cm_thunderc
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv6-vfp
TARGET_CPU_VARIANT=arm11
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.8.0-34-generic-x86_64-with-Ubuntu-13.04-raring
HOST_BUILD_TYPE=release
BUILD_ID=KOT49E
OUT_DIR=/home/andyopie150/android/system/out
============================================

andyopie150@Dell-OptiPlex-GX620DT:~/android/system$

What directory do I need to be in when I run:
Code:
lunch cm_thunderc-userdebug
??

If you run lunch and select cm_thunderc-userdebug you don't need to type lunch cm_thunderc-userdebug. That's just a shortcut command to skip the menu selection when you know what to type. You're ready to build.
 

AndyOpie150

Well-known member
May 15, 2011
1,254
32
0
Visit site
Re: 4.4 KitKat?

?
So I don't have to worry about:
Code:
andyopie150@Dell-OptiPlex-GX620DT:~/android/system$ lunch cm_thunderc-userdebug 
Looking for dependencies
Dependencies file not found, bailing out.

Everything is new to me, just trying to be sure before I actually run:
Code:
make -j3 bacon
 

skinbark

Well-known member
Nov 22, 2013
289
0
0
Visit site
Re: 4.4 KitKat?

?
So I don't have to worry about:
Code:
andyopie150@Dell-OptiPlex-GX620DT:~/android/system$ lunch cm_thunderc-userdebug 
Looking for dependencies
Dependencies file not found, bailing out.

Everything is new to me, just trying to be sure before I actually run:
Code:
make -j3 bacon

No I get that message too, I guess it's something that the build system uses to check that you installed all the necessary packages to build. You'll still get a successful build as long as the system has everything it needs. You're ready to go. If there are missing dependencies we'll worry about it later.
 

AndyOpie150

Well-known member
May 15, 2011
1,254
32
0
Visit site
Re: 4.4 KitKat?

OK. Side cover is off of tower. Fan as big as tower blowing cool air into tower.
I guess I give it a whirl.

EDIT: Changed my mind (it's 77 inside the house and 84 outside). Will give it a whirl early morning when it is the coolest, at about 62 (my 10 year old computer needs all the help it can get).
 
Last edited:

AndyOpie150

Well-known member
May 15, 2011
1,254
32
0
Visit site
Re: 4.4 KitKat?

EDIT: Decided to run
Code:
make clean
and try again. If I get same error again I will post it.
 
Last edited:

skinbark

Well-known member
Nov 22, 2013
289
0
0
Visit site
Re: 4.4 KitKat?

I managed to get CM11 to the point where the Android services start up and I can get an adb shell. The screen shows the spinning disk but that's as far as it gets, it just keeps spinning its wheels (looping in startup). Having adb shell and logcat is going to make it a lot easier to get going though.

Note: If anyone is working on this and needs to edit the contents of the ramdisk, I DON'T recommend unpacking and repacking the boot.img file. I wasted several hours flashing roms which contained corrupted ramdisk images that made it freeze on the LG logo. Just make your changes in the root folder of your out directory, delete ramdisk.img and boot.img and 'make bootimage'. It doesn't take long to generate a new boot.img.
 
Last edited:

AndyOpie150

Well-known member
May 15, 2011
1,254
32
0
Visit site
Re: 4.4 KitKat?

After doing a clean of the out folder (forgot to do this the first time which is probably why I got a camera error) I again tried to make bacon.
It hangs on:
Code:
target thumb c++ : lib LLVMAsmParser <= external/llvm/lib/AsmParser/Parser.cpp
Left the computer on, the screen timed out. Couldn't get the mouse to wakeup screen both times. Ended up having to do a hard reset.

PS: Everything was going great up until then. No noises from the hard drive, script on terminal seemed to be zipping right along, then wham! Dead stop in script on terminal, and mouse imputs to cursor on screen unresponsive.
 

skinbark

Well-known member
Nov 22, 2013
289
0
0
Visit site
Re: 4.4 KitKat?

After doing a clean of the out folder (forgot to do this the first time which is probably why I got a camera error) I again tried to make bacon.
It hangs on:
Code:
target thumb c++ : lib LLVMAsmParser <= external/llvm/lib/AsmParser/Parser.cpp
Left the computer on, the screen timed out. Couldn't get the mouse to wakeup screen both times. Ended up having to do a hard reset.

PS: Everything was going great up until then. No noises from the hard drive, script on terminal seemed to be zipping right along, then wham! Dead stop in script on terminal, and mouse imputs to cursor on screen unresponsive.
Try again but don't do a make clean, if you do it'll take forever to get through the build. The build will sort of continue where it left off if you don't do make clean. Make sure the swap you added is enabled (type 'free'). Under System Settings choose Don't Suspend under Power. Choose Turn screen off Never and turn off Lock under Brightness & Lock. Close out all other apps before starting the build. Run envsetup.sh, lunch cm_thunderc-userdebug and make -j3 bacon. Each time you'll get farther through the build. Sometimes when the computer freezes it'll generate a corrupted object file that will have to be removed from the out directory. I ran into this once or twice, I went into the out folder and deleted the some-thing.o file and that took care of the error. In your situation make clean should be a last resort or you might be treading water for days. You may have to enable ccache. What's your hard drive space situation? ccache will take up a lot of space, they recommend 50-100 gb, I'm using 20 gb. If you have an extra 10 gb on disk you should probably use it for that. But you obviously don't want to run out of space on disk during the build. Anyways just keep running make bacon and post your errors if they pop up more than once.
 

AndyOpie150

Well-known member
May 15, 2011
1,254
32
0
Visit site
Re: 4.4 KitKat?

Already enabled ccache.
Got a camera error when I didn't use the make clean command the first time. Will post the next time It comes up.
I won't run make clean this time.
Will check on the swap as well.
Thanks.

EDIT:
Code:
andyopie150@Dell-OptiPlex-GX620DT:~$ free
             total       used       free     shared    buffers     cached
Mem:       1009028     856268     152760          0      64836     427516
-/+ buffers/cache:     363916     645112
Swap:            0          0          0
Remember, the swap is on /dev/sda and not on /dev/sdb with Xubuntu. How do I get the swap on /dev/sda to function as needed (it seems to work fine for moving things back and forth between /dev/sda1 and /dev/sdb1). Maybe it's just not showing up on the terminal because it's on /dev/sda??
 
Last edited:

skinbark

Well-known member
Nov 22, 2013
289
0
0
Visit site
Re: 4.4 KitKat?

Already enabled ccache.
Got a camera error when I didn't use the make clean command the first time. Will post the next time It comes up.
I won't run make clean this time.
Will check on the swap as well.
Thanks.

EDIT:
Code:
andyopie150@Dell-OptiPlex-GX620DT:~$ free
             total       used       free     shared    buffers     cached
Mem:       1009028     856268     152760          0      64836     427516
-/+ buffers/cache:     363916     645112
Swap:            0          0          0
Remember, the swap is on /dev/sda and not on /dev/sdb with Xubuntu. How do I get the swap on /dev/sda to function as needed (it seems to work fine for moving things back and forth between /dev/sda1 and /dev/sdb1). Maybe it's just not showing up on the terminal because it's on /dev/sda??

Did you create a file on /dev/sda1 using the dd command or did you shrink the /dev/sda1 partition and add a /dev/sda2 because normally /dev/sda1 would be your windows partition. Install gparted and run it sudo to examine your partitions.
 

AndyOpie150

Well-known member
May 15, 2011
1,254
32
0
Visit site
Re: 4.4 KitKat?

I used Mini Tool Partition Home edition to delete the 1GB swap partition on /dev/sda2. I then merged everything back to /dev/sda1 (this is where my Windows partiton is) using EaseUS Partition Master Free. I then split the Windows partition with Mini Tool and made a 6GB partition on /dev/sda2.
When in Xubuntu (which is on /dev/sdb1) I have no problem moving things back and forth from Xubuntu (/dev/sdb1) to Windows (/dev/sda1).
Note: I have two seperate and distinct hard drives. One is an old PATA hard drive with Windows and the Swap partition. The other is a SATA with Xubuntu on it.

EDIT: Almost forgot.
Code:
frameworks/base/core/jni/android_hardware_Camera.cpp: In function 'void android_hardware_Camera_setLongshot(JNIEnv*, jobject, jboolean)':
frameworks/base/core/jni/android_hardware_Camera.cpp:398:34: error: 'CAMERA_CMD_LONGSHOT_ON' was not declared in this scope
frameworks/base/core/jni/android_hardware_Camera.cpp:400:34: error: 'CAMERA_CMD_LONGSHOT_OFF' was not declared in this scope
frameworks/base/core/jni/android_hardware_Camera.cpp: In function 'void android_hardware_Camera_setMetadataCb(JNIEnv*, jobject, jboolean)':
frameworks/base/core/jni/android_hardware_Camera.cpp:719:34: error: 'CAMERA_CMD_METADATA_ON' was not declared in this scope
frameworks/base/core/jni/android_hardware_Camera.cpp:721:34: error: 'CAMERA_CMD_METADATA_OFF' was not declared in this scope
frameworks/base/core/jni/android_hardware_camera2_CameraMetadata.cpp: In function 'jlong CameraMetadata_allocateCopy(JNIEnv*, jobject, jobject)':
frameworks/base/core/jni/android_hardware_camera2_CameraMetadata.cpp:163:39: warning: converting to non-pointer type 'jlong {aka long long int}' from NULL [-Wconversion-null]
make: *** [/home/andyopie150/android/system/out/target/product/thunderc/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/android_hardware_Camera.o] Error 1
make: *** Waiting for unfinished jobs....
 

skinbark

Well-known member
Nov 22, 2013
289
0
0
Visit site
Re: 4.4 KitKat?

I used Mini Tool Partition Home edition to delete the 1GB swap partition on /dev/sda2. I then merged everything back to /dev/sda1 (this is where my Windows partiton is) using EaseUS Partition Master Free. I then split the Windows partition with Mini Tool and made a 6GB partition on /dev/sda2.
When in Xubuntu (which is on /dev/sdb1) I have no problem moving things back and forth from Xubuntu (/dev/sdb1) to Windows (/dev/sda1).
Note: I have two seperate and distinct hard drives. One is an old PATA hard drive with Windows and the Swap partition. The other is a SATA with Xubuntu on it.

EDIT: Almost forgot.
Code:
frameworks/base/core/jni/android_hardware_Camera.cpp: In function 'void android_hardware_Camera_setLongshot(JNIEnv*, jobject, jboolean)':
frameworks/base/core/jni/android_hardware_Camera.cpp:398:34: error: 'CAMERA_CMD_LONGSHOT_ON' was not declared in this scope
frameworks/base/core/jni/android_hardware_Camera.cpp:400:34: error: 'CAMERA_CMD_LONGSHOT_OFF' was not declared in this scope
frameworks/base/core/jni/android_hardware_Camera.cpp: In function 'void android_hardware_Camera_setMetadataCb(JNIEnv*, jobject, jboolean)':
frameworks/base/core/jni/android_hardware_Camera.cpp:719:34: error: 'CAMERA_CMD_METADATA_ON' was not declared in this scope
frameworks/base/core/jni/android_hardware_Camera.cpp:721:34: error: 'CAMERA_CMD_METADATA_OFF' was not declared in this scope
frameworks/base/core/jni/android_hardware_camera2_CameraMetadata.cpp: In function 'jlong CameraMetadata_allocateCopy(JNIEnv*, jobject, jobject)':
frameworks/base/core/jni/android_hardware_camera2_CameraMetadata.cpp:163:39: warning: converting to non-pointer type 'jlong {aka long long int}' from NULL [-Wconversion-null]
make: *** [/home/andyopie150/android/system/out/target/product/thunderc/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/android_hardware_Camera.o] Error 1
make: *** Waiting for unfinished jobs....

You need to edit /etc/fstab and add the new swap partition.
You need to add a line that looks like

UUID=735b3be3-779c-4d21-a944-b033225f3ab4 none swap sw 0 0

and you get the UUID using the command

sudo blkid /dev/sda2

Then reboot and run free to make sure the swap is activated. Not surprising your computer froze up. You literally ran out of memory! The fix for the camera and other errors are in the folders I forked in my repo:

android_external_chromium_org
android_frameworks_base
android_frameworks_av

Add these to roomservice.xml, delete these directories (i.e. system/frameworks/base), repo sync and run the build commands.
 

AndyOpie150

Well-known member
May 15, 2011
1,254
32
0
Visit site
Re: 4.4 KitKat?

sudo blkid /dev/sda5 (Doubled checked with Gparted and swap is on dev/sda5) didn't work. But you got me going in the right direction (lack of knowledge is a pain some times). Listed all UUID's with:
Code:
ls -al /dev/disk/by-uuid
[code]
UUID of /dev/sda5 was not listed?? I found out I could edit /etc/fstab with the path instead. So I used:  /dev/sda5/     none     swap     sw 0 0 
Then I typed into a terminal:
[code]
sudo swapon --all
To initalize the swap partition.
Rebooted and ran "free" and got:
Code:
andyopie150@Dell-OptiPlex-GX620DT:~$ free
             total       used       free     shared    buffers     cached
Mem:       1009028     857464     151564          0      62232     465080
-/+ buffers/cache:     330152     678876
Swap:      6361704          0    636170
Yeah!!!

Thanks for the push in the right direction. Now on to the camera fix.

EDIT: I didn't see anything on the camera in android_framework_base (this is where I was getting the error, right?). I did see some camera fixes in android_framework_av.
I do apologize for being such a newb on this (it doesn't help that I'm an over thinker).
 
Last edited:

AndyOpie150

Well-known member
May 15, 2011
1,254
32
0
Visit site
Re: 4.4 KitKat?

OK. I ran make clean and ran the build commands to see how memory was going to be. Not only did nothing lock up, but the Camera error is now different.
Code:
frameworks/av/services/camera/libcameraservice/api1/CameraClient.cpp: In member function 'virtual android::status_t android::CameraClient::sendCommand(int32_t, int32_t, int32_t)':
frameworks/av/services/camera/libcameraservice/api1/CameraClient.cpp:704:23: error: 'CAMERA_CMD_METADATA_ON' was not declared in this scope
frameworks/av/services/camera/libcameraservice/api1/CameraClient.cpp:705:23: error: 'CAMERA_MSG_META_DATA' was not declared in this scope
frameworks/av/services/camera/libcameraservice/api1/CameraClient.cpp:706:23: error: 'CAMERA_CMD_METADATA_OFF' was not declared in this scope
frameworks/av/services/camera/libcameraservice/api1/CameraClient.cpp:707:24: error: 'CAMERA_MSG_META_DATA' was not declared in this scope
frameworks/av/services/camera/libcameraservice/api1/CameraClient.cpp:708:24: error: 'CAMERA_CMD_LONGSHOT_ON' was not declared in this scope
frameworks/av/services/camera/libcameraservice/api1/CameraClient.cpp:710:24: error: 'CAMERA_CMD_LONGSHOT_OFF' was not declared in this scope
make: *** [/home/andyopie150/android/system/out/target/product/thunderc/obj/SHARED_LIBRARIES/libcameraservice_intermediates/api1/CameraClient.o] Error 1
Will now use the fix in android_framework_av, after I get some sleep.
EDIT: Over thinking did actually pay off this time.
 

skinbark

Well-known member
Nov 22, 2013
289
0
0
Visit site
Re: 4.4 KitKat?

Check out this doc for how to use the local manifest:
Doc: Using local manifests - CyanogenMod
Rather than comment out the entries in manifest.xml you should use the 'remove' method that bigsupersquid mentioned. You might as well add in the android_bootable_recovery from omnirom (TWRP) unless you want to try to get CWM working. On another topic, just FYI it is possible to build the system project-by-project so if you run into trouble getting through a complete build you may be able to get through it that way although it would be slow and tedious. Trying to build with 1 gb ram is really pushing it I think. If I were doing it I'd consider shutting down X and working from the console to save a little memory. You can use ctrl-alt-f1 through f6 to switch between virtual consoles, ctrl-alt-f7 to get back into X. I'd also look into shutting down any non-essential daemons that were running. Another thing would be to build some of the core segments of the system individually before going for the final build. These are just ideas for if you run into trouble. Running top in a separate terminal while building will let you keep an eye on your memory status.
 
Feb 19, 2011
1,971
284
0
Visit site
Re: 4.4 KitKat?

generic_armv5 may exist in the build tree but not the combo system.
modified mini_generic-armv7a-neon.
java twitchy. no java 7 allowed.
64 bit install twtichy. bleh.
belkin n300 unfriendly without realtek8192CU driver. ugh.
ubuntu 12.04 won't repo anything on ntfs external drive, where 10.04 didn't mind at all. permissions errors. ?@#!?*!!
'javadoc not found' have to explicitly add jre/bin to PATH in .bashrc

building aosp generic now though...

funny. art built ok.
but bionic gets that thumb error thewraith420 mentioned.
since there's a fast enough connection to use repo, I'm gonna mess with the androidarmv6 stuff like you guys. mix and match.
 
Last edited:

skinbark

Well-known member
Nov 22, 2013
289
0
0
Visit site
Re: 4.4 KitKat?

generic_armv5 may exist in the build tree but not the combo system.
modified mini_generic-armv7a-neon.
java twitchy. no java 7 allowed.
64 bit install twtichy. bleh.
belkin n300 unfriendly without realtek8192CU driver. ugh.
ubuntu 12.04 won't repo anything on ntfs external drive, where 10.04 didn't mind at all. permissions errors. ?@#!?*!!
'javadoc not found' have to explicitly add jre/bin to PATH in .bashrc

building aosp generic now though...

funny. art built ok.
but bionic gets that thumb error thewraith420 mentioned.
since there's a fast enough connection to use repo, I'm gonna mess with the androidarmv6 stuff like you guys. mix and match.
If you're building for thunderc make sure you use the device files from TheJBC 10.2 branch not 10.1. If you want a clean compile use what's in my github (skinbark). I think I got all the showstoppers but I may have missed a couple.
 
Feb 19, 2011
1,971
284
0
Visit site
Re: 4.4 KitKat?

actually I haven't finished syncing cm11 yet.
that info was from aosp r2 building generic armv5 device.
but the cm11 sync is going to grab the cm10.2 branch as listed in your earlier post.
those are nice, they make stuff easier with the copy/paste.

skinbark, you've just been forked on github. I need to hack and slash at the device files. It's also easier to have local copies of the modified stuff you tweaked already.
github.com/squid-kat
I am going to try cutting away packages and such that aren't in the mini_ devices in aosp. perhaps that will make things fit better.
 
Last edited:

AndyOpie150

Well-known member
May 15, 2011
1,254
32
0
Visit site
Re: 4.4 KitKat?

skinbark:
Sorry for my newbness, but, how do I get the CameraClient.cpp from your repo into my fork? Downloaded Pro Git.pdf and have been trying read up on it, but that's a lot of info for my small brain housing group to take in at one time.

Hmm. I clicked on public activity and can see a bunch of your changes. Is this just a straight copy/paste thing going on, or do I need to do something else?