yashsingh1/xdaforums huggingface dataset:
[Galaxy Tab 7.7 Android Development] p3dboard:
Hi Daniel,

1. Seeing that I am commenting out the RIL library compilation due to the errors do you simply manually copy the files for the p6800 / i815 into the /out/.../system/lib folders?

/system/lib/libreference-ril.so

/system/lib/libril.so

/system/lib/librilutils.so

/system/lib/libsecril-client.so

/system/lib/libsecril-client-sap.so

Or have you got extra code fixes so that the /hardware/samsung/ril, /hardware/ril, /hardware/ril-caf actually compile and generate these files?

My compiling of the p6800 with the RIL libraries comment out doesn't result in the output having these files, which is probably one of the reasons why on the p6800 build, there is no SIM detected?

2. Even after putting the i815 files back to your standard vendor files for gps.exynos4.so and sensors.exynos4.so, it still complains about the libinvsense_hal.so export includes being missing and bombs out in the compile. Do you comment out something and simply manually supply the extra library? Compiling with the same changes as the p6800 and p6810 doesn't produce this error, but they use sensors.smdk4210.so, so possibly this doesn't have the same dependancy as the i815?

Thanks. Peter:D
[Galaxy Tab 7.7 Android Development] daniel_hk:
1. If you had read my replies, I had told you twice what to do. I never told you to comment out the source and I suggested you not to. You have every right to go your own way. But when things go wrong. It's time to review your paces and really read what you had ignored. If you don't want to read or you already know, why wasting time to ask? I don't want to ignore anyone but I don't have time to repeat again and again too.

2. I haven't post the i815's device tree for SlimLP but I had a test-built before my hard drive crash. It is almost the same as KK. If you derived yours form my kk4.4 tree or cm12.1 tree, you wouldn't have problem. Clearly, you have change something so I told you to revert. I have already told you it is a blob. Why are you still compiling it. Yes, I guessed since you didn't give me much to start with. Post your tree if you want me to point out what's wrong.

I might miss something from time to time and I don't mind to be wrong. What I and most of the developer have posted are as is. I welcome anyone pointing out my mistake. This is my hobby and time to relax myself. I have no intention to argue or to prove myself. It's free and I owe you nothing. I'm not comfortable being implied or accused I withheld something whenever you have problem. I hope this is the last time.

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

Just wanted to say i am not trying to accuse or imply anything bad. I am just trying to figure out how to resolve the issues with compiling the rom. I am also very new to this and i am glad you are being patient with me as i ask questions that must be very basic ones, so sorry if i don't always understand what you meant in the past when you have told me things.

The only things i have commented out were the 3 android.mk file references that were to do with compiling the ril libraries, which need extra fixes to compile. I could see that the libsec-ril.so file was being copied and assumed that was what you meant by manually supplying the ril components. But now i see there are more parts to the ril libraries, plus the /system/bin/rild binary.

I was just wondering if you had a list of all the files i would need to manually copy from one of your existing roms.

I am happy that i can basically compile a rom for my p6810, but just wanted to contribute a bit more by doing a p6800 and i815 build as well.

Like i said, i really appreciate your patience with me.

Regards,

Peter

Edit: I've compressed and attached to the post three Zips with source code and one zip that is my running notes of what changes I make to build - Thanks for taking the time to help me.

1. /hardware/ril, /hardware/ril-caf, /hardware/samsung - slimlp.hardware.zip - basically the change is just to comment out the RIL compilation

2. /device/samsung - slimlp.device.samsung.zip- the i815,p6800,p6810 device folders that I modify (i removed all the blob's as they are just the standard cm 12.1 repo's from your device tries, and it was to large to upload anyway)

3. /vendor/samsung/smdk4210-tab - slimlp.vendor.samsung.smdk4210-tab.zip - vendor file with the modifications to compile

4. slimlp changes to compile.txt.zip - my notes on compiling
[Galaxy Tab 7.7 Android Development] daniel_hk:
1. ril and ril-caf are mutual exclusive. only one is required. There is no need to change anything on either of them and hardware/samsung too.

2. This is my reply at 15 Aug, 2015. I think I was clear enough

3. All ROMs I built use the same blobs which are from stock ROM. All necessary blobs for all 7.7 and plus models are there. Just track the cm-12.1 branch for other 5.1 ROMs. Most of the developers are using the same way to handle blobs on github.

