yashsingh1/xdaforums huggingface dataset:
[Galaxy Tab 7.7 Android Development] p3dboard:
I am up to step 2.11 (for Step 2.9 I entered "repo init -u git://github.com/CyanogenMod/android.git -b cm-12.1") as I wanted the cm 12.1 source - I assume that was correct?

My local_manifest.xml is as follows - I am doing a sync now - just wanted to check if this was correct however.

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="danielhk/android_hardware_atheros_wlan" path="hardware/atheros/wlan" />
<project name="danielhk/android_device_samsung_p6800" path="device/samsung/p6800" />
<project name="danielhk/android_device_samsung_smdk4210-tab" path="device/samsung/smdk4210-tab" />
<project name="danielhk/android_kernel_samsung_smdk4210" path="kernel/samsung/smdk4210" />
<project name="danielhk/proprietary_vendor_samsung_smdk4210" path="vendor/samsung" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" />
</manifest>

Edit: actually I just realised, I probably should have changed the samsung_p6800 to samsung_p6810.... will wait for the repo sync to complete and re-run

I just realised Daniel has local manifests in his Github. So I believe this is what my local_manifest.xml should look like for CM 12.1 (I am not 100% sure on the p6810 device entries)

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- bluez support-->
<remote name="gcode" fetch="https://code.google.com/p/"/>
<remote name="korg" fetch="git://git.kernel.org/pub/scm/"/>

<remove-project name="CyanogenMod/android_external_bluetooth_bluedroid"/>
<project remote="korg" path="external/bluetooth/bluez" name="bluetooth/bluez" group="pdk" revision="master"/>
<project remote="korg" path="external/bluetooth/sbc" name="bluetooth/sbc" group="pdk" revision="master"/>
<project remote="gcode" path="external/bluetooth/glib" name="aosp-bluez.glib" group="pdk" revision="master"/>
<!-- Bluetooth app -->
<remove-project name="CyanogenMod/android_packages_apps_Bluetooth"/>
<remove-project name="CyanogenMod/android_packages_apps_BluetoothExt"/>
<project path="packages/apps/Bluetooth" name="danielhk/android_packages_apps_Bluetooth" />
<!-- device related -->
<project path="hardware/atheros" name="danielhk/android_hardware_atheros_wlan" />
<project path="hardware/samsung" name="CyanogenMod/android_hardware_samsung"/>
<project path="device/samsung/p6810" name="danielhk/android_device_samsung_p6810" />
<project path="device/samsung/p6800" name="danielhk/android_device_samsung_p6800" />
<project path="packages/apps/SamsungServiceMode" name="CyanogenMod/android_packages_apps_SamsungServiceMode" />
<project path="vendor/samsung" name="danielhk/proprietary_vendor_samsung_smdk4210"/>
<project path="device/samsung/smdk4210-tab" name="danielhk/android_device_samsung_smdk4210-tab"/>
<project path="kernel/samsung/smdk4210" name="danielhk/android_kernel_samsung_smdk4210"/>
</manifest>
[Galaxy Tab 7.7 Android Development] p3dboard:
After my initial repo sync -j32 command is run, I find that all the build files are in the root of my home drive ~/, instead of under ~/android/rom. Did I miss a step?

I tried moving the folders to the /android/rom and doing a repo sync -j32 whilst in the ~/android/rom folder, but it starts re-creating all the folders back in the root of my home drive ~/

edit: I think I may have figured the reason, I have moved the .repo folder to ~/android/rom, as it was in ~/ (home folder) - I'll try a sync now.....

edit: That worked, but when trying to build the rom using the ./rom-build.sh p6810 command, I get the following error. I think my Local Manifest.xml file must be wrong.... Any idea's Daniel?

Lunching device

build/core/product_config.mk:234: *** Can not locate config makefile for product "cm_p6810". Stop.

Device p6810 not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).

Repository for p6810 not found in the CyanogenMod Github repository list. If this is in error, you may need to manually add it to your local_manifests/roomservice.xml.

build/core/product_config.mk:234: *** Can not locate config makefile for product "cm_p6810". Stop.

