[Android Q&A, Help & Troubleshooting] ivelischt:
Hey again there, folks

Im not a excessive internet user and i may be off the site for months in series. i cannot guarantee any form of support, but if i happen to stumble across this thread and see questions that i can answer, i will do my best to do so. i hope i can encourage others to engage in the treble community in making this solution public. treble is not my work and i have nothing to do with it. maybe there is also a way to get twrp-treble versions, but i don't know what are the technical limits of that. what i want to say: i will not be responsable for your tries to hack your phone. if i can help i will, but i'm no pro in all of this at all!!!

This guide is quite long, but take care to not make mistakes, as it is reduced to what you really *NEED* to make this root method work. ALWAYS REMEMBER TO READ THE FULL GUIDE AND COMPLETELY PREPARING YOUR WORKSTATION BEFORE DOING ANY OF THE STEPS BELOW!!!

After some idling i decided to take another look into Lenny 5 rooting and stumbled across a way to do it pretty straightforward, but first of all:

*THIS GUIDE ASSUMES BASIC KNOWLEDGE ABOUT COMPUTERS AND FLASHING SMARTPHONES. IT ALSO ASSUMES THAT YOU KNOW WHAT ADB, FASTBOOT, ROM, IMAGE, VIRTUAL MACHINE, WORKING WITH WINDOWS AND UNIX PATHS AND OPERATING SYSTEMS, ETC. MEAN AND ARE FAMILIAR WITH THEIR USAGE. I WILL NOT PUBLISH ANY FORM OF PREPARED IMAGES NOR ANYTHING TO SPEED UP THIS PROCESS, AS IT MAKES YOU AWARE OF THE RISKS IN IT. I UNDERSTAND THIS AS SOME SORT OF COMMUNITY EFFORT, WHERE I JUST PRESENT ONE WAY OF GETTING WHERE YOU WANT TO GO. IF YOU DON'T THINK YOU CAN APPLY TO ALL OF THE REQUIREMENTS IN THIS GUIDE, YOU SHOULD CONSIDER TAKING DISTANCE FROM USING THIS GUIDE FOR YOUR ROOTING BEHALF.

DISCLAIMER: By using this method to Root your Lenny 5 you will lose all WARRANTY, DATA ON THE PHONE, YOU WILL NOT BE ABLE TO RETURN TO STOCK FIRMWARE as Wiko still did not share their SFW installer and i did not dig deeper into Source compilation. And LAST BUT VERY IMPORTANT: I DO NOT TAKE ANY RESPONSIBILITY FOR ANY DAMAGE ON YOUR PHONE. WHATEVER YOU DO IS AT YOUR OWN RISK!!! READ ALL OF THE TEXT AS THERE MIGHT BE CRUCIAL INFORMATION IN IT, WHICH I DIDN'T ESPECIALLY HIGHLIGHT. Allthough i will do my best. :)

DO NOT ATTEMPT ANY FLASHING UNTIL YOU GOT YOUR WORKING FIRMWARE IMAGE AT STEP 3 (3. Flashing the new Image to the Device). EXPERIENCED USERS MAY WANT TO FLASH A UNTOUCHED TREBLE IMAGE, WHICH IS ALSO POSSIBLE. YOU SHOULD ONLY EVER REFLASH YOUR DEVICE WHEN YOU ARE ABSOULTELY SURE ABOUT WHAT YOU DO AND THE (POSSIBLE) CONSEQUENCES OF WHAT YOU DO, INCLUDING, SOFT-/HARDBRICK, PERMANENT DAMAGE, AND OTHER NASTY STUFF. YOU TAKE FULL RESPONSABILITY FOR ANY OF THE STEPS YOU DO, ESPECIALLY BEYOND STEP 3!!!

I REPEAT: YOUR LENNY5 DOES NOT NEED TO BE CONNECTED OR EVEN TOUCHED TO YOUR COMPUTER AT ALL UNTIL STEP 3 (3. Flashing the new Image to the Device)!!!*