4. You only provide your blobs project for smdk4210-tab. For i815, I guess your make file *.mk contain a line like:

PRODUCT_PACKAGES +=\ sensor.exynos4

This will build the sensor.exynos4 separately and give you various errors. The sensor HAL was before ICS and inherent from ohanar's tree. It is a good place to study.

As you can see, you waste a lot of time because you didn't read or follow my reply. And sometimes you have asked the wrong question.

Good luck!

Daniel
[Galaxy Tab 7.7 Android Development] p3dboard:
Hi Daniel (@danielhk),

Just wanted to share a fix for the google play movies bug where it couldn't stream video's, but only play locally downloaded ones. I got updated and missing .so files from https://github.com/TheMuppets/proprietary_vendor_samsung

Using libdrmdecrypt.so from p3100 (https://github.com/TheMuppets/proprietary_vendor_samsung/tree/cm-12.1/p31xx/common/system/lib) - goes in the /system/lib, also the three libwv*.so files from (https://github.com/TheMuppets/proprietary_vendor_samsung/tree/cm-12.1/p31xx/common/system/vendor/lib) in the /system/lib folder, the libdrmwvmplugin.so file from (https://github.com/TheMuppets/propr...ee/cm-12.1/p31xx/common/system/vendor/lib/drm) in the /system/lib/drm folder and finally, in /vendor/lib/mediadrm the libwvdrmengine.so from (https://github.com/TheMuppets/propr...-12.1/p31xx/common/system/vendor/lib/mediadrm). The vendor folder should really be a link to /system/vendor - I checked this on a few other Android devices, not a seperate folder as it currently is in our builds, and then the folder /system/vendor/lib/mediadrm can contain this file, but it still works the other way, you just have duplicate files

- Next build of the slimlp I will try incorporate this fix
[Galaxy Tab 7.7 Android Development] daniel_hk:
Good to know. We can't connect to google servers locally so we can't enjoy any google services. I remembered last time I try the same blobs from i9300 and they didn't work properly. See the log would show some error and fail to load etc.

Actually, my vendor_samsung was derived from TheMuppets which was too large to download. Since then I put blobs from DM3 and other ROMs (like i9300, n7100, etc. This is mentioned in my build guide ). It is better to get the blobs from the latest ROM directly. TheMuppets get the blobs from those ROMs too but they don't have enough time to keep all models up to date.

Some background info.

If you study the source, you would find that vendor is an alternate place for system. Files in vendor/lib and vendor/bin etc. would be the same as inside lib and bin etc. This folder is mainly for vendor specific blobs.

Good luck
[Galaxy Tab 7.7 Android Development] p3dboard:
[MENTION=4948627]daniel_hk[/MENTION] - Thanks for the background on the /vendor area. I have compiled a test build for my p6810 with the new .SO files and that worked fine for Play Movies.

I've had a quick try at fixing the Hardware option being on for the Keyboard (to enable the touch keyboard) modifying the overlay file below, as well as I added in a value for the Torch in the framework via the overlay (looking at some of Lyergeric Acid's CM overlays). But my first try didn't succeed.

FILE:/device/samsung/smdk4210-tab/overlay/frameworks/base/core/res/res/values/config.xml

<!-- Workaround for devices with broken keyboards -->

<bool name="config_forceDisableHardwareKeyboard">false</bool>

<!-- Device supports LED flashlight -->

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

I noticed on your Change Logs for Cyanogenmod, that the Keyboard fix is a common one you have to apply, and I know you have mentioned before that the Torch was either a modification of the HAL or the CM framework and sysfs as a last restort. Could you let me know these fixes you normally apply to Cyanogenmod?

Cheers,

Peter
[Galaxy Tab 7.7 Android Development] daniel_hk:
The config setting was to disable the hardware keyboard. It trick the system that hardware keyboard is not there. I remembered this doesn't work for L. It is different from ROM to ROM. I can only tell you what I had done for each ROM.

For the keyboard:

1. Start with the choose keyboard dialog in the settings app.

2. I located the variable when the switch is flip.

3. Started with this valuable, I traced backward to it's init point or where being read the first time.

4. From settings all the way up to framework base.

5. Finally, I tested all hardware keyboard related valuables for the right one.

At the first time, it took me over a week!

For the torch:

S2 has a different camera and their camera support the framework's method. Nothing extra is required.

After searching for sometime, I found that in CM, it is a service in java. I rewrote the service and add a flash device. You may follow the old torch app from cm-11 or Omni-4.4.

