UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. erotavlas
    E
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 3
    • Groups 0

    erotavlas

    @erotavlas

    1
    Reputation
    245
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    erotavlas Unfollow Follow

    Best posts made by erotavlas

    • RE: Pine64 PinePhone

      Hi,
      I have some questions about pine64 pinePhone:

      1. I read that UBports will be available as option for the phone. Is the current pinePhone a prototype/development phone or is it at final stage/release phone?
      2. Does UBports support android app? For instance via anbox?
      3. I read here that there are some important stuff that do not work. Do you think that is just a question of time?
      4. Do you have info about SAR value of pinePhone?
        Thank you
      posted in News
      E
      erotavlas

    Latest posts made by erotavlas

    • RE: Pine64 PinePhone

      Hi,
      I have some questions about pine64 pinePhone:

      1. I read that UBports will be available as option for the phone. Is the current pinePhone a prototype/development phone or is it at final stage/release phone?
      2. Does UBports support android app? For instance via anbox?
      3. I read here that there are some important stuff that do not work. Do you think that is just a question of time?
      4. Do you have info about SAR value of pinePhone?
        Thank you
      posted in News
      E
      erotavlas
    • RE: Ubuntu touch: different compiling behaviour with different GCC versions

      I corrected all the errors: one was located in file system/core/adb/transport.c, another one in frameworks/base/libs/androidfw/AssetManager.cpp and the other four were located in file frameworks/base/libs/androidfw/ResourceType.cpp. Now I can compile with GCC 4,5,6. In few words, since c++11 has been introduced the type char16_t and GCC 6 supports -std=gnu++14 instead of -std=gnu++98. So since all the warnings are considered as errors due to -Werror a cast from const uint16_t* to const char16_t* solved all the problems. I do not why android developers did not change this.
      I filed a bug to CM, in particular the involved version is 12.1 aka android 5.1.

      posted in Porting
      E
      erotavlas
    • Ubuntu touch: different compiling behaviour with different GCC versions

      Hi,
      I found a strange behaviour of GCC. In few words, I can successfully compile with GCC 5 or GCC 4 while I cannot compile with GCC 6.
      From GCC manual: In GCC 6 the default mode for C++ is now -std=gnu++14 instead of -std=gnu++98 while GCC 5 the default mode for C is now -std=gnu11 instead of -std=gnu89.
      I think that using c++14 causes different behaviour with the same code with respect to previous GCC versions.
      I found the source of problem at least for one error during compiling with GCC 6:
      [CODE]system/core/adb/transport.c:807:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation] if (error_out)[/CODE]
      is detected by GCC 6 thank to a new warning -Wmisleading-indentation added to -Wall option https://gcc.gnu.org/gcc-6/porting_to.html while is not detected by GCC 5 or lower version.
      The current source code:
      [CODE]
      if (error_out)
      error_out = "insufficient permissions for device";
      continue;
      [/CODE]
      it should be:
      [CODE]
      if (error_out)
      {
      error_out = "insufficient permissions for device";
      }
      continue;[/CODE]
      with brackets for a better clearness https://stackoverflow.com/questions/2125066/is-it-bad-practice-to-use-an-if-statement-without-brackets#2125207
      After that I corrected this small error, another error appears related to invalid type conversion from const uint16_t
      to const char16_t
      :
      [CODE]
      frameworks/base/libs/androidfw/AssetManager.cpp: In member function ‘android::String8 android::AssetManager::getPkgName(const char*)’:
      frameworks/base/libs/androidfw/AssetManager.cpp:480:63: error: invalid conversion from ‘const char16_t*’ to ‘const uint16_t* {aka const short unsigned int*}’ [-fpermissive]
      const uint16_t* str = tree.getAttributeStringValue(idx, &len);
      ~~~~~~~~~~~~~~~~~~^
      frameworks/base/libs/androidfw/AssetManager.cpp:481:46: error: invalid conversion from ‘const uint16_t* {aka const short unsigned int*}’ to ‘const char16_t*’ [-fpermissive]
      pkgName = (str ? String8(str, len) : String8());
      ^
      In file included from frameworks/base/include/androidfw/Asset.h:30:0,
      from frameworks/base/libs/androidfw/AssetManager.cpp:26:
      system/core/include/utils/String8.h:56:33: note: initializing argument 1 of ‘android::String8::String8(const char16_t*, size_t)’
      explicit String8(const char16_t* o, size_t numChars);

      [/CODE]
      In this case the error is related to android utils library android::String8 which uses different return type. So, I think that such problem should be not related to ubuntu touch, but to general android and CM. Is there a way to compile android or CM with GCC 6?
      I search on the web about this behaviour without success.

      Thank you

      posted in Porting
      E
      erotavlas