** Don't have a product spec for: 'cm_p6810'

** Do you have the right repo manifest?

Starting compilation

build/core/product_config.mk:234: *** Can not locate config makefile for product "full". Stop.

#### make failed to build some targets ####

Total time elapsed: 0 minutes (2.675478760 seconds)

Edit: I just figured out what was wrong with my local_manifest.xml (the entry for p6810 should have been under /device not /hardware)
[Galaxy Tab 7.7 Android Development] daniel_hk:
Clearly, you had repo init in ~/. You.have miss the step creating a working directory first.

Good to know you figure out.

Good luck!
[Galaxy Tab 7.7 Android Development] p3dboard:
I think I'll have to wait for some feedback from Daniel, hopefully with my notes above, Daniel might be able to tell me what I have done wrong to do a successful build. I would love to be able to help out and just the satisfaction of compiling a Rom for the Galaxy Tab 7.7

Edit (15-8-2015): Trying a new build today of cm-12.1 - I have commented out of the local_manifest.xml all the Bluetooth stuff, as cm-12.1 is crashing on building the bluetooth items, that way I can see if it's Daniel's github.com libraries / includes from other sources that are the bug with Bluetooth.
[Galaxy Tab 7.7 Android Development] daniel_hk:
First of all, as a member for almost 2 years, I think you know but overlooked. You didn't quote or mention me in your post. That means there will be no notification to me. I can only know when I manually check the end of the thread.

I login to XDA almost everyday (with my phone mostly) to check for PM and notifications. I seldom ignore anyone, only those helpless and meaningless arguments. I do check once a while for the threads in case there would be someone like you. ;)

Clearly, you didn't finish reading the post. You might read only a few lines, grep the necessary thing and go. I do the same from time to time.

Frankly, you are jumping the steps you are not capable of skipping yet....

I have a section on Bluetooth. There is link to the thread which is another guide for porting Bluez. Bluez only support AOSP. Modifications are required for CM.

Their source is not on Github and they changed frequently. It would not be a simple clone and pull to make others life easy. A developer should know what to do.

Android development is not difficult but there are too many to read. Many teenagers are actively involved. I don't think every one of them are genius but I do believe most of them have read a lot. :good:

I uploaded the latest Omni local_menifest a not long ago. I cloned it from cm-12.1. Some hardware related projects are not updated yet. For the time being, you may track the cm-12.1 branch for those projects. I would correct it when I have time.

Android development for our device is never straight forward. I need to fix the errors and get the build pass all the time.

The original hardware_samsung project from Omni is not working properly. It was clone from CM but never polish to work for our devices.

There are two ways:

1. use blobs to replace the exynos codecs.

2. add the exynos enhancement codes to frameworks_native.

I use the 2nd method. I had requested Omni to include the code but up to this moment no reply yet. Seems no one would take me seriously. PA, RR etc. haven't replied me too.

To be honest, I'm disappointed but never blame anyone. Everyone has his reason and agenda. They don't owe me any explanation. This apply to you and me too. :)

It is not a commercial product, just my hobby for free. I wouldn't say feedback. I would be happy to answer your questions or help you if I can. However, you should let me know first. A PM, a simple quote or an [MENTION=4948627]daniel_hk[/MENTION] would generate a notification to me. I can check it easily with my phone. ;)

Good luck!
[Galaxy Tab 7.7 Android Development] p3dboard:
Thanks Daniel, I'm trying to keep some running notes as I am trying to learn - but I did overlook the quoting of you so you didn't get any notifications, sorry and thanks for being patient with me :)

I'm trying to get a feel for compiling, I only read up to the Sync / Build step 2.11 section, and was hoping that it would simply be able to compile if I had a correct local_manifest.xml, which would include your modifications for things like bluetooth, but it sounds like it's more of a manual tuning process to get things going, and it sounds like I'll have to do some more reading on the Bluetooth changes (your article on Bluez porting etc).
[Galaxy Tab 7.7 Android Development] daniel_hk:
That means ril.h (inside hardware/ril) is updated again. The overlay include file need to update accordingly. (adding new valuable, enum, #deine, etc.)

For the time being, you may

1. Open the file device/samsung/p6800/BroadConfig.mk (same for p6200 and i815)

2. remark the last 3 lines and rebuild

It will not build the ril lib from Samsung.

I have built the ril lib separately as blob. It won't hurt without it.

Good luck!

Daniel
[Galaxy Tab 7.7 Android Development] p3dboard:
Hi Daniel,

I had to comment out a few more RIL entries (/hardware/samsung from memory), so the build got further this time. I also increased the RAM in my build VM from 1.5Gb to 3.0Gb. I am not sure if it failed this time due to lack of Ram (as there was the two make:fork:Cannot allocate Memory errors before the Fail). My machine only has 4gb of Ram, so I might need to actually build the Rom via booting into Ubuntu, rather then running it as a VM. Do you think from the error's below it was the lack of Ram or something else?

I also noticed in the OUT folder for my Rom, its made up a recovery.img file (which I assume must be the CM 12.1 recovery.img file). Do you normally remove that from the .ZIP file at the end of the build? Or do you exclude it from being made? I want to keep the TWRP recovery, and would prefer to build it without the CM 12.1 recovery as its very limited.

Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
target Java: LatinIME (/home/peter/android/rom/out/target/common/obj/APPS/LatinIME_intermediates/classes)
make: fork: Cannot allocate memory
make: fork: Cannot allocate memory
collect2: error: ld terminated with signal 9 [Killed]
/home/peter/android/rom/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.gold: warning: hidden symbol 'SkBitmap::lockPixels() const' in /home/peter/android/rom/out/target/product/p6810/obj/STATIC_LIBRARIES/skia_skia_library_gyp_intermediates/skia_skia_library_gyp.a(SkBitmap.o) is referenced by DSO /home/peter/android/rom/out/target/product/p6810/obj/lib/libjnigraphics.so
/home/peter/android/rom/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.gold: warning: hidden symbol 'SkBitmap::unlockPixels() const' in /home/peter/android/rom/out/target/product/p6810/obj/STATIC_LIBRARIES/skia_skia_library_gyp_intermediates/skia_skia_library_gyp.a(SkBitmap.o) is referenced by DSO /home/peter/android/rom/out/target/product/p6810/obj/lib/libjnigraphics.so
/home/peter/android/rom/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.gold: warning: hidden symbol 'SkBitmap::notifyPixelsChanged() const' in /home/peter/android/rom/out/target/product/p6810/obj/STATIC_LIBRARIES/skia_skia_library_gyp_intermediates/skia_skia_library_gyp.a(SkBitmap.o) is referenced by DSO /home/peter/android/rom/out/target/product/p6810/obj/lib/libjnigraphics.so
build/core/shared_library_internal.mk:68: recipe for target '/home/peter/android/rom/out/target/product/p6810/obj/SHARED_LIBRARIES/libwebviewchromium_intermediates/LINKED/libwebviewchromium.so' failed
make: *** [/home/peter/android/rom/out/target/product/p6810/obj/SHARED_LIBRARIES/libwebviewchromium_intermediates/LINKED/libwebviewchromium.so] Error 1

#### make failed to build some targets (08:42:41 (hh:mm:ss)) ####
Total time elapsed: 523 minutes (31382.188199060 seconds)
[Galaxy Tab 7.7 Android Development] daniel_hk:
I already mentioned in my thread. It is not recommended to use any kind of VM BOX. Even if you have less RAM, Linux would use swap. It will be definitely slow. I suggest you use a real partition or another hard disk to stall Ubuntu again.

The out folder held every object and output files. Most of your answers are in my thread. If don't you want to waste your time. I think you better read the thread again and my answers in the posts too.

It is not a good practice to manually edit the source. You would get lost soon.

Don't worry about other things. You are still at the early stage. Finish the build first.

You would have already finished your first build if you had read enough.

Good luck
[Galaxy Tab 7.7 Android Development] p3dboard:
Just installed a copy of Ubuntu in a partition with 180gb of space and 8gb swap partition. I will transfer my build repos and try building again. I was running the vm in the background while i work, but i can set myself up in Ubuntu so while i am working remotely i can run a compile in the background.
[Galaxy Tab 7.7 Android Development] p3dboard:
[MENTION=4948627]daniel_hk[/MENTION] - So I finally had a chance to copy over my ~/android/rom build with the local_manifest.xml onto the ubuntu partition, and I re-ran the compile.

My first successful build!!

Package Complete: /home/peter/android/rom/out/target/product/p6810/cm-12.1-20150820-UNOFFICIAL-p6810.zip

#### make completed successfully (01:25:45 (hh:mm:ss)) ####

Total time elapsed: 85 minutes (5155.382683630 seconds)

Edit: Of course this build doesn't have Bluetooth, or the RIL libraries enabled (not needed for the p6810 anyway). Now to read more on your notes about Bluetooth and Bluez library! :) And the build was much faster then on the VM.
[Galaxy Tab 7.7 Android Development] p3dboard:
[MENTION=4948627]daniel_hk[/MENTION] - I've made an upload area on Androidfilehost.com https://www.androidfilehost.com/?w=files&flid=37443 and uploaded my cm12.1 build for the p6810. I'm about to give it a try on my tablet. I'll upload any of my builds to this area.

I expect that my current build on my p6810 should have just bluetooth not working. Anyway I'll know after testing.
[Galaxy Tab 7.7 Android Development] p3dboard:
[MENTION=4948627]daniel_hk[/MENTION] - My build worked basically as expected. The Bluetooth Share .APK crashes, but I can force stop / remove it to stop that. Initially the ASOP keyboard wasn't opening during the Device Setup, but after I skipped past the initial install screens and in settings went into Language and Input, and changed the Language from English Australian to English United States, the ASOP keyboard started working.

One thing that is fixed in my build, I modified the Open GL value prior to building to OpenGL ES 2.0's value (edited /android/rom/device/samsung/smdk4210-tab/device.mk and modified ro.opengles.version=131072. My Build runs Asphalt 8 (game from the playstore) without any graphics issues as compared to your builds with the OpenGL ES 3.0 value (196609). All I can say is that having the right value must cause some other modifications in the Build process, and the OpenGL library when built with the wrong value causes some underlying issues. But I am glad that I have been able to test this to see that it does indeed fix that bug. Modifying /system/build.prop and setting the value doesn't have the same effect, as components must already be built by this stage, and so the bug doesn't get fixed by a simple value modification.

# Graphics

PRODUCT_PROPERTY_OVERRIDES += \

ro.opengles.version=131072 \

---------- Post added at 10:20 AM ---------- Previous post was at 09:27 AM ----------

Just for anyone else trying to do a build for the first time, these are the modifications I made to the Source to get the build going for my P6810 (Wifi only model) of the Galaxy Tab 7.7, using the cyanogenmod 12.1 source code (cm 12.1). I've also attached the local_manifest.xml. It's not a perfect build (Bluetooth doesn't work, slight issue initially with the keyboard as mentioned above), but it does compile for me (after you follow all of Daniels instructions properly :)). It's still currently still got the bug with CM 12.1 rebooting when ES Explorer tries to send a file and for P6800 or i815 RIL is disabled (so that would mean no mobile data / mobile connection if I understand correctly). I am going to try make a p6800 build, and uncomment the RIL stuff to see if it was just my P6810 build that didn't like the RIL code.

/android/rom/hardware/samsung/Android.mk

#Comment out RIL (for p6810)

#ifeq ($(BOARD_VENDOR),samsung)

#include $(SAM_ROOT)/ril/Android.mk

#endif

/android/rom/hardware/ril/Android.mk

#Comment out RIL (for p6810)

# RIL_PATH := $(call my-dir)

# ifeq ($(RIL_PATH),$(call project-path-for,ril))

# include $(call first-makefiles-under,$(RIL_PATH))

# endif

/android/rom/hardware/ril-caf/Android.mk

#Comment out RIL (for p6810)

# RIL_PATH := $(call my-dir)

# ifeq ($(RIL_PATH),$(call project-path-for,ril))

# include $(call first-makefiles-under,$(RIL_PATH))

# endif

/android/rom/device/samsung/smdk4210-tab/device.mk

#Comment - Fix OpenGL ES 2.0 value

# Graphics

PRODUCT_PROPERTY_OVERRIDES += \

ro.opengles.version=131072 \
[Galaxy Tab 7.7 Android Development] daniel_hk:
I don't know why you still believe that. I have to tell you again that you are wrong.

You have the source now, you may study it, not just blindly believe. Read the spec. of OpenGL too, it is way before Android. You would get a better idea.

As the name implied, that line means to override the value in build.prop. It is not for building. I just followed the AOSP build note for Lollipop. I think AOSP have its reason. I never have time to play games but people in my local forum test many games too. They know the way to deal with. Just change whatever you feel comfortable. ;)

We are the few Android devices using Atheros (which acquired by Qualcomm years ago) wifi chip. If you have tried Stock, my JB and KK roms, you won't find any problem in file tx over wifi. I ported the kernel driver from Stock 4.1.2 with modified wakelock handling 2 years ago. ES use p2p and samba is another protocol. They are not the same issue. p2p file tx was a known issue since JB. I just don't have motivation to try. Now, even with the old HAL and kernel drivers, file tx over samba crash too. That means most likely a kernel issue. May be buffer overflow or overlap, etc. Like any other Unix based system, only kernel could crash the whole system. There is no log and kmsg generated. That means a debugging version of kernel is required to find out what's wrong. Sounds scary time consuming... o_O

Now you have finished a build. You may start your own threads and do whatever you feel right. This is the reason I spend my time to start and update this thread. Take over the CM thread if you want. I would love having time to move on. :D

Now is only a start. Anyone with some programming skill can get it done in hours. You haven't done anything yet. There will be a lot to do ahead. Just keep your mind open and act like a developer. Find your answer inside the source and don't forget to share officially too. It is what people have done and shared making your life easy.

Good luck. :)
[Galaxy Tab 7.7 Android Development] p3dboard:
[MENTION=4948627]daniel_hk[/MENTION] - No worries (about the OpenGL ES issue) - I just know that my own test build Asphalt 8's not got any graphics glitches, where as the CM 12.1, Carbon LP and Omnirom builds that I have tried that you have made for us seem to still have it. Just trying to share my observations on how it's running on my test build.