In Omni, it is a policy in SystemUI. Similar approach but need modifications.

These are not the good (nor right) way to do. I hope to find time trying another method that doesn't involve the framework later

If you want to start, you may work on the kernel driver directly.

These are what I found (may not be totally right)

1. L now use the capture session to start the torch (Something like: when we touch the screen to focus a point at night, the flash light will go on during focusing.)

2. I'd tried to do it in HAL. However, it only call the torch_mode once so It can only be turn on but not off... I think it is off automatically when session end, not confirm??

3. Our camera driver (kernel driver) doesn't support the torch_mode in a capture session. If we can copy what S2's driver do to our driver, it would be the ultimate solution.

I'm busy rewriting the kernel drivers. Hoping to solve all the hardware related issues. Seems I poke the bee hive and quite messy now. I've already restarted from beginning twice now...:eek:
[Galaxy Tab 7.7 Android Development] p3dboard:
[MENTION=4948627]daniel_hk[/MENTION] - Don't know if this might be the issue with the Atheros Wifi driver, but another device that also uses the same Wifi chipset has a patch for when the Transmit buffer gets full, and it's always when I am transmitting things (like sending a file via Es Explorer, or Uploading a game profile) that the Wifi Freeze occurs.

ath6kl: Recover from "wmi ctrl ep is full" condition - Description of issue on the HTC handset

In some error conditions, fw pauses HTC pipes which would result in control endpoint full condition. When we hit this case, most of the time the device will be unusable. Re-initialize the target to recover from this situation.

https://github.com/SlimLP-Y300/andr...d126436#diff-0db78ebf9885eb5a0af1038ca1ade92f

FILE: ar6000/txrx.c

Line:603

Original Value: /* TODO: Handle FW error recovery here for ctrl ep full cases */

Updated Value: ath6kl_recovery_err_notify(ar, ATH6KL_FW_EP_FULL);
[Galaxy Tab 7.7 Android Development] daniel_hk:
Thanks,

This was from the old Linux kernel driver (kernel-2.6.x). We already have this line since day one.

Actually, I'm working on the driver for 2 days now... I think its the irq mode cause it. Same settings are working in KK. I'm looking at the difference in netd now. :cyclops:
[Galaxy Tab 7.7 Android Development] p3dboard:
[MENTION=4948627]daniel_hk[/MENTION] - Thanks for the tips on the keyboard issue.

I think I've tracked down the dialog box code for the Keyboard issue - frameworks/base/core/res/res/layout/input_method_switch_dialog_title.xml: android:id="@+id/hard_keyboard_switch"

I think I can set the default value for this via adding to the hard_keyboard Category a default value for the switch

/packages/apps/Settings/res/xml/language_settings.xml:

<PreferenceCategory
android:key="hard_keyboard"
android:title="@string/builtin_keyboard_settings_title"
android:persistent="false">
<!-- Additional preference screens are inserted here programmatically
with low order values to set the key map of each attached keyboard. -->

<SwitchPreference
android:key="hard_keyboard_switch"
android:defaultValue="true" />
</PreferenceCategory>

I'm going to give this a test compile soon (just waiting for my current compile to finish - compiling your updated device tree for Ambient Display / Hotspot fix)

Edit: that doesn't seem to have set the default value to active, I'll keep hunting. I think I am close though :)

Edit: I got a reply from a Galaxy Tab 2 developer, he told me how they overcame this same issue, they got the commit included into Cyanogenmod to make the Keyboard Dock driver a module, so for anyone who needs it, the module can be started as an init.d module. So I am going to try doing a kernel build with the dock as a module, or if that fails, I'll try no dock support as a test on my p6810.

http://review.cyanogenmod.org/#/c/83499/

espresso10: build KEYBOARD_SEC_DOCK as module Our sec_keyboard driver does not properly unregister the input device when no dock is detected, which makes the system believe that a physical keyboard is present at all times, which prevents the software keyboard from being shown. Some user own a Keyboard-Dock and meight miss the ability to use the dock if it gets disabled completely. Building it as module gives the user the ability to add a simple init.d script to start the module at boot if they need it.

Proposed Change:

/kernel/samsung/smdk4210/arch/arm/configs/cyanogenmod_p6800_defconfig

Code change CONFIG_KEYBOARD_SEC_DOCK=y -> CONFIG_KEYBOARD_SEC_DOCK=m

