Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

Android 9 partition repack tool!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #61
    james739

    You need to add a new sepolicy rule in plat_file_contexts that allows bootplayer to run on the system..
    Code:
    /system/bin/bootplayer       u:object_r:bootvideo_exec:s0

    Comment


      #62
      Originally posted by bumerc View Post
      james739

      You need to add a new sepolicy rule in plat_file_contexts that allows bootplayer to run on the system..
      Code:
      /system/bin/bootplayer u:object_r:bootvideo_exec:s0
      Bumerc,
      It didn't work! Is there somewhere else to edit or add code?

      Comment


        #63
        Originally posted by james739 View Post

        Bumerc,
        It didn't work! Is there somewhere else to edit or add code?
        how did you do it?

        Comment


          #64
          Originally posted by bumerc View Post
          how did you do it?
          I edited plat_file_contexts in system/etc/selinux and added
          Code:
          /system/bin/bootplayer            u:object_r:bootvideo_exec:s0
          bootplayer has following permissions in system/bin/
          owner:root
          access:reand and write
          group:root
          access: read-only
          Others:
          access: read-only
          execute: Allow executing file as program (checked)

          In build.prop
          Code:
          service.bootvideo=1
          persist.vendor.media.bootvideo=3050
          bootvideo file is in system/etc/
          Attached Files

          Comment


            #65
            Originally posted by james739 View Post
            I edited plat_file_contexts in system/etc/selinux and added
            Code:
            /system/bin/bootplayer u:object_r:bootvideo_exec:s0
            bootplayer has following permissions in system/bin/
            owner:root
            access:reand and write
            group:root
            access: read-only
            Others:
            access: read-only
            execute: Allow executing file as program (checked)

            In build.prop
            Code:
            service.bootvideo=1
            persist.vendor.media.bootvideo=3050
            bootvideo file is in system/etc/
            Hi,

            I don't know if it matters or not, but I put the code in vendor/etc/selinux/vendor_plat_file_contexts.
            Code:
            /vendor/bin/bootplayer u:object_r:bootvideo_exec:s0
            in build.prop,
            Code:
            service.bootvideo=1
            persist.vendor.media.bootvideo=3050
            And last and not least, make sure bootvideo has the correct permissions :
            owner: root
            access: rw
            group:root
            access ro
            others:
            access: ro


            This worked.

            Thank you for pointing me in the right direction.

            Comment


              #66
              I edited plat_file_contexts in system/etc/selinux and added
              wrong, you have to insert this line in afck/bc-tool/system/selinux/plat_file_contexts, all contexts files that are in this directory will be compiled to file_contexts.bin during the build process and passed to the e2fsdroid as build parameters, old Contexts files are overwritten..
              but I'm glad that it worked

              Comment


                #67
                @james739 is bootplayer from there working on Android 9? i want to change it too
                @bumerc so for any modifications i need to make a folder with mod? if i add/replace files manually in extracted partitions then build them it won't work, right?

                Comment


                  #68
                  drakulaboy
                  You don't have to create a mod folder, only if you absolutely want it, if you want to automate something. Otherwise it is enough to make the changes by hand

                  Comment


                    #69
                    bumerc so, for example i want to add video bootanimation, i copy/paste the file bootplayer to bc-tool/system/system/system/bin/bootplayer then i add
                    Code:
                    /system/bin/bootplayer u:object_r:bootvideo_exec:s0
                    to afck/bc-tool/system/selinux/plat_file_contexts , edit by hand init.amlogic.rc from afck/bc-tool/vendor/vendor/etc/init/hw and add

                    Code:
                    service bootvideo /system/bin/bootplayer /system/etc/bootvideo
                    class main
                    user root
                    group system
                    disabled
                    oneshot
                    save it, then in terminal i do , make mod-partition-all

                    Code:
                    make mod-partition-all
                    mkdir -p "bc-tool/stamp"
                    cd bc-tool/odm && ./build
                    check source folder...
                    ok
                    sepolicy sha256sum: don't match, please apply mod-sepolicy!
                    make: *** [build/mod.mak:62: bc-tool/stamp/.stamp.mod-partition-all] Error 1
                    hmm, okay then i do make mod-sepolicy
                    all good , then i do make mod-partition-all again
                    and here it fails to pack the system partition full log here https://pastebin.com/raw/Z3ZERs6B
                    make mod-system fails too with the same error

                    btw: build.prop - what file should i edit from system or from vendor?

                    okay, i tried to unpack and edit another .IMG , it's good
                    Last edited by drakulaboy; 08-06-2020, 12:26.

                    Comment


                      #70
                      drakulaboy
                      You make it difficult for yourself, just use the standard player, leave out everything you have done and only make these two entries in build.prop

                      system build.prop:
                      Code:
                      service.bootvideo=1
                      vendor build.prop
                      Code:
                      persist.vendor.media.bootvideo=3050
                      copy bootvideo mp4 to /vendor/etc/ and recompile the partitions

                      Comment


                        #71
                        bumerc thank you, i've read all 5 pages and now i know for sure how it's working, i know russian too so there is no problem with messages from terminal, and the boot video animation is working now

                        Comment


                          #72
                          Thanks tools. But I meet that errors when make mod-vendor:

                          ./build: line 100: contrib/mke2fs: cannot execute binary file: Exec format error
                          generate fs_config
                          compile file_contexts.bin
                          ./build: line 106: contrib/sefcontext_compile: cannot execute binary file: Exec format error

                          create a sparse img...
                          ##################
                          contrib/e2fsdroid: 1: contrib/e2fsdroid: Syntax error: ")" unexpected
                          build/mod.mak:61: recipe for target 'bc-tool/stamp/.stamp.mod-vendor' failed
                          make: *** [bc-tool/stamp/.stamp.mod-vendor] Error 1


                          Comment


                            #73
                            Install Ubuntu 64bit version, binary is 64bit

                            Comment


                              #74
                              I found some program unsure what it is on the pine firmware site on the wiki page. Its like 104G!! i figured it was something to build android firmware or edit or something over my head.

                              This is what it says

                              Android SDK

                              Android P SDK [v9.0]I think this is the link if it works

                              Comment


                                #75
                                Originally posted by BowerR64 View Post
                                I found some program unsure what it is on the pine firmware site on the wiki page. Its like 104G!! i figured it was something to build android firmware or edit or something over my head.

                                This is what it says

                                Android SDK

                                Android P SDK [v9.0]I think this is the link if it works

                                http://files.pine64.org//SDK/ROCK64/...roid9.0.tar.gz
                                Umm... that is ROCKCHIP and this is an AMLOGIC forum thread. So that should have been posted in a new TOPIC for Rockchip devices.

                                What you found is the "Source Code" that is specific to the ROCK64 device, so if you have the device you can build the Android 9 software on a Linux/Ubuntu machine with the Pine64 SDK.
                                ( sdk = software development kit )

                                There will be software tools to modify or package Rockchip firmwares in the Source Code, if you want to try your hand at development and make a custom ROM for the Rock64 then that would be the only reason to download the SDK.

                                Cheers

                                Comment

                                Working...
                                X