The Wifi P2P file transfer bug in Es Explorer doesn't happen on the Slimkat 8.2 (Android 4.4.4) Rom which I had gone back to, it's only happening on the Lollipop based Rom's, so not sure why the lollipop Rom's are crashing, but i know it's working fine on Kitkat for me. If I discover anything, I'll share what I find. Just trying to help provide feedback to help fix issues.

Thanks for your patience with me getting my first build done :)
[Galaxy Tab 7.7 Android Development] p3dboard:
[MENTION=4948627]daniel_hk[/MENTION] - I am reading over / trying to apply the Bluez port guide.

Do I have to do point 1.2 (patching bionic)? I have completed 1.3 and 1.4, and am doing a compile now (patches to "external/bluetooth/bluez/android/hal-bluetooth.c" and "external/bluetooth/bluez/android/client/if-bt.c", and the external/bluetooth/bluez/tools/Android.mk file). So far I think the compile has gotten past the Bluetooth Errors I had before. I'll wait and see once the compile has finished and see if Bluetooth functions.

I gather that Step 2, Kernel Backporting has already been done in your Kernel Library that I am pullling and so don't have to do that part? Just thought I should check.

Also the init script that you have for bluetoothd, is that (Step 3.2) part of your Github library or do I still need to add that?

Thanks,

Peter
[Galaxy Tab 7.7 Android Development] daniel_hk:
Everything is ready for AOSP but CM has one more argument in a function.

1. The patch for bionic is only required for KK. If you check the source first, you would find Lollipop already included.

2. The only thing to do is patching the 2 funtions in bluez to work with CM.

3. kernel backport was already included in my source.

4. all init scripts are in device tree. Check the source.

Only CM reqired to patch.

Good luck