Clone and R3xS Instructions - RetroGFX/UnofficialOS GitHub Wiki

Instructions For GameConsole and Clone Units

Identifying Real vs Clone R36S Devices

There is a few different methods to figure out if your unit is real or a clone. This is important due to the fact that the overlays used for UnofficialOS are different. The first is by comparing your unit to the ones listed in the R36S Handheld Wiki. You are looking at things like single vs dual ram chips, specific board revisions, stock operating system, etc. Information on the real R36S units can be found here, and the Clone R36S units here.

The second way, and the way used by UnofficialOS to identify devices for the multiboot image, is by dumping adc values. This way is fool-proof, as clones identify in one range of values, and the real R36S units in another range. Here's how you get those values:

  1. SSH into your device.
  2. Run the following command to get a dump of the adc values.
for RAW in $(find /sys/devices/platform/ -name "in_*_raw" | sort); do echo ${RAW}; cat ${RAW}; done
  1. This will give you an output that looks similar to this.
/sys/devices/platform/ff288000.saradc/iio:device0/in_voltage0_raw
517
/sys/devices/platform/ff288000.saradc/iio:device0/in_voltage1_raw
498
/sys/devices/platform/ff288000.saradc/iio:device0/in_voltage2_raw
1020
/sys/devices/platform/ff288000.saradc/iio:device0/in_voltage3_raw
453
/sys/devices/platform/ff288000.saradc/iio:device0/in_voltage4_raw
457
/sys/devices/platform/ff288000.saradc/iio:device0/in_voltage5_raw
454
  1. You want to look at the output for voltage0.
  2. If voltage0 is within the range of 140-190 the device is REAL, follow these instructions.
  3. If voltage0 is within the range of 490-540 the device is a CLONE, follow these instructions.

GameConsole R33S/R35S/R36S

For R33S/R35S/R36S, R36 Plus and R46H/R45H/R40XX/R40XX Pro Max devices, there will be overlays in the mipi-panel-overlays repo. These units are pretty straight forward. NOTE: If your joysticks do not work once the device starts, the toggle must be flipped in the ES settings for R36S.

  1. Create a folder on the root of your UnofficialOS SD card named overlays.
  2. Download the right overlay for your device, and rename it to mipi-panel.dtbo, and place it in overlays.
  3. Boot your device.
  4. After install is complete, press START and go to the SYSTEM SETTINGS section. Under HARDWARE/DEVICE, flip the switch that says Device is R35S/R36S. (Without this option, the R33S .dtb will be loaded by default, and the sticks will have issues.) UnofficialOS will reboot with the right .dtb loaded from that point on, and OTA updates will work correctly.

Kinhank K36/Xifan MyMini, XF35H, XF40H/R36 Ultra/R36T(Max)/Clone Devices

For these devices an edit of the boot.ini file is required before first boot. Please be aware that the boot.ini WILL GET RESET on update if you do not flip the device switch for the unit you are using. Also, these units have a tool that will create the needed overlay for your device. This overlay will handle the panel, audio, and analog sticks. NOTE: IF YOUR DEVICE IS A MY MINI you can download the needed mipi-panel.dtbo here, or select the My Mini joystick option on the webtool. IF YOUR DEVICE IS AN A10 MINI you can download the needed mipi-panel.dtbo here. IF YOUR DEVICE IS AN R36T/Max you can download the needed mipi-panel.dtbo here. Units with LED sticks MUST set the proper device in the boot.ini for the LED options to be available in EmulationStation.

Right now the following units have specific DTBs (more will be added):

  1. Kinhank K36
  2. Xifan MyMini
  3. Xifan XF35H / XF40H
  4. Game Console R36 Ultra
  5. AISLPC R36T / R36T Max
  6. All other units use the clone DTB

Editing the boot.ini

  1. Flash the image like normal to your sd card.
  2. Before removing the sd, go into the UNOFFICIALOS partition, and open the boot.ini with a text editor.
  3. Find this section in the boot.ini:
if test ${hwrev} = 'g350'; then
  load mmc 1:1 ${dtb_loadaddr} rk3326-batlexp-g350.dtb
#  load mmc 1:1 ${dtb_loadaddr} rk3326-clone.dtb
#  load mmc 1:1 ${dtb_loadaddr} rk3326-kinhank-k36.dtb
#  load mmc 1:1 ${dtb_loadaddr} rk3326-xifan-mymini.dtb
#  load mmc 1:1 ${dtb_loadaddr} rk3326-xifan-xf35-40h.dtb
#  load mmc 1:1 ${dtb_loadaddr} rk3326-gameconsole-r36-ultra.dtb
#  load mmc 1:1 ${dtb_loadaddr} rk3326-aislpc-r36t-max.dtb
elif test ${hwrev} = 'r33s'; then
  load mmc 1:1 ${dtb_loadaddr} rk3326-gameconsole-r33s.dtb
elif test ${hwrev} = 'xumini'; then
  load mmc 1:1 ${dtb_loadaddr} rk3326-magicx-xu-mini-m.dtb 
fi
  1. For example, to use the Xifan MyMini, Comment out the rk3326-batlexp-g350.dtb line with a # at the beginning of the line, and uncomment the rk3326-xifan-mymini.dtb by removing the # so it looks like this:
if test ${hwrev} = 'g350'; then
#  load mmc 1:1 ${dtb_loadaddr} rk3326-batlexp-g350.dtb
#  load mmc 1:1 ${dtb_loadaddr} rk3326-clone.dtb
#  load mmc 1:1 ${dtb_loadaddr} rk3326-kinhank-k36.dtb
  load mmc 1:1 ${dtb_loadaddr} rk3326-xifan-mymini.dtb
#  load mmc 1:1 ${dtb_loadaddr} rk3326-xifan-xf35-40h.dtb
#  load mmc 1:1 ${dtb_loadaddr} rk3326-gameconsole-r36-ultra.dtb
#  load mmc 1:1 ${dtb_loadaddr} rk3326-aislpc-r36t-max.dtb
elif test ${hwrev} = 'r33s'; then
  load mmc 1:1 ${dtb_loadaddr} rk3326-gameconsole-r33s.dtb
elif test ${hwrev} = 'xumini'; then
  load mmc 1:1 ${dtb_loadaddr} rk3326-magicx-xu-mini-m.dtb 
fi
  1. Proceed to the overlay setup.

Overlay Setup

  1. Go to the UnofficialOS webtool and upload your stock dtb. That's the dtb that came with the original OS when you first bought the unit. It'll be on your stock SD card, and you can plug that into your computer.
  2. Use the checkboxes for audio, sticks and rotation if needed. You will have to test with a normal overlay first to know if these steps are needed or not (MyMini overlay can be found here, R36T/Max overlays can be found here, and the A10-Mini overlays can be found here).
  3. The webtool takes in that stock dtb file and will generate an overlay.
  4. On your SD card, go to the UNOFFICIALOS partition and create a folder called overlays and place the mipi-panel.dtbo in the overlays folder.
  5. Boot your device.
  6. After install is complete, press START and go to the SYSTEM SETTINGS section. Under HARDWARE/DEVICE, flip the switch for the device you have set in the boot.ini. UnofficialOS will reboot with the right .dtb loaded from that point, and OTA updates will work correctly. Only 1 switch should be flipped at a time.

Clone Devices With Audio Issues

There is a few devices that have issues with the audio when using the rk3326-clone.dtb, whether they use the invert headphone detection checkbox on the webtool or not. This is due to some boards having reversed polarity that conflicts with the device quirks on the unit. The way to know for sure if your unit has this issue is by:

  1. Trying the webtool overlay twice, with the invert headphone detection checkbox checked and unchecked.
  2. Speakers only work with the headphones plugged in, or after plugging them in and unplugging them.

The solution to this is described below. I suggest having the 2 inverted and uninverted overlays ready to try once these steps are completed.

  1. With the rk3326-clone.dtb selected in the boot.ini, try both overlays.
  2. If audio works, press START and go to the SYSTEM SETTINGS section. Under HARDWARE/DEVICE, flip the switch that says DEVICE IS CLONE.
  3. If there's still no sound after testing both overlays, flip the switch that says DEVICE IS CLONE V2, and try both overlays again. One will work.

Known Affected Units

  1. Batman clones (T16Max, S600, H50Pro)
  2. R36S clone
  3. R36 Ultra (New added support with seperate dtb should fix this, this is only required if using the clone dtb)

There may be more, but these are the known devices so far.