• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Porting to Samsung Galaxy Note 4 SM-N910P

Scheduled Pinned Locked Moved Porting
117 Posts 8 Posters 54.1k Views 5 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      tigerpro
      last edited by 9 Aug 2017, 00:21

      Hello all,

      So this is my first time trying to compile a OS/ROM for anything that isn't a desktop tower. I followed the directions on the wiki for porting ubports to new devices. I get all the files when I "repo sync" (had to do repo sync a few times before it finished) I'm on Ubuntu 16.04 64-bit, when I do ". build/envsetup.sh" it does not list my Samsung device (I verified files exist with "ls") and if I use lunch my device doesn't show there either. I tried just picking the arm version that comes up and I get errors with make on that (I'll deal with those after my device appears) from what I can tell it is just going through the vendor folder and not device, if I put the files from device into vendor it shows up but gives me errors about the manifest if I try to use it. Anyone have some advice for a first timer? I can offer any files that might help.

      Thanks in Advance

      Whether you think you can, or you can't, if you do not try, you will never truly know. So give it a Go.

      D 1 Reply Last reply 9 Aug 2017, 04:49 Reply Quote 0
      • D Offline
        doniks @tigerpro
        last edited by 9 Aug 2017, 04:49

        @tigerpro said in Porting to Samsung Galaxy Note 4 SM-N910P:

        if I use lunch my device doesn't show there either.

        I had to use add_lunch_combo cm_deb-userdebug here
        https://forums.ubports.com/topic/271/building-for-nexus-7-deb

        Hth

        T 1 Reply Last reply 9 Aug 2017, 11:42 Reply Quote 0
        • T Offline
          tigerpro @doniks
          last edited by tigerpro 8 Sept 2017, 11:43 9 Aug 2017, 11:42

          @doniks Thanks for the info and the link to your thread, it looks like you've gone through alot of what I'm seeing with my attempts. I tried "add_lunch_combo cm_trltespr-userdebug but I still get the manifest errors, Ill have to post my local manifest when I get home and see if I missed something, as well as the cm.dependencies for my device. I'm thinking I either missed something or am missing something (likely the latter)

          Whether you think you can, or you can't, if you do not try, you will never truly know. So give it a Go.

          D 1 Reply Last reply 9 Aug 2017, 12:30 Reply Quote 0
          • D Offline
            doniks @tigerpro
            last edited by doniks 8 Oct 2017, 18:19 9 Aug 2017, 12:30

            @tigerpro said in Porting to Samsung Galaxy Note 4 SM-N910P:

            either missed something or am missing something (likely the latter)

            🙂

            Probably best if you post some more details about your error, like your local manifest.

            I also made another thread about an attempted halium build. https://forums.ubports.com/topic/431/porting-halium-to-nexus-7-deb Might be valuable to check.

            Also, I can highly recommend the #halium irc chat!

            FWIW, porting guide says breakfast https://github.com/Halium/docs/blob/master/porting/index.md#initialize

            1 Reply Last reply Reply Quote 0
            • T Offline
              tigerpro
              last edited by 12 Aug 2017, 12:39

              So after some research, digging through trltespr repos and many many many repo syncs to add missing stuff, as well as putting the vendorsetup.sh files back, I am now at a point of compiling (compiling as I type this) from here I'm just doing "make 2> errors.text" and just resolving the issues as the compile goes further and further. I'm hoping to have a fully working image anywhere between today and Monday. I'll let you know the outcome when I know it myself. Thank you for the help so far.

              Whether you think you can, or you can't, if you do not try, you will never truly know. So give it a Go.

              D 1 Reply Last reply 12 Aug 2017, 13:09 Reply Quote 1
              • D Offline
                doniks @tigerpro
                last edited by 12 Aug 2017, 13:09

                @tigerpro Sweet! Good luck!

                1 Reply Last reply Reply Quote 0
                • T Offline
                  tigerpro
                  last edited by 12 Aug 2017, 16:57

                  ok so i got to a error I cant figure out with make, the parts of the error log that I send all the errors and warnings to is attached below:

                  hardware/qcom/display-caf/apq8084/libhwcomposer/hwc_utils.cpp: In function 'void qhwc::getAspectRatioPosition(hwc_context_t, int, int, hwc_rect_t&, hwc_rect_t&)':
                  hardware/qcom/display-caf/apq8084/libhwcomposer/hwc_utils.cpp:483:30: warning: conversion to 'float' from 'uint32_t {aka unsigned int}' may alter its value [-Wconversion]
                  xRatio = (float)(inPos.x/actualWidth);
                  ^
                  hardware/qcom/display-caf/apq8084/libhwcomposer/hwc_utils.cpp:484:30: warning: conversion to 'float' from 'uint32_t {aka unsigned int}' may alter its value [-Wconversion]
                  yRatio = (float)(inPos.y/actualHeight);
                  ^
                  hardware/qcom/display-caf/apq8084/libhwcomposer/hwc_utils.cpp:485:30: warning: conversion to 'float' from 'uint32_t {aka unsigned int}' may alter its value [-Wconversion]
                  wRatio = (float)(inPos.w/actualWidth);
                  ^
                  hardware/qcom/display-caf/apq8084/libhwcomposer/hwc_utils.cpp:486:30: warning: conversion to 'float' from 'uint32_t {aka unsigned int}' may alter its value [-Wconversion]
                  hRatio = (float)(inPos.h/actualHeight);
                  ^
                  hardware/qcom/display-caf/apq8084/libhwcomposer/hwc_utils.cpp: In function 'void qhwc::optimizeLayerRects(const hwc_display_contents_1_t*)':
                  hardware/qcom/display-caf/apq8084/libhwcomposer/hwc_utils.cpp:1213:29: error: 'hwc_layer_1_t' has no member named 'dirtyRect'
                  layer->dirtyRect = getIntersection(bottomCrop,
                  ^
                  hardware/qcom/display-caf/apq8084/libhwcomposer/hwc_utils.cpp:1214:52: error: 'hwc_layer_1_t' has no member named 'dirtyRect'
                  layer->dirtyRect);
                  ^
                  make: *** [/home/tyg3rpro/phablet/out/target/product/trltespr/obj/SHARED_LIBRARIES/hwcomposer.apq8084_intermediates/hwc_utils.o] Error 1*

                  any advice or help would be appreciated as Im not sure where to go from here, the google machine didnt turn up much in my searching except that its a motorola device.

                  Thank you in advance.

                  Whether you think you can, or you can't, if you do not try, you will never truly know. So give it a Go.

                  D 1 Reply Last reply 12 Aug 2017, 17:32 Reply Quote 0
                  • D Offline
                    doniks @tigerpro
                    last edited by doniks 8 Dec 2017, 17:36 12 Aug 2017, 17:32

                    @tigerpro WHAT gives that error?

                    Edit: Oh, make does. mhhhh.
                    post your manifest

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      tigerpro
                      last edited by 12 Aug 2017, 17:50

                      heres my samsung_trltespr.xml manifest file thus far.

                      <?xml version="1.0" encoding="UTF-8"?>
                      <manifest>

                      <project path="device/samsung/trltespr" name="android_device_samsung_trltespr" remote="cm" revision="cm-12.1" />
                      <project path="device/samsung/trlte-common" name="android_device_samsung_trlte-common" remote="cm" revision="cm-12.1" />

                      <project path="device/qcom/common" name="android_device_qcom_common" remote="cm" revision="cm-12.1" />
                      <project path="device/samsung/qcom-common" name="android_device_samsung_qcom-common" remote="cm" revision="cm-12.1" />
                      <project path="kernel/samsung/trlte" name="android_kernel_samsung_trlte" remote="cm" revision="cm-12.1" />

                      <project path="hardware/samsung" name="android_hardware_samsung" remote="cm" revision="cm-12.1" />

                      <project path="device/qcom/sepolicy" name="android_device_qcom_sepolicy" remote="cm" revision="cm-12.1" />

                      <project path="device/generic/goldfish" name="android_device_generic_goldfish" remote="cm" revision="cm-12.1" />

                      </manifest>

                      please let me know if I am missing anything.

                      thank you for the help so far.

                      Whether you think you can, or you can't, if you do not try, you will never truly know. So give it a Go.

                      D 1 Reply Last reply 12 Aug 2017, 18:57 Reply Quote 0
                      • D Offline
                        doniks @tigerpro
                        last edited by 12 Aug 2017, 18:57

                        Well, for starters, don't expect too much from me 🙂 I'm also just stumbling in the dark. But let me go stumble a bit ...

                        I assume you did this
                        repo init -u https://github.com/ubports/android -b ubp-5.1
                        as pointed out here: https://wiki.ubports.com/wiki/Setting-up-Your-Tree-for-CM12.1-Devices

                        which means, you are using this default manifest:
                        https://github.com/ubports/android/blob/ubp-5.1/default.xml

                        the error you post seems to be in
                        hardware/qcom/display-caf/apq8084/libhwcomposer/hwc_utils.cpp:1213:29:

                        which, if I understand it correctly is from here:
                        https://github.com/ubports/android/blob/ubp-5.1/default.xml#L143

                        which is here
                        https://github.com/ubports/android_hardware_qcom_display/blob/cm-12.1-caf-8084/libhwcomposer/hwc_utils.cpp#L1213

                        which has an ifdef QCOM_BSP around it and is talking about the type hwc_layer_1_t which I cgrep in my locally checked out tree to be in :
                        ./hardware/libhardware/include/hardware/hwcomposer.h

                        which in turn, looking back at
                        https://github.com/ubports/android/blob/ubp-5.1/default.xml#L132

                        is here:
                        https://github.com/ubports/android_hardware_libhardware/blob/cm-12.1/include/hardware/hwcomposer.h#L221

                        and indeed is again surrounded by QCOM_BSP

                        aaaaand, uhm, now I honestly don't know further ... does any of that give you any idea? Or is there someone else reading along?

                        I mean, I guess you could comment out the two lines 1213 and 1214. It will get you past this specific error, but I wouldn't be surprised if it bites you later on. hwcomposer is part of the machinery that get's pixels on your screen. I guess if no smarter suggestion comes up, you could comment it now and postpone that particular headache until later ....

                        T D 2 Replies Last reply 12 Aug 2017, 19:19 Reply Quote 0
                        • T Offline
                          tigerpro @doniks
                          last edited by 12 Aug 2017, 19:19

                          @doniks if I understand what your saying correctly, it sounds like the display server is having issues compiling. I'll try commenting those 2 lines out if no better suggestions come up, but having nothing on the screen would kinda defeat the purpose of having a screen in the first place, I suppose its possible the android source in my trlte-common repo could have a display server but I'm not gonna hold my breath. I'll keep an eye on here for a few more hours then I'll try commenting out those 2 lines and see what happens. I had a feeling it was something more than just a missing repo. Thank You for the input.

                          Whether you think you can, or you can't, if you do not try, you will never truly know. So give it a Go.

                          D 1 Reply Last reply 12 Aug 2017, 20:00 Reply Quote 0
                          • D Offline
                            doniks @tigerpro
                            last edited by 12 Aug 2017, 20:00

                            @tigerpro said in Porting to Samsung Galaxy Note 4 SM-N910P:

                            @doniks if I understand what your saying correctly, it sounds like the display server

                            I don't think it's exactly the display server, but then I also don't really know what it is 😛 But that name comes up with displaying stuff

                            is having issues compiling. I'll try commenting those 2 lines out if no better suggestions come up, but having nothing on the screen would kinda defeat the purpose of having a screen in the first place,

                            haha. totally! I'm suggesting it because a) it might just work anyway, who knows, deal with the problems one at a time and b) even if there is a critical problem here, it buys you some time waiting for smarter comments or insights and maybe also later on you may get a more useful error message making it easier to solve ...

                            I suppose its possible the android source in my trlte-common repo could have a display server but I'm not gonna hold my breath.

                            Well, uhm, no the way I understand it. hwcomposer HAS to work. But so far we have no conclusive proof that won't work ... so again, one step at a time

                            I'll keep an eye on here for a few more hours then I'll try commenting out those 2 lines and see what happens.

                            I had a feeling it was something more than just a missing repo. Thank You for the input.

                            that reminds me - looking at your manifest again. How did you put it together? I read the instructions on the ubports wiki to say:

                            take that stuff from here https://github.com/CyanogenMod/android_device_samsung_trltespr/blob/cm-12.1/cm.dependencies

                            and then, I guess we're supposed to follow the cm.dependencies files recursively. When I do that, I end up with :

                            • android_device_samsung_trltespr
                              • android_device_samsung_trlte-common
                                • android_device_qcom_common
                                • android_device_samsung_qcom-common
                                  • android_hardware_samsung
                                • android_kernel_samsung_trlte

                            But you have these two in addition: android_device_qcom_sepolicy android_device_generic_goldfish

                            T 1 Reply Last reply 12 Aug 2017, 20:05 Reply Quote 0
                            • T Offline
                              tigerpro @doniks
                              last edited by 12 Aug 2017, 20:05

                              @doniks that's the result of a couple errors that make failed at, I added those two repos and it seemed to solve it. They could be unneeded, but if it gets the make process further then no harm in trying it at least, there's also one repo that's not listed there cause its not part of CM so I just manually downloaded it and put it in its respective folder, the repo is for the cm12.1 blobs as my note 4 is currently running cm 13

                              Whether you think you can, or you can't, if you do not try, you will never truly know. So give it a Go.

                              H 1 Reply Last reply 12 Aug 2017, 22:10 Reply Quote 0
                              • H Offline
                                hans1977se @tigerpro
                                last edited by 12 Aug 2017, 22:10

                                @tigerpro My guess is that is the problem. The version you downloaded is probably not compatible with the rest of the code base.

                                T 1 Reply Last reply 12 Aug 2017, 22:52 Reply Quote 0
                                • T Offline
                                  tigerpro @hans1977se
                                  last edited by 12 Aug 2017, 22:52

                                  @hans1977se all my downloaded code is for cm12.1 though, isn't that what ubports uses? The blobs are from a 12.1 ROM its the muppets repo on git

                                  Whether you think you can, or you can't, if you do not try, you will never truly know. So give it a Go.

                                  H 1 Reply Last reply 13 Aug 2017, 05:44 Reply Quote 0
                                  • H Offline
                                    hans1977se @tigerpro
                                    last edited by 13 Aug 2017, 05:44

                                    @tigerpro yes, I think they use 12.1, but I thought you meant you have a mix between 12.1 and 13. 🙂 Anyway, I think it could be worth double checking that you got the right version.

                                    T 1 Reply Last reply 13 Aug 2017, 08:49 Reply Quote 0
                                    • T Offline
                                      tigerpro @hans1977se
                                      last edited by tigerpro 13 Aug 2017, 08:49

                                      @hans1977se Out of curiosity is there a way to just add that repo to my manifest so I don't have to manually get the files? I tried using "git fetch" but it said it couldn't find the repo, and I'll double check the version on the blobs, is there anything else I could try if it is the right version?

                                      Whether you think you can, or you can't, if you do not try, you will never truly know. So give it a Go.

                                      H 1 Reply Last reply 13 Aug 2017, 14:57 Reply Quote 0
                                      • H Offline
                                        hans1977se @tigerpro
                                        last edited by 13 Aug 2017, 14:57

                                        @tigerpro Should be like that. However, I have only just started looking into this repo stuff and mobile phone development so I'm in an just as early age as you in this area. 🙂 I think there are a lot of spot on skilled people around here, who would know exactly what should be added if they just read this thread. 🙂

                                        I have compiled other Linux source, though, so I have experience with error messages like yours. 🙂

                                        T 1 Reply Last reply 13 Aug 2017, 15:12 Reply Quote 0
                                        • T Offline
                                          tigerpro @hans1977se
                                          last edited by 13 Aug 2017, 15:12

                                          @hans1977se Yea, I had more errors but I managed to resolve those on my own with a little research, I'm thinking just comment out the offending lines, try make again and see where I end up. Worse case I get another error from the same file, best case it compiles and everything just works. I doubt the latter and I expect the errors when trying to port to an unsupported device like the note 4, but with some luck I'll get there eventually

                                          Whether you think you can, or you can't, if you do not try, you will never truly know. So give it a Go.

                                          H 1 Reply Last reply 13 Aug 2017, 15:18 Reply Quote 0
                                          • H Offline
                                            hans1977se @tigerpro
                                            last edited by 13 Aug 2017, 15:18

                                            @tigerpro Yes, you can probably give that a go, and hopfully that code is not run. 🙂

                                            T 1 Reply Last reply 13 Aug 2017, 16:53 Reply Quote 0
                                            3 out of 117
                                            • First post
                                              3/117
                                              Last post