redroid-script

repository·main·Indexed 19 days ago

https://github.com/ayasa520/redroid-script

A script to inject Gapps (OpenGapps, liteGapps, MindTheGapps), Magisk, libndk (arm translation), and Widevine DRM into ReDroid images without requiring a full recompile of the Android image.

Tokens
1.2K
Snippets
8
Records
10
Agent score
14%

What's inside redroid-script

  1. Troubleshoot libndk and libhoudini issues

    main

    libndk issues

    • Currently only confirmed to work on redroid/redroid:11.0.0.
    • Enabling Zygisk may break libndk for 32-bit apps, though arm64 apps should continue to work.

    libhoudini issues

    • libhoudini is currently not supported/working on redroid.
  2. Run libndk on redroid:12.0.0_64only

    main

    If using the 12.0.0_64only image with libndk, you must include specific boot and bridge properties when starting the container.

    docker run -itd --rm --privileged \
        -v ~/data12:/data \
        -p 5555:5555 \
        redroid/redroid:12.0.0_64only-ndk \
        androidboot.use_memfd=1 \
        ro.product.cpu.abilist=x86_64,arm64-v8a \
        ro.product.cpu.abilist64=x86_64,arm64-v8a \
        ro.dalvik.vm.isa.arm64=x86_64 \
        ro.enable.native.bridge.exec=1 \
        ro.dalvik.vm.native.bridge=libndk_translation.so
  3. Full Example: Build and run a customized ReDroid container

    main

    To build an image with Gapps, Magisk, Libndk, and Widevine for Android 11.0.0, run the script with combined flags and then start the container with the required properties.

    # 1. Build the image
    python redroid.py -a 11.0.0 -gmnw
    
    # 2. Run the container
    docker run -itd --rm --privileged \
        -v ~/data:/data \
        -p 5555:5555 \
        redroid/redroid:11.0.0-gapps-ndk-magisk-widevine \
        ro.product.cpu.abilist=x86_64,arm64-v8a,x86,armeabi-v7a,armeabi \
        ro.product.cpu.abilist64=x86_64,arm64-v8a \
        ro.product.cpu.abilist32=x86,armeabi-v7a,armeabi \
        ro.dalvik.vm.isa.arm=x86 \
        ro.dalvik.vm.isa.arm64=x86_64 \
        ro.enable.native.bridge.exec=1 \
        ro.vendor.enable.native.bridge.exec=1 \
        ro.vendor.enable.native.bridge.exec64=1 \
        ro.dalvik.vm.native.bridge=libndk_translation.so \
        ro.ndk_translation.version=0.2.3
  4. Configure redroid-script CLI options

    main

    The redroid.py script allows you to customize the container type, Android version, and various Android enhancements (Gapps, Magisk, etc.) via command-line flags.

    # Reference of available flags:
    # Container type
    -c {docker,podman}, --container {docker,podman}
    
    # Android version
    -a, --android-version {8.1.0, 9.0.0, 10.0.0, 11.0.0, 12.0.0, 12.0.0_64only, 13.0.0}
    
    # Enhancements
    -g: Add OpenGapps
    -lg: Add liteGapps
    -mtg: Add MindTheGapps
    -n: Add libndk arm translation
    -m: Add Magisk
    -w: Add widevine DRM(L3)