yashsingh1/xdaforums huggingface dataset:
[Galaxy Tab 7.7 Android Development] p3dboard:
[MENTION=4948627]daniel_hk[/MENTION] - the compiling of the Bluetooth APK from your github.com repo file fails.

From what I can tell, the first error is because the BluetoothMapService.java file doesn't have the definition for a static BluetoothMapService.MSG_OBEX_AUTH_CHALL; - Looking at Cyanogenmod's original file I see this value is missing (public static final int MSG_OBEX_AUTH_CHALL = 5003;), however in your BluetoothMapService.java you seem to have redefined the values

However I am not sure if you have modified code elsewhere to use different variable names - Do you know if the 1st one should be updated to point to your new MSG_MAS_CONNECT static? also for the second and third errors (see below), should the variable be reverted to charset or updated to the new mCharset?

DanielHK repo - android_packages_apps_Bluetooth/src/com/android/bluetooth/map/BluetoothMapService.java

public static final int MSG_MAS_CONNECT = 5003; // Send at MAS connect, including the MAS_ID

public static final int MSG_MAS_CONNECT_CANCEL = 5004; // Send at auth. declined

public static final int MSG_ACQUIRE_WAKE_LOCK = 5005;

public static final int MSG_RELEASE_WAKE_LOCK = 5006;

Cyanogenmod Repo android_packages_apps_Bluetooth/src/com/android/bluetooth/map/BluetoothMapService.java

public static final int MSG_OBEX_AUTH_CHALL = 5003;

public static final int MSG_ACQUIRE_WAKE_LOCK = 5004;

public static final int MSG_RELEASE_WAKE_LOCK = 5005;

The second and third errors seem to be because the file BluetoothMapbMessage.java has a variable renamed to mCharset, instead of just charset

Danielhk repo - android_packages_apps_Bluetooth/src/com/android/bluetooth/map/BluetoothMapbMessage.java

/* BBODY attributes */

private long mPartId = INVALID_VALUE;

protected String mEncoding = null;

protected String mCharset = null;

private String mLanguage = null;

Cyanogenmod Repo - android_packages_apps_Bluetooth/src/com/android/bluetooth/map/BluetoothMapbMessage.java

/* BBODY attributes */

private long partId = INVALID_VALUE;

protected String encoding = null;

protected String charset = null;

private String language = null;

Errors

Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar

packages/apps/Bluetooth/src/com/android/bluetooth/map/BluetoothMapAuthenticator.java:60: error: cannot find symbol

msg.what = BluetoothMapService.MSG_OBEX_AUTH_CHALL;

^

symbol: variable MSG_OBEX_AUTH_CHALL

location: class BluetoothMapService

packages/apps/Bluetooth/src/com/android/bluetooth/map/BluetoothMapbMessageMmsEmail.java:240: error: cannot find symbol

charset = null;

^

symbol: variable charset

location: class BluetoothMapbMessageMmsEmail

packages/apps/Bluetooth/src/com/android/bluetooth/map/BluetoothMapbMessageMmsEmail.java:244: error: cannot find symbol

charset = "UTF-8";

^

symbol: variable charset

location: class BluetoothMapbMessageMmsEmail

Thanks,

Peter
[Galaxy Tab 7.7 Android Development] daniel_hk:
That was just before my hard drive crash. I only changed the file BluetoothMapbMessageMmsEmail.java to make the build pass. This is to follow the changes after my drive crash. We would face these kind of errors from time to time. These are what we need to deal with. I got no one to turn to... :cyclops:

I need VPN to upload to Github so I always group everything first. I'm working on the Bluetooth aduio pin. I can give you the BluetoothMapbMessageMmsEmail.java file if you want.

Good luck

PS. If you want a reference, CM is the wrong place. This package is modified from AOSP which Bluez aiming at. There are too many changes and I'm scare to do it again... :eek:

The file : View attachment 3447714 I've remarked the old lines so that you can compare.
[Galaxy Tab 7.7 Android Development] p3dboard:
[MENTION=4948627]daniel_hk[/MENTION] - Thanks Daniel, I actually made the same changes as I guessed the mCharset might be defined elsewhere, and I have compiled bluetooth now
[Galaxy Tab 7.7 Android Development] p3dboard:
[MENTION=4948627]daniel_hk[/MENTION] - So I just installed my new Build on my p6810 after breakfast and bluetooth is working. Fantastic. Thanks Daniel. I've still got to go through the RIL errors to get the p6800 build code working (trying to be able to help you build fresh cm 12.1 rom's for more then just my device which is the wifi only model).

One question though about the CM12.1 source code and the repo sync command. When I look at my new builds, the CyanogenMod version, doesn't seem to get updated after I do a repo sync and a build. It seems to be staying at 12.1-20150812, which I believe is the day I originally did a source code sync. Is there a way to make the repo sync download the latest source code as I notice on my galaxy s2 (i9100) that has cm 12.1 nightlies, it gets the latest source code each time they rebuild. Do I need to do a repo init again?

One other thing - the Torch in the Quick settings currently can turn on the light, but it doesn't turn off - I see you have been working on some code in the Omnirom builds to do with torch, so possibly a new version will appear in github that fixes that soon? Other wise I'll try see if I can track down the code - any tips are welcome.
[Galaxy Tab 7.7 Android Development] daniel_hk:
1. I have told you that RIL is a blob now. Read my reply again for detail.

2. If you have repo init in the same directory, it won't happen. I guess you just copy from somewhere. A repo init can fix that but you have to remove the old .repo folder. That means all the project sources needed to re-sync again. I need VPN to sync so I would never do that. Guide and examples are in Google's notes.

3. Some of the device specific fixes are in framework. If I'm building a new rom base on CM, I would start a new project and pull CM's change from time to time. This is the way Carbon is doing. But I'm not and I had tried uploading to CM but these device dependent changes seems inappropriate for them. That's why I only recommend changing the official source if really necessary.

For torch on QS, my first attempt was fixing it in HAL but strangely it was only called once. That's why it can only be turned on but not off. I was thinking to give another shot later so I keep the code.

My next attempt was using sysfs directly. This is always my last resort, touching the official source. CM and Omni are using different approach for torch. CM use a service in framework while Omni use the policy in SystemUI. There is no guide and shortcut, we have to find out why first.

It is fixed in framework now but I would try to fix it in the HAL again later.

If you really want to learn and prove yourself. Try this yourself or just setting the default hardware keyboard on. it is comparatively easy. I can guide you through this.

You seems not interested in detail. Sometime I would wonder, am I wasting my time explaining too much?

If yes, I'll keep it short. ;)

FYI,

S2 has 83xM free ram while 7.7 only have 776M. They should have different Ram settings.

Find out why almost all Android and Linux distribution would have a libGLESv3.so link to linGLESv2.so. It would answer your questions.
[Galaxy Tab 7.7 Android Development] p3dboard:
[MENTION=4948627]daniel_hk[/MENTION] - Yes - I have only been light reading so far :)

I don't have lots of extra time, but I am interested in learning, so I don't mind the extra detail, and as I gradually get more familiar I hope I can be more of use to you rather then a burden :) Hopefully over the next few weeks, I'll have a chance to read a bit (slowly) and I don't mind trying to fix some of these bugs / learning how the modules interact as it's the best way to learn :) Thanks for answering my questions.
[Galaxy Tab 7.7 Android Development] p3dboard:
[MENTION=4948627]daniel_hk[/MENTION] - Hi Daniel,

Update on my Question 2 about repo sync - I found this article about Repo Sync commands, and the --reference paramater (http://xda-university.com/as-a-developer/repo-tips-tricks) - using this I was able to build a new repo in a few minutes, rather than hours, as it was able to use the locally downloaded repo as a base to build the new repo. I rebuilt a new rom last night based on the new repo, and the CM 12.1 source code updated to the latest (20150823).

mkdir ~/android/cm12.1

cd ~/android/cm12.1

repo init --reference=~/android/rom -u git://github.com/CyanogenMod/android.git -b cm-12.1

repo sync
[Galaxy Tab 7.7 Android Development] p3dboard:
Hi Daniel [MENTION=4948627]daniel_hk[/MENTION],

I've been doing a bit more reading / research about the omnirom compile error, and I believe that the Omnirom compile error above is related to a missing entry in /frameworks/native/libs/ui/GraphicBufferMapper.cpp for the Exynos 4 processor (https://github.com/BlakKatRom/platform_frameworks_native/tree/master/libs/ui - sample code I found with the entry). However just adding the code to the same file doesn't allow it to compile as it errors out. Is there an additional file that needs a reference added? I'll keep on searching in the mean time.

/frameworks/native/libs/ui/GraphicBufferMapper.cpp

#ifdef EXYNOS4_ENHANCEMENTS

status_t GraphicBufferMapper::getphys(buffer_handle_t handle, void** paddr)

{

status_t err;

err = mAllocMod->getphys(mAllocMod, handle, paddr);

ALOGW_IF(err, "getphys(%p) fail %d(%s)",

handle, err, strerror(-err));

return err;

}

#endif

Edit: i think i have to add an entry to the /frameworks/native/include/ui/GraphicBufferMapper.h, i will test after work today
[Galaxy Tab 7.7 Android Development] daniel_hk:
Yeah, there are a few more to add.

You may search the flags on CM source for the missing codes. CM has most of the missing codes while others can be found in the old source (KK and JB). Modification may be required.

Besides EXYNOS4_ENHANCEMENTS, MHEAP and EGL flags are required to handle too.

These are what I normally do for a port.

Further porting would involve frameworks_base and bionic.
[Galaxy Tab 7.7 Android Development] p3dboard:
Thanks Daniel [MENTION=4948627]daniel_hk[/MENTION]

My first omni rom compile - The graphics settings are not quite right, you see part of the boot logo at the top right corner during boot, and the initial boot with rebuild of my Android Apps with ART (coming from your omnirom build) is currently a bit squashed and at the top of the screen - so some display property settings must not be set right, but once booted and you unlock / rotate the screen it displays normally - but the rom compiled and Omni is booting. I've attached my list of current code changes to get this build to happen. GPS still doesn't work on any of my builds, must be something I am missing.

I haven't done any of the MHEAP, or EGL changes yet but the rom built successfully. But as suggested using the CM source I tracked down a missing Wifi setting. I also included from the source code that I found some HDMI code - going to try see if my Samsung HDMI cable does anything (don't expect it will but going to try).

/frameworks/base/core/res/res/values/config.xml

<bool name="config_wifiApFirmwareReload">true</bool>

/frameworks/base/core/res/res/values/custom_symbols.xml

<java-symbol type="bool" name="config_wifiApFirmwareReload" />

services/core/java/com/android/server/NetworkManagementService.java

if (mContext.getResources().getBoolean(

com.android.internal.R.bool.config_wifiApFirmwareReload)) {

wifiFirmwareReload(wlanIface, "AP");

}

P6810 Build - uploaded to

https://www.androidfilehost.com/?w=files&flid=37890
[Galaxy Tab 7.7 Android Development] daniel_hk:
1. Omni doesn't support default platform orientation (to 270 degree). Some modification is required in framework_base.

2. Those code are for the HDMI dongle which is crazy expensive and only few people have it.

3. Those valuables are already set by overlay in device tree. Omni doesn't have it. We need to add them.

You might realize that like other AOSP base ROMs, Omni needs more attention.

Good luck!
[Galaxy Tab 7.7 Android Development] p3dboard:
Thanks for the information, I'll see if I can find where to change the framework_base to fix that. I actually have one of those HDMI dongles which was a about $50 from memory, not that I use it often, but i can use it to test code changes to see if I can get it going.

Yes for point 3, the Overlay did set them, but the code compile crashed out and I had to manually add them.

The Bluetooth APK might need to be modified (I used omni's rather then your APK), to support Bluez? I didn't add the CM modifications to Bluez as being ASOP based I assumed it wouldn't need it. Is that right? Any tips on fixing the GPS? So far it doesn't detect any satellites on either my CM build or Omni.

Thanks. Peter

Edit: I am just doing a compile with this modification to see if that fixes the boot animation, I found this post http://xdaforums.com/showthread.php?t=2594276 about the same issue.

/frameworks/native/services/surfaceflinger/DisplayDevice.cpp

# Line 442

original code -

if ((mHardwareOrientation/90) & DisplayState::eOrientationSwapMask) {

frame = Rect(h, w);

} else {

frame = Rect(w, h);

}

modified code -

if (((mHardwareOrientation/90) || (mHardwareOrientation/270)) & DisplayState::eOrientationSwapMask) {

frame = Rect(h, w);

} else {

frame = Rect(w, h);

}
[Galaxy Tab 7.7 Android Development] daniel_hk:
1. The price for the HDMI dongle is about us$80 here. The libraries were already included but reported not working.

2. I have already updated the device trees and local_manifest for Omni5.1. No need to track my Bluetooth apk.

3. Don't know why your GPS not working. I had already included the fixes. Might be something missing. Try sync the source again. If still not working, you may dump the log to check what's wrong.

4. As I mentioned before, it is inside framework base. It is the default orientation. This is not the bootanimation orientation issue (which was an old fixed issue).

Next time list in points. It will be easier to read. ;)

I'm quite busy recently. May not be around for a few days...

Good luck!
[Galaxy Tab 7.7 Android Development] p3dboard:
[MENTION=4948627]daniel_hk[/MENTION] - just a quick question, does the libfimc library have anything to do with gps? I comment out the sm-tab libfimc item
[Galaxy Tab 7.7 Android Development] daniel_hk:
No. fimc is for imaging. I think you got it from LA. He asked me for the Camera and rebuilt the libfimc as a blob.

I build that file from source with the latest gcc.

Did you re-sync the source?

Sometimes local reference would miss something and occupy extra spaces. I use another more efficient method now.

I suggest you restarting with the original device trees and clean source first. Something might be messed up.

Good luck!

Edit: can you send me your logcat?
[Galaxy Tab 7.7 Android Development] p3dboard:
[MENTION=4948627]daniel_hk[/MENTION] - Yes, I am starting from a fresh source tree. I just reset my repo using "repo forall -c 'git reset --hard ; git clean -fdx' " to remove all my modifcations and bring it back to the current.

Current Code changes - trying to modify the least amount of things for CM12.1 (using your github repo)

Using your Bluetooth APK package along with the bluez libraries, I modify /external/bluetooth/bluez/android/hal-bluetooth.c and /external/bluetooth/bluez/android/client/if-bt.c to have the Secure entries. Next I am commenting out the RIL entries in /hardware/ril/Android.mk, /hardware/ril-caf/Android.mk and /hardware/samsung/Android.mk and finally comment out libfmc entry in /samsung/smdk4210-tab/props/Android.mk (So it's using /hardware/samsung/exynos4/hal/libfimc instead of the /vendor/samsung/smdk4210-tab/props entry)

Is there any other things you normally modify for CM12.1 builds? Any advice is welcome.

I also built a SlimLP rom today (it's built off some CM sources and some ASOP) but I still had the same issues with GPS not working as I do with my CM 12.1 builds. The GPS apps I tried said that the GPS was not started, even though Location services were started. Wifi location services worked fine in Google Maps, but GPS didn't work in Google Maps or any GPS Status programs. I have attached the list of changes and the manifest I used to build the SlimLP rom for the p6810
[Galaxy Tab 7.7 Android Development] daniel_hk:
I was thinking you're still in Omni. Slim is AOSP base. Porting is similar to Omni.

Anyway for cm-12.1, I think it's the PIE issue. I assumed LA had already patched it in CM.

I asked for your logcat earlier. Let me see what's wrong first. Please attach the whole thing. I don't want to miss anything.
[Galaxy Tab 7.7 Android Development] p3dboard:
[MENTION=4948627]daniel_hk[/MENTION] - I currently have three source tree's, CM 12.1, Omni and SlimLP. I can compile all three but with various issues. I'll save a logcat output for you from both a CM 12.1 build and SlimLP build. I haven't had time yet to look into the Omni Framework/Base for the orientation issue at boot.

I am keeping my running notes on what changes are needed for each build, but they are basically very similar. I thought I would look at SlimLP, as it was the other Rom that lots of people wanted in your survey, and I didn't want to be duplicating your work, but if I could, wanted to add something new, but I want to get it working reasonably well before posting it to the forums.

I'm just backing up my current Rom which is my daily driver rom (Slimkat 4.4.4 at the moment - everything works in this build for me). If I get time before I have to go out, I'll flash one of my rom's and upload the logcat, otherwise it will have to be when I get home tonight (it's early morning now).

Slim LP Builds - https://www.androidfilehost.com/?w=files&flid=38253

Omni 5.1 Builds - https://www.androidfilehost.com/?w=files&flid=37890

CM 12.1 Builds - https://www.androidfilehost.com/?w=files&flid=37443

Peter
[Galaxy Tab 7.7 Android Development] p3dboard:
Attached log cat files [MENTION=4948627]daniel_hk[/MENTION]

Looking at my builds, even though Bluetooth is compiling, i don't think it's working. I saw a lot of Bluetooth errors when i try turn it on, so probably i have more to fix.

I saw a gps client error in the logs. I also noticed that i am getting the same e sensor error in my builds as your latest build with Adaptive display turned on, turning it off that error disappears.

Any quick tips you can give me would be appreciated

One thing i noticed with the slimlp source code is that it already had all the exynos4 ifdef code like cm12.1, whereas omni doesn't have this. My first build i treated it like omni, but it's Bluetooth library wanted the secure bits you added to compile, but Bluetooth still didn't work. Next i recompiled using your cm 12.1 github Bluetooth app package, but with the minor fixes like mCharset, Bluetooth didn't work, so i went to my last cm12.1 build and realised it to didn't work. Slim compiles and the initial orientation of the boot logo is fine, no need for me to modify framework /base.

Anyway thanks for taking the time to educate and help me.

Peter
[Galaxy Tab 7.7 Android Development] daniel_hk:
I don't know which method you get the log. Clearly it was filtered and something is missing. It would just waste your time. Please use the build-in logcat.

In a terminal apk, type:

logcat > /sdcard/log

Or connect to a PC with usb. In the Command shell, type:

adb logcat > log

After that, you can play with gps and when finished press ctrl-c or close the terminal.

Either way would provide the complete log.

This is a typical View attachment 3462707 I usually study. I dumped it from Omni. It is clearer and easier to read and search.
[Galaxy Tab 7.7 Android Development] p3dboard:
Hi Daniel,

So I think I have attached the log in the format mentioned above that you were after. I was trying to use a Terminal APK under android but that wasn't working for me - possibly a wrong syntax. Anyway, from a Terminal session on Ubuntu which is what you probably meant all along, I have done a dump of the log cat via ADB over the USB cable. I have attached the slimlp Logcat output, and am just reflashing my CM 12.1 now to produce it's logcat.

I'll attach CM 12.1 to this post when I have made it as well.

Peter

Edit: Added cm 12.1 logcat output (with GPS / Bluetooth failure tests), and after I did another logcat with the Es Explorer file transfer crash of the OS when sending a file (cm12.1 wifi logcat) - incase that helps with working out the Wifi driver bug
[Galaxy Tab 7.7 Android Development] daniel_hk:
If you compare your log cm12.1 to cm12.1 wifi, you may find the differences. I think the first two log were produced after a soft reboot (a crash probably). They contain no daemon initialization. Luckily your last log, (which was probably right after reboot) shows the key points.

1. For bluetooth, bccmd is missing. That means you haven't add the Android.mk in tools. I already told you twice and it is in my Bluez guide too.

We use bccmd to initialize the bt chip.

2. For gps, errors like gps_geofencing are normal. They are simply not supported.

3. I think non PIE support is not there. I found that LA has revert his commit a few times. I don't know why. Actually, the code is from Omni. I attach my version of View attachment 3463340.

Good luck!
[Galaxy Tab 7.7 Android Development] daniel_hk:
For 2: I think you didn't read my reply carefully. point 3 state that my bionic has non-PIE support. PIE = position independent executable. It is to fix GPS.

For 3: H/W drivers usually require to clear data. You may use apps like GPSStatus which have a h/w reset that would clear the GPS data. A factory reset/wipe data would also help but too much sacrifice.
[Galaxy Tab 7.7 Android Development] p3dboard:
Exynos 4 GPS blob - pie version

Hi Daniel [MENTION=4948627]daniel_hk[/MENTION],

I just got back from holidays, so haven't done a great deal more in development. One thing I am just testing is using the Galaxy S2 Exynos 4 gps blob with the builds (I will test getting the non-pie blob that you have working with the modified bionic library that supports non-pie), but attached is the GPS blob that LA uses in the i9100/galaxy s2 as to get CM 12.1 certification he had to have PIE support. This is the GPS blob (its 1.7mb so a fair bit larger then the ones your using), but it's PIE supported, so I assume this means you wouldn't need to modify the bionic library if this works for you.

I've just renamed the gps.exynos4.so to gps.default.so in the zip as well, just so the naming convention matches the build code.

Cheers,

Peter
[Galaxy Tab 7.7 Android Development] p3dboard:
[MENTION=4948627]daniel_hk[/MENTION] - Quick question about compiling for the i815 device. I am getting an error with the build process to do with the libinvensense_hal and the sensors.exynos4.so driver

Using grep, I have found a reference to this in the following file

samsung/smdk4210-tab/libsensors/Android.mk:LOCAL_SHARED_LIBRARIES := libinvensense_hal libcutils libutils libdl

make: *** No rule to make target '/home/peter/android/slimlp/out/target/product/i815/obj/SHARED_LIBRARIES/libinvensense_hal_intermediates/export_includes', needed by '/home/peter/android/slimlp/out/target/product/i815/obj/SHARED_LIBRARIES/sensors.exynos4_intermediates/import_includes'. Stop.

Any tips on how to correct this?

Thanks,

Peter
[Galaxy Tab 7.7 Android Development] daniel_hk:
Just revert what you have done. Sensor HAL is a blob.