FORUMS
Remove All Ads from XDA

[DEVS-ONLY] SuperSU developer discussion

11,130 posts
Thanks Meter: 84,981
 
By Chainfire, XDA Ad-Free Senior Moderator / Senior Recognized Developer - Where is my shirt? on 5th September 2014, 03:57 PM
Post Reply Email Thread
20th April 2017, 03:01 PM |#91  
Junior Member
Thanks Meter: 1
 
More
Hey, I was giving a workshop on Xposed some time ago for which I needed some cheapo phones, found some 90 euro phone called Wiko Freddy. Interwebz told me it was rootable, so I bought a couple of them. Turns out, they weren't. No TWRP for my device either. After a lot of researching I managed to install Xposed without root access on the device by patching the recovery image. I added my own generated key to the image so I could sign my own OTA. That worked out for me, I just had to make minor modifications to the flash-script of Xposed. I also want to root the phone, just for the sake of it. I know for one thing that mounting /system as rw is very unusual on this phone. Is there any procedure for porting superSU to a phone?
The Following User Says Thank You to voider1 For This Useful Post: [ View ] Gift voider1 Ad-Free
 
 
4th June 2017, 03:51 AM |#92  
Junior Member
Flag Melbourne
Thanks Meter: 5
 
More
Hi Chainfire et al,

Trying to embed to get root via instructions at http://su.chainfire.eu/#embed onto a Pumpkin 27-AQTU72 car head unit.
Their downloaded update rar consists of:
mcuupdate
update.script
update.zip

I unzipped update.zip, put supersu/supersu.zip in with other files (see attached) and re zipped.
Updated update.script as per code in 6.2 at http://su.chainfire.eu/#embed

Attempted update. Errors as attached.

Any thoughts?

Many thanks in advance.

Henry
Attached Thumbnails
Click image for larger version

Name:	UpdateError.JPG
Views:	140
Size:	115.5 KB
ID:	4170647   Click image for larger version

Name:	zip-contents-with-supersu-added.JPG
Views:	144
Size:	50.5 KB
ID:	4170648  
6th June 2017, 10:02 AM |#93  
Member
Thanks Meter: 8
 
More
I found very old bug in update-binary script. This bug is about mips determining and appearing in Android older then API 17.

Here is the patch solving this bug:

Code:
--- update-binary.~1~	2008-02-29 03:33:46.000000000 +0700
+++ update-binary	2017-06-06 13:48:59.515801184 +0700
@@ -956,13 +956,13 @@
 
 if [ "$ABI" = "x86" ]; then ARCH=x86; fi;
 if [ "$ABI2" = "x86" ]; then ARCH=x86; fi;
+if [ "$ABI" = "mip" ]; then ARCH=mips; fi;
+if [ "$ABILONG" = "mips" ]; then ARCH=mips; fi;
 if [ "$API" -eq "$API" ]; then
   if [ "$API" -ge "17" ]; then
     PIE=.pie
     if [ "$ARCH" = "x86" ]; then SU=su.pie; fi;
     if [ "$ABILONG" = "armeabi-v7a" ]; then ARCH=armv7; fi;
-    if [ "$ABI" = "mip" ]; then ARCH=mips; fi;
-    if [ "$ABILONG" = "mips" ]; then ARCH=mips; fi;
   fi
   if [ "$API" -ge "18" ]; then
     SUMOD=0755
6th June 2017, 10:14 AM |#94  
Member
Thanks Meter: 8
 
More
[Linux] Universal script to embedding root in system.img image of Android up to 6.0
I modified update-binary script from SuperSU v2.82 update ZIP to work on Linux. This script mount system.img image and placing all needed files from SuperSU update ZIP. This script can work on system.img of Android version up to 6.0. I tested it on system.img of Android versions 4.0.3, 4.4.2, 5.1. I am run it on Ubuntu 14.04, other Linux versions should be OK. All you need is usual Linux tools and unzip.

Also this script deleting /system/recovery-from-boot.p - this file restoring original recovery in some firmwares.

Quote:

Usage:
makeroot.sh system.img UpdateSuperSU.zip

- system.img Should be in ext4 file system format.
system.img may be in another file system format that linux "mount" cmd can mount

- UpdateSuperSU.zip - TWRP / CWM / FlashFire installable SuperSU ZIP

- MUST be run by root user, f.e:
sudo makeroot.sh system.img UpdateSuperSU.zip

Look at makeroot-0.1.sh.zip in attachment.
Attached Files
File Type: zip makeroot-0.1.sh.zip - [Click for QR Code] (4.4 KB, 10 views)
6th June 2017, 07:55 PM |#95  
Chainfire's Avatar
OP Senior Moderator / Senior Recognized Developer - Where is my shirt?
Thanks Meter: 84,981
 
Donate to Me
More
Quote:
Originally Posted by MATPOC

I found very old bug in update-binary script. This bug is about mips determining and appearing in Android older then API 17.

Here is the patch solving this bug:

But... MIPS is only officially supported since API 17, so the code is as it should be ?
The Following User Says Thank You to Chainfire For This Useful Post: [ View ]
7th June 2017, 03:31 AM |#96  
Member
Thanks Meter: 8
 
More
Quote:
Originally Posted by Chainfire

But... MIPS is only officially supported since API 17, so the code is as it should be ?

Friend of mine has Ainol NOVO7 Basic Tablet. It's mips, the first Android version for it was 3.2, the last firmware is Android 4.0.3.
17th June 2017, 06:47 PM |#97  
Member
Thanks Meter: 8
 
More
Some firmwares contains another technique to restore recovery - the file /system/recovery-from-boot.p. Please modify your update-binary script to remove this file. Some like this:

Code:
if [ -f "/system/recovery-from-boot.p" ]; then
  rm -f /system/recovery-from-boot.p
fi
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes