Skip to content

Instantly share code, notes, and snippets.

@r0kk3rz
Last active September 9, 2017 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r0kk3rz/0c13e14dfd6a4de117191d7248ed0ce9 to your computer and use it in GitHub Desktop.
Save r0kk3rz/0c13e14dfd6a4de117191d7248ed0ce9 to your computer and use it in GitHub Desktop.
Way of the Mal for Sony Open Devices
Before we start you need to have a working AOSP image for 6.0.1_r80 m-mr1, flash it to the device and make sure it boots
Follow the Sailfish OS HADK until section 5 to get your initial environment set up
In Section 5.1 we want to use the aosp 6 branch so do this instead:
repo init -u git://github.com/mer-hybris/android.git -b hybris-sony-aosp-6.0.1_r80-20170902
Sort out a local manifest with the platform and device repo for your device
eg. local_manifests/shinano.xml below.
mkdir $ANDROID_ROOT/.repo/local_manifests
Do HADK section 5.3 and sort out the mountpoints, if you had some from a cm12 build they will need to change.
# TODO: link to scorpion mountpoints example
Install unzip:
sudo apt-get install unzip
Download the AOSP Marshmallow (Android 6.0.1) Binaries for your device from:
https://developer.sonymobile.com/downloads/tool/
Unzip its contents in the $ANDROID_ROOT directory like this:
unzip ~/Downloads/SW_binaries_for_Xperia_AOSP_*.zip
source build/envsetup.sh
export USE_CCACHE=1
lunch
*choose your device from the menu, it will be its model name*
make -j4 hybris-hal
For 32bit devices there is a small bug in the kernel see this commit for details:
#TODO: push kernel syscalls fix
Continue on with the HADK from 5.4.1 onwards, everything else is as per usual.
When it comes to build the middleware, you need to build the minimalhooks branch of libhybris.
Build droidmedia and audioflinger glue as per hadk and faq.
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote fetch="https://github.com/" name="github"/>
<remove-project name="droid-hal-f5121" />
<project path="device/sony/shinano" name="device-sony-shinano" remote="sony" revision="m-mr1" />
<project path="device/sony/scorpion" name="device-sony-scorpion" remote="sony" revision="m-mr1" />
<project path="device/sony/scorpion_windy" name="device-sony-scorpion_windy" remote="sony" revision="m-mr1" />
<project path="external/droidmedia" name="sailfishos/droidmedia" remote="github" revision="master" />
<project path="external/audioflingerglue" name="mer-hybris/audioflingerglue" remote="github" revision="master" />
</manifest>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment