ayasa520 / redroid-script

MIT License
162 stars 37 forks source link

Magisk does not seem to be installing #11

Closed KaitoKid closed 1 year ago

KaitoKid commented 1 year ago
python3 redroid.py -a 11.0.0 -m
Downloading latest Magisk-Delta now .....
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11.4M/11.4M [00:00<00:00, 29.9MiB/s]
Extracting archive...
/home/xxx/.cache/redroid/downloads/magisk.apk
/tmp/magisk_unpack
Copying magisk libs now ...

Dockerfile
FROM redroid/redroid:11.0.0-latest
COPY magisk /

[+] Building 0.2s (7/7) FINISHED                                                                                                                                                                                                                         
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                0.0s
 => => transferring dockerfile: 86B                                                                                                                                                                                                                 0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                   0.0s
 => => transferring context: 2B                                                                                                                                                                                                                     0.0s
 => [internal] load metadata for docker.io/redroid/redroid:11.0.0-latest                                                                                                                                                                            0.0s
 => [internal] load build context                                                                                                                                                                                                                   0.1s
 => => transferring context: 15.65MB                                                                                                                                                                                                                0.1s
 => CACHED [1/2] FROM docker.io/redroid/redroid:11.0.0-latest                                                                                                                                                                                       0.0s
 => [2/2] COPY magisk /                                                                                                                                                                                                                             0.1s
 => exporting to image                                                                                                                                                                                                                              0.1s
 => => exporting layers                                                                                                                                                                                                                             0.1s
 => => writing image sha256:5d4112e4a50b135caa186ac991331d7da76abf7622f6f781bf232cfbf30bf510                                                                                                                                                        0.0s
 => => naming to docker.io/redroid/redroid:11.0.0_magisk   
docker run -itd --rm --privileged \
    --name redroidm \
    -v /home/xxx/.config/appdata/redroid11m:/data \
    -p 5555:5555 \
    redroid/redroid:11.0.0_magisk \
    androidboot.use_memfd=1 \
    androidboot.redroid_width=1080 \
    androidboot.redroid_height=1920 \
    androidboot.redroid_gpu_mode=auto

adb logcat | grep magisk is empty

Running Ubuntu 22.04.2 LTS

After downloading the Delta release manually, here's a screenshot: image

KaitoKid commented 1 year ago

Seems like the /sbin/.magisk directory does not exist, which makes me wonder if the bootanim.rc is being called at all or if there's a permissions issue

2cb1d401b266:/system/etc/init/magisk # ls -l
total 15296
-rwxrwxr-x 1 root root  2265688 2023-04-11 06:25 busybox
-rw-rw-r-- 1 root root 11442619 2023-04-11 06:25 magisk.apk
-rwxrwxr-x 1 root root   303632 2023-04-11 06:25 magisk64
-rwxrwxr-x 1 root root   730400 2023-04-11 06:25 magiskboot
-rwxrwxr-x 1 root root   538016 2023-04-11 06:25 magiskinit
-rwxrwxr-x 1 root root   366648 2023-04-11 06:25 magiskpolicy
2cb1d401b266:/system/etc/init # cat bootanim.rc                                                                                        

service bootanim /system/bin/bootanimation
    class core animation
    user graphics
    group graphics audio
    disabled
    oneshot
    ioprio rt 0
    task_profiles MaxPerformance

on post-fs-data
    start logd
    exec u:r:su:s0 root root -- /system/etc/init/magisk/magisk64 --auto-selinux --setup-sbin /system/etc/init/magisk
    exec u:r:su:s0 root root -- /system/etc/init/magisk/magiskpolicy --live --magisk "allow * magisk_file lnk_file *"
    mkdir /sbin/.magisk 700
    mkdir /sbin/.magisk/mirror 700
    mkdir /sbin/.magisk/block 700
    copy /system/etc/init/magisk/config /sbin/.magisk/config
    rm /dev/.magisk_unblock
    exec u:r:su:s0 root root -- /sbin/magisk --auto-selinux --post-fs-data
    wait /dev/.magisk_unblock 40
    rm /dev/.magisk_unblock

on zygote-start
    exec u:r:su:s0 root root -- /sbin/magisk --auto-selinux --service

on property:sys.boot_completed=1
    mkdir /data/adb/magisk 755
    exec u:r:su:s0 root root -- /sbin/magisk --auto-selinux --boot-complete
    exec -- /system/bin/sh -c "if [ ! -e /data/data/io.github.huskydg.magisk ] ; then pm install /system/etc/init/magisk/magisk.apk ; fi"

on property:init.svc.zygote=restarting
    exec u:r:su:s0 root root -- /sbin/magisk --auto-selinux --zygote-restart

on property:init.svc.zygote=stopped
    exec u:r:su:s0 root root -- /sbin/magisk --auto-selinux --zygote-restart
    2cb1d401b266:/system/etc/init # 
KaitoKid commented 1 year ago

I checked out a solution from a different thread but it seems to cause my adb to fail - any chance someone else can verify this?

https://github.com/remote-android/redroid-doc/issues/207#issuecomment-1491318842

ayasa520 commented 1 year ago

Can you provide me with detailed system information?

KaitoKid commented 1 year ago

Sure

Let me know if there's anything specific that you're looking for

$ docker -v
Docker version 23.0.2, build 569dd73
$ uname -a
Linux xxx 5.19.0-38-generic #39~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 17 21:16:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
$ lscpu
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         39 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  6
  On-line CPU(s) list:   0-5
Vendor ID:               GenuineIntel
  Model name:            Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz
    CPU family:          6
    Model:               158
    Thread(s) per core:  1
    Core(s) per socket:  6
    Socket(s):           1
    Stepping:            10
    CPU max MHz:         4100.0000
    CPU min MHz:         800.0000
    BogoMIPS:            6000.00
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mc
                         a cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss 
                         ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art
                          arch_perfmon pebs bts rep_good nopl xtopology nonstop_
                         tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cp
                         l vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid ss
                         e4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes 
                         xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_f
                         ault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_sh
                         adow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adj
                         ust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx sma
                         p clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dt
                         herm ida arat pln pts hwp hwp_notify hwp_act_window hwp
                         _epp md_clear flush_l1d arch_capabilities
Virtualization features: 
  Virtualization:        VT-x
Caches (sum of all):     
  L1d:                   192 KiB (6 instances)
  L1i:                   192 KiB (6 instances)
  L2:                    1.5 MiB (6 instances)
  L3:                    9 MiB (1 instance)
NUMA:                    
  NUMA node(s):          1
  NUMA node0 CPU(s):     0-5
Vulnerabilities:         
  Itlb multihit:         KVM: Mitigation: VMX disabled
  L1tf:                  Mitigation; PTE Inversion; VMX conditional cache flushe
                         s, SMT disabled
  Mds:                   Mitigation; Clear CPU buffers; SMT disabled
  Meltdown:              Mitigation; PTI
  Mmio stale data:       Mitigation; Clear CPU buffers; SMT disabled
  Retbleed:              Mitigation; IBRS
  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer
                          sanitization
  Spectre v2:            Mitigation; IBRS, IBPB conditional, RSB filling, PBRSB-
                         eIBRS Not affected
  Srbds:                 Mitigation; Microcode
  Tsx async abort:       Mitigation; TSX disabled