!!!READ THE BUGS LIST AND HELP OTHERS BY REPORTING OTHER BUGS YOU'VE FOUND IN THIS THREAD. IT IS IMPORTANT THAT YOU KNOW WHAT YOU ARE DOING HERE, BEFORE COMPLETELY MESSING UP WITH YOUR PHONES STORAGE!!! SO YOU BETTER READ THE WHOLE THREAD BEFORE TRYING ANYTHING :)

There is no Root-only method i know, SO BE AWARE, you are completely rearranging your Lenny 5 Firmware, which is the reason for complete data loss. Wiko DENIES ALL RESPONSABILITY when you unlock your bootloader, according to "phhusson", which is the reason you will lose all warranty.

Known bugs until now:

- On dual SIM handys, if you tell the handy to let you choose the sim card for each call, it will hang after choosing the Sim. The call will not happen. This is a Treble issue. To work around this, select the SIM you want to use in the preferences prior to making the call.

- It seems that after installing a newer Version of the AOSP image provided by phhusson, it is impossible to downgrade to an earlier version of the ROM. This might also be a bug in my device from tampering around with it. But it causes me to be unable to flash any other version than the newest one. If i do so, my device is stuck in a bootloop and i need to reset and reflash it via adb and fastboot. Maybe others can confirm/disregard this behaviour.

- This guide does not solve updating your phone, maybe i can deliver a solution to that at a later point. Until then, you will be urged to reflash your system each time an update is deployed.

- The configuration in this guide is gapps-less, although you might choose a treble-image, that's got them installed. I did not yet manage to install the opengapps-package seperately, as theres yet no solution to custom recovery (that i'm aware of) and i did not (yet) find out how to include it via the kitchen.

-many apps will require you to have at least basic gapps installed. you could compile treble aosp with the amount of google apps you need or use the gapps-img instead.

I will try to give an exact sequence of what to do to Root your Lenny 5 device, but some experimentation afterwards might be needed to get your best experience. Note that, depending on version and "bloating" of your new Firmware, you may experience more or less strong performance breakdowns. Be careful not to overload it, your Lenny 5's hardware is... lets say... not the best out there :)

Table of Contents:

0. Before starting

1. Preparing your Workstation

1.1.1 Get your copy of lubuntu 18+ (19 is recommended, the version of lubuntu i used in the whole process was 19.04)

1.1.2 Install Oracle Virtual Box

1.1.3 Install lubuntu 18+

1.1.4 Install openjdk-8+ (8 is recommended, i use that version, too)

1.1.5 Install python

1.2.1 Install samba

1.2.2 Configure samba

1.2.3 Connect to sambashare

1.3.1 A few words about handling file permissions in Linux

1.4.1 Get your copy of SuperR's Kitchen (what we do can be done in the Free version)

1.4.2 Install SuperR's Kitchen

2. Preparing your SuperR installation for your Custom AOSP Rom

2.1 Find out which Treble image you need

2.2 Copy and Extract your Treble image

2.3 Editing the contents (Rooting, etc.) of the Treble image

2.4 Repacking the Treble image

3. Flashing the new Image to the Device

4. Final words

0. Before starting

PLEASE CAREFULLY READ THESE STEPS BEFORE STARTING THE PROCESS!! There's a few things to say before starting to do this. I will use this section to note that.

ad 1.:

- If you are using (L)ubuntu 18+ or the corresponding Debian distributions, and already have OpenJDK-8(+)(-JRE) installed, you should be able to move straight to SuperR's kitchen installation. If the kitchen complains about missing OpenJDK, try installing OpenJDK-8(+)-JDK as well.

ad 1.1.1:

- I recommend placing a "Workfolder" somewhere on your

host

system, so you have all the corresponding data in one place. This helps accelerate the process a lot. In the rest of the document, i will always assume, that you have a workfolder and use it for all the files.

ad 1.1.3:

- i use 25GB for my virtual disk as i only unpack compiled ROMS (as for this guide). if you plan to use the VM for compiling sources, you should be well above 75 to 100GB as the source trees are HUGE.

ad 1.2.1:

- We will also create a workfolder on the virtual system, but this one we will take care of in the main tutorial steps.

- To make samba work, we need to make sure that VirtualBox connects to your Network as required. To do so, on the VirtualBox top menubar, Click on Devices -> Network -> Network Settings...

