[GUIDE] Modfying CF-AutoRoot kit to enable ADB debugging on phone with broken screen - Android Q&A, Help & Troubleshooting

After breaking the screen on my phone I spent the following months reading about how to extract data. It all comes down to enabling ADB debugging and having your computer authorised. Usually this can be done from recovery and you're good to go. However, if you have a broken phone that is fully stock, with ADB disabled and with no custom recovery support then your data is as good as bricked. Such was the case with me when I broke my rare Samsung G360G. However, my phone was supported by CF-AutoRoot by Chainfire, and this gave just the opening I needed to go full wide.
Prerequisites:
Your phone needs to be supported by CF-AutoRoot. Check on there and the new site linked for support of your phone. If it's not there then you will need to download a stock ROM and use the CF-AutoRoot site tool to generate a root package for you. But that is outside the scope of this tutorial. This procedure has only been tested on Samsung. Your phone should have a minimal working charge.
https://autoroot.chainfire.eu/
This tutorial is also based on Linux. It should be translatable to Windows and Cygwin. But for simplicity I'll just use the method I used on Linux. However, if using Odin like I do, you'll need Windows to finish it off.
Aside from this it assumes files in are named in a particular format with a certain file format.
Tutorial:
1. First you need to download a CF-AutoRoot package for your phone. Won't get far without it.
2. Open up a terminal in Linux. We need to download some depends so enter this command:
Code:
sudo apt-get install android-tools-adb android-tools-fsutils
3. We need to extract the archive contents out. Create a suitable folder inside your home folder to build the patch in and cd to it. This uses an example file named CF-AutoRoot-example.tar.md5. Substitute with your actual archive name. Like so.
Code:
mkdir cfar-adb
cd cfar-adb
tar -xf CF-AutoRoot-example.tar.md5
4. There should be a recovery.img and a cache.img.ext4 extracted out. We just need to modify the cache.img.ext4. But first we need to convert it to a workable format. From a sparse to a raw image.
Code:
simg2img cache.img.ext4 cache.raw.ext4
5. We need to mount the cache image
Code:
mkdir cache
sudo mount -t ext4 -o loop cache.raw.ext4 cache
6. The big one. Doing the mod. So now we need to modify the cfar cleanup script. We need to insert commands on the end to enable ADB and add the key to authorise the computer. The following will do just that in this fashion.
a)
You will need to load in the cfar-cleanup.sh file inside the cfroot folder from the cache point mounted. Locate the end and paste the following lines before the reboot and exit commands on the end. Don't save yet.
Code:
echo -n 'mtp,adb' > /data/property/persist.sys.usb.config
mount -o remount,rw /system
echo '' >> /system/build.prop
echo 'persist.service.adb.enable=1' >> /system/build.prop
echo 'persist.service.debuggable=1' >> /system/build.prop
echo 'persist.sys.usb.config=mtp,adb' >> /system/build.prop
chmod 644 /system/build.prop
mount -o remount,ro /system
mkdir -p /data/misc/adb/
echo '' >/data/misc/adb/adb_keys
chmod 640 /data/misc/adb/adb_keys
b)
Load up the ~/.android/adbkey.pub file in a text editor and copy the entire contents in the clipboard. Now back at the script locate that last echo command you pasted into it and set the cursor just after the first single quotation mark. Now paste the clipboard in! This will add your key in. Make sure it's only between the single quotes with no extra characters or line feeds. The lines will naturally split if they don't fit on screen. Otherwise it should be good to go.
c)
Okay now save the file. The above will enable ADB and authorise your computer on the main Android system after the rooting script has done it's work. Before it reboots normally.
7. We need to unmount the cache so it's ready for use.
Code:
sudo umount cache
8. We need to convert the raw image back into a sparse image.
Code:
img2simg cache.raw.ext4 cache.img.ext4
9. Okay were almost done. Now we repack the files into a new Odin archive. Choose a suitable new filename. Like I have done here with my example file.
Code:
tar -H ustar -c recovery.img cache.img.ext4 > cfar-adb.tar
md5sum -t cfar-adb.tar >> cfar-adb.tar
mv cfar-adb.tar cfar-adb.tar.md5
10. The final step! So now the new package is ready for use. We just to use Odin and flash it to the phone. Save the package to a USB stick if needed.
a)
Reboot into Windows. Or you can run it virtualised from Linux. But I prefer to use the real things when dealing with things of a delicate manner and working blindly. Unplug your phone from the computer if connected. Now load up Odin in admin mode.
b)
Just to make sure pull the battery from your phone. Give it a few seconds then put the battery back in and click the back cover on. Now hold down volume down, then home key, and finally hold down power. Wait for the vibration. Then release power after a few moments. Finally release the other keys. At this point press volume up briefly. You should have just put your phone blindly into download mode. I've done this numerous times.
c)
Plug your phone into your computer. After a moment you should see Odin respond with a device added. Usually the phone can vibrate also when it connects giving more positive signs. If nothing happens disconnect the phone from the computer and retry the last step again to put it into download mode. Took me a few tries before I could do it blindly. It helps if you have a working Samsung to test it out on so you can see what happens before you can only feel it.
d)
Now in Odin press the PDA (or AP) button. Select the cfar-adb.tar.md5 package you made up. If the package is fine it will pass the md5 test. Now press the Start button and watch it go! If all goes well it will upload recovery, cache, give you a pass and then the phone will reset. At this point it will be in the process of being rooted, enable ADB, then reboot. If something goes wrong then you may need to go back and check all the patched files. Then rebuild the package again. But be careful, if the ADB has been enabled in the build.prop file one time, you don't want to add it in again and create duplicates, no matter how keen. Once I had it added the only other major problem I encountered was using the correct adb key.
e)
Hopefully now your phone is rooted, has ADB enabled and is booting up normally. Give it a few minutes. You can even see signs of life in Odin with adds and removes on USB activity. Your phone should also vibrate at times. And making noises is also a good sign.
1.1. So I just cranked it up to eleven. Open a Linux terminal again and give it a test. With your phone plugged in.
Code:
adb devices
If all goes well then adb will find your phone as well as list your device as authorised. You can now open shell to the inside. USB debugging is now enabled.
Conclusion:
Well I hope this helps those who have their app data stuck under a broken screen. As long as it was to type in this tutorial It still took me less time to write this tutorial than to learn all that was needed and apply it to my phone. This ends here but for you it may be only the beginning. A next step would be a screen mirroring app which I think is a must have for visual feedback. And USB debugging opens up these possibilities. One thing to be careful of, in a related issue, is that just because you can use adb and the phone is also rooted doesn't mean it will all work at once. If you are tempted to "su" it in an adb shell and get right in there then SuperSU will ask for permission on a blank screen. As will also happen if you try to do an adb backup, it will ask for confirmation on screen. So just expect to work with USB debugging blindly unless you already have a screen mirroring app installed. If you don't have one installed that is your next step.
And on that note. Good luck!

Hi there,
Your tutorial on how to achieve this on Linux looks real neat and complete. Unfortunately, i'm on Windows and i would like to know if you would be able to rewrite this totorial for a Windows user?
I've been reading online for about a week and i've never saw such a complete guide to help newbies to ADB to be able to retrieve data on their locked broken devices.
Cheers!

Hi RaiM1986 and thanks for your kind words. Yes I wrote it so it would be useful to newbies and seasoned hackers alike. Plus I needed to write down some instructions in case I need to do it all again.
Looking at the tutorial it is a bit Linux-centric. I don't know how well it would translate to Windows. Though there would be Windows version of the tools used the main problem would be mounting the filesystem image and making modifications without corrupting it. Because of things like Linux file modes.
However the following tools may be of assistance.
ADB tools:
https://wiki.lineageos.org/adb_fastboot_guide.html
Cygwin provides Linux tools if needed:
http://www.cygwin.com
simg2img:
https://github.com/KinglyWayne/simg2img_win
For mounting the ext4 image:
https://www.osforensics.com/tools/mount-disk-images.html
img2simg and other tools:
https://forum.xda-developers.com/showpost.php?p=49235638&postcount=5
For the ADB key it should be in %USERPOFILE%\.android and other spots I've read of are C:\Windows\System32\config\systemprofile\.android
In case any of the above fails, since I haven't tested them, the easiest alternative might be to just download a Linux live CD, boot it and do the steps inside. Of course any work is lost when you shut it down. You could also boot it in VM program running on Windows.

Amazing guide, Hypexed! The amount of work you put in to figure this out is incredible.
However, I'm stuck on step 6c, where I'm supposed to save the cfar-cleanup.sh file. It's not letting me save it at all, either within the mount point or to another location, it says that I don't have permissions to save the file. I tried the 'sudo chown' to change ownership to try to edit the permissions, but that didn't work either with it still saying I can't have access to the file. Any ideas? There is probably a simple solution, but this is my first time really using Linux so I'm a noob. I'm using Ubuntu 18.04.1LTS installed, not live, dual-booted with Windows, if that's important to know

SpinningQyarks said:
Amazing guide, Hypexed! The amount of work you put in to figure this out is incredible.
Click to expand...
Click to collapse
Thank you for noticing. It really was the culmination of months of hacking and cracking. Not to mention research. I decided I had to write a guide so I could document what I did in case I needed to do it again. And of course if it helped anyone else.
However, I'm stuck on step 6c, where I'm supposed to save the cfar-cleanup.sh file. It's not letting me save it at all, either within the mount point or to another location, it says that I don't have permissions to save the file. I tried the 'sudo chown' to change ownership to try to edit the permissions, but that didn't work either with it still saying I can't have access to the file. Any ideas? There is probably a simple solution, but this is my first time really using Linux so I'm a noob. I'm using Ubuntu 18.04.1LTS installed, not live, dual-booted with Windows, if that's important to know
Click to expand...
Click to collapse
Sorry you got stuck. I can see some issues in my guide. Especially after trying to do 6c again. First I notice I didn't specify where to store all the folders. Somewhere in the home folder obviously but it looks like you sorted that out fine.
I have tested a working solution to the permissions problem. In fact two:
1. Locate cf folder in the cache mount point on the desktop and go into it. Now right click in the window to bring up the context menu and select "Open as Root". Open up the editor as before.
2.. In the terminal run the editor as root. For example:
sudo gedit cfar-cleanup.sh
I've tested this on Mint which is a "relation" of Ubuntu so should work the same.
Now the original permissions should be left intact. I checked and they didn't have the execute bit set which is unusual. It may help here to save your work on the file to a place you can save to in the meantime. So you don't get stuck again. And then unmount your cache mount point, extract the raw image again as per step 4 and remount as per step 5, if the permissions need restoring. They really should be as they are originally set in the image.
Then continue through to step 6 and beyond as you were.
Good luck!

Related

*Root the Slide & Other HTC Devices*6/15/2010* How-To Updated 8/14/2010

How-TO Root the
HTC Slide
HTC Aria + See this Link > http://forum.xda-developers.com/showthread.php?t=708233
&
Nexus One
Works With ALL 2.1 HTC PHONE"S with 2e Recovery!
Must be able to See the Device From the ADB in recovery for it to work!
See this Thread if you Have a New Slide or Updated the OTA to version 1.35.531.1
http://forum.xda-developers.com/showthread.php?t=754669
If at anytime You have Trouble or Can't get my Method to work, Please see wesgarner's [Root] SimpleRoot v1.3 (Linux/Windows)
Link > http://forum.xda-developers.com/showthread.php?t=713347
Just use my Update.zip if you just want root only
Download This Package > Root.zip
*EDITED* 6/29/2010 Update Now Contains Su & Superuser.apk. Permission Fixed on SU / Sh as well
-Contains Dusty51 script for Partitioning the a2sd & Swap
-fstab install so swap will work
-Default partition table's are:
-Linux Swap @ 32mb
-ext2 a2sd partition @ 512mb
-Fat32 Partition is based on the size after the 2 above
How-to Use:
Once You load the Recovery via update.zip, Unplug & Plug the USB to make sure the Device is Seen..
- Open Command Prompt from Computer
- Adb shell
- sdparted
- Next Follow the Command, y = Y to confirm..
Note: Backup your SDCARD first, only thing should be on it is the update.zip then Follow the above to Format for a2sd support!
Click to expand...
Click to collapse
Stratis1978 said:
I've got root now and just wanted to repeat what made the difference for me (also posted pages back):
when you're ready to run recovery in the bootloader be sure to unplug the USB from your phone until 'HBOOT' not 'HBOOT USB PLUG' displays.
So basically you unplug the phone until 'HBOOT' appears, have 'RECOVERY' highlighted, and plug the phone in a moment before you select 'RECOVERY'.
The moment I did that I had 'recovery' displaying in my loop.
Continue with the directions...
Click to expand...
Click to collapse
How-TO Root the Slide
First!! - Go to Settings > Application > Development and turn on USB Debugging. This should save you headaches.
NOW… Power Off the Slide
Step 0.
Un-zip the Package you Downloaded
Step 1.
Place the Contents of "update.zip" & "ota.zip" & "loop" into your Android SDK Tools folder.
Step 2.
Open Command Prompt or Terminal and CD to the SDK/Tools Directory.
Step 3.
Power on the Slide into the bootloader by Holding Down ( Volume Down + Power Button )
Step 4.
Now run your loop file from the prompt (either type "loop" in windows or "./loop.sh" in a *nix like) ( ./ Is used For OSX )
Step 5.
Once your loop is running in your prompt, select Recovery from the bootloader menu.
Step 6.
When recovery loads, you should Have an Offline Device. You can use ctrl+c to stop your script & see.
If this doesn't happen, Power Off and try again..
Step 7.
Un-plug your USB cable from the back of your phone & Plug it back in for it to Detect ADB Correctly!!! This is an important step. At this point you can adb devices to see if you can see your device and that it is in recovery mode.
Step 8.
Hit Volume Up + Power button to Bring up the Selectable Menu
Select Update.zip from the menu. (This will fail, but we already know that! Select it anyway).
Step 9.
adb push ota.zip /sdcard/update.zip (*OSX users add a ./ in front of all terminal commands please.)
Step 11.
This is Very important!! Have this Command ready in your prompt before applying update.zip again!!
This is the Command, We do not Push this Yet adb push update.zip /sdcard
Click to expand...
Click to collapse
step 12.
Hit run update.zip, as soon as you see a Little Bar appear under the text, push Enter to execute the command in your prompt (adb push update.zip /sdcard )
Step 13.
In successful, you should see Clockwork Recovery & you Now have Su & Superuser.apk Installed! You can Now Reboot Your Phone into the OS to verify.
If unsuccessful, repeat steps 11 & 12.
Congrats.
Next Guide For Flashing the ENG-BUILD with Test-key Recovery​ http://forum.xda-developers.com/showthread.php?t=703076​
Updating the Radio Once Everything Is Done​ http://forum.xda-developers.com/showthread.php?t=705064​
Special Thanks to:
Paul O'Brien: > http://android.modaco.com/forum.html
Koushik K. Dutta: His ClockWorkMod Recovery can Be found here > http://www.clockworkmod.com/
&
http://unrevoked.com/ OTA Spoofing Method
&
ChiefzReloaded for Huge amount of Suggestion & Brain Storming.
​
GREAT JOB!
Thank you sir, for your diligence, and hard work! Let's get to work boys!!!
Tips: May want to be a little more clear on "SDK Directory". Some may think that you "must" have this directory, but all that is important to know is that you know the directory where the contents were placed... If that IS the case, then I'd mention that...
Also, might be important to mention the phone should already be plugged in, and should have prerequisite of ADB working...
Thaaaaaaank you! got some fun stuff to do right after work now
Re: How-TO * Root The Slide * *6/15/2010*
Thanks guys. You've made a lot of people happy.
Sent from my T-Mobile myTouch 3G Slide using Tapatalk
Having trouble at step 5. ADB works when the phone is powered on. However, when in Recovery, adb devices list is blank.
Other problems: is Step 8 really a step? It says to select Update.zip... is this just anecdotal, as in "Now we will select an update.zip"...?
And how are you "selecting" things in Recovery? My recovery simply has the phone with a triangle...
What is ADB i come from rooting g1 and i dont remember or know what it is i rooted my g1 when it first came out and every since then all i had to do is name file update then push. could u be alittle more clear for a retard like me I dont want to miss my phone up when i just got it today, I really want to get rid of some of the bloatware on it tho
richierich118 said:
What is ADB i come from rooting g1 and i dont remember or know what it is i rooted my g1 when it first came out and every since then all i had to do is name file update then push. could u be alittle more clear for a retard like me I dont want to miss my phone up when i just got it today, I really want to get rid of some of the bloatware on it tho
Click to expand...
Click to collapse
ADB is part of the Android SDK, you'll need to download it and extract it to your PC before you can use it.
http://developer.android.com/sdk/index.html
My problem may be that I'm using a Mac, but I cannot get my Terminal to recognize the "loop" command. I've tried many things and it won't work properly just keeps giving me errors. I'm gonna keep trying though.
android007 said:
My problem may be that I'm using a Mac, but I cannot get my Terminal to recognize the "loop" command. I've tried many things and it won't work properly just keeps giving me errors. I'm gonna keep trying though.
Click to expand...
Click to collapse
Loop is just a batch file (.bat). I don't know about Macs using batch files. All it's doing is looping the "adb devices" command to see if it detects the device.
fermunky said:
Having trouble at step 5. ADB works when the phone is powered on. However, when in Recovery, adb devices list is blank.
Other problems: is Step 8 really a step? It says to select Update.zip... is this just anecdotal, as in "Now we will select an update.zip"...?
And how are you "selecting" things in Recovery? My recovery simply has the phone with a triangle...
Click to expand...
Click to collapse
You have to Repeat then... It Don't always work everytime!! That's why I said Repeat.. You have to Power Off, run loop & if you see now Devices then you have to Repeat again!!
You Must boot into bootloader First!! Run Loop, Then to Recovery!
my computer doesn't find the device in recovery mode. Any advice on getting around this? adb works when phone is on.
eugene373 said:
You have to Repeat then... It Don't always work everytime!! That's why I said Repeat.. You have to Power Off, run loop & if you see now Devices then you have to Repeat again!!
Click to expand...
Click to collapse
Wow, cant believe I missed that order. May need to update the how to though... it says to run loop, then go to bootloader, then to recovery. You need to add a step after getting into bootloader of "Wait for device to be listed, then goto recovery"... or similar.
My error when trying to invoke the loop file:
: command not founde 1: :TOP
sdk/tools/loop: line 2: adb: command not found
sdk/tools/loop: line 3: GOTO: command not found
Click to expand...
Click to collapse
Sweeeet! Awesome job guys.
On Mac replace the loop.bat with loop.sh and change the contents of the file to the following:
#!/bin/bash
while [ 1 ]
do
adb devices
done
On the command line, run "chmod 755 loop.sh" to give it execute permission. To run the file type "./loop.sh"
Are there any roms for it yet?
android007 said:
My error when trying to invoke the loop file:
Click to expand...
Click to collapse
You have not added the tools directory to your PATH system variable. Explained on the SDK page. Also, you don't need to be in the /tools folder, just go to the folder you extracted the files to.
Eugene, I noticed while the loop was running, I chose recovery, and on one instance, I saw an offline device, but then subsequent loop commands, it stopped listing them. Also, it is still not clear what to do on Step 8. Most of us only see an image in recovery, no menus.
With no menus, anyone know how to reboot the phone in recovery other than removing the battery?
marvinp said:
On Mac replace the loop.bat with loop.sh and change the contents of the file to the following:
#!/bin/bash
while [ 1 ]
do
adb devices
done
On the command line, run "chmod 755 loop.sh" to give it execute permission. To run the file type "./loop.sh"
Click to expand...
Click to collapse
you think you can do quick little rewrite of the tutorial for us mac users

[HOW TO] How do you root the slide with new update on ubuntu?

