Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

TRWP. 3229 Devices Followmsi.

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

    #76
    followmsi

    I am taking this step by step. as slow as possible make sure I dont miss anything. (Ive been having a few issues backup appears to work normal, but restore causes system to hang on logo image (before bootanimation)

    I have started fresh and worked through step by step

    I am to the point of
    install Update.ZIP_TWRP_RK3229_3.1.0-0_170318.zip
    and saw a error come up while flashing.

    I continued on
    install SuperSu-forced-system-mode.zip
    I created the new-system.img
    and copied the recovery.log file

    after a reboot I pulled the recovery.log file and checked through and found the following

    Code:
    I:operation_start: 'Flashing'
    Installing zip file '/usb-otg/TWRP/Update.ZIP_TWRP_RK3229_3.1.0-0_170318.zip'
    Checking for MD5 file...
    Skipping MD5 check: no MD5 file found
    I:Update binary zip
    I:Zip does not contain SELinux file_contexts file in its root.
    I:Legacy property environment initialized.
    Install TWRP ..
    about to run program [/sbin/e2fsck] with 3 args
    e2fsck 1.42.9 (28-Dec-2013)
    Pass 1: Checking inodes, blocks, and sizes
    Pass 2: Checking directory structure
    Pass 3: Checking directory connectivity
    Pass 4: Checking reference counts
    Pass 5: Checking group summary information
    system: 1977/3072 files (3.2% non-contiguous), 622178/1048576 blocks
    about to run program [/sbin/resize2fs] with 2 args
    resize2fs 1.42.9 (28-Dec-2013)
    The filesystem is already 1048576 blocks long.  Nothing to do!
    
    bootmode = emmc 
    bootmode = emmc 
    recovery filesystem table
    =========================
      0 /mnt/internal_sd vfat /dev/block/platform/ff0f0000.rksdmmc/by-name/user 0
      1 /mnt/external_sd vfat /dev/block/mmcblk1p1 0
      2 /system ext4 /dev/block/platform/ff0f0000.rksdmmc/by-name/system 0
      3 /cache ext4 /dev/block/platform/ff0f0000.rksdmmc/by-name/cache 0
      4 /metadata ext4 /dev/block/platform/ff0f0000.rksdmmc/by-name/metadata 0
      5 /data ext4 /dev/block/platform/ff0f0000.rksdmmc/by-name/userdata 0
      6 /cust ext4 /dev/block/platform/ff0f0000.rksdmmc/by-name/cust 0
      7 /custom ext4 /dev/block/platform/ff0f0000.rksdmmc/by-name/custom 0
      8 /radical_update ext4 /dev/block/platform/ff0f0000.rksdmmc/by-name/radical_update 0
      9 /misc emmc /dev/block/platform/ff0f0000.rksdmmc/by-name/misc 0
      10 /uboot emmc /dev/block/platform/ff0f0000.rksdmmc/by-name/uboot 0
      11 /charge emmc /dev/block/platform/ff0f0000.rksdmmc/by-name/charge 0
      12 /resource emmc /dev/block/platform/ff0f0000.rksdmmc/by-name/resource 0
      13 /parameter emmc /dev/block/platform/ff0f0000.rksdmmc/by-name/parameter 0
      14 /boot emmc /dev/block/platform/ff0f0000.rksdmmc/by-name/boot 0
      15 /recovery emmc /dev/block/platform/ff0f0000.rksdmmc/by-name/recovery 0
      16 /backup emmc /dev/block/platform/ff0f0000.rksdmmc/by-name/backup 0
      17 /trust emmc /dev/block/platform/ff0f0000.rksdmmc/by-name/trust 0
      18 /baseparamer emmc /dev/block/platform/ff0f0000.rksdmmc/by-name/baseparamer 0
      19 /tmp ramdisk ramdisk 0
    
    minzip: Extracted 2 file(s)
    ApplyParsedPerms: lsetfilecon of /system/etc/install-recovery-2.sh to u:object_r:system_file:s0 failed: Operation not supported on transport endpoint
    script aborted: set_metadata_recursive: some changes failed
    set_metadata_recursive: some changes failed
    Updater process ended with ERROR: 7
    I:Legacy property environment disabled.
    I:Install took 4 second(s).
    Error installing zip file '/usb-otg/TWRP/Update.ZIP_TWRP_RK3229_3.1.0-0_170318.zip'
    Updating partition details...
    I:Data backup size is 647MB, free: 5252MB.
    I:Unable to mount '/external_sd'
    I:Actual block device: '', current file system: 'vfat'
    ...done
    I:Set page: 'flash_done'
    I:operation_end - status=1
    I dont know (not educated enough yet to know if that is a issue or non issue.

    I also pulled the new-system.img down and I will be repacking a new firmware image with that new-system.img.

    Ill keep you posted.

    Comment


      #77
      Originally posted by tacotime82
      followmsi

      I am taking this step by step. as slow as possible make sure I dont miss anything. (Ive been having a few issues backup appears to work normal, but restore causes system to hang on logo image (before bootanimation)

      I have started fresh and worked through step by step

      I am to the point of and saw a error come up while flashing.

      I continued on

      I created the new-system.img
      and copied the recovery.log file

      after a reboot I pulled the recovery.log file and checked through and found the following

      Code:
      I:operation_start: 'Flashing'
      Installing zip file '/usb-otg/TWRP/Update.ZIP_TWRP_RK3229_3.1.0-0_170318.zip'
      Checking for MD5 file...
      Skipping MD5 check: no MD5 file found
      I:Update binary zip
      I:Zip does not contain SELinux file_contexts file in its root.
      I:Legacy property environment initialized.
      Install TWRP ..
      about to run program [/sbin/e2fsck] with 3 args
      e2fsck 1.42.9 (28-Dec-2013)
      Pass 1: Checking inodes, blocks, and sizes
      Pass 2: Checking directory structure
      Pass 3: Checking directory connectivity
      Pass 4: Checking reference counts
      Pass 5: Checking group summary information
      system: 1977/3072 files (3.2% non-contiguous), 622178/1048576 blocks
      about to run program [/sbin/resize2fs] with 2 args
      resize2fs 1.42.9 (28-Dec-2013)
      The filesystem is already 1048576 blocks long.  Nothing to do!
      
      bootmode = emmc 
      bootmode = emmc 
      recovery filesystem table
      =========================
        0 /mnt/internal_sd vfat /dev/block/platform/ff0f0000.rksdmmc/by-name/user 0
        1 /mnt/external_sd vfat /dev/block/mmcblk1p1 0
        2 /system ext4 /dev/block/platform/ff0f0000.rksdmmc/by-name/system 0
        3 /cache ext4 /dev/block/platform/ff0f0000.rksdmmc/by-name/cache 0
        4 /metadata ext4 /dev/block/platform/ff0f0000.rksdmmc/by-name/metadata 0
        5 /data ext4 /dev/block/platform/ff0f0000.rksdmmc/by-name/userdata 0
        6 /cust ext4 /dev/block/platform/ff0f0000.rksdmmc/by-name/cust 0
        7 /custom ext4 /dev/block/platform/ff0f0000.rksdmmc/by-name/custom 0
        8 /radical_update ext4 /dev/block/platform/ff0f0000.rksdmmc/by-name/radical_update 0
        9 /misc emmc /dev/block/platform/ff0f0000.rksdmmc/by-name/misc 0
        10 /uboot emmc /dev/block/platform/ff0f0000.rksdmmc/by-name/uboot 0
        11 /charge emmc /dev/block/platform/ff0f0000.rksdmmc/by-name/charge 0
        12 /resource emmc /dev/block/platform/ff0f0000.rksdmmc/by-name/resource 0
        13 /parameter emmc /dev/block/platform/ff0f0000.rksdmmc/by-name/parameter 0
        14 /boot emmc /dev/block/platform/ff0f0000.rksdmmc/by-name/boot 0
        15 /recovery emmc /dev/block/platform/ff0f0000.rksdmmc/by-name/recovery 0
        16 /backup emmc /dev/block/platform/ff0f0000.rksdmmc/by-name/backup 0
        17 /trust emmc /dev/block/platform/ff0f0000.rksdmmc/by-name/trust 0
        18 /baseparamer emmc /dev/block/platform/ff0f0000.rksdmmc/by-name/baseparamer 0
        19 /tmp ramdisk ramdisk 0
      
      minzip: Extracted 2 file(s)
      ApplyParsedPerms: lsetfilecon of /system/etc/install-recovery-2.sh to u:object_r:system_file:s0 failed: Operation not supported on transport endpoint
      script aborted: set_metadata_recursive: some changes failed
      set_metadata_recursive: some changes failed
      Updater process ended with ERROR: 7
      I:Legacy property environment disabled.
      I:Install took 4 second(s).
      Error installing zip file '/usb-otg/TWRP/Update.ZIP_TWRP_RK3229_3.1.0-0_170318.zip'
      Updating partition details...
      I:Data backup size is 647MB, free: 5252MB.
      I:Unable to mount '/external_sd'
      I:Actual block device: '', current file system: 'vfat'
      ...done
      I:Set page: 'flash_done'
      I:operation_end - status=1
      I dont know (not educated enough yet to know if that is a issue or non issue.

      I also pulled the new-system.img down and I will be repacking a new firmware image with that new-system.img.

      Ill keep you posted.

      minzip: Extracted 2 file(s) ApplyParsedPerms: lsetfilecon of /system/etc/install-recovery-2.sh to ubject_r:system_file:s0 failed: Operation not supported on transport endpoint script aborted: set_metadata_recursive: some changes failed set_metadata_recursive: some changes failed Updater process ended with ERROR: 7 I:Legacy property environment disabled.

      This is an issue with update script ..To set the correct the correct permissions to execute the file.
      Will check this ..

      But more important is the supersu installation ..
      Once done do the DD of the system.Img.
      On your PC you can loop mount the system.img and copy the TWRP files into the system.img .. and check the permissions of the etc/install-recovery-2.sh script.
      You need to get the files into the system.Img.

      Good luck.

      Comment


        #78
        Just wondering if the error might be related to the recovery filesystem table reffering to "ff0f0000.rksdmmc" not "30020000.rksdmmc"

        Any way

        Here is the log of the supersu installation

        Code:
        I:operation_start: 'Flashing'
        Installing zip file '/usb-otg/TWRP/SuperSU-v2.79-201612051815-forced-system-mode.zip'
        Checking for MD5 file...
        Skipping MD5 check: no MD5 file found
        I:Update binary zip
        I:Zip does not contain SELinux file_contexts file in its root.
        I:Legacy property environment initialized.
        
        *****************
        SuperSU installer
        *****************
        - Mounting /system, /data and rootfs
        mount: mounting /dev/block/mmcblk0p15 on /data failed: Device or resource busy
        2+0 records in
        2+0 records out
        3+0 records in
        3+0 records out
        12+0 records in
        12+0 records out
        3+0 records in
        3+0 records out
        /tmp/updater: line 940: /system/toolbox: not found
        - Extracting files
        Archive:  /usb-otg/TWRP/SuperSU-v2.79-201612051815-forced-system-mode.zip
           creating: arm/
           creating: arm64/
           creating: arm64/chromeos/
          inflating: arm64/chromeos/futility
          inflating: arm64/libsupol.so
          inflating: arm64/su
          inflating: arm64/suinit
          inflating: arm64/sukernel
          inflating: arm64/supolicy
           creating: armv7/
          inflating: armv7/chattr.pie
          inflating: armv7/libsupol.so
          inflating: armv7/su
          inflating: armv7/suinit
          inflating: armv7/sukernel
          inflating: armv7/supolicy
          inflating: arm/chattr
          inflating: arm/chattr.pie
          inflating: arm/libsupol.so
          inflating: arm/su
          inflating: arm/suinit
          inflating: arm/sukernel
          inflating: arm/supolicy
           creating: common/
          inflating: common/000000deepsleep
          inflating: common/99SuperSUDaemon
           creating: common/chromeos/
          inflating: common/chromeos/kernel.bootloader
          inflating: common/chromeos/kernel.config
          inflating: common/chromeos/kernel.keyblock
          inflating: common/chromeos/kernel_data_key.vbprivk
          inflating: common/file_contexts_image
          inflating: common/frp_install
          inflating: common/hexpatch
          inflating: common/init.supersu.rc
          inflating: common/install-recovery.sh
          inflating: common/launch_daemonsu.sh
          inflating: common/Superuser.apk
           creating: META-INF/
          inflating: META-INF/CERT.RSA
          inflating: META-INF/CERT.SF
           creating: META-INF/com/
           creating: META-INF/com/google/
           creating: META-INF/com/google/android/
          inflating: META-INF/com/google/android/update-binary
          inflating: META-INF/com/google/android/updater-script
          inflating: META-INF/MANIFEST.MF
           creating: mips/
           creating: mips64/
          inflating: mips64/libsupol.so
          inflating: mips64/su
          inflating: mips64/suinit
          inflating: mips64/sukernel
          inflating: mips64/supolicy
          inflating: mips/chattr.pie
          inflating: mips/libsupol.so
          inflating: mips/su
          inflating: mips/suinit
          inflating: mips/sukernel
          inflating: mips/supolicy
           creating: x64/
          inflating: x64/libsupol.so
          inflating: x64/su
          inflating: x64/suinit
          inflating: x64/sukernel
          inflating: x64/supolicy
           creating: x86/
          inflating: x86/chattr
          inflating: x86/chattr.pie
          inflating: x86/libsupol.so
          inflating: x86/su
          inflating: x86/su.pie
          inflating: x86/suinit
          inflating: x86/sukernel
          inflating: x86/supolicy
        supolicy v2.79 (ndk:armeabi-v7a) - Copyright (C) 2014-2016 - Chainfire
        
        File [/sys/fs/selinux/policy] does not exist!
        - Rockchip Android M workaround to force SuperSU System mode installation -> Pls check for System mode 2 lines below !!!
        - Detecting system compatibility
        sukernel v2.79 (ndk:armeabi-v7a) - Copyright (C) 2014-2016 - Chainfire
        
        Loading from [/dev/block/mmcblk0p7] ...
        Could not find header
        - System mode
        - Disabling OTA survival
        /tmp/supersu/armv7/chattr.pie: No such file or directory while trying to stat /system/bin/su
        /tmp/supersu/armv7/chattr.pie: No such file or directory while trying to stat /system/sbin/su
        /tmp/supersu/armv7/chattr.pie: No such file or directory while trying to stat /vendor/sbin/su
        /tmp/supersu/armv7/chattr.pie: No such file or directory while trying to stat /vendor/bin/su
        /tmp/supersu/armv7/chattr.pie: No such file or directory while trying to stat /vendor/xbin/su
        /tmp/supersu/armv7/chattr.pie: No such file or directory while trying to stat /system/xbin/sugote
        /tmp/supersu/armv7/chattr.pie: No such file or directory while trying to stat /system/xbin/sugote_mksh
        /tmp/supersu/armv7/chattr.pie: No such file or directory while trying to stat /system/xbin/ku.sud
        /tmp/supersu/armv7/chattr.pie: No such file or directory while trying to stat /system/xbin/.ku
        /tmp/supersu/armv7/chattr.pie: No such file or directory while trying to stat /system/xbin/.su
        /tmp/supersu/armv7/chattr.pie: No such file or directory while trying to stat /system/lib64/libsupol.so
        /tmp/supersu/armv7/chattr.pie: Operation not supported on transport endpoint while reading flags on /system/bin/install-recovery.sh
        - Removing old files
        rm: cannot remove '/data/su.img': No such file or directory
        rm: cannot remove '/cache/su.img': No such file or directory
        - Creating space
        - Placing files
        mkdir: cannot create directory '/system/bin/.ext': File exists
        rm: cannot remove '/system/bin/.ext/.su': No such file or directory
        rm: cannot remove '/system/xbin/su': No such file or directory
        rm: cannot remove '/system/xbin/daemonsu': No such file or directory
        rm: cannot remove '/system/xbin/supolicy': No such file or directory
        rm: cannot remove '/system/lib/libsupol.so': No such file or directory
        rm: cannot remove '/system/app/SuperSU/SuperSU.apk': No such file or directory
        rm: cannot remove '/system/etc/install-recovery.sh': No such file or directory
        rm: cannot remove '/system/etc/init.d/99SuperSUDaemon': No such file or directory
        /tmp/updater: line 1571: cannot create /system/etc/init.d/99SuperSUDaemon: nonexistent directory
        chown: /system/etc/init.d/99SuperSUDaemon: No such file or directory
        chown: /system/etc/init.d/99SuperSUDaemon: No such file or directory
        chmod: /system/etc/init.d/99SuperSUDaemon: No such file or directory
        - Restoring files
        - Post-installation script
        rm: cannot remove '/system/toybox': No such file or directory
        rm: cannot remove '/system/toolbox': No such file or directory
        - Unmounting /system
        - Done !
        I:Updater process ended with RC=0
        I:Legacy property environment disabled.
        I:Install took 4 second(s).
        Updating partition details...
        I:Data backup size is 646MB, free: 5254MB.
        I:Unable to mount '/external_sd'
        I:Actual block device: '', current file system: 'vfat'
        ...done
        I:Set page: 'flash_done'
        I:operation_end - status=0
        To my untrained eye it looks normal.

        I will (once the new-system.img file is transferred) mount the img and look into the files.
        Any help on what I should be looking for, what permissions should be, would be greatly appreciated. Ill try to read through the log file and confirm what I should do.

        Comment


          #79
          Havent had a chance to look into the new-system.img yet. But I wanted to test the operation of the TWRP for backing up and restoring partitions. So I selected a backup of a system and data partition
          and saved log file.

          Rebooted, made a few changes to the system to check if restore worked.

          Back to recovery,
          Directly to restore. Selected the backup I had just made and hit restore.
          Everything appeared normal durring
          I again pulled the log file
          And rebooted.

          The device hangs right at the logo img display. Waited a long time (20 min or so)
          Unplug and retry again nothing, just boot img...

          Not looking good.

          Could this be caused by something I have done wrong, I have no idea. Verry frustrated. I should have tested this earlier before...

          Anyway I have posted the logs



          recovery-TWRPupdate-SUupdate-Zips-installed.log is taken directly after the first fresh install of the TWRPupdate.zip and SUupdate.zip

          Then I rebooted, Made sure everything worked.

          recovery-first-backup.log was taken directly after the backup of the system

          Again rebooted confirmed operations. Changed a few items and rebooted to recovery.

          recovery-first-restore.log taken directly after the restore...

          After words, it failed to boot.


          Also located in that folder is partition info recovery.log was just for my referance just the partition table extracted out from a recovery log.

          I am going to take a break. Stop working for a while. maybe have a drink. Anyway thanks for all of your help with everything.

          Comment


            #80
            Originally posted by tacotime82 View Post
            Havent had a chance to look into the new-system.img yet. But I wanted to test the operation of the TWRP for backing up and restoring partitions. So I selected a backup of a system and data partition
            and saved log file.

            Rebooted, made a few changes to the system to check if restore worked.

            Back to recovery,
            Directly to restore. Selected the backup I had just made and hit restore.
            Everything appeared normal durring
            I again pulled the log file
            And rebooted.

            The device hangs right at the logo img display. Waited a long time (20 min or so)
            Unplug and retry again nothing, just boot img...

            Not looking good.

            Could this be caused by something I have done wrong, I have no idea. Verry frustrated. I should have tested this earlier before...

            Anyway I have posted the logs

            https://drive.google.com/open?id=0Bw...VI1ZHZZMGRjVjQ

            recovery-TWRPupdate-SUupdate-Zips-installed.log is taken directly after the first fresh install of the TWRPupdate.zip and SUupdate.zip

            Then I rebooted, Made sure everything worked.

            recovery-first-backup.log was taken directly after the backup of the system

            Again rebooted confirmed operations. Changed a few items and rebooted to recovery.

            recovery-first-restore.log taken directly after the restore...

            After words, it failed to boot.


            Also located in that folder is partition info recovery.log was just for my referance just the partition table extracted out from a recovery log.

            I am going to take a break. Stop working for a while. maybe have a drink. Anyway thanks for all of your help with everything.

            Made a new TWRP version ..

            Update.ZIP_TWRP_RK3229_3.1.0-0_170319.zip

            TWRP_RK3229_3.1.0-0_170319.img

            Changed the Update-zip code to ..
            Code:
            set_metadata("/system/etc/install-recovery-2.sh", "uid", 0, "gid", 0, "mode", 0755, "capabilities", 0x0);
            Tested it on geekbox .. no error 7 anymore.
            Anyway .. the file is located in /system/etc/ and has rights to be executed ...

            Pls verify via adb shell ..
            Here I made fresh install - over my existing supersu installation.

            Code:
            :# adb shell ls -l /system/etc/install*
            -rwxr-xr-x    1 root     root           188 Aug  1  2008 /system/etc/install-recovery-2.sh
            -rwxr-xr-x    1 root     root           629 Mar 19 11:41 /system/etc/install-recovery.sh
            -rwxr-xr-x    1 root     root           629 Jan 17 20:24 /system/etc/install-recovery_original.sh


            But .. What I can see from your logs.. all seems to be fine .. except one issue !

            Patching sepolicy ...
            You dont have one ..


            Your log ...
            Code:
             inflating: x86/supolicy
            supolicy v2.79 (ndk:armeabi-v7a) - Copyright (C) 2014-2016 - Chainfire
            
            [B]File [/sys/fs/selinux/policy] does not exist![/B]
            
            - Rockchip Android M workaround to force SuperSU System mode installation -> Pls check for System mode 2 lines below !!!
            - Detecting system compatibility
            sukernel v2.79 (ndk:armeabi-v7a) - Copyright (C) 2014-2016 - Chainfire
            
            Loading from [/dev/block/mmcblk0p7] ...

            My log ...
            Code:
            supolicy v2.79 (ndk:arm64-v8a) - Copyright (C) 2014-2016 - Chainfire
            
            Patching policy ...
            -permissive:adbd_socket=ok
            -permissive:functionfs=ok
            -permissive:wifip2p_service=ok
            -permissive:hci_attach_exec=ok
            -permissive:system_server=ok
            -permissive:proc_uid_cputime_showstat=ok
            -permissive:nfc=ok
            -permissive:rild_debug_socket=ok
            Also when you backup/restore ..

            backup:
            Code:
              ==> set selinux context: unlabeled
            I:addFile '/data/misc/bluedroid/bt_config.conf.new' including root: 0
              ==> set selinux context: unlabeled
            I:addFile '/data/misc/bluedroid/bt_config.conf' including root: 0
              ==> set selinux context: unlabeled
            restore:
            Code:
            tar_extract_file(): failed to restore SELinux context unlabeled to file /data//misc/bluedroid/ !!!
              ==> extracting: /data//misc/bluedroid/bt_config.conf.new (file size 0 bytes)
            tar_extract_file(): failed to restore SELinux context unlabeled to file /data//misc/bluedroid/bt_config.conf.new !!!
              ==> extracting: /data//misc/bluedroid/bt_config.conf (file size 0 bytes)
            tar_extract_file(): failed to restore SELinux context unlabeled to file /data//misc/bluedroid/bt_config.conf !!!

            The system does not know how to label it ...
            You have the files restored but the system may not able to read them correctly ..

            Do you have s stock recovery.img of your current ROM ?

            I have only one old recovery.img from Lollipop ...
            We may can change this ..


            EDIT:
            Pls run the following commands .. in recovery and in system ...

            Code:
            adb shell dmesg | grep 'avc: '
            Code:
            adb shell ls -l /sys/fs/selinux/class/file/perms/
            Code:
             adb shell ls -l /sys/fs/selinux/policy

            Thanks
            Last edited by followmsi; 19 March 2017, 14:37.

            Comment


              #81
              Originally posted by followmsi View Post
              Made a new TWRP version ..

              Update.ZIP_TWRP_RK3229_3.1.0-0_170319.zip

              TWRP_RK3229_3.1.0-0_170319.img
              Have you made a new new version with the same name??
              When I started fresh I made sure I downloaded the TWRPUpdate.ZIP from your link.

              Just want to make sure I am on the right page.

              Originally posted by tacotime82 View Post
              I am to the point of
              # install Update.ZIP_TWRP_RK3229_3.1.0-0_170318.zip #


              Originally posted by followmsi View Post
              Pls verify via adb shell ..
              Here I made fresh install - over my existing supersu installation.

              :# adb shell ls -l /system/etc/install*
              -rwxr-xr-x 1 root root 188 Aug 1 2008 /system/etc/install-recovery-2.sh
              -rwxr-xr-x 1 root root 629 Mar 19 11:41 /system/etc/install-recovery.sh
              -rwxr-xr-x 1 root root 629 Jan 17 20:24 /system/etc/install-recovery_original.sh
              I checked over ADB

              Code:
              shell@Dolamee_D5:/ $ ls -l /system/etc/install*                                
              -rwxr-xr-x root     root          188 2008-08-01 07:00 install-recovery-2.sh
              -rwxr-xr-x root     root          629 1969-12-31 18:01 install-recovery.sh
              -rwxr-xr-x root     root          629 1969-12-31 18:01 install-recovery_original.sh

              Every thiing seems normal. (and after signing off last night and taking my break had a few, I have made some progress on a firmwareupdate.img file that incorporates TWRP and SuperSU boots fine starts normal, and reboots into TWRP recovery) All thanks to your ideas!! Once I mounted the new-system.img file and compared it to the system.img file before TWRPUpdate.zip and SuperSU.zip I made the following observations / modifications.

              Code:
              Things found durring overview of new-system.img vs original system.img
              
              
              Orriginal System.img had none of the below files but they are in new-system
              /etc/install-recovery.sh        #contains new code from SU install
              /etc/install-recovery-2.sh        #contains new code to dd twrprecovery.img
              /etc/install-recovery_original.sh    #also contains new code from SU install
              /etc/.installed_su_daemon        #contains "1"
              
              
              New-system.img has different from old System.img
              /bin/install-recovery.sh        #file is empty
              /bin/install-recovery_original.sh    #File has the original code
              /bin/: app_process32_original        #is new
              /bin/: app_process_init            #is new
              /bin/: .ext                #is new
              
              
              Process I completed
              chmod all above files to 755
              /bin/install-recovery.sh is now the same as the /ets/install-recovery.sh with the new code from the SU install.
              confirmed /twrp/twrprecovery.img is available.
              
              unmounted new-system.img
              replaced system.img in custom firmware and repackaged firmware.
              
              I will attempt to flash and see if it works.
              !! It did !! (less the backup and restor functions)
              So that I'm sure is progress, small steps forward.

              Originally posted by followmsi View Post
              But .. What I can see from your logs.. all seems to be fine .. except one issue !

              Patching sepolicy ...
              You dont have one ..

              ... ... ...

              The system does not know how to label it ...
              You have the files restored but the system may not able to read them correctly ..

              Do you have s stock recovery.img of your current ROM ?

              I have only one old recovery.img from Lollipop ...
              We may can change this ..
              I do have the stock recovery .img and anything else you may need should be in here aswell...
              https://drive.google.com/open?id=0Bw...zNfMmpHVnhFeTQ GDrive Folder holding the unpacked entire stock firmware.
              https://drive.google.com/open?id=0Bw...lBRUTd3WWJfd2s Direct link to stock 6.0.1 recovery.img

              If there is anything else you need, just ask away and I will do my best to get it.

              Originally posted by followmsi View Post
              EDIT:
              Pls run the following commands .. in recovery and in system ...
              I donot know how to connect adb to this box while it is in recovery? Any help would be appreciated on that.
              Otherwise I will try and find a alternate method to do the requested.

              Thinking about useing the terminal in TWRP and seeing if those commands will show in the log file.

              I will do some trail and come back and edit this post.

              Originally posted by followmsi View Post
              Code:
              adb shell dmesg | grep 'avc: '
              Code:
              dmesg during recovery returned no matches to 'avc: '
              dmesg during normal system returned no matches either
              Originally posted by followmsi View Post
              Code:
              adb shell ls -l /sys/fs/selinux/class/file/perms/
              Code:
              (during recovery) ls: /sys/fs/selinux/class/file/perms: No Such file or directory
              (normal system) /sys/fs/selinux/class/file/perms/: No such file or directory
              Originally posted by followmsi View Post
              Code:
              adb shell ls -l /sys/fs/selinux/policy
              Code:
               
              (during recovery)ls: /sys/fs/selinux/policy: No Such file or directory
              (normal system) /sys/fs/selinux/policy: No such file or directory
              Thanks Aaron
              Last edited by tacotime82; 19 March 2017, 16:28. Reason: Edited to add results of commands requested from recovery shell and from adb in system

              Comment


                #82
                Originally posted by tacotime82

                Have you made a new new version with the same name??
                When I started fresh I made sure I downloaded the TWRPUpdate.ZIP from your link.

                Just want to make sure I am on the right page.




                I checked over ADB

                Code:
                shell@Dolamee_D5:/ $ ls -l /system/etc/install*                                
                -rwxr-xr-x root     root          188 2008-08-01 07:00 install-recovery-2.sh
                -rwxr-xr-x root     root          629 1969-12-31 18:01 install-recovery.sh
                -rwxr-xr-x root     root          629 1969-12-31 18:01 install-recovery_original.sh

                Every thiing seems normal. (and after signing off last night and taking my break had a few, I have made some progress on a firmwareupdate.img file that incorporates TWRP and SuperSU boots fine starts normal, and reboots into TWRP recovery) All thanks to your ideas!! Once I mounted the new-system.img file and compared it to the system.img file before TWRPUpdate.zip and SuperSU.zip I made the following observations / modifications.

                Code:
                Things found durring overview of new-system.img vs original system.img
                
                
                Orriginal System.img had none of the below files but they are in new-system
                /etc/install-recovery.sh        #contains new code from SU install
                /etc/install-recovery-2.sh        #contains new code to dd twrprecovery.img
                /etc/install-recovery_original.sh    #also contains new code from SU install
                /etc/.installed_su_daemon        #contains "1"
                
                
                New-system.img has different from old System.img
                /bin/install-recovery.sh        #file is empty
                /bin/install-recovery_original.sh    #File has the original code
                /bin/: app_process32_original        #is new
                /bin/: app_process_init            #is new
                /bin/: .ext                #is new
                
                
                Process I completed
                chmod all above files to 755
                /bin/install-recovery.sh is now the same as the /ets/install-recovery.sh with the new code from the SU install.
                confirmed /twrp/twrprecovery.img is available.
                
                unmounted new-system.img
                replaced system.img in custom firmware and repackaged firmware.
                
                I will attempt to flash and see if it works.
                !! It did !! (less the backup and restor functions)
                So that I'm sure is progress, small steps forward.



                I do have the stock recovery .img and anything else you may need should be in here aswell...
                https://drive.google.com/open?id=0Bw...zNfMmpHVnhFeTQ GDrive Folder holding the unpacked entire stock firmware.
                https://drive.google.com/open?id=0Bw...lBRUTd3WWJfd2s Direct link to stock 6.0.1 recovery.img

                If there is anything else you need, just ask away and I will do my best to get it.



                I donot know how to connect adb to this box while it is in recovery? Any help would be appreciated on that.
                Otherwise I will try and find a alternate method to do the requested.

                Thinking about useing the terminal in TWRP and seeing if those commands will show in the log file.

                I will do some trail and come back and edit this post.

                Code:
                dmesg returned no matches to 'avc: '
                Code:
                ls: /sys/fs/selinux/class/file/perms: No Such file or directory
                Code:
                ls: /sys/fs/selinux/policy: No Such file or directory
                Thanks Aaron

                V170318 from yesterday
                V170319 from today


                If you go into system now .. are fully rooted ?
                Everything works as expected ?

                Can you check the recover installation mechanism now ?
                Pls delete the /data/twrp-install check file manually.
                You may install your stock recovery and do normal reboot into system.
                Now the /data/twrp check file should be back .. and TWRP installed again.

                The selinux is missing for you ..
                Pls do the same ADB commands when you have booted into system.
                Thanks

                Will have a look into your recovery​.img ...


                EDIT:

                Made another version of the TWRP ... your version . included all the stuff from your recovery.img.

                Pls have check ...

                Update.ZIP_TWRP_RK3229_3.1.0-0_170319-2.zip

                TWRP_RK3229_3.1.0-0_170319-2.img


                What about the selinux part now ?


                Last edited by followmsi; 19 March 2017, 16:48.

                Comment


                  #83
                  I have been poking around and the /sys/selinux folder on my firmware is completely empty.

                  So I decided to see if that was something I had done incorrectly,

                  I flashed the Dolamee_D5_rtl8189es_RK3229_6.0.1_20170224.img the original android 6.0.1 firmware released for the Dolamee and will be redoing the tests below

                  I keep trying to jump forward and make everything work all at once. I am going to restart from ground 0 just to make sure my modifications are not the ones causing the issue.

                  After all of that I should have a Stock-Dolamee_D5_rtl8189es_RK3229_6.0.1_20170224withSupe rSUandTWRP.img

                  That anyone can use...

                  Originally posted by followmsi View Post

                  EDIT:
                  Pls run the following commands .. in recovery and in system ...

                  Code:
                  adb shell dmesg | grep 'avc: '
                  Code:
                  adb shell ls -l /sys/fs/selinux/class/file/perms/
                  Code:
                   adb shell ls -l /sys/fs/selinux/policy

                  Thanks
                  After Firmware install of stock 6.0.1.img

                  adb shell ls -l /sys/fs/selinux/

                  Directory is still empty.

                  dmesg no referance to avc in normal system.

                  Moving forward

                  Manually pushed the twrprecovery.img and manual dd to recovery partition, then reboot to recovery. Ok new recovery up.

                  Next installed TWRP Install update 170319-2 .zip (freshly downloaded) thank you much

                  Pulled Log File

                  Next Installed SuperSU update .zip

                  Pulled Log File

                  Next in TWRP terminal preformed

                  Code:
                   dd if=/dev/block/mmcblk0p14 of=/usb-otg/stock6.0.1.TWRPSuperSU.system.img
                  Reboot to system.
                  SU appears normal.
                  Prompting for grant permisions.
                  Everything operational
                  Install root checker
                  Root is properly installed

                  Now for the tests requested above.
                  Code:
                   adb shell dmesg | grep 'avc: '
                  (In system)     no responce
                  (In recovery)   no responce  
                  
                  adb shell ls -l /sys/fs/selinux/class/file/perms/
                  (in system)     /sys/fs/selinux/class/file/perms/: No such file or directory
                  (in recovery)   ls: /sys/fs/selinux/class/file/perms/: No such file or directory  
                  
                  adb shell ls -l /sys/fs/selinux/policy
                  (in system)     /sys/fs/selinux/policy: No such file or directory
                  (in recovery)   ls: /sys/fs/selinux/policy: No such file or directory
                  /sys/fs/selinux directory is empty

                  Preformed backup and inspected recovery log per your note from earlier

                  Note from earlier
                  Originally posted by followmsi View Post
                  Also when you backup/restore ..

                  backup:
                  #
                  ==> set selinux context: unlabeled
                  I:addFile '/data/misc/bluedroid/bt_config.conf.new' including root: 0
                  ==> set selinux context: unlabeled
                  I:addFile '/data/misc/bluedroid/bt_config.conf' including root: 0
                  ==> set selinux context: unlabeled


                  The system does not know how to label it ...
                  You have the files restored but the system may not able to read them correctly ..
                  Set selinux context: unlabeled is still there...
                  Last edited by tacotime82; 19 March 2017, 18:36.

                  Comment


                    #84
                    Originally posted by tacotime82
                    I have been poking around and the /sys/selinux folder on my firmware is completely empty.

                    So I decided to see if that was something I had done incorrectly,

                    I flashed the Dolamee_D5_rtl8189es_RK3229_6.0.1_20170224.img the original android 6.0.1 firmware released for the Dolamee and will be redoing the tests below

                    I keep trying to jump forward and make everything work all at once. I am going to restart from ground 0 just to make sure my modifications are not the ones causing the issue.

                    After all of that I should have a Stock-Dolamee_D5_rtl8189es_RK3229_6.0.1_20170224withSupe rSUandTWRP.img

                    That anyone can use...



                    After Firmware install of stock 6.0.1.img

                    adb shell ls -l /sys/fs/selinux/

                    Directory is still empty.

                    dmesg no referance to avc in normal system.


                    Moving forward

                    Manually pushed the twrprecovery.img and manual dd to recovery partition, then reboot to recovery. Ok new recovery up.

                    Next installed TWRP Install update 170319-2 .zip (freshly downloaded) thank you much

                    Pulled Log File

                    Next Installed SuperSU update .zip

                    Pulled Log File

                    Next in TWRP terminal preformed

                    Code:
                     
                     dd if=/dev/block/mmcblk0p14 of=/usb-otg/stock6.0.1.TWRPSuperSU.system.img
                    reboot to system. SU appears normal. Prompting for grant. Everything operational Install root checker Root is properly installed Now for the tests requested above.
                    Code:
                     adb shell dmesg | grep 'avc: ' (in system)     no responce (in recovery)   no responce  adb shell ls -l /sys/fs/selinux/class/file/perms/ (in system)     /sys/fs/selinux/class/file/perms/: No such file or directory (in recovery)   ls: /sys/fs/selinux/class/file/perms/: No such file or directory  adb shell ls -l /sys/fs/selinux/policy (in system)     /sys/fs/selinux/policy: No such file or directory (in recovery)   ls: /sys/fs/selinux/policy: No such file or directory
                    /sys/fs/selinux directory is empty



                    Maybe your kernel is not configured for selinux ?
                    If selinux is missing in system too .. the twrp backup/restore should work too.

                    Test backup and restore again .. only data .. system you can always DD your last version, there are no changes. Normally mounted read-only.

                    If supersu and automatic TWRP installation are working fine you have done one big step.

                    Comment


                      #85
                      I did a test backup and restore of the Data partition, and it worked... SuperSU and auto TWRP install worked.

                      I will work on packing this into a Stock firmware .img for others to use.

                      What instructions would you reccomend posting with this to help others use it.

                      Should I have them not backup or restore the System / Boot / Recovery / Uboot / Trust / Resource / Kernel / Cache partitions. Only to use the Data backup and restore functionality?

                      Comment


                        #86
                        Originally posted by tacotime82
                        I did a test backup and restore of the Data partition, and it worked... SuperSU and auto TWRP install worked.

                        I will work on packing this into a Stock firmware .img for others to use.

                        What instructions would you reccomend posting with this to help others use it.

                        Should I have them not backup or restore the System / Boot / Recovery / Uboot / Trust / Resource / Kernel / Cache partitions. Only to use the Data backup and restore functionality?
                        Cool .. sounds good now.
                        You may install Xposed via TWRP and have it also fix included in your ROM

                        But you understood the principles ...

                        Yes, I strongly recommend to backup data only.
                        This is your data and your apps and your settings - the rest is coming from the ROM you are using.

                        I do the same .. even more in AOSP world.

                        But you can still try to backup and restore system too .. have a try.
                        Should work too .. ext4 permissions should be still saved inside the tar backup of TWRP.
                        Same principle as data .. independent of the selinux stuff.

                        Cheers

                        Comment


                          #87
                          Originally posted by followmsi View Post

                          You may install Xposed via TWRP and have it also fix included in your ROM


                          I do the same .. even more in AOSP world.
                          Thank you for all of your help. For sure greatly appreciated. I will do a writeup and put it in the Firmware Folder under the rk3229 forum to share the update.

                          I donot understand the 2 comments I quoted above. What is Xposed?

                          All the best

                          Comment


                            #88
                            Originally posted by tacotime82

                            Thank you for all of your help. For sure greatly appreciated. I will do a writeup and put it in the Firmware Folder under the rk3229 forum to share the update.

                            I donot understand the 2 comments I quoted above. What is Xposed?

                            All the best
                            Have a look for Xposed framework .. check it out, plenty of possibilities.
                            It's working fine on mmallow rockchip ROMs.
                            At least on rk3368 mmallow ROMs.

                            Cheers

                            Comment


                              #89
                              Hi followmsi im needing twrp for my mk809iv rk3229 5.1.1 is this recovery working I need to install xposed
                              Last edited by gavster26; 26 March 2017, 12:50.
                              My Works @XDA:
                              AVD Rom Xperia J The Way Stock Should Be
                              Pre Root Xperia J 4.12
                              Deodex Xperia L
                              Deodex Xperia Z kitkat
                              Stock Xperia Icon's For CM11

                              Comment


                                #90
                                Originally posted by gavster26 View Post
                                Hi followmsi im needing twrp for my mk809iv rk3229 5.1.1 is this recovery working I need to install xposed
                                Does the version from here not work on your rk3229 device ?

                                But as I know there are still issues with xposed on (rockchip) android 5.1.1 .. make a backup first

                                Comment

                                Working...
                                X