$ sudo lshw -short
H/W path           Device          Class          Description
=============================================================
                                   system         10SUS4S200 (LENOVO_MT_10SU_BU_
/0                                 bus            312A
/0/0                               memory         64KiB BIOS
/0/3b                              memory         32GiB System Memory
/0/3b/0                            memory         [empty]
/0/3b/1                            memory         16GiB DIMM DDR4 Synchronous 26
/0/3b/2                            memory         [empty]
/0/3b/3                            memory         16GiB DIMM DDR4 Synchronous 26
/0/47                              memory         384KiB L1 cache
/0/48                              memory         1536KiB L2 cache
/0/49                              memory         9MiB L3 cache
/0/4a                              processor      Intel(R) Core(TM) i5-8500 CPU 
/0/100                             bridge         8th Gen Core Processor Host Br
/0/100/2           /dev/fb0        display        CoffeeLake-S GT2 [UHD Graphics
/0/100/8                           generic        Xeon E3-1200 v5/v6 / E3-1500 v
/0/100/14                          bus            Cannon Lake PCH USB 3.1 xHCI H
/0/100/14/0        usb1            bus            xHCI Host Controller
/0/100/14/1        usb2            bus            xHCI Host Controller
/0/100/14.2                        memory         RAM memory
/0/100/16                          communication  Cannon Lake PCH HECI Controlle
/0/100/17          scsi0           storage        Cannon Lake PCH SATA AHCI Cont
/0/100/17/0.0.0    /dev/sda        disk           14TB WDC  WUH721414AL
/0/100/17/0.0.0/1  /dev/sda1       volume         12TiB EXT4 volume
/0/100/1b                          bridge         Cannon Lake PCH PCI Express Ro
/0/100/1b/0        /dev/nvme0      storage        SPCC M.2 PCIe SSD
/0/100/1b/0/0      hwmon1          disk           NVMe disk
/0/100/1b/0/2      /dev/ng0n1      disk           NVMe disk
/0/100/1b/0/1      /dev/nvme0n1    disk           512GB NVMe disk
/0/100/1b/0/1/1                    volume         511MiB Windows FAT volume
/0/100/1b/0/1/2    /dev/nvme0n1p2  volume         476GiB EXT4 volume
/0/100/1f                          bridge         Intel Corporation
/0/100/1f/0                        system         PnP device PNP0c02
/0/100/1f/1                        system         PnP device PNP0c02
/0/100/1f/2                        communication  PnP device PNP0501
/0/100/1f/3                        system         PnP device PNP0c02
/0/100/1f/4                        generic        PnP device INT3f0d
/0/100/1f/5                        system         PnP device PNP0c02
/0/100/1f/6                        system         PnP device PNP0c02
/0/100/1f/7                        system         PnP device PNP0c02
/0/100/1f/8                        system         PnP device PNP0c02
/0/100/1f.3        card0           multimedia     Cannon Lake PCH cAVS
/0/100/1f.4                        bus            Cannon Lake PCH SMBus Controll
/0/100/1f.5                        bus            Cannon Lake PCH SPI Controller
/0/100/1f.6        eno1            network        Ethernet Connection (7) I219-V
/1                                 power          To Be Filled By O.E.M.
/2                 input0          input          Sleep Button
/3                 input1          input          Power Button
/4                 input19         input          Video Bus
/5                 input2          input          Power Button
/6                 input20         input          sof-hda-dsp Mic
/7                 input21         input          sof-hda-dsp Front Mic
/8                 input22         input          sof-hda-dsp Line Out
/9                 input23         input          sof-hda-dsp Front Headphone
/a                 input24         input          sof-hda-dsp HDMI/DP,pcm=3
/b                 input25         input          sof-hda-dsp HDMI/DP,pcm=4
/c                 input26         input          sof-hda-dsp HDMI/DP,pcm=5
KaitoKid commented 1 year ago

Just thought I'd add the Android info too

image
KaitoKid commented 1 year ago

I checked out a solution from a different thread but it seems to cause my adb to fail - any chance someone else can verify this?

remote-android/redroid-doc#207 (comment)

Confirming that the changes from @baohaven work, I had to clean the data folder from host computer. Closing this ticket out.

ayasa520 commented 1 year ago

Confirming that the changes from @baohaven work, I had to clean the data folder from host computer. Closing this ticket out.

Thanks. I don't know why the permission issue doesn't affect everyone