05-04-2016, 09:46 PM
(This post was last modified: 05-05-2016, 05:53 AM by hyperlogos.)
Xposed Framework lets you fiddle with Android and change how things work by installing modules. It requires that you install a framework. Normally you do this with CWM or TWRP recovery but you can also do it by hand. Doing it by hand requires a Linux machine. You could do it on your Pine running Linux, on a PC running Linux, with a virtual machine running Linux... but you're gonna need Linux. You might actually be able to just do it with Android, but I haven't tried.
This is how I just installed Xposed on my Pine running Android 20160428.
Step 0, READ ENTIRE POST BEFORE DOING ANYTHING PLEASE THANK YOU
Step 1, visit XDA forum thread http://forum.xda-developers.com/showthre...?t=3034811
Step 2, download XposedInstaller_3.0-alpha4.apk from the thread and also for Android 5.1.1 on pine64, the latest sdk from http://dl-xda.xposed.info/framework/sdk22/arm64/ (currently xposed-v84-sdk22-arm64.zip)
Step 3, put your microsd card into a Linux machine. Windows can't read ext4 so you need Linux. If you don't have a linux machine, use a linux livecd with vmware player and connect the card reader to the virtual machine. Doing this is outside the scope of this howto, but I am actually going to use a debian livecd for my examples. The short, SHORT form is that you download the livecd ISO and vmware player, install vmware player, then create a new virtual machine using the iso. You don't need to install, just run live.
Step 4, get a root shell. e.g. sudo bash
Step 5, mount the partitions if this hasn't happened already. you can either just try to mount every partition on the microsd card until you find some ext4 parts, or use this handy-dandy code snip to locate them. First do something like "dmesg|grep sd" to find your devices, it will look like this
[ 1690.123504] sdb: sdb1 sdb2 sdb3 < sdb5 sdb6 sdb7 sdb8 sdb9 sdb10 sdb11 sdb12 sdb13 >
[ 1690.158498] sd 4:0:0:0: [sdb] Attached SCSI removable disk
OK, so you want to look at /dev/sdb, so now do this:
( for i in /dev/sdb*; do echo -n "$i " ; head $i | file - ; done ) | grep ext
That will show you which partitions are formatted ext-something. now mount 'em.
for i in 1 10 13 7; do mkdir /mnt/sdb$i; mount /dev/sdb$i /mnt/sdb$i; done
Now you can see their contents. To figure out which is /system:
ls /mnt/sdb*/build.prop
which here returns /mnt/sdb7/build.prop, so sdb7 is /system. To simplify your life, make a symlink in the root
ln -sf /mnt/sdb7 /system
At this point you need the unpacked zip file for the framework. Just unzip it anywhere.
unzip xposed-v84-sdk22-arm64.zip
This will give you a META-INF and a system directory. Deep in the META-INF directory is a script, we will need to carve it up before we can use it. So we will make a copy.
cp META-INF/com/google/android/flash-script.sh .
Now we have to edit the script and make a change. I use vi, you might use nano, whatever. edit flash-script.sh
nano flash-script.sh
and remove these lines about halfway through:
echo "- Mounting /system and /vendor read-write"
mount /system >/dev/null 2>&1
mount /vendor >/dev/null 2>&1
mount -o remount,rw /system
mount -o remount,rw /vendor >/dev/null 2>&1
and these lines near the bottom:
if [ "$API" -ge "22" ]; then
find /system /vendor -type f -name '*.odex.gz' 2>/dev/null | while read f; do mv "$f" "$f.xposed"; done
fi
Now you can just run the script to install!
sh flash-script.sh
Here's what it spit out for me
******************************
Xposed framework installer zip
******************************
- Checking environment
Xposed version: 84
- Placing files
- Done
Now umount all the /dev/sdb stuff that you mounted:
for i in /mnt/sdb*; do umount $i; done
And you can take out the sd card, put it back in your pine, and reboot.
WHAT CAN GO WRONG
You could forget any step
You could get the wrong platform file
What happens next?
When you boot, Android will have to optimize all your apps all over again. It will do this automatically. There is no need to clear the cache. Android is smart enough to figure out that the old stuff in the cache is worthless.
The next thing you do is install the Xposed Installer APK. This is what actually lets you do stuff with the Xposed Framework. You can use the installer to get some modules. Then you have to reboot before you can use them.
My favorite modules are App Settings and GravityBox. iFont is also nifty. After downloading and installing modules under download, you must also activate them under modules.
I am using Reboot menu [no ads] by KitKelly for rebooting... good luck finding it. There's lots of similar apps though. The Xposed Installer should also offer to reboot for you.
If You Are Smart
You will do a test on a fresh install on a spare SD card before messing with an install you care about.
What You Should Know
Stuff may not work. I am having pretty mixed results. Still encouraged by getting it to install.
This is how I just installed Xposed on my Pine running Android 20160428.
Step 0, READ ENTIRE POST BEFORE DOING ANYTHING PLEASE THANK YOU
Step 1, visit XDA forum thread http://forum.xda-developers.com/showthre...?t=3034811
Step 2, download XposedInstaller_3.0-alpha4.apk from the thread and also for Android 5.1.1 on pine64, the latest sdk from http://dl-xda.xposed.info/framework/sdk22/arm64/ (currently xposed-v84-sdk22-arm64.zip)
Step 3, put your microsd card into a Linux machine. Windows can't read ext4 so you need Linux. If you don't have a linux machine, use a linux livecd with vmware player and connect the card reader to the virtual machine. Doing this is outside the scope of this howto, but I am actually going to use a debian livecd for my examples. The short, SHORT form is that you download the livecd ISO and vmware player, install vmware player, then create a new virtual machine using the iso. You don't need to install, just run live.
Step 4, get a root shell. e.g. sudo bash
Step 5, mount the partitions if this hasn't happened already. you can either just try to mount every partition on the microsd card until you find some ext4 parts, or use this handy-dandy code snip to locate them. First do something like "dmesg|grep sd" to find your devices, it will look like this
[ 1690.123504] sdb: sdb1 sdb2 sdb3 < sdb5 sdb6 sdb7 sdb8 sdb9 sdb10 sdb11 sdb12 sdb13 >
[ 1690.158498] sd 4:0:0:0: [sdb] Attached SCSI removable disk
OK, so you want to look at /dev/sdb, so now do this:
( for i in /dev/sdb*; do echo -n "$i " ; head $i | file - ; done ) | grep ext
That will show you which partitions are formatted ext-something. now mount 'em.
for i in 1 10 13 7; do mkdir /mnt/sdb$i; mount /dev/sdb$i /mnt/sdb$i; done
Now you can see their contents. To figure out which is /system:
ls /mnt/sdb*/build.prop
which here returns /mnt/sdb7/build.prop, so sdb7 is /system. To simplify your life, make a symlink in the root
ln -sf /mnt/sdb7 /system
At this point you need the unpacked zip file for the framework. Just unzip it anywhere.
unzip xposed-v84-sdk22-arm64.zip
This will give you a META-INF and a system directory. Deep in the META-INF directory is a script, we will need to carve it up before we can use it. So we will make a copy.
cp META-INF/com/google/android/flash-script.sh .
Now we have to edit the script and make a change. I use vi, you might use nano, whatever. edit flash-script.sh
nano flash-script.sh
and remove these lines about halfway through:
echo "- Mounting /system and /vendor read-write"
mount /system >/dev/null 2>&1
mount /vendor >/dev/null 2>&1
mount -o remount,rw /system
mount -o remount,rw /vendor >/dev/null 2>&1
and these lines near the bottom:
if [ "$API" -ge "22" ]; then
find /system /vendor -type f -name '*.odex.gz' 2>/dev/null | while read f; do mv "$f" "$f.xposed"; done
fi
Now you can just run the script to install!
sh flash-script.sh
Here's what it spit out for me
******************************
Xposed framework installer zip
******************************
- Checking environment
Xposed version: 84
- Placing files
- Done
Now umount all the /dev/sdb stuff that you mounted:
for i in /mnt/sdb*; do umount $i; done
And you can take out the sd card, put it back in your pine, and reboot.
WHAT CAN GO WRONG
You could forget any step
You could get the wrong platform file
What happens next?
When you boot, Android will have to optimize all your apps all over again. It will do this automatically. There is no need to clear the cache. Android is smart enough to figure out that the old stuff in the cache is worthless.
The next thing you do is install the Xposed Installer APK. This is what actually lets you do stuff with the Xposed Framework. You can use the installer to get some modules. Then you have to reboot before you can use them.
My favorite modules are App Settings and GravityBox. iFont is also nifty. After downloading and installing modules under download, you must also activate them under modules.
I am using Reboot menu [no ads] by KitKelly for rebooting... good luck finding it. There's lots of similar apps though. The Xposed Installer should also offer to reboot for you.
If You Are Smart
You will do a test on a fresh install on a spare SD card before messing with an install you care about.
What You Should Know
Stuff may not work. I am having pretty mixed results. Still encouraged by getting it to install.