/kernel/samsung/smdk4210/arch/arm/configs/cyanogenmod_p6810_defconfig

Code change CONFIG_KEYBOARD_SEC_DOCK=y -> CONFIG_KEYBOARD_SEC_DOCK=m
[Galaxy Tab 7.7 Android Development] daniel_hk:
1. To fix hotspot, you need to track my proprietary_vendor_samsung_smdk4210 project and the kernel too.

2. I had tried the DOCK driver before. I just don't have the DOCK to test. Our kernel use CONFIG_SEC_KEYBOARD_DOCK instead. It is actually on top of the 30 pin connector driver. For me, I don't think making it as a module is a fix. It is not what the stock ROM do and it's not convenient. There is definitely another better way. I think there is a setting not initialized properly. It can be the kernel or the platform. That's why I spent time to search for it. That would be the best way to keep both. I'll give another shot later.

Anyway, only few people has it. For the time being, it is up to us to decide what to do. Just take your pick.

Good luck!
[Galaxy Tab 7.7 Android Development] frami2:
LineageOS

Hi Daniel,

as a beginner, I followed your great guide. My target is LinageOS cm13.

Sync went well after some iterations, my local_manifest.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- 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/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>

The "mka bacon" now fails with:

build/core/base_rules.mk:157: *** vendor/samsung/smdk4210-tab/props: MODULE.TARGET.SHARED_LIBRARIES.libUMP already defined by hardware/samsung/exynos4/hal/libUMP.

Furthermore - a minor issue maybe:

"images/tvdpi" missing. Seems to be a font, required.

Can you share your experience building cm13 before?

Thanks and Best Regards
[Galaxy Tab 7.7 Android Development] daniel_hk:
A year or two is a few centuries in technology. CM/Lineage has changed a lot since cm-13.0. My "experience" was already obsolete for some time.

As far as I know and remember:

1. CM/Lineage now use opensource libUMP. You need to remark the libUMP entry in the Android.mk inside vendor/samsung/smdk4210-tab

2. tvdpi is also obsolete. You can use a symlink to say "xdpi". You may reference the links for some other dpi in the same folder.

Good luck! ;)
[Galaxy Tab 7.7 Android Development] frami2:
libUMP.so in CM11

Hi [MENTION=4948627]daniel_hk[/MENTION] and [MENTION=5495967]p3dboard[/MENTION]

I'm still trying to succeed my first build. I'm now targeting CM11 - since this guide is about CM11. I followed your discussion regarding RIL and also commented out RIL things like P3dboard for now (but the chain of dependency seems to be a bit different in CM11). Now all RIL error are gone it seems.

Now, the error is regarding libUMP.so, required by libgralloc_ump in the exynos HAL area.

How is libUMP.so to be handled in CM11? I did'nt find it anywhere in my source tree neighter as source MODULE nor as prebuilt lib.

Later I would be curious how you finally solved to get RIL compiling

Thanks and Best regards

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

I just used Daniels precompiled RIL libraries in my builds, so I didn't compile them at all. If you go to the SlimLP rom thread that I had going, you can download my compile notes, which would probably help you build a CM12 based rom with a few changes. You'll might need to set the target / source in your Manifest.xml so that it grab's the CM11 repositories from Daniels Github (if you haven't already done that).

I had a bit of fun getting through the errors, but eventually got the compiling working, but its a bit of playing around.

My old P6810 just runs Daniels Carbon Rom Android 4.4.4 build, as I found that Android 4.4.4 was fairly stable, and I mainly use it for reading. My main device now is a newer Nvidia Shield tablet.
[Galaxy Tab 7.7 Android Development] frami2:
First build succeeded - still many issues

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

finally, I got my first lineageos cm13 to build. Current local manifest, ignoring bluetooth, is for now:

After making small code changes for every syntax error I got the rom starting finally. The RIL syntax issues - I just copied a more recent "ril.h" from one of the central RIL folders to the smdk4210 specific folders with the outdated ril.h.

Bluetooth is deactivated. At first start the keyboard did'nt come up - same issues as for p3board.

Just recently, I managed to deactivate the keyboard dock/ hardware keyboard at all, so that even the touch keys come up at first start of the rom, for entering WIFI credentials, etc.

Current status (very unstable):

- WIFI works basically - Browser is working

- Touch keyboard is working

- Camera also works

Main problems:

- external sd card is not working (where can I upload the logcat?) - also the rom does not start while an sd-card is in

Main issue seems to be:

- graphical glitches and no youtube video play, it looks weird, rotation not always working

Do you have any experience/ hints regarding the sd-card issue? And I know you have some regarding the graphical issues :)

Best regards

Frank
[Galaxy Tab 7.7 Android Development] daniel_hk:
Hi Frank,

I lost most of the things for Samsung so I can only recall my memory.

I guess you use adopted mode for the ext. sdcard. There was something wrong (seems gapps related, I remember opengapps is not working and some reported delta gapps would work) for adopted mode. Try portable mode first. I would work. You may format your sdcard in recovery first. See if it solve the stuck at boot.

For graphical glitches, it appeared in KK. Screen capture was too slow and left out some part of the image. I had changed a few things in screen capture to solve it. Some Samsung related patches were already in LP and MM so it disappeared after LP or MM. Check if you have those Samsung flags enabled.

You may compare with my last cm13 to see if there are other differences.

Good luck!

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

If you could post what you had to do to deactivate the keyboard dock / hardware keyboard, that would be great information for anyone in the future developing a Rom.

Regards,

Peter
[Galaxy Tab 7.7 Android Development] frami2:
Hi Peter,

according to your idea I looked into WindowManagerService.java. I could'nt find the ideal solution to switch between hard and soft keys, what I did is a modification of the place where this should be decided:

// Determine whether a hard keyboard is available and enabled.
/*boolean hardKeyboardAvailable = false;
if (!mForceDisableHardwareKeyboard) {
mHardKeyboardAvailable = config.keyboard != Configuration.KEYBOARD_NOKEYS;
}
if (hardKeyboardAvailable != mHardKeyboardAvailable) {
mHardKeyboardAvailable = hardKeyboardAvailable;
mHardKeyboardEnabled = hardKeyboardAvailable;
mH.removeMessages(H.REPORT_HARD_KEYBOARD_STATUS_CHANGE);
mH.sendEmptyMessage(H.REPORT_HARD_KEYBOARD_STATUS_CHANGE);
}*/
//if (!mHardKeyboardEnabled) {
config.keyboard = Configuration.KEYBOARD_NOKEYS;
//}

config.keyboard = Configuration.KEYBOARD_NOKEYS;

always prefers the soft-keys. Anyhow, now both work - once the keyboard dock is connected you can type with the hard keys, but still the soft keyboard is shown on the screen...

Had no time for investing any further - but for now this works for me

Best regards,

Frank
[Desire HD Q&A, Help & Troubleshooting] SkipperRi:
Hi to all

I have a big problem. My HTC Desire HD is now "dead". So, everything is working normally, just fine, on JellyTime, but this afternoon everything get broken. Suddenly, after the boot animation is finished, nothing happens, the screen is "black". The phone works, because when I connect USB to the computer sound. I can not get into Recovery (Home + Volume Down), can not do anything. I tried to remove the battery, but it does not help. I tried with adb, but there is "error: device not found". So I installed the drivers, asking me activate USB Debugging on the phone, and I can not access the phone.

Do you have any idea how to access recovery mode and install the new ROM?

Please help!

Thanks in advance.
[Desire HD Q&A, Help & Troubleshooting] JJeamy:
just turn on your device with press volume down + power to get into the bootloader..then from there you can select recovery
[Desire HD Q&A, Help & Troubleshooting] SkipperRi:
I try, but I can't. :crying:
[Desire HD Q&A, Help & Troubleshooting] JJeamy:
can you explain more cleared about this..?, did you mean your volume rocker is already broken or what else..?

what is the last you know the state or your phone bootloader..?, unlocked with s-on or already s-off..?

and what about the stock RUU..did you had already tried to flashing it through the pc..?
[Desire HD Q&A, Help & Troubleshooting] SkipperRi:
I finally managed this problem. I pulled off the battery over the night, and this morning I can booted into the recovery. So, I installed new ROM, all my apps, and now I performed backup to the my PC.

Thanks for help!

Regards.
[Desire HD Q&A, Help & Troubleshooting] SkipperRi:
Again same problem. For few hours everything seems fine, but just now my HTC has "blank" screen... Nothing to do. Again, I can't go to Recovery, nothing... What's going on with this phone?!?!
[Desire HD Q&A, Help & Troubleshooting] SkipperRi:
How to do this? And, if I do that, will be my phone still rooted after that?