like this!
i thought a purely ubuntu method would be helpful for those just starting out [like me] and the linux methods haven't been updated [to my knowledge].
1. charge your phone to at least 50%.
2. get adb.
BEARTARD said:
Install adb. Download it here: developer.android.com/sdk/index.html . adb is a little program distributed as part of the Android software development kit (SDK). Its job is to communicate with the phone from a shell (terminal). To install adb, I strongly suggest you copy the adb file from the tools directory into your system's /usr/local/bin directory. This way, it will always be in your path. If you don't intend to do development work on Android applications, feel free to delete the rest of the SDK after installing adb.
Click to expand...
Click to collapse
so, download that ^ . open it up and extract the adb file from the tools folder onto the desktop. now open up the terminal and type in:
gksu nautilus /usr/local/bin
drag the adb file in there and close nautilus.
3. pick a rom from the rom bible: forum.xda-developers.com/showthread.php?t=704567
i like the ota updated one from CR, the froyo ones were "too lacking" for me. although still awesome*
place the rom on your phone's sd card. don't unzip it. and remember where you put it.
4. download this 4shared.com/file/J6i52nwy/slideroot.html
make a folder somewhere [i use the desktop] and name it something, like "root". extract the downloaded files into that folder.
5. set the phone up to be rooted:
-unplug it from the computer if it is plugged in
-again, make sure it is charged to at least 50%
-settings > applications > development > USB debugging (check mark here)
-settings > connect to pc > charge only
-settings > wireless & networks > wifi unchecked (important)
-settings > sound & display > screen timeout > never
-now plug it back in
6. minimize all other windows.
open up a terminal and type:
cd
now drag the folder you extracted all the stuff from step 4 into the terminal window [faster than typing it all out ]. click the title bar of the terminal. press enter. don't close this terminal. we should now be inside the folder.
7. copy and paste these commands in order.
they make some time to complete, so be patient or risk KILLING YOUR PHONE TO DEATH. [also, i'm not sure which commands actually require sudo to run so i just included it in all of the commands, forgive my noobishness].
commands:
sudo adb devices
-to start it up and make sure your phone is recognized the first time, if not, try again:
sudo adb devices
sudo adb push exploid /sqlite_stmt_journals
sudo adb push flash_image /data/local
sudo adb push mtd0.img /data/local
sudo adb push update.zip /sdcard
sudo adb push esprimg.zip /sdcard/ESPRIMG.zip
-you might want to get a drink or say hi to some friends at this point; takes a while. just wait until it says it's done like the rest.
adb shell
cd /sqlite_stmt_journals
chmod 0755 exploid
./exploid
-at this time go to settings and turn wifi on and then back off before continuing
./exploid
-the password is : secretlol
you should now have a # instead of a $
cd /data/local
chmod 04755 *
/data/local/flash_image misc /data/local/mtd0.img
8. turn off the phone.
9. press and hold volume down and then power up; hold both buttons.
let go when see the 3 skateboarding androids.
10. wait until the bar on the side of the screen loads.
if you don't see the bar wait about 4 minutes and something should happen.
11. when it is finished, press volume up, when prompted, to apply the update.
wait some more!~
DON'T REBOOT when it is done.
12. DON'T REBOOT!
13. press volume down.
press volume down once to highlight recovery and select with the power/lock button to boot recovery.
on the recovery screen you will see a device with a red warning triangle.
hold volume up and power together for a second or so.
14. ignore the warning at the bottom.
press volume down and then power to select apply update.zip.
you will now be loaded into the clockwork recovery and will be able to flash the rom of your choosing from your sd card.
you can use your touchpad at the bottom now and select with it.
otherwise: volume butttons=navigation power/lock=select
15. do a backup of your phone with nandroid.
-pretty self explanatory > press backup >wait >??? >profit!
16. wipe the device.
this won't wipe your sd card though, so don't worry.
17.install a custom rom
scroll down and select "install zip from sd"
select choose "zip from sdcard"
find your rom and apply!!!
wait!!!!!!.....
reboot!
18. complain on the dev forums about how bad the roms are, how dead the phone is, and speculate about newer phones. also, make sure to start your own thread even if it is a question, general banter, or to post pictures .
/sarcasm
19. seriously don't do step 18.
>_O
20. update the radio if it is not the newest one.
forum.xda-developers.com/showthread.php?t=705064
sources/more info:
exploid method:
forum.xda-developers.com/showthread.php?t=754669
ubuntu set up:
forum.xda-developers.com/showthread.php?t=710056
rom bible:
forum.xda-developers.com/showthread.php?t=704567
go donate money to the active devs now.
Oh crap. I got quoted. Good job, man!
thanks! i didn't know how else to so eloquently explain adb, so i just quoted you. hopefully this will be of help to all three of those linux users out there on this forum!
It's kind of funny, I came on here to write a thread like this one. I noticed that there wasn't a single thread that combined the new root method with flashing the ENG build into one. You saved me some time.
I noticed that you don't have the part about updating to the newest Radio after the ENG build. Do the newer ROMs come with a Radio update in them?
@slughappy1: i reccomended updating to CR's OTA rom since going from stock to updated stock with root is the most logical step. therefore, a radio updatre is included.
to my knowledge, the nicer devs include the newer radio, other wise they make a mention of updating it. anyways, i'll include it in my tutorial for completeness sake. now if only i could figure out how to take non-blurry distance pictures with my slide >_>. sadly, i'll probably sell this off for a g2 =\.
Why sudo? I don't think adb need super user permission. Is it needed because you put it in /usr/local?
Sent from my T-Mobile myTouch 3G Slide using Tapatalk
arifwn said:
Why sudo? I don't think adb need super user permission. Is it needed because you put it in /usr/local?
Click to expand...
Click to collapse
Some systems are setup incorrectly to handle giving users permission to write to the ADB device file when the phone is plugged in. The correct process is to fix the permissions on the dev file that udev creates. Here's a link to do that: http://forum.xda-developers.com/showpost.php?p=5300224&postcount=6.
Please ALWAYS refrain from using 'sudo' or 'su' unless you're ABSOLUTELY sure that it needs root and there's no (more) proper way to do it.
(On a side note, I'm always available to answer any simple or complicated Linux questions anyone may have. You can PM me to get my attention or GTalk: nbetcher at gmail dot com.)
Thanks for the post about not using sudo. It was a quick way to make sure users on various linux distros can get it to work without a whole bunch of rigmarole.
On another note about the udev rules mentioned, the "SYSFS{}" call is being deprecated and a revision will be needed soon.
So i tried to follow the intstruction but once i booted in recovery mode nothing happend
10. wait until the bar on the side of the screen loads.
if you don't see the bar wait about 4 minutes and something should happen.
this is the step where nothing i happening on my phone
huh!! no one cares to help me
You didn't give much information to learn where the problem might be. If you didn't get the loading bar on the side of the screen, your recovery didn't see the ESPRIMG.zip file in the root directory of your sd card. Mount it on the computer and see if it's there.
beartard said:
You didn't give much information to learn where the problem might be. If you didn't get the loading bar on the side of the screen, your recovery didn't see the ESPRIMG.zip file in the root directory of your sd card. Mount it on the computer and see if it's there.
Click to expand...
Click to collapse
Alright let me check if the sd card has ESPRIMG.zip. but i have a question no where in the instruction it says if i need to transfer the zip file to the sd card ?
Step number seven is one of the most important ones. Check those commands you pasted. Most of them copy files to various places on your phone.

[Q] Possible Brick? internal SD card seems to be "stuck" as is. WEIRD

Okay guys, so here's a weird one.
My g-tablet was working great. Was running VEGAn-Tab Build, BETA 5.1.1, no reason to update it, because it did everything I needed. I finally had it to where I wanted it, then it all kind of started falling apart. Here's how.
I power it on and notice my home screen got all messed up for some reason (using launcher pro). All of the settings defaulted to the original. I tweaked it back to more or less how I wanted it, and when I had it back to normal, thought nothing better of it. Must have glitched out some how.
Then I notice a bunch of things starting to force close, specfically android market, amazon market, titanium backup, google services framework, launcher pro, etc. Odd thing is it would do it one at a time, but otherwise my tablet would carry on as normal.
I go ahead and restart the tablet, to see if that helps at all, and what do you know, the homescreen is messed up again! I thought launcher pro might have been the culprit, so I un-installed the app and rebooted... And launcher pro is still there.
I go ahead and delete it again and start deleting other apps, restarting the tablet, and no matter what I do, everything stays the same. time for some clockwork mod action. I go into clockwork mod, and try to do the factory reset option, thinking what the hey, I'll try anything right now. Hit it, mourn the loss of my user data, and reboot the system... and again, everything is still the same.
I hook up my tablet to the computer via usb, and it looks like I'm able to at least delete misc. files that way. But when I return to good old Tabatha (my nickname for Gtab) everything is stuck just the way it is.
Needless to say, it feels like I'm stuck in the twilight zone.
I know I should have researched it by now, but I'm going to finally look it up to see if I can recover with NVFlash (I know I know, very noobish of me, using strange roms and not knowing any of the basics).... but I'm increasingly worried I've got some kind of a hardware malfunction on my hands. Could it be the memory? The internal SD card?
Oddly enough, my tablet still functions... I can browse the web, hook it up to my computer, etc etc, but no matter what I do I can't alter the data I already have on my tablet. Can't delete things, can't change settings, update apps, etc. etc. Which makes it pretty much useless for what I wanted to use it for.
I finally realized what this is like. The movie groundhog day, and I'm stuck in the same day, over and over again.
Any help or input that might get me out of this mess would be greatly appreciated.
Phil: "I was in the Virgin Islands once. I met a girl. We ate lobster, drank piña coladas. At sunset, we made love like sea otters. *That* was a pretty good day. Why couldn't I get *that* day over, and over, and over..."
This is now the second time that I've seen this exact same problem. I was in the process of troubleshooting the original one when the user returned his gTablet for replacement. If you can stand the deja vu, read this thread.
Do not nvflash your tablet--nvflash cannot fix SD-card related problems. Read this post for why not.
Instead, do this for me: Reboot the gTablet, then open a Terminal, or, use adb and run this command:
Code:
$ dmesg > /mnt/sdcard/dmesg.txt
Attach that dmesg.txt which will contain messages from the kernel to your next post.
I'll check this thread in the evening.
rajeevvp said:
This is now the second time that I've seen this exact same problem. I was in the process of troubleshooting the original one when the user returned his gTablet for replacement. If you can stand the deja vu, read this thread.
Do not nvflash your tablet--nvflash cannot fix SD-card related problems. Read this post for why not.
Instead, do this for me: Reboot the gTablet, then open a Terminal, or, use adb and run this command:
Code:
$ dmesg > /mnt/sdcard/dmesg.txt
Attach that dmesg.txt which will contain messages from the kernel to your next post.
I'll check this thread in the evening.
Click to expand...
Click to collapse
Thanks for the direction, at least I know it isn't an isolated incident. It's 1:45 AM where I am right now, and I have to wake up for work in about 5 hours... So I probably won't be able to get in depth with the follow up on this stuff untill after work tomorrow night (so long as the wife doesn't hog the computer )
Again thanks for the quick response, I appreciate you pointing me into some sort of direction. Can't wait to try to get this sorted out!
Currently trying to figure out how to get ADB going.... pretty intimidating, but I'm trying. I got the Java JDK installed, installing the SDK, but can't find the "SDK Setup.exe" file or even a USB driver folder in the SDK directory. Got a good resource for getting ADB set up?
Save yourself some trouble. Got to http://www.knoppix.org/ and download the latest Knoppix live CD image.
Burn it, boot it, then use the adb executable from this post. For simple things like just running adb, you don't need the entire Android SDK.
Get me a dmesg while inside ClockworkMod:
Code:
$ [B]sudo ./adb shell dmesg > dmesg.txt[/B]
ADB commands documentation
Thanks, I'll try it out sometime this weekend!
Well, I really screwed myself now. I got the Linux distro loaded but still couldn't figure out how to get ADB to work. For whatever reason, When I boot from the DVD, I can't download the zip from within linux (get errors) and I could not open the ADB command by navigating to where I have it extracted in my hard drive. [Do I need to load the OS onto a flash drive instead?]
So I started messing with some stuff in clockwork mod. I apparently really goofed it, and I got a "Magic Value Mismatch" error everytime I tried to boot it up.
I looked up Magic Value Mismatch, and from there it pointed to using NVFlash to try to fix that problem. So tried that. After I flashed it, I thought for sure I finally had it back to stock, as the intro screen started to show the tap n tap logo... but i basically got stuck in a boot loop, tap n tap, then "n", then tap n tap, then "n", etc, until it dies.
I looked up this issue and apparently the key is to get into clockwork mod and do factory reset, reset cache, and partition the SD card to 2048 and 0, which I did... (per post #4 on this thread: http://www.slatedroid.com/topic/17501-helpstuck-in-bootloop/ ) but still no dice.
Not sure where to go from here, or if I can even get it to interface with ADB in its current state. Looks like I'm done for
Thanks for trying though
On second thought, I may have had a breakthrough, at least in getting ADB to see my tablet!!! Woohoo! It finally sees the device and has a serial number. Was following the device on this thread:
http://www.androidtablets.net/forum/viewsonic-gtablet-technical/5377-adb-g-tab-step-step.html
7. under the "[Google.NTx86]" section, paste the following:
Code:
;NVIDIA Tegra
%SingleAdbInterface% = USB_Install, USB\VID_0955&PID_7000
%CompositeAdbInterface% = USB_Install, USB\VID_0955&PID_7100&MI_01
save the file and exit.
But I have a 64 bit machine, so I finally figured it out and plopped that into the 64 bit portion of the .inf file. DOH!
So now let me see what I can drum up through the previous commands above.... though the parameters have changed now to be sure... Due to my haste things may have taken a turn for the worse.
To recap, now my tablet is stuck in a boot loop after having done NV Flash, after having screwed up some settings in clockwork mod trying to fix a "Magic Value Mismatch" error.
Tried:
$ dmesg > /mnt/sdcard/dmesg.txt
I just run this in the cmd prompt at my platform-tools directory where the adb is correct?
All it says is, "The system cannot find the path specified."
Am I doing something wrong, or is my tablet that messed up?
Okay, this is slightly weird. So I was browsing around in clockwork mod, and lo and behold, the original zip flies for vegan tab are all STILL THERE. So I reloaded them... And My tablet zips back to exactly the way I had it before!
Only this time, so far no force closes. This looks way too good to be true after what I've been through. I'm going to try modifying some files and settings and restart my tablet to see what it does. I'm pretty sure I can't be out of the woods yet. Allthough it is 3:33 AM as this is happening... magic hour. I may be going insane.
EDIT: Nope, was definitely way too good to be true. All my data is as stuck as it was ever was. But at least now I can get into it again. But now we're back to square one. Lemme figure out this dmesg business and get back to you. X(
So I would try issuing the following exactly in the command line at the adb platform tools folder:
$ dmesg > /mnt/sdcard/dmesg.txt
Is that code supposed to be copy and paste in? I don't seem to be getting anything. I can do the following command and get the info to pop into the command interface:
adb shell dmesg
But I can't figure out how to save that to a text file. And you want me to do that while the g tablet is in recovery, correct?
FYI, trying to do it through Windows 7. Would that command only operate in the linux environment via knoppix?
Thanks
titobetlogs said:
I can do the following command and get the info to pop into the command interface:
adb shell dmesg
But I can't figure out how to save that to a text file.
Click to expand...
Click to collapse
Redirect the output to a file:
Code:
C:\SOME\PATH> [B]adb shell dmesg > dmesg.txt[/B]
titobetlogs said:
I got the Linux distro loaded but still couldn't figure out how to get ADB to work. For whatever reason, When I boot from the DVD, I can't download the zip from within linux (get errors) and I could not open the ADB command by navigating to where I have it extracted in my hard drive.
Click to expand...
Click to collapse
I suggested using Knoppix just because it is so easy to use adb in Linux. Broken-down steps for future reference:
1. Download and burn the latest Knoppix Live CD iso image. Check the downloaded file size. The .iso file should be ~700MB in size. Also, test the CD by booting it and then typing at the boot prompt: knoppix testcd
2. Boot Live CD and skip the creation of any partition or file to store user data. After all, we just want to run adb.
3. After Knoppix has booted into the desktop, run a browser, right click on the adb.zip attachment in this post, then select "Save Link As..." and save the zip file into /tmp.
4. Connect the gTablet to the PC via the USB cable.
5. Open a terminal window, then type in it:
Code:
hostpc$ [B]cd /tmp[/B] [I]Change to the dir. where adb.zip was saved[/I]
hostpc$ [B]unzip adb.zip[/B] [I]Unzip zip file[/I]
hostpc$ [B]ls -l adb[/B] [I]Check if the adb program was extracted OK[/I]
-rwx------ 1 rvp rvp 159620 Dec 1 22:23 adb
hostpc$ [B]chmod 555 adb[/B] [I]Make adb executable.[/I]
hostpc$ [B]sudo ./adb shell dmesg > dmesg.txt[/B]
Note 1: do not type in the shell prompt, 'hostpc$'. It is only there to show you what the screen should (roughly) look like.
Note 2: If adb says something like "device not found", just unplug the USB cable from the PC, wait a few moments, then re-plug the cable and re-run the adb command again.
6. Go back into the browser and attach the dmesg.txt file that is there in /tmp. You will have to tell the Noscript plugin to allow scripts from xda-developers to enable attachments. Right click on the page, then select the Noscript menu item, then choose "Temporarily allow xda-developers.com".
I thought for sure I finally had it back to stock, as the intro screen started to show the tap n tap logo... but i basically got stuck in a boot loop, tap n tap, then "n", then tap n tap, then "n", etc, until it dies.
Click to expand...
Click to collapse
I'm not surprised. If the files on the internal SD card cannot be modified then that boot loop behaviour is to be expected. Here's why:
Android requires certain partitions to exist on the system. These partitions can be either on the flash or on SD cards. The partitions are:
/system: This is where the binaries and system apps that come with the firmware are stored. This partition is usually mounted read-only to protect it. On the gTablet, this partition is on the 512MB built-in NAND flash chip.
/cache: As the name indicates, this is the partition used to speed up the execution of the Java apps. Temporary files are also created here. This partition too is on the built-in NAND flash chip.
/data: This is where user-downloaded apps are stored by default, and also where Android stores its system configuration data. This partition, on the gTablet, is on the internal SD card.
/sdcard: This is where user content like media files, books, and the apps moved to SD card are stored. This partition too is on the internal SD card.
The first 3 partitions are critical and Android won't come up without them being present (or, if there are any errors on them). Among these 3, only /system needs to be correctly populated (When you install a ROM, new stuff is copied here). The other 2 partitions, /data and /cache can be empty and the system will boot up fine--with defaults. In fact, when you select "wipe data/factory reset" in CWM, /cache and /data are re-formatted--effectively, wiped clean.
(There are 2 other important partitions on the NAND flash chip, but, these are not mounted because they don't contain a proper filesystem. You have to use special tools to create the contents of these 2 partitions.
The first of these is the "boot" partition. This one and "system" are re-written when you install a new ROM. The "boot" partition holds the Android Linux kernel. If you install a new kernel, only the "boot" partition is rewritten.
The second is the "recovery" partition. This contains a separate, and usually different (and safe), Linux kernel and a mini filesystem image. This is a fail-safe partition. Stock recovery and ClockworkMod sit here.)
In your case, nothing on the internal SD card can be modified, so the stuff in /data will still be from your old ROM. (nvflash also cannot modify SD card contents, as I mentioned before.) When the stock firmware boots up, it will find incompatible stuff in /data. Critical apps will then die. Android will restart them, they will die again. This is your boot loop.
Get me the dmesg output and then we'll run a few tests using CWM, but, judging from your previous posts, I don't think your internal SD card can be fixed. You have 2 options:
1. Return the tablet for a replacement.
2. If you can't return it, I can switch the internal and external SD cards on your ROM so that you can boot and use the system (almost) normally. But, this is a custom solution and you will need to have an external SD card in its slot always. Read through this thread.
Wow, you really know you're stuff! I'll see what I can get you later on in the day with regard to the dmesg, I'm currently still at work.
I had suspected a hardware error... bummer. I'll definitely be interested in seeing if I can just use the external micro sd slot to sub out for the internal sd card. I would at least like this thing to be functional again, though I suppose I'll never be able to try any of the honeycomb roms when those get past alpha. Oh well.
Do you know if this thing takes 32 gb micro sd cards? That would be pretty awesome, I at least wouldn't feel too limited on space.
By the way, thanks for all your help on this, I know I'm a huge noob. I greatly appreciate your patience and taking the time to break everything down for me. I have absolutely zero background in programming or anything computer related, though I do find this stuff extremely fascinating! If I could rewind the clock and study this stuff in school, I would do it in a heartbeat.
Again, thanks so much, can't thank you enough.
titobetlogs said:
I would at least like this thing to be functional again, though I suppose I'll never be able to try any of the honeycomb roms when those get past alpha. Oh well.
Click to expand...
Click to collapse
No, you should be able to run whatever ROM you want. I'll send you an installable zip file, in a few days, which should get you going again on Vegan-Tab, at least. You'll just need to remember to flash this zip file right after you've flashed the ROM (of your choice).
Right now, I don't know if I need one zip file for each kind of ROM in existence for the gTablet, or, if I can use some scripting and do the internal/external SD card switch using just a single installable zip file. I'll look into this on the weekend.
Do you know if this thing takes 32 gb micro sd cards?
Click to expand...
Click to collapse
Yes, it does.
By the way, thanks for all your help on this, I know I'm a huge noob...
Click to expand...
Click to collapse
I was a complete noob to Android myself back in April of this year. I've picked all of this up in just a few months. I'm pretty sure you can do it too, with a bit of poking around in the system. Of course, having a background in Unix/Linux helps a lot.
In your honor, below are some inspiring lyrics from the Karate Kid soundtrack:
You’re the best!
Around!
Nothing’s gonna ever keep you down
You’re the Best!
Around!
Nothing’s gonna ever keep you down
You’re the Best!
Around!
Nothing’s gonna ever keep you dow-ow-ow-ho-how-ho-own
INSPIRING GUITAR SOLO
Dude! you're embarrassing me -- I haven't send you the zip file yet... and, you haven't sent that dmesg output I wanted.
I know I've been stuck at work and family functions every day this week so far. Hopefully I'll get to it soon
Finally got to this! Here you go! Thanks again!
titobetlogs said:
Finally got to this! Here you go!
Click to expand...
Click to collapse
Can't see any problems in that dmesg output. Time for some tests on the internal SD card.
Boot into CWM, then run on PC (on Linux run: sudo ./adb shell):
Code:
C:\SOME\PATH> [B]adb shell[/B]
~ # [B]mount /dev/block/mmcblk3p1 /sdcard[/B] [I] Mount internal SD card partition[/I]
~ # [B]mkdir -p /sdcard/a/b/c[/B] [I]Make a directory tree[/I]
~ # [B]echo test > /sdcard/a/b/c/test.txt[/B] [I]Create a file[/I]
~ # [B]cat /sdcard/a/b/c/test.txt[/B] [I]Read it back again[/I]
test [I]Correct[/I]
~ # [B]echo 3 > /proc/sys/vm/drop_caches[/B] Flush kernel caches
~ # [B]cat /sdcard/a/b/c/test.txt[/B] Read it back again
test Correct
~ # [B]umount /sdcard[/B] [I]Unmount[/I]
~ # [B]mount /dev/block/mmcblk3p1 /sdcard[/B] [I]Remount /sdcard[/I]
~ # [B]cat /sdcard/a/b/c/test.txt[/B] [I]Reread file[/I]
test [I]You should see "test" here[/I]
~ # [B]umount /sdcard[/B]
You should see "test" after the kernel flush and the remount.
Next, reboot the tablet--back into CWM, then run the cat command again. `cat' should output "test", again, if the SD card is OK.
Here's a screen of the commands I entered and what I got back. Did I do anything wrong? Looks like something's a bit off.

How to root Wiko Lenny 5

Hello dear community, how can I root Wiko Lenny 5?
I would be very grateful for any idea. Thank you in advance!
No TWRP recovery
deadlyassin said:
Hello dear community, how can I root Wiko Lenny 5?
I would be very grateful for any idea. Thank you in advance!
Click to expand...
Click to collapse
Hi, there is no TWRP recovery at moment for this model, only unlock bootloader. Look here github com/phhusson treble_experimentations wiki Wiko-Lenny5
ROM for Lenny5
Would you mind uploading your firmware for testing? or sending a link to it...
My model: W_K400
I need to install the Recovery TWRP? Or Custom Rom? Or LineageOS? Or Root?
All nothing? Well, i am waiting. Thanks for your answer!
Wiko Lenny 5
Hey Peeps
I did some research on the Lenny 5 as i got this phone a few weeks ago.
There is at the moment, and to my knowledge, no Lenny 5 stock firmware available. I contacted Wiko Germany, asking if there is any place i missed and they answered me in the sense of:
"at the moment there is no stock firmware available online, refer to de[dot]wikomobile[dot]com/maj.php?telephone=2270 where a stock firmware should be uploaded shortly."
Still they didn't upload the file yet, so there only patience will help, if anything at all.
Another possible way i wanted to raise attention to is the site www[dot]wikogeek[dot]com/ where under www[dot]wikogeek[dot]com/index.php?telephone=LENNY5 there is a source seemingly for the phone system, although i don't know, what partitions of the phone system, if not all, are contained in the source code. Following the included Instructions, and doing some further research, i managed to compile some sort of Image which might be the way to get working partition images for the phone. I couldn't examine the image contents using a few different image explorers, so i cannot even tell how to work with the image if its of use at all.
I thought, maybe some of the more experienced users of this board could maybe work with this information to get something like TWRP to work even without having the stock firmware images. As this is my only working phone and my experience is little, i will not do any changes to the phone partitions as long as im not sure the result is a) working, as expected (no recovery required), or b) completely recoverable (at least to factory state), but maybe others are more courageous and want to try.
Hope this helps getting this topic to the latest state. Sorry for the non-URLs, i made the account specifically to contribute to this topic and my post count is to low to post complete urls.
ivelischt said:
Hey Peeps
I did some research on the Lenny 5 as i got this phone a few weeks ago.
There is at the moment, and to my knowledge, no Lenny 5 stock firmware available. I contacted Wiko Germany, asking if there is any place i missed and they answered me in the sense of:
"at the moment there is no stock firmware available online, refer to de[dot]wikomobile[dot]com/maj.php?telephone=2270 where a stock firmware should be uploaded shortly."
Still they didn't upload the file yet, so there only patience will help, if anything at all.
Another possible way i wanted to raise attention to is the site www[dot]wikogeek[dot]com/ where under www[dot]wikogeek[dot]com/index.php?telephone=LENNY5 there is a source seemingly for the phone system, although i don't know, what partitions of the phone system, if not all, are contained in the source code. Following the included Instructions, and doing some further research, i managed to compile some sort of Image which might be the way to get working partition images for the phone. I couldn't examine the image contents using a few different image explorers, so i cannot even tell how to work with the image if its of use at all.
I thought, maybe some of the more experienced users of this board could maybe work with this information to get something like TWRP to work even without having the stock firmware images. As this is my only working phone and my experience is little, i will not do any changes to the phone partitions as long as im not sure the result is a) working, as expected (no recovery required), or b) completely recoverable (at least to factory state), but maybe others are more courageous and want to try.
Hope this helps getting this topic to the latest state. Sorry for the non-URLs, i made the account specifically to contribute to this topic and my post count is to low to post complete urls.
Click to expand...
Click to collapse
Ok so Wiko Released the Firmware! Its a Windows software that downloads and flashes the ROM, and it makes a folder with stuff in it. Maybe experienced people can look into it and build TWRP?!! I would really love twrp but I don't have the experience :crying: . Hope developers see this
Matt 123456789 said:
Ok so Wiko Released the Firmware! Its a Windows software that downloads and flashes the ROM, and it makes a folder with stuff in it. Maybe experienced people can look into it and build TWRP?!! I would really love twrp but I don't have the experience :crying: . Hope developers see this
Click to expand...
Click to collapse
Would you mind adding a link to the firmware you've found?
edit: got it
Are you able to develop a TWRP?
Matt 123456789 said:
Are you able to develop a TWRP?
Click to expand...
Click to collapse
Nope, sorry. I just didn't get at first what firmware you refered to (the link i posted in the first place).
As i stated above, i don't know for sure, if the wikogeek-source really contains all of the files required to build anymore than (if even) the bootloader.
More experienced people would need to take a look into it.
Best regards
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
Code:
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? ) 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
Code:
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
Code:
sudo apt update
you will be asked to enter your account password, enter password and confirm with ENTER
Code:
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.
Code:
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
Code:
java --version
the output should be something like:
Code:
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
Code:
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
Code:
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
Code:
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)
Code:
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
Code:
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
Code:
[B]username[/B]@[U]virtual[/U]machinename: ~$
Code:
[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
Code:
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
Code:
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
Code:
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
Code:
ip a
you need to find the address obtained by your router. you normally find it under something like
Code:
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
Code:
\\[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
Code:
chown -R [B]<yourusername>[/B]:[B]<yourusername>[/B] ~/android
if there are still files you can't access you can maybe fix it with
Code:
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 \\virtualmachine\androshare directory.
1.4.2 Install SuperR's Kitchen
to install superr's kitchen, we need to unzip it. on the virtual host, type
Code:
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
Code:
sudo apt install unzip
to easily solve this problem, and repeat the upper step.
you can confirm that that unpacking was successfull by entering
Code:
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
Code:
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
Code:
./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
Code:
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)
[CFW][W_K400][TREBLE] CFW and ROOT, MOSTLY-VANILLA
PART 2 OF THE POST, START WITH PART 1!!!!
2. Preparing your SuperR installation for your Custom AOSP Rom
In the Project Name we enter something identifying. Keep in mind that you may want to add multiple roms on this installation, so you should make it something rather unique. This process corresponds somewhat to Step 2.1, so you can read this one already to find out a good notation for your new project. I have already chosen my Treble image and will call mine
Code:
Enter new project name ...
lenny5_aosp8.1_vanilla_su_v32
2.1 Find out which Treble image you need
As you see in the last step, i selected a Version 8.1 "Oreo" image, where Vanilla tells you that theres no gapps at all and the suffix su means that it contains a rooted system. But later more about this. Also i chose v32 from the treble_experimentations releases.
To find your treble image, you need to have some information. First of all, read the information on this link. (phhusson's github wiki for Wiko Lenny 5)
Some informations here are important. First of all the flashing sequence, which will get important to us in a later step
Code:
Enable adb and oem unlock in developer options
adb reboot bootloader
fastboot flashing unlock
fastboot oem unlock
fastboot flash system your_gsi_path
fastboot reboot
as well as his testing notice
Code:
Flashed using Phh-Treble v18 - arm
as you can read in the Before starting section, there is a bug i could not resolve concerning installing older version ROMS, which could spontaneously start to apply to your device. i cannot "downgrade" my device, because it bootloops.
to select your image of choice, go to this site. (phhusson's treble image release site). to find v18, you will need to scroll down and go a few pages back in history.
some things to consider:
- lenny5 doesn't seem to be able to run AOSP9, so i'd recommend you stick with AOSP8.1
- there are lineageos compilations which might be interesting for some people. (i cannot tell if the root process for lineageos massively differs, as i don't use that one)
we will stick with AOSP8.1 in this guide.
first of all, you must decide if you want to stick with the go apps, install the stock gapps or go vanilla (no gapps at all). i will stick with vanilla. (note that some versions do not have the go version, others do)
then you will want to ask yourself if you want to root your phone, which we assume here to be yes.
as vanilla, like in our case, is not available with preinstalled su, we will stick with the nosu version. (which is a bit of a "hoax", as in fact this version already is rooted, you just have no way of controlling it, yet. we will take care of that in a later step.)
for our wiko lenny 5 we must choose the arm-aonly architecture. also i choose to stick with v32, the newest version per guide release date.
in my decision case, this leaves us with the following ROM:
https://github.com/phhusson/treble_experimentations/releases/tag/v32
Code:
system-arm-aonly-vanilla-nosu.img.xz
we will stick with that. if you want to use another rom, you must modify your choice. the overall process stays more or less the same. CONSIDER: It's proves easier to install some missing APK's etc. to your gapps-less system than removing unwanted gapps from your gapps-prebloated system.
click on the link and download the image file.
CONSIDER: Some of the images are in raw flashable format (the older ones), and have the extension *.img . For newer versions, the images are packed and CANNOT BE DIRECTLY FLASHED. these files are namely the ones with the extension *.img.xz
if your file has an extension that differs from *.img i strongly recommend you to use 7zip to extract the contained *.img file. 7-zip handles them all, which makes it the perfect standalone (de-)archiver on your computer. and no, i'm not getting paid by them for the advertising, it's just great and opensource.
now, if you didn't already, enter the name identifying your rom into the kitchen and confirm with ENTER.
to allow smb to write to your new project folder, reuse the command
Code:
sudo chown -R ~/android
by quitting superr (using the q key) or opening a second terminal (the easier way, in the original CTRL + ALT + T terminal on lubuntu, just doubleclick the top Tab-Bar off any other tabs and a new terminal tab will open) in which you execute this command.
now store the image file to your host workfolder and from there, copy it to your virtual workfolder's project folder (~/android/superr_<yourprojectname>/).
rename your system-arm-aonly-....img to just system.img for the kitchen to recognize it.
2.2 Extract your Treble image
To extract your Image file, on your virtual machines terminal, superr's kitchen should be running in the Main Menu.
if by any means you have stopped it, open a terminal with CTRL + ALT + T and enter
Code:
cd ~/android
./superr
press enter to execute and superr should launch. when asked for a project to load, choose the project you just created by pressing the correspondant cipher on the keyboard.
in the kitchen main menu, push cipher 4 on your keyboard to extract your obtained IMG-File. if asked, select your system.img by pressing the correspondant key and confirm the extraction with the "Y" key. wait for the process to finish. if asked, enter your virtual machine's user password. the kitchen sometimes needs to elevate some of it's processes during the extraction.
for the name of the zip, when asked, just enter "system_new". this is not so important, just dont simply call it "system", as this might confuse you under some circumstances and in the worst case overwrite your stock system.img.
for the perm type, select set_metadata by typing the "1" key on your keyboard, and you should be back in the main menu.
now your system image is unpacked into your virtual machine workfolder (~/android/<yourprojectfoldername>/system/)
2.3 Editing the contents (Rooting, etc.) of the Treble image
The editing in this guide's usecase is quite simple. We will want the following features and packages preinstalled:
- Root, of course
- including Root Management App
- BusyBox
- FDroid
- ...
you can add to this list to your hearts delight. The above will be my initial setup.
First we need to get the Root files.
These are found here
from this thread, get phh's-superuser.zip (the topmost file)
aswell as the phh's SuperUser apk file (top-second)
if you are having issues with the superuser implementation, try the bottommost element called phh's-superuser-aonly.zip instead of phh's-superuser.zip. this should normaly not be required.
copy both, the .zip and the .apk to your host workfolder.
now unpack the .zip to your host workfolder, which should create a folder "system" with 3 subfolders "bin,etc,xbin" in it.
copy this "system" folder to your virtual workfolder and into your project, so it integrates with the existing "system" folder on the virtual machine. if it asks you to overwrite, just allow it.
your virtual workfolder's project folder should now contain the following 3 files:
Code:
system/bin/phh-su
system/etc/init/su.rc
system/xbin/su
amongst the other system files.
Now download FDroid from here (the F-Droid site was temporarily down at the time of writing this guide)
Download the FDroid APK and store it in your host machine's workfolder.
After that, download the BusyBox APK from here
https://www.appsapk.com/busybox-app/
or a source you thrust more. There is a official busybox source, but i did not check which binary i must use for the Lenny 5, so i stick with the simplest method.
Download the BusyBox APK and store it in your host machine's workfolder.
Now copy the FDroid, BusyBox, and previously downloaded phh_s_SuperUser APK's from the host's workfolder to your virtual machine's project folder ~/android/<yourprojectfolder>/system/app/ (or \\<<yourvirtualmachineip\androshare\<yourprojectfolder>\system\app, respectively) to include them in your new ROM.
Thats basically all of the magic done. Your ~/android/<yourprojectfolder> should now contain the following 6 Elements
Code:
system/bin/phh-su
system/etc/init/su.rc
system/xbin/su
app/FDroid.apk
app/BusyBox.apk
app/phh_s_SuperUser_vX.X.X.X.apk
amongst the other elements from the Treble ROM.
move the APK app/FDroid.apk to a new Folder like this: app/FDroid/FDroid.apk
move the APK app/BusyBox.apk to a new Folder like this: app/BusyBox/BusyBox.apk
move the APK app/phh_s_SuperUser_vX.X.X.X.apk to a new Folder like this: app/phh/phh_s_SuperUser_vX.X.X.X.apk
as everything is sorted into folders, right?!
now we're done with modifying our treble image. lets repack it.
2.4 Repacking the Treble image
on your virtual machine terminal, with the kitchen open, go to the main menu if required and select "ROM Tools Menu" with the "8" key. You can check the "Root Menu" by pressing the "3" Key.
The Root/Unroot ROM should read (CURRENT: xbin/su) with Busybox and su.d "Disabled", which is okay, as BusyBox is not recognized, but there. If you want to utilize su.d, you must know yourself, how to do that properly. i don't know if it works as it should when done in the kitchen.
go back to the "ROM Tools Menu" with the "4" key and go to the "Build Menu" with the "7" key. Choose the option to "Build EXT4 img" by the key "2" and after the quick process finishes, in the menu "Which EXT4 img would you like to build?" select "system" by pressing the corresponding key, then select "sparse" by pressing the "2" key. for the file size, select the option to "Assume file size from project folder" by pressing the correspondent key and confirm the warning about this being BETA. Then wait for the process to finish.
The kitchen should say "system_new.img has been created in <yourprojectname>".
Now copy the newly created system_new.img from your virtual machine project directory to your host machine workfolder and we're done with editing and repacking the Image.
STEP 3 AND ON IN THIRD POST (CHARACTER LIMIT)
About TWRP and other stuff...
PART 3 OF THE GUIDE, START WITH PART 1!!!
3. Flashing the new Image to the Device
AT THIS POINT YOU SHOULD HAVE ALL YOUR DATA BACKUPED AND MAKE REALLY SURE FOR A LAST TIME, THAT YOU ACCEPT TO VOID YOUR WARRANTY AND TAKE ABSOLUTELY EVERY RISK TO YOURSELF FOR ANY CONSEQUENCES THAT COULD ARISE OF WHAT HAPPENS WITH YOUR DEVICE AT ANY TIME AFTER FOLLOWING THIS GUIDE.
The flashing process is simple. Enable Debug mode in your Phones Settings (Enable Developer Mode by taping the Build-Number several times Google: "Android Enable Developer Mode" - i really hope you know that after coming so far through this guide!!!.
When Developer Mode is activated, Go to Settings->Development Menu and activate the USB Debug Slider.
You must unlock the bootloader, at this point you must have generic adb or wiko specific adb installed, you can download it from here or get more information in section 0. "Before starting". The installation process is straightforward, possibly a restart of your host machine is required to get it running.
After installing ADB, you open the command line of your host machine and switch to your host machine workfolder by entering
Code:
cd <yourworkfolderpath>
and executing with ENTER.
use
Code:
dir
to make sure, that you are indeed in your workfolder.
when your phone is in usb debug mode, you can then reboot it into bootloader by entering
Code:
adb reboot bootloader
into your host machine command line. NOW THE DANGEROUS PART BEGINS, SO BE AWARE!!! WHEN UNLOCKING THE BOOTLOADER, YOUR LENNY5 WILL COMPLETELY WIPE ALL OF YOUR DATA AND RESET TO FACTORY SETUP!!!
by using the following commands in your command line you will unlock your bootloader, wipe your data and cache partitions including ALL PERSONAL DATA and flash your newly created ROM to the device.
Code:
fastboot flashing unlock
fastboot oem unlock
unlocks the boot loader. reenabling the debug mode (because of the factory reset) and/or rebooting the device may be required to reconnect to adb.
after that and making sure that you want to take the risk of flashing your new image, enter
Code:
fastboot flash system <yourhostworkfolderpath>\system_new.img
fastboot -w
fastboot reboot
the first command flashes your new image file, the second wipes your data and cache additionally, to make sure theres no residues there, which could mess with the first startup. after that we reboot the phone with the third command. after some loading, and a warning about the bootloader beeing unlocked, you should be greeted by AOSP's standard launcher with superuser, fdroid and busybox preinstalled.
4. Final words
After all it prove to be a quite long process, if you don't have any kitchen presetup. If the kitchen is ready, it's a thing of downloading, modifying and reflashing the device. but be careful. there's always a risk of bricking your device.
I will try to keep this guide up and running but memorize my Thread starting words.
If you think my RED BLOCKS are excessive - i'm sorry, but i care for your LENNY, too.
If you read this and are able to comply with all the steps in the guide, you are ready to flash your phone!
It's a wall of text, and i don't know if it's straight forward for all users, but it's the only way i could come up with, to root the LENNY5 phone, so it's worth it all the while, right?
I hope it helps some of you to get their Phones Unlocked and Unleashed.
Best regards
ivelischt
---------- Post added at 09:39 PM ---------- Previous post was at 09:37 PM ----------
if you find errors and mistakes in the guide, you are welcome to notice me and all the others by leaving a post in this thread.
Please ignore my posting titles, as they do not fit anymore, since i had to split from 2 to 3 posts to fit all of the text.
Okay some more words from my side concerning TWRP etc.
1. as far as i can tell, with the wikogeeks source you can indeed compile TWRP, but i'm not deep enough into it to try it.
2. with the procedure in the description above i now have a fully rooted phone
3. i am able to dump (mostly) any partition on my device (boot, recovery, system). so i have boot.img, recovery.img tested working. of course i was unable to dump my old system as it was not rooted. but i can dump my new system.img and it is also tested working, i reflashed all of the images to find it out.
4. if someone here in the forums thinks, that, with this information, you are able to port TWRP, i think we all would be glad,
because
5. i tampered around with various twrp roms. with the Jerry 3 ROM, which is out in the Net (DuckDuckGo-Search: w_k300 twrp), i thought i'd come to a point, as these are "sister-devices". in fact i had twrp running after loading the split-files (zKernel, etc...) from stock recovery to twrp recovery using the kitchen. but the screen isn't working. i need to "swipe for modifications", but i can't. as far as i can tell, it's just the touchscreen irresponsive. maybe this is something quickly fixed, maybe not.
so, i don't know if it's legal for me to share these sources here in the board but if anyone wants to test around on these write a on pm. just ask me and i will do what i can.
on my system, at the moment i have:
- stock boot.img
- stock recovery.img
- aosp8.1 system.img i use on my lenny
- semi-functional Jerry3-TWRP-Port, with the display unfunctional
let me know if you can do something with this stuff.
best regards
Matt 123456789 said:
Ok so Wiko Released the Firmware! Its a Windows software that downloads and flashes the ROM, and it makes a folder with stuff in it. Maybe experienced people can look into it and build TWRP?!! I would really love twrp but I don't have the experience :crying: . Hope developers see this
Click to expand...
Click to collapse
Hey Matt! Sorry, i completely misunderstood what you were talking about. Thats my fault
To clarify, there IS an actual Update package, just not under the various xx.wikomobile.com subdomains, but via world.wikomobile.com, using the IMEI number, you can infact get an Update.zip. I saw that really just now... The most recent update hides at https://support.wikomobile.com/maj/Lenny5_OPE_V34.zip
I don't know if this helps porting TWRP, as i'm actually experimenting with compiling it from source, for lenny 5 specifically. but to no success until this point. but whilst experimenting around, you can at the very least use it to flash to stock if required.
The update.zip contains the following:
- SPFlashTool
- MT6580 Scatterer-File
- boot-sign.img
- cache-sign.img
- lk-sign.img
- misc2-sign.img
- odmdtbo-sign.img
- recovery-sign.img
- secro-sign.img
- system.img
- tee-sign.img
- userdata-sign.img
- vendor-sign.img
- preloader_k400.bin
- as well as tons of other files
i think the stock system image is raw. to flash it you must either use the SPFlashTool or convert it to sparse format by other means...
best regards
edit: it seems, that lenny5 runs well with AOSP9, at least i upgraded my device today and it runs.
also, if you decide to install treble images by the guide above, using gapps, you will have to register your device here. (Android Device Registration)
their guide on getting the android_id may be a bit strange, i needed to progress as follows:
Code:
adb root
adb shell
inside shell type:
Code:
su <-- work as root
cd /data/data/com.google.android.gsf/databases/
sqlite3 gservices.db
this will start sqlite3 command line.
inside the sqlite3 command line enter
Code:
select * from main where name = "android_id"; <-- don't forget the semicolon!
after pressing enter, the output should be something like
Code:
android_id|[B]1234567890123456789[/B] <-- this code will be different on your device.
on the Android Device Registration page, you enter the bold part of the output and press Register. enter
Code:
.exit <-- to leave sqlite
exit <-- to leave su mode
exit <-- to leave shell
it will take a few minutes until your google services start to work properly without flooding your notifications.
you should now be able to use your gapps.
ivelischt said:
Please ignore my posting titles, as they do not fit anymore, since i had to split from 2 to 3 posts to fit all of the text.
Okay some more words from my side concerning TWRP etc.
1. as far as i can tell, with the wikogeeks source you can indeed compile TWRP, but i'm not deep enough into it to try it.
2. with the procedure in the description above i now have a fully rooted phone
3. i am able to dump (mostly) any partition on my device (boot, recovery, system). so i have boot.img, recovery.img tested working. of course i was unable to dump my old system as it was not rooted. but i can dump my new system.img and it is also tested working, i reflashed all of the images to find it out.
4. if someone here in the forums thinks, that, with this information, you are able to port TWRP, i think we all would be glad,
because
5. i tampered around with various twrp roms. with the Jerry 3 ROM, which is out in the Net (DuckDuckGo-Search: w_k300 twrp), i thought i'd come to a point, as these are "sister-devices". in fact i had twrp running after loading the split-files (zKernel, etc...) from stock recovery to twrp recovery using the kitchen. but the screen isn't working. i need to "swipe for modifications", but i can't. as far as i can tell, it's just the touchscreen irresponsive. maybe this is something quickly fixed, maybe not.
so, i don't know if it's legal for me to share these sources here in the board but if anyone wants to test around on these write a on pm. just ask me and i will do what i can.
on my system, at the moment i have:
- stock boot.img
- stock recovery.img
- aosp8.1 system.img i use on my lenny
- semi-functional Jerry3-TWRP-Port, with the display unfunctional
let me know if you can do something with this stuff.
best regards
Click to expand...
Click to collapse
Same with the display here, can't get it to work. I read that display touch malfunction is about kernel diferences, but I don't know how to modify it.
Hanthonious said:
Same with the display here, can't get it to work. I read that display touch malfunction is about kernel diferences, but I don't know how to modify it.
Click to expand...
Click to collapse
well, i then tried all the possible configurations of the following:
TWRP versions:
- self-compiled TWRP
- TWRP for some random FullHD-MTK6580 with more or less same specs as lenny 5
- K300 TWRP
kernel versions:
- twrp k300 kernel
- stock k400 kernel
- self-compiled k400 kernel
which makes quite some possible combinations. as far as i can recall, the most sucessful was the untouched k300 twrp with its k300 kernel, which managed to boot up but with the touchscreen not working.
i then tried the k300 twrp with stock and self-compiled k400 kernel, but both failed. i even tampered with the kernel adress to fit it to k400 and tried out multiple "tricks" i stumbled upon when searching the internet. but the phone always just hangs a few seconds, then boots into "normal" mode or stock recovery.
i cannot fully rule out whether its caused by me implementing the kernel in a wrong way (for me this is the most probable reason ) or if it's because SuperR's kitchen (thanks go out!) has some kind of mess while reintegrating the changed kernel, as i did all of these combine-and-retry kind of rom porting experiments with his product. maybe i am just using the tool in a wrong way.
i also compiled a stock kernel from wikogeek sources, then used that to compile twrp sources into a recovery.img, including the self-built kernel, which both, after some tinkering, built without any issue, but then also, this image just hangs for a few seconds and shows the same behavior as stated above.
whatever it is, i cannot identify it. this has two main reasons:
- first and most important: what i know is through learning-by-doing, which means, i have no degree in coding or anything. from my perspective, i feel a bit proud already, being able to compile aosp or lineage from source, even with a lot of help by those creating these mostly ready-for-use sources. :victory: learning-by-doing implicates my second point: time investment.
- i cannot afford to spend most of my time with digging into android development. and also often, i just don't have any delight in it and do other things.
also, my main purpose was to get a rooted system (with a custom rom on it), which i managed, so most of the time i spend on android stuff at the moment, is to update my build and distribute the updated images in time when security patches arrive.
short said: if twrp for k400 comes, it would be nice, but it's none of my main objectives at the moment to get this to work.
best regards

How To Guide Unlocking, Rooting, System RW, LED Notification Summary

First time posting and I wanted to say thank you to all the excellent talent here on XDA! None of this would have been done without the work of so many people.
I have a Moto G Play (2021) (XT2093-4) that I recently purchased (Best Buy - $159 US/Carrier Unlocked) and I wanted to document my adventure in to rooting, making '/system' RW, and fixing the missing LED notification light (hint: I used the charging light) (hint^2: It's not required to make '/system' RW in order to fix the LED notification light - I just wanted more control over my phone).
First, "OEM unlocking" was greyed out for me, but became available after several days of having the phone online with a SIM card.
I followed the instructions here to unlock the bootloader and root with Magisk (Non-TWRP). Along with these instructions.
Once bootloader is unlocked, you will need the 'boot.img' file from your stock firmware. I used the "Rescue and Smart Assistant" utility to grab a copy of the stock firmware (GUAMNA_RETAIL_QZAS30.Q4_39_35_9_subsidy_DEFAULT_regulatory_DEFAULT_CFC.xml) and extracted the "boot.img" file for the next steps.
Continue installing Magisk (Filenames may be different! Don't just copy and paste.):
Code:
adb install Magisk-v23.0.apk
adb push boot.img /sdcard/Download
(Follow the instruction on your phone to patch 'boot.img' in Magisk)
adb pull /sdcard/Download/magisk_patched-23000_aKKMt.img
adb reboot bootloader
fastboot flash boot_a magisk_patched-23000_aKKMt.img
fastboot flash boot_b magisk_patched-23000_aKKMt.img
You should now have a working, rooted Moto G Play. You can just stop here and have fun with your phone, but I noticed that even with root, the system partition was not RW.
I followed these instructions to make '/system' writable (Note: you will need the 'sysrw_repair.zip' that's included in the bundle and a Linux system):
Code:
adb push systemrw_1.32_flashable.zip /data/local/tmp/
adb shell
su
cd /data/local/tmp/
unzip systemrw_1.32_flashable.zip
cd systemrw_1.32/
chmod +x systemrw.sh
./systemrw.sh in=`ls -l /dev/block/by-name/super | awk '{print $NF}'` out=/data/local/tmp/systemrw_1.32/img/super_original.bin size=50
The phone doesn't have enough space to complete 'lpmake' on the device and will end with an "Error 73" code. Running the "sysrw_repair_v1.32" tool on a Linux machine was a workaround because it pulls the '*.img" files to your local machine then combines them in to a single '.bin' file. But, before I did that, and because it's really annoying, I made some room to stop the phone from complaining about a lack of space:
(Still on the phone's adb)
Code:
rm ./img/super_original.bin
Now, on the Linux machine, I unzipped 'sysrw_repair_v1.32_proper.zip' then commented out line 39 (where it calls the "flash()" function) of the script (sysrw_repair.sh) because I wanted to flash the "super" partition myself.
(On another Linux terminal)
Code:
cd /path/to/unzipped/sysrw_repair/dir/
chmod +x sysrw_repair.sh
./sysrw_repair.sh
This results in a new folder (img) with a rather large bin file (super_original.bin).
(Back on the phone adb)
Code:
exit # Exit root
exit # Exit adb
adb reboot bootloader
Now it's time to flash the fixed bin file to the "super" partition:
Code:
cd /path/to/unzipped/sysrw_repair/dir/
fastboot flash super ./img/super_original.bin
fastboot reboot
You should be able to login and have a writable '/system':
Code:
adb shell
su
mount -o rw,remount /
No errors should appear.
Last, I like having an LED indicator that tells me that I have an SMS/MMS notification waiting. Motorola thought it would be wise to eliminate that feature altogether instead of having the option to enable it. So, I forced it back on using a startup script that dumps the notifications and greps for some key words. And, if it finds something, it "breaths" the charging LED. The script loops until the notification is gone, then keeps checking for new notifications every 30 seconds. (Note: the "/data/adb/service.d/" directory is used by Magisk like an INIT service):
(Still root on the phones adb)
Code:
cd /data/adb/service.d/
cat <<EOF > ledfix.sh
#!/bin/sh
while true; do
if dumpsys notification | egrep NotificationRecord | egrep sms > /dev/null
then
if [[ $(cat /sys/class/leds/charging/breath) == 0 ]]
then
echo 1 > /sys/class/leds/charging/breath
sleep 2
continue
else
sleep 2
continue
fi
elif egrep 'Charging' /sys/class/power_supply/battery/status > /dev/null
then
if [[ $(cat /sys/class/leds/charging/breath) -ne 0 && $(cat /sys/class/leds/charging/brightness) -ne 0 ]]
then
echo 0 > /sys/class/leds/charging/breath
echo 255 > /sys/class/leds/charging/brightness
elif [[ $(cat /sys/class/leds/charging/breath) == 0 && $(cat /sys/class/leds/charging/brightness) == 0 ]]
then
echo 255 > /sys/class/leds/charging/brightness
else
continue
fi
else
echo 0 > /sys/class/leds/charging/breath
echo 0 > /sys/class/leds/charging/brightness
fi
sleep 30
done
EOF
chown 0.0 ledfix.sh
chmod 0755 ledfix.sh
reboot
Now, the charging light will fade off and on about every 2 seconds if there's an SMS/MMS notification waiting. And will check for notifications every 30 seconds. I'm sure someone can come up with a better way of doing this, but this was a nice quick-and-dirty way to get what I wanted.
Hope this helps!
I created an account to say thank you for this, I have already done a good portion, having unlocked the bootloader, the problem is the Rescue Smart Assistant, it won't let me log in, it keeps telling me it can't connect, and the GUI is different because of an update, there is no download button inside the program, only a greyed out rescue button. How did you manage to make the backup Boot.img? Maybe you are using a different OS, and/or version of the program (Not the app, that is already auto-installed), I'm using Windows 10, are you on Linux? I might just need to try from Linux, maybe in a VM.
I was trying to do this before I found this post, and have already installed ADB, the SDK, fastboot, and Motorola Drivers, I just need a way to get the Boot.img, and to patch it, also figure out how to flash it. The last android I rooted with a custom rom was the HTC EVO 4G with Oreo/Jellybean, so I'm a little rusty, but am able to understand technical jargon.
If anyone could help, that would be awesome. I've reinstalled different versions of Rescue Smart Assistant as well, they always upgrade on boot, same problem. I've added exceptions to my firewall and everything.
UPDATE: Was about to post this when I had updated from android 10 to 11 and decided to try logging in again a little closer to my router, to see if the connection was timing out, I think that was the cause, as I can now sign in, and the GUI seems correct from the first appearance. I don't see why I should have any trouble following the rest of the guide, but feel I should share my trials and frustrations anyways, for anyone else experiencing the same,
Thanks again.
PROFSLM said:
I created an account to say thank you for this, I have already done a good portion, having unlocked the bootloader, the problem is the Rescue Smart Assistant, it won't let me log in, it keeps telling me it can't connect, and the GUI is different because of an update, there is no download button inside the program, only a greyed out rescue button. How did you manage to make the backup Boot.img? Maybe you are using a different OS, and/or version of the program (Not the app, that is already auto-installed), I'm using Windows 10, are you on Linux? I might just need to try from Linux, maybe in a VM.
I was trying to do this before I found this post, and have already installed ADB, the SDK, fastboot, and Motorola Drivers, I just need a way to get the Boot.img, and to patch it, also figure out how to flash it. The last android I rooted with a custom rom was the HTC EVO 4G with Oreo/Jellybean, so I'm a little rusty, but am able to understand technical jargon.
If anyone could help, that would be awesome. I've reinstalled different versions of Rescue Smart Assistant as well, they always upgrade on boot, same problem. I've added exceptions to my firewall and everything.
UPDATE: Was about to post this when I had updated from android 10 to 11 and decided to try logging in again a little closer to my router, to see if the connection was timing out, I think that was the cause, as I can now sign in, and the GUI seems correct from the first appearance. I don't see why I should have any trouble following the rest of the guide, but feel I should share my trials and frustrations anyways, for anyone else experiencing the same,
Thanks again.
Click to expand...
Click to collapse
You can also get the firmware from
Lolinet Mirrors
https://t.me/MotoUpdatesTracker
Search for Firmware by codename, software channel, Software Version, and build #
So I wasn't going crazy when I could swear a LED notification light in the upper right side above the screen blinked once whenever I rebooted the phone?
Why would Motorola include such a thing and not utilize it for more than merely a boot up indicator? Like I dont even get to see it come on while charging, it literally only blinks once during boot and that's it.
mario0318 said:
So I wasn't going crazy when I could swear a LED notification light in the upper right side above the screen blinked once whenever I rebooted the phone?
Why would Motorola include such a thing and not utilize it for more than merely a boot up indicator? Like I dont even get to see it come on while charging, it literally only blinks once during boot and that's it.
Click to expand...
Click to collapse
I know!
I don't know what triggers that light to come on. I even waited until the battery was at 6% and the light still never came on.
So, I updated the script above to make the light go full brightness if the battery is charging. The order matters, so if a notification comes in while charging, it'll "breath" the LED. Also, if the battery is full, then the light will turn off. Kind of telling you that it's time to unplug.
I followed these steps and my touch screen stopped working. I had previously installed twrp already on it while trying to learn how to root it, and when i boot into fastboot it goed through twrp, i also used the boot.img file from lolinet, not sure which of these caused the issue. Interestingly though, the touch screen does work whilst in twrp. any suggestions on how to fix or what would be causing it? Phone does work with usb mouse over OTG
jorduino said:
I followed these steps and my touch screen stopped working. I had previously installed twrp already on it while trying to learn how to root it, and when i boot into fastboot it goed through twrp, i also used the boot.img file from lolinet, not sure which of these caused the issue. Interestingly though, the touch screen does work whilst in twrp. any suggestions on how to fix or what would be causing it? Phone does work with usb mouse over OTG
Click to expand...
Click to collapse
Are you absolutely sure you used the correct boot.img from an image version exactly matching your phone variant version?
mario0318 said:
Are you absolutely sure you used the correct boot.img from an image version exactly matching your phone variant version?
Click to expand...
Click to collapse
Im not completely sure how to get the right file, but I think the first time it was the wrong one, but then when i got what i thought was the right one, it just didn't work at all and I had to recovery flash it. I had just updated so maybe the correct image wasn't available yet. Im going to try again though
Oh! Hello @latentspork. Thanks for your interest in my SystemRW project. I just came across this thread randomly...
I'm happy you got my script to work on your Motorola device by using the included sysrw_repair script
Please feel free to send me your log files from script folder. Thanks. It's useful for further development of the script
latentspork said:
The phone doesn't have enough space to complete 'lpmake' on the device and will end with an "Error 73" code. Running the "sysrw_repair_v1.32" tool on a Linux machine was a workaround because it pulls the '*.img" files to your local machine then combines them in to a single '.bin' file. But, before I did that, and because it's really annoying, I made some room to stop the phone from complaining about a lack of space:
Click to expand...
Click to collapse
That's not 100% accurate. Lpmake error 73 means CAN'T_CREATE and has nothing to do with error 70 (insufficient space).
To this day I still don't know exactly what causes error 73 on some devices (mostly Motorola and others) but it looks like some kind of kernel panic. If anyone knows how to avoid this error 73 in Android please let me know! Thanks!
Yes that's true the included sysrw_repair script (Linux only) pulls the image files from the phone to your computer and attempts to run the same lpmake command with the same arguments that just failed with error 73 on the phone itself and now all of a sudden it just works in Linux. Go figure.
latentspork said:
(Still on the phone's adb)
Code:
rm ./img/super_original.bin
Click to expand...
Click to collapse
Why would you delete the super_original.bin ? That's your stock read-only super image which by default is automatically dumped by script for backup purposes in case you ever get a bootloop.
And if you launch the script by specifying a custom input value (in=x) like in your example above then you won't even have a super_original.bin file to begin with because script will skip the whole dumping of original super image process.
latentspork said:
This results in a new folder (img) with a rather large bin file (super_original.bin).
Click to expand...
Click to collapse
I think you mean super_fixed.bin
latentspork said:
Now it's time to flash the fixed bin file to the "super" partition:
Code:
cd /path/to/unzipped/sysrw_repair/dir/
fastboot flash super ./img/super_original.bin
fastboot reboot
Click to expand...
Click to collapse
Here in your instructions you are manually flashing the wrong file. Shouldn't you be flashing super_fixed.bin to your super partition?
Usually I only flash the super_original.bin to get back out of a bootloop...
latentspork said:
Now, on the Linux machine, I unzipped 'sysrw_repair_v1.32_proper.zip' then commented out line 39 (where it calls the "flash()" function) of the script (sysrw_repair.sh) because I wanted to flash the "super" partition myself.
Click to expand...
Click to collapse
See that's why I included that automatic flash() function in the repair script. Then you don't have to worry about manually flashing the wrong file to your super partition
Enjoy a fully read/write-able device!
Great news! New SystemRW version coming soon! ​
@lebigmac
I really appreciate the reply and the tool! It did work really well on my model (XT2093-4).
That's not 100% accurate. Lpmake error 73 means CAN'T_CREATE and has nothing to do with error 70 (insufficient space).
To this day I still don't know exactly what causes error 73 on some devices (mostly Motorola and others) but it looks like some kind of kernel panic. If anyone knows how to avoid this error 73 in Android please let me know! Thanks!
Click to expand...
Click to collapse
I only assumed that "Error 73" was caused by insufficient space, because the phone really did run out of space. I noticed that the phone was out of space because I got a home screen notification warning, asking me to free up space. I confirmed it with a "df -h" at the shell. Apparently, the OS takes up almost 15GB. When you add the ".img" files, there's only about 5GB left. There wasn't enough room to complete the ".bin" file. Maybe I could have used an SD card or something.
You're probably correct in that "Error 70" is the correct error for that, but on my phone, I never saw that error. I did notice that the tool was still trying to write data as the phone ran out of space, then it would throw the "Error 73". Maybe it didn't register the lack of space, or just an oddity with my model? No idea.
Why would you delete the super_original.bin ?
Click to expand...
Click to collapse
This is the file that was created when I initially ran the "./systemrw.sh" command on the phone. The result of running the command on the phone were several ".img" files and a very large "super_original.bin", but it was incomplete because the command threw an "Error 73". I was following your instructions, and I noticed that the output name of the file was "original" instead of "fixed". I probably could of outputted it to a new name to reduce confusion, but I didn't really care too much about the name as long as I had a working file.
I think you mean super_fixed.bin
...
Shouldn't you be flashing super_fixed.bin...
Click to expand...
Click to collapse
Normally, yes. But the Linux script also outputted the filename "super_original.bin". Again, as long as it worked, I was okay with it. The commands I used above were the exact commands that I ran at the time. I copied them from the terminal consoles I was using. So I don't know why it wasn't outputting the correct filename (again, I was following your instructions and was a little confused that the names came out differently - I just figured I was doing something wrong like not use the proper output command or something).
Then you don't have to worry about manually flashing the wrong file to your super partition...
Click to expand...
Click to collapse
I was really just being cautious because my previous phone broke and I didn't have a fallback.
But, at no point were there two bin files (original and fixed), so there wasn't much confusion. Where I originally had just ".img" files before running the script, I now had a single ".bin" file. I knew that was the file I needed.
But again, thank you for all the hard work on this tool! I was reading that it's worked on lots of different model phones, and it's always good to see the open source community doing things that help all kinds of people.
For moto notification for this phone at least use https://play.google.com/store/apps/details?id=br.com.itsmeton.motoledreborn or moto led reborn from the play store it just works
Hi, sorry. This can be removed. I put it in place because I was having issues with the xda app. For whatever reason, every time I tried to share this particular post, it would share a link for the post which I used originally, rather than the current post. I knew that if I commented I could get back here easily on my PC.
So what is the place holder for

Categories

Resources