In the Drop-Down "Attached to:" choose "Bridged Adapter". Make sure that the "Name" Drop-Down shows the name of your physical LAN-Adapter. This way your Virtual Machine will obtain an IP from your local network router instead of NATing with your Host Machine as router. Click Okay. You can check the Network Mode change by using

ip a

in the terminal. If you want to make sure it changed the mode, restart your

virtual

machine and reopen the terminal by using CTRL+ALT+T again.

ad 2.1. the wiki-guide on Lenny 5 says "tested on v18". i had v18 installed on my system, but at some point it denied function. i don't know if this is a downgrade-issue or something else, but if you want to stick with it and are able to install it, feel free. but be aware that it does not contain the most recent security patches. i instead stick to AOSP8.1_v32 at the time of writing this guide.

ad 3. i assume that you have already installed adb. otherwise you can get it here in the forums or the specific wiko version from here. (WikoGeek Website) Just click on the download link.

it is important that you learn, that ~/android/... means the same as \\<yourvirtualdeviceip\androshare, if you closely follow this guide, especially the network and samba configuration.

1. Preparing your workstation

To prepare your workstation you must get a Debianesque Linux Environment running, as Windows (and Mac) User, the easiest way to get to this, is to install a Virtual Machine. For the sake of freelyness (is this even a word? :P) we'll stick with Oracle's VirtualBox. This seems to be a lot of work, but it took me less than 2 hours to be completely ready to tamper with my image files. So lets begin.

Users on the correct systems ((L)ubuntu/Debian with Java 8 and python installed) can skip to 1.2.1

1.1.1 Get your copy of lubuntu 18+

Go to https://lubuntu.net/ and download lubuntu 18 if your pc hardware is 32-bit only, or lubuntu 19 for 64-bit hardware. You can do this by clicking the corresponding blue buttons on the main page or, if this doesn't apply anymore, find them in the Download section under the "previous lubuntu releases". Download the Image file and store it in your Workfolder

1.1.2 Install Oracle VirtualBox

From now on, all the steps mentioned will be either on the

host-machine

or the

virtual machine

i will clearly mark this out to avoid misunderstandings. Users already on correct systems will have to work-around these conceptions a little bit, but all in all the process should be the same for every workstation.

To install Virtual Box on the

host-machine

, get the installer for your host-system-architecture from https://www.virtualbox.org/wiki/Downloads. Follow the On-Screen-Instructions for the Installer to Setup VirtualBox for you. (I had it installed already, so i don't know the exact order of it. But maybe some of the users testing this out could come up with a quick "tutorial" for this step.) Most of the settings should be standard values.

After finishing the installation (and restarting?) you should now be able to Open the VirtualBox Manager via Desktop or Start Menu (whatever your host-OS offers, we will be sticking to Windows as host).

1.1.3 Install lubuntu 18+

In VirtualBox on your

host-machine

, create a "New" machine by clicking the button on the top left of the manager. As the name, choose how you want to memorize your virtual machine for later usage.

Use "Linux" as Type and "Ubuntu (32-bit/64-bit, choose appropriately)" as Version.

Your memory doesn't necessarily need to be gigantic. Still, i reserved 4GB of RAM for mine, and would recommend at least 2GB.

Check the radio button to "Create a virtual hard disk now" and click on "Create"

In the next dialog choose the Location for your VHD to be stored. The storage location should have around 25 GB of free space (read on section 0. for additional notes about storage space).

Choose your VHD size, i used 25GB to have some reserve, just in case. Click on Create. Choose your newly created virtual machine and select start from the top shortcut bar.

VirtualBox will come up with a new window and in it a dialog, asking for a installation medium for your new virtual machine. Click on the button to "Choose a virtual optical disk file..." and choose your previously stored Lubuntu disk image to mount as start-up disk. Click on Start, wait, then choose your Language. I recommend using english, so its easier to follow the tutorial, but this is up to you.

After that, you will be allowed to "Start Lubuntu" which we choose our virtual machine to do. The startup should be quite fast, from my experience. As soon as you get presented with your new (yet non-persistent)

virtual

desktop click on the icon to "Install Lubuntu xx.xx"

Soon the Lubuntu installer will come up, asking for the Language to be used. We'll keep American English (again, your choice) for now and click Next.

Choose your timezone and Region and click next. Choose your corresponding keyboard Layout, make sure it's the right one and click Next. In the next dialog step choose "Erase disk", leave the rest be and click Next.

On the next page, i recommend keeping it simple, as this is just a virtual machine, which ever only runs when you decide to extract and repack images. Enter "your" name, choose a login name, give the virtual machine a simple, locally-unique network name and choose a password for elevated rights operations. Remember, keep it simple, it will ease your work. I recommend to "Log in automatically without asking for the password" but i leave it to you to decide that. Click Next.

In the summary, check if you are okay with the Settings you entered, then click on Install.

Confirm the warning dialog with Install now.

Now it's all about Linux magic happening to create for you a persistent operating system on your virtual hard disk.

As the Installer asks you to Restart, do so by clicking on Done. Let the

virtual

machine reboot. When asked to do so, remove the installation medium (VirtualBox automatically does this for you, the options for this are under the main menu "Devices -> Optical Drives") and press ENTER.

After starting up, (and entering your password, if you didn't check the autologin checkbox), you are presented with your Desktop. On your keyboard press CTRL + SHIFT + T to open a terminal.

On a normal machine you should always keep your firewall on and setup. you can easily setup ufw for samba, but as we just crank around at a virtual machine (ideally behind a NAT-Router), it will be easier to just turn off the firewall alltogether by using

sudo ufw disable

in the terminal window (when asked for a password, enter your

virtual

machine user's password and press ENTER.

at UNIX-like terminals it is normal that the password you enter will not be shown. don't worry, it's typing, just hiding. it will tell you after pressing ENTER, if its the right one or not.

)

1.1.4 Install openjdk-8+

To install JDK on Lubuntu we use the built-in software installer. The following commands will update the system and install openjdk-8-jre

sudo apt update

you will be asked to enter your account password, enter password and confirm with ENTER

sudo apt dist-upgrade

confirm by typing "Y" into your keyboard and press ENTER.

This process will take a while, depending on your hardware and internet connection.

sudo apt install openjdk-8-jre

when asked, if you accept the changes to be made, type "Y" again and press ENTER.

this chain updates the

virtual

system packages and installs openjdk-8.

To check whether OpenJDK 8 JRE is installed, use the command

java --version

the output should be something like:

openjdk version "[B]1.8.0_222[/B]"

the bold part is the important, as it tells you that you have version 1.8.x, which is OpenJDK 8

OpenJDK Runtime Environment (build [B]1.8.0_222[/B]...

shows that the JRE version on your

virtual

machine is the same as the major openjdk version which is good.

1.1.5 Install python

To install python, use

sudo apt install python

this will install the required packages and configure them.

1.2.1 Install samba

To move files between your

virtual

machine and your

host

machine, the easiest way to do so is to use samba. It is easy to configure and fulfills our needs. To install samba enter

sudo apt install samba

into the terminal on your

virtual

machine and press ENTER. If asked, confirm changes with Y and ENTER.

1.2.2 Configure samba

We will configure samba in a way, so we don't need to "sudo" all of the time to use superr's kitchen, but instead use it as our autologin user. For this we will enter the following in our terminal (make sure that you didn't elevate ["sudo -i"] your terminal session, otherwise use exit, to return to unelevated session)

mkdir ~/android
chown -R [B]<yourusername>[/B]:[B]<yourusername>[/B] ~/android
cd ~/android

(the term "~/android" basically is a synonyme for "/home/<yourusername>/android; the ~ marks the path as inside your users /home/... directory)

this creates a folder called android in your

virtual

machine users home directory and changes the bash-path into it.

enter

sudo nano /etc/samba/smb.conf

to the terminal and press enter. this will open a console text editor with the samba configuration file. use PgDn or the Down-Arrow-Key to reach the end of the file and then append the following "code"

for <yourusername> use the username you selected during your

virtual

machine installation. its visible in the terminal before the ":" sign in the format

[B]username[/B]@[U]virtual[/U]machinename: ~$

[androshare]
comment = Android Share
path = /home/[B]<yourusername>[/B]/android
browseable = yes
read only = no
public = yes
create mask = 0644
directory mask = 0755
force user = [B]<yourusername>[/B]

save the changes by pressing CTRL + O on the keyboard and confirm with the ENTER key.

you can use the bash-command

testparm

and push ENTER to see your role configuration, and if you have made any mistakes in entering the configuration data.

to restart samba and make the share available enter

sudo service smbd restart

into the terminal and press ENTER.

sometimes the kitchen needs elevation for some tasks and will then write files that belong to the user "root". the easiest way to work around that is to sporadically use

and memorize for later usage

sudo chown -R [B]<yourusername>[/B]:[B]<yourusername>[/B] ~/android

this will set file ownership to your user and thus allows you and shared samba-instances (as they are forced to run as your user) to regain read-write access to the respective files.

if you struggle with this, try asking in a new post (or maybe someone asked already?), maybe i or others can help you.

now you should be able to connect to your samba share.

1.2.3 Connect to sambashare

to connect to your newly created samba share, on your

windows host

machine use WIN + R or Startmenu -> Run... and enter \\<yourdeviceip>\androshare and press ENTER.

for other ways to connect to samba shares according to your

host

operating system, i must ask you to check google. this guide is long already, anyways. but its easily possible on any system (win,macos,linux,...)

to find your device ip, on the

virtual

machine enter the following into the terminal

ip a

you need to find the address obtained by your router. you normally find it under something like

1: lo:
...
inet 127.0.0.1/8 ...
2: enp0sX
...
inet [B]192.168.x.x[/B]
...

the bold part is important, while the upper address "127.0.0.1" is your local loopback address and not what we are looking for.

on your

host

machine enter the bold ip at <yourdeviceip> like this

\\[B]192.168.x.x[/B]\androshare

and press ENTER. this should open your Sambashare

1.3 A few words about handling file permissions in Linux

Sometimes SuperR's kitchen may create or modify files that are owned by root user, which prohibits you from changing these files without elevating via sudo. This is easily corrected by again using

chown -R [B]<yourusername>[/B]:[B]<yourusername>[/B] ~/android

if there are still files you can't access you can maybe fix it with

sudo chmod a+rwx ~/android/<fileyoucantmodify>

1.4.1 Get your copy of SuperR's Kitchen

SuperR's kitchen can be obtained at The Official SuperR's Kitchen Thread. Get the latest version. I use 1.2.1.1.

Download it to your

host

machine and put it into your

host

workfolder. from there, copy it to your \\

virtual

machine\androshare directory.

1.4.2 Install SuperR's Kitchen

to install superr's kitchen, we need to unzip it. on the

virtual

host, type

cd ~/android
unzip [B]SuperRs-Kitchen_Linux-64_v1.2.1.1.zip[/B]

press ENTER and the archive should extract. if it did not extract, and instead throws an error about the package "unzip" beeing unknown to the system, use

sudo apt install unzip

to easily solve this problem, and repeat the upper step.

you can confirm that that unpacking was successfull by entering

ls -l ~/android/

into your terminal. the result should show at least a folder called "tools" and a file called "superr".

after confirming the correct extraction, use

rm [B]SuperRs-Kitchen_Linux-64_v1.2.1.1.zip[/B]

to delete the ZIP-File

replace the bold part with your SuperRs Kitchen ZIP-File Name.

Your ~/android directory should now contain 3 Elements, namely "README.md, superr" and a directory called "tools".

If everything went fine, you should now be able to start the kitchen by typing

./superr

into the terminal and pressing ENTER. if you are beeing told that you don't have permission to run this file as an executable, use

chmod ug+x ./superr

and repeat the above step. If everything worked, you should be asked to select your Language (english_srk.py). To choose it, type 1 on the keyboard.

The Kitchen will now ask you to download tools it needs to work properly. Allow it to do so by typing "Y" on the keyboard.

If everything went well, you should now be asked to enter your new Project name which identifies the folder, in which you will later store, modify and receive files. We will take care of that in the next step. This means, the Preparation process is over and you can now start using SuperR's Kitchen for your needs.

STEP 2 AND ON IN SECOND POST (CHARACTER LIMIT)