[Android Q&A, Help & Troubleshooting] Algesat:
Hello XDA, i have been looking for a way to root the ZTE Blade Apex2 from Orange Spain (also known as Orange Hi 4G), and i found some interesting things about how the system manages the partitions and how the OTA update is done.

Packed inside Recovery.img in /etc/recovery.fstab we can read this:

# mount point	fstype	device	[device2] [length=]

/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered wait,check

As you can see, the property BARRIER is enabled on all the mountpoints "interesting" to be accesed, so we CANT remount this mountpoints.

So i changed my mind to look for another way to try to make the trick, and unexpectedly, i found a nice glitch on the way how the official updater does the ota update process.

I decrypted the app itself from the decompyleandroid web, and got surprised.

The first thing called my attention is that the reboot on recovery to install the ota update, DONT check the signature of the file, its done by the otaupdater itself, so, we can try a replace file trick to change the target file.

Another interesting thing i found, is in the otaupdater, found this interesting piece of code:

[HIDE]package com.orange.authentication.utunneling.ttg;

import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.security.GeneralSecurityException;
import java.security.KeyStore;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import javax.net.ssl.TrustManagerFactory;
import javax.net.ssl.X509TrustManager;

public class TtgX509TrustManager
implements X509TrustManager
{

private static final String KEYSTORE = "AAAAAQAAABSR52UCnjiSFiwLKyzthZxY4sJ0ZQAABdEBAAh2ZXJpc2lnbgAAASw2S2EsAAAAAAAFWC41MDkAAAMGMIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZ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I][SIZE="3"][COLOR="Red"]private static final char PASSPHRASE[] = "orange".toCharArray();[/COLOR][/SIZE][/I][/B]
private X509TrustManager mTrustManager;

public TtgX509TrustManager(boolean flag)
throws GeneralSecurityException, IOException
{
if (flag)
{
KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType());
keystore.load(newInputStream(decodeBase64("AAAAAQAAABSR52UCnjiSFiwLKyzthZxY4sJ0ZQAABdEBAAh2ZXJpc2lnbgAAASw2S2EsAAAAAAAFWC41MDkAAAMGMIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4XDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCOFoUgRm1HP9SFIIThbbP4pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71lSk8UOg013gfqLptQ5GVj0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1HMIHnBgNVHSMEgd8wgdyhgcekgcQwgcExCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrghB92f4Hz6getxB5Z/uniTTGMA0GCSqGSIb3DQEBBQUAA4GBAGN0Lz1Tqi+X7CYRZhr+8d5BJxnSf9jBHPniOFY6H5CuOcUgdav4bC1nHynCIdcUiGNLsJsnY5H48KMBJLb7j+M9AgtvVP7UzNvWhb98lR5eYhHB2QmcQrmy1KotmDojYMyimvFu6M+O0Ro8XhnF15s1sAIjJOUFuNWI4+D6ufRfAF0Slrj4O266ePon5MC54zEX3hju")), PASSPHRASE);
TrustManagerFactory trustmanagerfactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
trustmanagerfactory.init(keystore);
javax.net.ssl.TrustManager atrustmanager[] = trustmanagerfactory.getTrustManagers();
if (atrustmanager == null || atrustmanager.length != 1 || !(atrustmanager[0] instanceof X509TrustManager))
{
throw new IllegalArgumentException("Invalid keystore");
}
mTrustManager = (X509TrustManager)atrustmanager[0];
}
}

private static ByteBuffer decodeBase64(String s)
{
ByteBuffer bytebuffer = ByteBuffer.allocate((6 * s.length()) / 8);
int i = 0;
int j = 0;
for (int k = 0; k < s.length(); k++)
{
int l = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(s.charAt(k));
if (l == -1)
{
continue;
}
i = l | i << 6;
for (j += 6; j >= 8;)
{
j -= 8;
bytebuffer.put((byte)(i >> j));
}

}

bytebuffer.flip();
return bytebuffer;
}

private static InputStream newInputStream(ByteBuffer bytebuffer)
{
return new InputStream(bytebuffer) {

final ByteBuffer val$buffer;

public int read()
throws IOException
{
this;
JVM INSTR monitorenter ;
boolean flag = buffer.hasRemaining();
if (flag) goto _L2; else goto _L1
_L1:
byte byte1 = -1;
_L4:
this;
JVM INSTR monitorexit ;
return byte1;
_L2:
byte byte0 = buffer.get();
byte1 = byte0;
if (true) goto _L4; else goto _L3
_L3:
Exception exception;
exception;
throw exception;
}

public int read(byte abyte0[], int i, int j)
throws IOException
{
this;
JVM INSTR monitorenter ;
int k;
k = Math.min(j, buffer.remaining());
buffer.get(abyte0, i, k);
this;
JVM INSTR monitorexit ;
return k;
Exception exception;
exception;
throw exception;
}

{
buffer = bytebuffer;
super();
}
};
}

public void checkClientTrusted(X509Certificate ax509certificate[], String s)
throws CertificateException
{
if (mTrustManager != null)
{
mTrustManager.checkClientTrusted(ax509certificate, s);
}
}

public void checkServerTrusted(X509Certificate ax509certificate[], String s)
throws CertificateException
{
if (mTrustManager != null)
{
mTrustManager.checkServerTrusted(ax509certificate, s);
}
}

public X509Certificate[] getAcceptedIssuers()
{
if (mTrustManager != null)
{
return mTrustManager.getAcceptedIssuers();
} else
{
return new X509Certificate[0];
}
}

}[/HIDE]

Orange is so kind to provide us not only the certificate, but the key itself :D

Im uploading the sources of the otaupdater application that Orange is using on our Blade Apex2 aka Orange Hi 4G.

P.S. This phone allows us to upgrade and downgrade all the times needed, so dont hesitate to ask, just booting on recovery menu lets me flash previous firmware versions.

Hopes any developer find some time to take a look on it, im ready to test anything.