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

    building for Nexus 7 deb

    Scheduled Pinned Locked Moved Porting
    32 Posts 3 Posters 11.1k Views 2 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.
      • flohackF Offline
        flohack @doniks
        last edited by

        @doniks SELinux is a kernel extension for security and policies. can you check the output of the kernel settings script for Ubuntu: https://github.com/janimo/phablet-porting-scripts/tree/master/kernel => it will tell you what needs to be changed in the kernel config file, and it can also apply those changes. Then a rebuild of the kernel should get you going.

        BR

        My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

        1 Reply Last reply Reply Quote 0
        • D Offline
          doniks
          last edited by

          Ah thanks! I'll check that.

          But it makes me wonder ... I have a recovery that has trouble booting. But, stupid question: Is it a "cyanogenmod recovery" or is it an "ubports recovery"? I guess, I'm somewhere in between, right? The "repo init" brought the ubports side and the "local_manifest" brought in the cm side. If it were straight "cm only", then the resulting recovery would probably just boot. But then, I don't want cm, so, I'm venturing into ubp territory and those config options you linked are probably the next step deeper into ubp land.

          I'm rambling ... I'm just trying to understand what I'm actually doing, while copy pasting instructions.

          I see in the script there is a CONFIGS_OFF : CONFIG_DEFAULT_SECURITY_SELINUX

          that does indeed sound like it might resolve the problem. Let's see.

          1 Reply Last reply Reply Quote 0
          • D Offline
            doniks
            last edited by doniks

            Alrighty! Welcome to the Ubports Recovery πŸ™‚

            I applied most of what sounded like "turn off SELinux". I didn't apply all the check-config changes yet, because I was concerned about changing too many things at once and breaking more than fixing. (diff below)

            Recovery seems to be working fine now: Shows menu, I can navigate it with volup/voldown/power and with touch gestures, all actions I tried seemed to work. On to image building πŸ™‚

            git diff
            

            arrrghhh .... forum software! why can I copy/paste a diff as plain text, which of course screws up the layouting of the post because it's misinterpreted as markdown, but I am NOT allowed to copy/paste into a

            code block
            

            because "Error

            Post content was flagged as spam by Akismet.com"

            Whatever, I adjusted the following:
            CONFIG_SECURITY_SELINUX_BOOTPARAM=y
            CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0
            CONFIG_SECURITY_SELINUX_DISABLE=y
            CONFIG_DEFAULT_SECURITY_SELINUX=n

            flohackF 1 Reply Last reply Reply Quote 1
            • flohackF Offline
              flohack @doniks
              last edited by

              @doniks You can safely apply all changes of this script - in fact they are all necessary, so dont bother with trying one by one πŸ˜‰

              My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

              D 1 Reply Last reply Reply Quote 0
              • D Offline
                doniks @flohack
                last edited by doniks

                @Flohack said in building for Nexus 7 deb:

                @doniks You can safely apply all changes of this script - in fact they are all necessary, so dont bother with trying one by one πŸ˜‰

                Ok, let me try. I saw some apparmor stuff and thought .... uh, probably I need to hunt for kernel patches to make this work, let me postpone THAT headache ....

                D flohackF 2 Replies Last reply Reply Quote 1
                • D Offline
                  doniks @doniks
                  last edited by

                  @doniks said in building for Nexus 7 deb:

                  @Flohack said in building for Nexus 7 deb:

                  @doniks You can safely apply all changes of this script - in fact they are all necessary, so dont bother with trying one by one πŸ˜‰

                  Ok, let me try.

                  Yup, that was easy enough. Applied all changes. Rebuilt. Flashed recovery. Rebooted. Works just as well until here!

                  1 Reply Last reply Reply Quote 2
                  • flohackF Offline
                    flohack @doniks
                    last edited by

                    @doniks In general if you got a working CM kernel no real kernel patches are needed except apparmor3 => But you can try stealing that as a whole subdir from a kernel that has these patches applied. Should be more like copy/paste.

                    BR

                    My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      doniks
                      last edited by

                      one step further. next road block. I've cloned the rootstock-ng thingy, downloaded the vivid....tar.gz, ran the rootstock thingy. It did it's thing, the tablet rebooted but is stuck at the Google logo screen. adb is not working. nothing seems to be happening. Not sure how to proceed, don't have any ideas 😞

                      D 1 Reply Last reply Reply Quote 0
                      • D Offline
                        doniks @doniks
                        last edited by

                        I realize that there is a deb image in the rc channel

                        ubuntu-device-flash --verbose --server=https://system-image.ubports.com/ touch --device=deb --channel=ubuntu-touch/rc-proposed

                        that installs and starts just fine. Poking around in that image, it seems to me as if the initrd is basically the same as my self built one, but the kernel config and the android system.img look quite different. Though, I still don't know what exactly to do ...

                        1 Reply Last reply Reply Quote 0
                        • A Offline
                          Andreas Pokorny
                          last edited by

                          @doniks You might want to try the google_msm kernel in ubports. It already contains the apparmor and other backports:
                          https://github.com/ubports/android_kernel_google_msm/tree/ubp-5.1

                          but it does not contain a reasonable kernel config for flo.

                          You could also verify that the user space binaries and firmware files are being picked up get copied into the out/target/product/...../system directory.

                          If none of that gets you any further - use adb while in recovery and go to /data/system-data and examine the var/log files for clues..

                          A D 3 Replies Last reply Reply Quote 1
                          • A Offline
                            Andreas Pokorny @Andreas Pokorny
                            last edited by

                            I meant deb .. not flo

                            flohackF 1 Reply Last reply Reply Quote 0
                            • flohackF Offline
                              flohack @Andreas Pokorny
                              last edited by

                              @Andreas-Pokorny You can edit posts here xD

                              My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

                              1 Reply Last reply Reply Quote 0
                              • D Offline
                                doniks @Andreas Pokorny
                                last edited by

                                @Andreas-Pokorny said in building for Nexus 7 deb:

                                Thanks for your tips.

                                You could also verify that the user space binaries and firmware files are being picked up get copied into the out/target/product/...../system directory.

                                I think I'm good here:

                                cd vendor/qcom/deb/proprietary
                                for b in * ; do find ../../../../out/target/product/deb/system/ -name $b ; done
                                ../../../../out/target/product/deb/system/vendor/firmware/a300_pfp.fw
                                ../../../../out/target/product/deb/system/vendor/firmware/a300_pm4.fw
                                ../../../../out/target/product/deb/system/bin/ATFWD-daemon
                                ../../../../out/target/product/deb/system/bin/bridgemgrd
                                ../../../../out/target/product/deb/system/bin/btnvtool
                                ../../../../out/target/product/deb/system/bin/diag_klog
                                ../../../../out/target/product/deb/system/bin/diag_mdlog
                                ../../../../out/target/product/deb/system/bin/ds_fmc_appd
                                ../../../../out/target/product/deb/system/vendor/lib/egl/eglsubAndroid.so
                                [...]
                                
                                1 Reply Last reply Reply Quote 1
                                • D Offline
                                  doniks @Andreas Pokorny
                                  last edited by

                                  @Andreas-Pokorny said in building for Nexus 7 deb:

                                  At first I thought about looking into this:

                                  If none of that gets you any further - use adb while in recovery and go to /data/system-data and examine the var/log files for clues..
                                  But really, I think the problem with that build was that the root partition never got mounted, I'm not even sure whether much of anything of the initrd got mounted/executed

                                  However, I think i must have messed up something earlier, maybe I did still end up using the old kernel config, I don't know, at some point (without having knowingly done something different) the screen came up (and adb as well). But then the display was all garbled up. I can recognize that it's trying to display the welcome screen, but the colors are all distorted, looking pink and green and it seems as if the characters shown are all way too big and don't really fit on the screen.

                                  At that point, I thought, ok, lets switch to that other kernel,

                                  @doniks You might want to try the google_msm kernel in ubports. It already contains the apparmor and other backports:
                                  https://github.com/ubports/android_kernel_google_msm/tree/ubp-5.1

                                  but it does not contain a reasonable kernel config for flo.

                                  so I change the manifest to

                                  <?xml version="1.0" encoding="UTF-8"?>
                                  <manifest>
                                    <remote       name="cm"       fetch="http://github.com/CyanogenMod"       revision="refs/heads/cm-12.1" />
                                    <project       path="device/asus/deb"       name="android_device_asus_deb"       remote="cm"       revision="cm-12.1" />  
                                    <project       path="device/asus/flo"       name="android_device_asus_flo"       remote="cm"       revision="cm-12.1" />
                                  
                                    <!--
                                    <project       path="kernel/google/msm"       name="android_kernel_google_msm"       remote="cm"       revision="cm-12.1" />
                                    <remote       name="ubp"      fetch="http://github.com/ubports"      review="http://review.ubports.com"      revision="refs/heads/ubp-5.1" />
                                    -->
                                  
                                     <project       path="kernel/google/msm"       name="ubports/android_kernel_google_msm"       remote="ubp"        revision="ubp-5.1" />  
                                  </manifest>
                                  

                                  and copied the cyanogen_flo_defconfig file back. Ie, the one from cm deb repo with all the check-config adjustments. Rebuilt and

                                  fastboot boot boot.img

                                  but that produces the same result actually, adb comes up, screen comes up, display is all garbled up. Not sure, what's next.

                                  D 1 Reply Last reply Reply Quote 0
                                  • D Offline
                                    doniks
                                    last edited by

                                    Do you guys have a git repository of the kernel trees that Canonical had used?

                                    flohackF 1 Reply Last reply Reply Quote 0
                                    • flohackF Offline
                                      flohack @doniks
                                      last edited by

                                      @doniks said in building for Nexus 7 deb:

                                      e kernel trees that Canonical had used?

                                      No I dont think so. Maybe @mariogrip knows that?

                                      BR

                                      My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

                                      1 Reply Last reply Reply Quote 0
                                      • D Offline
                                        doniks
                                        last edited by

                                        Canonical says:

                                        You can find all the needed Android specific git repositories at code-review.phablet.ubuntu.com . This is a working gerrit server with everything needed to build the Android images used by Ubuntu Touch. The reference tree in there is based on AOSP (4.4.2 specifically), so make sure your device specific repositories are compatible with AOSP at least.

                                        For any Android related project at our git server, you'll find a branch named phablet-4.4.2_r1. This branch contains a static known git HEAD and the required changes needed for Ubuntu, including our custom Androidmanifest ( https://code-review.phablet.ubuntu.com/gitweb?p=aosp%2Fplatform%2Fmanifest.git;a=shortlog;h=refs%2Fheads%2Fphablet-4.4.2_r1 ).

                                        This custom manifest does contain:

                                          <project path="device/asus/deb" name="aosp/device/asus/deb" groups="device,flo" />
                                          <project path="device/asus/flo" name="aosp/device/asus/flo" groups="device,flo" />
                                        

                                        And poking around on that website I see stuff where something deb related has happened:
                                        https://code-review.phablet.ubuntu.com/#/q/aosp+deb,n,z

                                        However,

                                        • I can't find a decent overview of all the repositories there, e.g, where is kernel/google/msm (or should it be called android_kernel_google_msm?! can't find it either)
                                        • I can't figure out what to change in the local manifest that I put in the directory where I did the initial checkout of ubports version (in my first post)
                                        flohackF 1 Reply Last reply Reply Quote 0
                                        • flohackF Offline
                                          flohack @doniks
                                          last edited by

                                          @doniks BTW The gerrit server may go down any time at phablet.ubuntu.com πŸ˜‰

                                          My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

                                          D 1 Reply Last reply Reply Quote 0
                                          • D Offline
                                            doniks @flohack
                                            last edited by

                                            @Flohack said in building for Nexus 7 deb:

                                            @doniks BTW The gerrit server may go down any time at phablet.ubuntu.com πŸ˜‰

                                            Do you know how to get an overview of the repositories there? Something like how I see an overview here: https://github.com/ubports

                                            1 Reply Last reply Reply Quote 0
                                            • D Offline
                                              doniks
                                              last edited by doniks

                                              I managed to download some sources from canonical, but in this double-digit-gigabyte-"source"-download, I seem to only have gotten a binary kernel πŸ˜› so, I haven't gotten a lot wiser.

                                              phablet-dev-bootstrap phablet
                                              . build/envsetup.sh
                                              lunch
                                              # ... pick deb
                                              m
                                              

                                              Among others that spits out:

                                              including ubuntu/platform-api/android/hybris/Android.mk ...
                                              including ubuntu/upstart-property-watcher/Android.mk ...
                                              No private recovery resources for TARGET_DEVICE deb
                                              if [ -f kernel/asus/deb/Makefile ]; then \
                                                      mkdir -p /media/peter/share2/data/canonical/phablet/out/target/product/deb/obj/KERNEL_OBJ; \
                                                      make -C kernel/asus/deb O=/media/peter/share2/data/canonical/phablet/out/target/product/deb/obj/KERNEL_OBJ ARCH=arm  headers_install; \
                                                      fi
                                              Downloading linux-image-flo version 3.4.0.4.5
                                              Downloading linux-image-3.4.0-4-flo version 3.4.0-4.16
                                              '/media/peter/share2/data/canonical/phablet/out/target/product/deb/ubuntu/kernel/boot/vmlinuz-3.4.0-4-flo' -> '/media/peter/share2/data/canonical/phablet/out/target/product/deb/ubuntu/kernel/vmlinuz'
                                              

                                              And I can't see a "kernel" directory either:

                                              ls
                                              abi  bionic  bootable  build  development  device  external  frameworks  hardware  Makefile  out  prebuilts  sdk  system  ubuntu
                                              

                                              I can fastboot boot boot.img and that comes up fine. It doesn't have a /proc/config.gz though 😞

                                              FWIW, diff tells me that

                                              • the out/target/product/deb/kernel file and
                                              • the zImage inside the boot image inside the device image in the rc-proposed channel on the ubports servers
                                                are identical according to diff.
                                              1 Reply Last reply Reply Quote 0
                                              • First post
                                                Last post