[GUIDE/TUTORIAL/HOWTO] Sony Xperia S stock to Android 8.1 Oreo - Sony Xperia S, Acro S, Ion

[GUIDE/TUTORIAL/HOWTO] Sony Xperia S stock to Android 8.1 Oreo
[GUIDE/TUTORIAL/HOWTO] Upgrade Sony Xperia S (Model LT26i codename nozomi) from Android 2.3.7 to Android 8.1 Oreo / nAOSP Rom
This detailed step-by-step guide helps you transform your Sony Xperia S to a much fresher one with Android 8.1 Oreo.
To make sure you are with a compatible Xperia S:
On the smartphone, go to Settings > About phone. Check that "Model number" is correct: LT26i.
### We need to make sure Bootloader can be unlocked before going further.
Open dialer, enter code
Code:
*#*#7378423#*#*
In the follow menu, go to Service info > Configuration > Rooting status.
Bootloader unlock allowed: Yes
If it is set on No, you cannot update your device. You can quit this tutorial and cry, you will never unlock it.
### You must be logged as a Microsoft Windows administrator to run console commands below.
CHANGELOG
v4. Moved to Bitgapps to solve infinite GApps "searching for updates", TWRP 3.5.2_9-0
v3. Android 7.1 if needed, hints to solve problems (error 7, fdisk -l)
v2. Slight tutorial improvements
v1. Initial release
1) DOWNLOAD FILES
- djibe Xperia S pack: https://bit.ly/djibe-xperias-pack
(contains FlashTool Xperia Driver Pack 1.8 for USB drivers + fastboot/adb + recovery TWRP 3.5.2_9-0)
+ ROM nearAOSP 8.1 build 11: https://forum.xda-developers.com/t/rom-8-1-naosprom-for-xperia-s-acro-s.3853082/
Download latest build (2020/03 or newer): https://androidfilehost.com/?w=files&flid=240525&sort_by=date&sort_dir=DESC
+ BitGApps Package ARM 8.1: https://github.com/BiTGApps/BiTGApps-Release/releases
+ You find Android 8.1 laggy ? Android 7.1.2/nAOSP is suitable https://androidfilehost.com/?fid=890129502657590583
Download according BitGApps.
+ Charge phone to 100%.
NB. Use a USB2 port to connect tablet to PC.
2) INSTALL USB DRIVERS
Commands below are for Windows 10 installation of unsigned drivers.
### For other Windows versions, Google "windows X install unsigned driver".
On the keyboard of PC, use "Windows key + R" combo.
In the command prompt that opens, type:
Code:
shutdown -r -t 0 -o
This opens a Windows menu:
Go to Troubleshooting > Advanced Options > Settings > Restart
Upon restart, press on keyboard : key 7 - Disables drivers signature verification
After boot,
Start Flashtool Xperia Driver Pack 1.8,
check the Flashmode Drivers, Fastboot drivers, Common drivers Fuji board (both lines) and Xperia S driver for ICS.
Start the installation and confirm the forcing the driver installation.
It ends by saying that everything was installed.
Restart Windows.
3) BACKUP ALL YOUR DATA
Backup every SMS, photo, app login or sync everything in the cloud.
You will lose everything, including what is contained in the microSD card during bootloader unlock.
So backup everything and transfer every file to your computer.
### Do it now or you will regret it.
4) IMEI NUMBER AND UPDATES
On phone, go to Settings > About phone > Status > IMEI
Note the IMEI (15 digits). Store it.
5) MAKE SURE PHONE IS NOT SIMLOCKED
We need to check phone is not SIMlocked.
Open dialer, enter code again
Code:
*#*#7378423#*#*
Go to Service info > SIM lock. If everything is blank/unchecked ( [] ), phone is Desimlocked.
If not, you must contact your network provider for an unlock code.
### Don't move further until phone is simlocked. You cannot debrand/desimlock it using a custom ROM.
6) GENERATE BOOTLOADER UNLOCK CODE
From your PC, go to https://developer.sony.com/develop/open-devices/get-started/unlock-bootloader/
At the bottom of the page, in "Select your device:" menu: select Xperia S.
Enter your IMEI, check first 2 checkboxes "I acknowledge that", click Submit and complete the captcha to generate unlock key.
Note the unlock code (beginning and end of page paragraph C.)
7) CONNECT PHONE IN FASTBOOT MODE
Phone powered off, hold "Volume up" while you plug phone in USB.
The blue light appears at the front bottom edge, the drivers install in Windows.
8) UNLOCK BOOTLOADER
In Windows, copy the path to the "flash" folder you unziped earlier.
Open a Windows command prompt : Start menu > Command prompt > Start as administrator
Then type
Code:
cd /d thePathToFlashFolder
(ex: E:\root\djibe Sony Xperia S\djibe\flash)
Type:
Code:
fastboot devices
If "PSDN:..." is returned, drivers are correctly installed.
Create this text: fastboot -i 0x0fce oem unlock 0xAPPENDYOURUNLOCKCODEAFTER0x
Paste the previous line in windows command:
Code:
fastboot -i 0x0fce oem unlock 0xAPPENDYOURUNLOCKCODEAFTER0x
confirm with Enter.
After 5 seconds, it is displayed Finished. Total time: ...
Bootloader is unlocked !
9) FLASH TWRP RECOVERY 3.5
Still in fastboot, type in console :
Code:
fastboot flash boot twrp-3.5.2_9-0-nozomi.img
. Confirm with Enter.
Wait, then once the confirmed success,
type :
Code:
fastboot reboot
(confirm with Enter).
Be fast to disconnect phone AND while it restarts, repeatedly click Volume+ AND Volume- buttons to access the recovery (can take a while).
Reconnect phone to PC once recovery has started.
10) BACKUP ORIGINAL ROM AND USE TWRP RECOVERY
You are now in TWRP recovery,
check Never show this screen during boot again and Swipe to Allow modifications.
Go to Backup, select all partitions.
Confirm with OK.
Then swipe to start backup.
Click the TWRP icon to return to home.
Go to Mount. Select Data partition and make sure bottom right button is dsiplaying Disable MTP text.
Phone must be connected to computer.
In Windows Explorer, open Xperia S device > Internal Storage.
Copy whole TWRP folder and save it somewhere safe on your PC.
In the opposite way, copy twrp.img and paste it in the same phone's folder you grabbed TWRP folder (SDcard root folder).
11) FLASH A PERMANENT TWRP RECOVERY
The TWRP recovery you are using is temporary.
We need to flash it on a partition.
Back to TWRP Home screen > Install > Install Image button > twrp.img > Select boot partition > Swipe to flash.
12) REPARTITION INTERNAL MEMORY
Newer Android versions changed the partition layout. We have to do so.
Back to TWRP Home screen > Mount.
Deselect ALL partitions.
You can copy-paste commands with right click in the Windows command.
From Windows command, type following commands:
Code:
adb devices
Command returns: List of devices attached
CB511Z8FWJ recovery
Code:
adb shell
Code:
fdisk -l /dev/block/mmcblk0
### fdisk -l (this is letter L, not number 1)
Command returns
Code:
4 heads, 16 sectors/track, 973824 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 65 2048 f0 Linux/PA-RISC boot
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 * 65 81 512 4d Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3 129 768 20480 48 Unknown
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4 769 954240 30511104 5 Extended
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5 785 800 512 46 Unknown
/dev/block/mmcblk0p6 833 928 3072 4a Unknown
/dev/block/mmcblk0p7 961 1056 3072 4b Unknown
/dev/block/mmcblk0p8 1089 1184 3072 58 Unknown
/dev/block/mmcblk0p9 1217 1376 5120 70 Unknown
/dev/block/mmcblk0p10 1409 1664 8192 83 Linux
/dev/block/mmcblk0p11 1665 2176 16384 f0 Linux/PA-RISC boot
/dev/block/mmcblk0p12 2177 34944 1048576 83 Linux
/dev/block/mmcblk0p13 34945 42944 256000 83 Linux
/dev/block/mmcblk0p14 42945 108480 2097152 83 Linux
/dev/block/mmcblk0p15 108481 954240 27064320 c Win95 FAT32 (LBA)
~ #
### Copy all the text of the partition layout to be able to reformat in case of a crash.
### Paste this text in a file somewhere safe on your PC.
We are interested by line /dev/block/mmcblk0p14, Start sector: 42945 in my case,
And /dev/block/mmcblk0p15 End sector: 954240 for me.
### These values may differ for you. USE YOUR OWN VALUES.
Now type
Code:
fdisk /dev/block/mmcblk0
Commands returns: Command (m for help):
Enter
Code:
p
Commands returns: Command (m for help):
Enter
Code:
d
Command returns: Partition number (1-15):
Enter
Code:
15
Commands returns Command (m for help):
Enter
Code:
d
Command returns: Partition number (1-15):
Enter
Code:
14
Commands returns: Command (m for help):
Enter
Code:
n
Command returns: First cylinder (769-954240, default 769):
Enter
Code:
42945
(Your /dev/block/mmcblk0p14 Start sector)
Command returns: Last cylinder or +size or +sizeM or +sizeK (42945-954240, default 954240):
If "default 954240" is the same as your /dev/block/mmcblk0p15 End sector, just press Enter.
Commands returns: Command (m for help):
Enter
Code:
t
Command returns: Partition number (1-14):
Enter
Code:
14
Command returns: Hex code (type L to list codes):
Enter
Code:
83
Commands returns: Command (m for help):
Enter
Code:
w
And let command return to its waiting state: ~ #
We must restart phone now, unplug USB and from TWRP go to Reboot > Recovery for a refresh of partition table.
### Your TWRP recovery is not compatible with new partition layout.
13) FORMAT PARTITIONS TO F2FS
nAOSP Rom doesn't support EXT4 filesystem. We need to repartition to F2FS, easily with TWRP.
### If you experience errors while flashing like "Unable to mount storage", use TWRP 3.2.3 instead: https://androidfilehost.com/?fid=1322778262904003720
Check Never show this screen during boot again and Swipe to Allow modifications.
Back to TWRP Home menu.
Go to Wipe > Wipe Advanced > Select Data > Repair or Change File System > Change File System > F2FS.
Repeat same procedure for Cache partition.
We must restart phone now, go to Reboot > Recovery for a refresh of partition table.
### If you don't, you won't be able to flash zipfiles.
After reboot, Swipe to Allow modifications.
### If you still see 0MB or a wrong size for data after the reboot, try to format data (Wipe/Format Data).
### In the worst case, convert data to ext4 and convert back to f2fs will do the job.
### You get ERROR 7, Failed to mount '/system' etc.), try this fix: https://bit.ly/3BvcYvM
### Failed to mount '/system' error: https://bit.ly/3yF2jwX
14) PUSH ROM AND GOOGLE APPS
Go to Mount > make sure nothing is mounted.
Connect phone to PC with USB.
Copy downloaded ROM and Google Apps to your /flash folder (along adb.exe and twrp.img).
Rename bitgapps*.zip to gapps.zip
Make sure adb is still running with 'adb devices' command.
Now push the ROM to the phone with
Code:
adb push nAOSProm-8.1.0-b11-nozomi.zip /sideload
Then
Code:
adb push gapps.zip /sideload
15) INSTALL ROM AND GOOGLE APPS
Go back to TWRP Home menu.
Go to Install > You are in /sdcard empty folder.
Tap on (Up a level) > sideload.
Select nAOSProm > Swipe to flash.
Wait during "Install Zip".
Then Reboot > Recovery
Go back to Install > select bitgapps*.zip > Swipe to flash.
## Problems flashing? Use TWRP 3.2.3-0: https://eu.dl.twrp.me/nozomi/twrp-3.2.3-0-nozomi.img.html
At the end, tap on Wipe Cache/Dalvik and Swipe to wipe.
Then tap on Reboot system.
Wait during long first boot.
Enjoy your new phone.
16) BETTER PERFORMANCES
Go to Settings > About phone.
Tap 7 times on Build number.
Go to Settings > System > Developer options.
Set Windows animation scale, Transition animation scale and Animator duration scale to 0.25x.
Right below, you may try to switch Force GPU rendering On (default is off but feels slower, isn't it ?)
17) ROOT
nAOSProm has a built-in root.
No extra Root manipulation needed.
### DO NOT TRY MAGISK, you will have problems.
### If you run in troubles with Magisk, see the end of this tutorial.
Configure Android as you like.
For faster GPS fix, use GPS Status and Toolbox and download A-GPS data.
You may try Greenify app to improve battery.
Your phone is up to date, enjoy ;-)
Thanks: @millosr, @mickybart, @AdrianDC, TWRP team, OpenGApps team, Flashtool Xperia Driver pack team
-----------------------------------------------------------------------
### Android doesn't see Wifi channel 14 (or 13),
Your phone doesn't see your local Wifi network?
You are probably european and your wifi is set to channel >= 11.
Reboot to TWRP recovery.
Go to Mount > check System partition.
Open a Windows command like before:
Code:
adb pull /system/build.prop
Edit file with Notepad++ freeware.
Locate line: ro.wifi.channels=
Change it to: ro.wifi.channels=14
Add this line just below: ro.boot.wificountrycode=EU
Save file.
Send modified file to phone:
Code:
adb push build.prop /system/
Disconnect phone, go to Reboot > System.
-------------------------------------------------------------------------
### Tried Magisk and it doesn't work ? (we know it doesn't)
You can't access recovery because phone restarts as soon as it reboots.
Let battery drain by bootloop.
When it is exhausted, hold Volume+ and connect phone tu USB, blue light will appear (fastboot mode).
Unzip boot.img from nAOSProm-8.1.0-b11-nozomi.zip to /flash folder (along fastboot.exe).
Make sure fastboot is OK with
Code:
fastboot devices
Then
Code:
fastboot flash boot boot.img
And restart with
Code:
fastboot reboot
Phone is op.
Enjoy

Thank you very much for this detailed guide. I have two questions:
1) Why do you recommend to flash version 2.3.7 of Android before beginning this procedure?
2) Everytime I have Flashed nAOSProm-8.1.0-b11-nozomi.zip on my phone (folllowing the original guide), I've had a very annoying bug, which is that it's really difficult to answer a phone call (I have to swipe the phone icon up several times until it finally rsponds). Of course I have always made a totally clean flash of the rom. Do you know what the reason for this can be?

TXUTXI72 said:
Thank you very much for this detailed guide. I have two questions:
1) Why do you recommend to flash version 2.3.7 of Android before beginning this procedure?
2) Everytime I have Flashed nAOSProm-8.1.0-b11-nozomi.zip on my phone (folllowing the original guide), I've had a very annoying bug, which is that it's really difficult to answer a phone call (I have to swipe the phone icon up several times until it finally rsponds). Of course I have always made a totally clean flash of the rom. Do you know what the reason for this can be?
Click to expand...
Click to collapse
Hi,
1) By precaution. For some phones you have to flash latest firmwares which upgrade bootloaders. We never know and there is no information about this. Just precaution.
2) I will test it.
Have you tried another call app ? That's the benefit of Android.

djibe89 said:
Hi,
1) By precaution. For some phones you have to flash latest firmwares which upgrade bootloaders. We never know and there is no information about this. Just precaution.
2) I will test it.
Have you tried another call app ? That's the benefit of Android.
Click to expand...
Click to collapse
Hi again! Thanks for answering.
First of all, 2.3.7 was not the last firmware for Sony xperia s, but the first one. The last one was Jelly Bean (4.1.2, or something like that, as far as I remember). So I am confused by your answer.
Secondly, yesterday I flashed again nAOSProm-8.1.0-b11-nozomi.zip, and this time I didn't get that annoying bug related to the phone app. Why? Well, there are two possible reasons:
1) This time I Flashed TWRP the way you tell in your guide. I used to do it via Flashtool.
2) I have used Nano Gapps instead of Pico Gapps.
Another thing I would like to tell you, is that yesterday it was impossible for me to flash the rom with the official TWRP (the one you recommend). I had to use TWRP 3.2.3, the version the developer of this rom recommends. It is something I don't understand: Why does the official TWRP work for you, while it doesn't for me?
Thank you very much again for all your help. I am pretty much interested in bringing to life again this old phone. What I really like about Xperia S is its small size
Now I am going to try to flash the rom again, because, although it works correctly, I cannot reboot into recovery
Cheers!

TXUTXI72 said:
Hi again! Thanks for answering.
First of all, 2.3.7 was not the last firmware for Sony xperia s, but the first one. The last one was Jelly Bean (4.1.2, or something like that, as far as I remember). So I am confused by your answer.
Secondly, yesterday I flashed again nAOSProm-8.1.0-b11-nozomi.zip, and this time I didn't get that annoying bug related to the phone app. Why? Well, there are two possible reasons:
1) This time I Flashed TWRP the way you tell in your guide. I used to do it via Flashtool.
2) I have used Nano Gapps instead Pico Gapps.
Another thing I would like to tell you, is that yesterday it was impossible for me to flash the rom with the official TWRP (the one you recommend). I had to use TWRP 3.2.3, the version the developer of this rom recommends. It is something I don't understand: Why does the official TWRP work for you, while it doesn't for me?
Thank you very much again for all your help. I am pretty much interested in bringing to life again this old phone. What I really like about Xperia S is its small size
Now I am going to try to flash the rom again, because, although it works correctly, I cannot reboot into recovery
Cheers!
Click to expand...
Click to collapse
Hi,
Sorry for my late replay.
Sorry for the 2.3.7 version. When i tried to force updates nothing came out so I thought it was the last one. I will remove comments on version.
For the Recovery, everything went fin with latest version. However, with 3.4+ TWRP, every time you wipe a partition you must reboot recovery before flashing.
I'll put a comment for those who have problems flashing.
And now I must add the Magisk tuto.

djibe89 said:
Hi,
Sorry for my late replay.
Sorry for the 2.3.7 version. When i tried to force updates nothing came out so I thought it was the last one. I will remove comments on version.
For the Recovery, everything went fin with latest version. However, with 3.4+ TWRP, every time you wipe a partition you must reboot recovery before flashing.
I'll put a comment for those who have problems flashing.
And now I must add the Magisk tuto.
Click to expand...
Click to collapse
Flashing Rom and Gapps over adb gives an insufficient space error. I first install Rom and then install Gapps.

Hi @haktug,
did you repartition correctly ? The partition should be ultra wide after repart

after writing the partition layout and formating /data and /cash the only i get whatever i try to do is "Unable to mount storage". SDCard partition is marked as no present and on "Select Storage" button the only i get is "SDCard (0MB)". and that lets me do NOTHING at all. i tryied everithing i cant get over it, dispite my every step in this guide were presice... please somebody help...

djibe89 said:
Hi @haktug,
did you repartition correctly ? The partition should be ultra wide after repart
Click to expand...
Click to collapse
yes ı did

bkokkinos said:
after writing the partition layout and formating /data and /cash the only i get whatever i try to do is "Unable to mount storage". SDCard partition is marked as no present and on "Select Storage" button the only i get is "SDCard (0MB)". and that lets me do NOTHING at all. i tryied everithing i cant get over it, dispite my every step in this guide were presice... please somebody help...
Click to expand...
Click to collapse
which version of twrp are you using?

haktug said:
which version of twrp are you using?
Click to expand...
Click to collapse
the one you provide ... 3.5.0.9.0 i think it is
i made the procedure multiple times and i formated many times both /data and /cashe and i return to my previous layout installed a random rom and tryied this repartition again with the same results....
unable to mount storage
SDCard (0MB)
on advanced wipe >SDCard >change file system > Present:No

@bkokkinos Can you send the log form the command
Code:
fdisk -l /dev/block/mmcblk0

bkokkinos said:
the one you provide ... 3.5.0.9.0 i think it is
i made the procedure multiple times and i formated many times both /data and /cashe and i return to my previous layout installed a random rom and tryied this repartition again with the same results....
unable to mount storage
SDCard (0MB)
on advanced wipe >SDCard >change file system > Present:No
Click to expand...
Click to collapse
you should use twrp 3.2.3 on this link.
Downloads for : Sony Xperia S | AndroidFileHost.com | Download GApps, Roms, Kernels, Themes, Firmware and more. Free file hosting for all Android developers.

haktug said:
you should use twrp 3.2.3 on this link.
Downloads for : Sony Xperia S | AndroidFileHost.com | Download GApps, Roms, Kernels, Themes, Firmware and more. Free file hosting for all Android developers.
Click to expand...
Click to collapse
WWWOOOOOOOOOOOOOOOOOWWWWWWWWWWW!!!!!!!!!!!!!
What did you do......????????!!!!
i just flashed twpr 3.2.3 and everything worked perfectly....!!!! How could just different version make such differance???? OOOUUUFFFFFF i can't believe it... my two days headache is gone... THANK YOU Very Much!!!

Hi, I updated tutorial thanks to both of you.

Thanks t
djibe89 said:
Hi, I updated tutorial thanks to both of you.
Click to expand...
Click to collapse
Thanks to you!

Hello,
Good day! I was stuck at step 13) INSTALL ROM AND GOOGLE APPS
It says,
"Updater process ended with ERROR: 7 error installing zip file 'sideload/nAOSProm-81.0-b11-nozomi.zip'
Failed to mount '/system' ".
I used TWRP 3.2.3-0.
Thank you...

l3mu3l said:
Hello,
Good day! I was stuck at step 13) INSTALL ROM AND GOOGLE APPS
It says,
"Updater process ended with ERROR: 7 error installing zip file 'sideload/nAOSProm-81.0-b11-nozomi.zip'
Failed to mount '/system' ".
I used TWRP 3.2.3-0.
Thank you...
Click to expand...
Click to collapse
I don't know if I can really help you, but I would recommend you to use the links provided by the author of the rom himself. For instance, the author of this rom says clearly to use the following link in order to get the proper TWRP version: https://androidfilehost.com/?fid=1322778262904003720
Another important thing is in my opinion that the permanent twrp must be flashed into the fota partition, not in the boot partition. In my case, everytime I flashed it into the boot partition, the device always rebooted into system and not into twrp.
And very important as well is to check if the repartition has been made correctly. Check out that the sd has about 28 gigabytes free after doing the repartition.

l3mu3l said:
Hello,
Good day! I was stuck at step 13) INSTALL ROM AND GOOGLE APPS
It says,
"Updater process ended with ERROR: 7 error installing zip file 'sideload/nAOSProm-81.0-b11-nozomi.zip'
Failed to mount '/system' ".
I used TWRP 3.2.3-0.
Thank you...
Click to expand...
Click to collapse
By the way, I have just read someone who was getting error 7 while trying to install the rom, and he warns: MAKE SURE YOU DON'T CHANGE SYSTEM PARTITION INTO F2FS. Only Data and cache partitions must be changed into f2fs. Just in case it may help you...

TXUTXI72 said:
I don't know if I can really help you, but I would recommend you to use the links provided by the author of the rom himself. For instance, the author of this rom says clearly to use the following link in order to get the proper TWRP version: https://androidfilehost.com/?fid=1322778262904003720
Another important thing is in my opinion that the permanent twrp must be flashed into the fota partition, not in the boot partition. In my case, everytime I flashed it into the boot partition, the device always rebooted into system and not into twrp.
And very important as well is to check if the repartition has been made correctly. Check out that the sd has about 28 gigabytes free after doing the repartition.
Click to expand...
Click to collapse
ı agree. if it doesn't work, you're doing it wrong somewhere. You should do it again

Related

Collection of Guides and Tutorials for G9(Also, how to root and get custom rom)

Welcome
I wrote this post to help people get their Archos g9 tablet running custom roms. If you have any improvement ideas, please post them so I can make this better source of information.
List of content:
Post 1
What is recovery
What is SDE and how to install it
-Also SDE for 4.0.25
List of most commonly used roms
How to install custom roms
How to install offical rom
How to multiboot android 4.0 based roms
Installing 3G stick and Huawei modems support.
Post 2
Change symlinks/binds.
Installing ADB
Installing SuperCharger
Installing Chainfire3D
But why?
FAQ
Useful links
What is recovery​You can boot to recovery menu by holding volume- while booting your device. From recovery meny you can calibrate your touchscreen, wipe data and do this kind of stuff. Installing SDE creates new entry to recovery menu, called Special Developers Edition. There you can remove android kernel, flash new, export hdd and data. In recovery move up and down with volume + and -. Select by pressing power button
What is SDE and how to install it​SDE is shortened word from Special Developers Edition. After SDE is installed, your tablet is able to boot to official rom, recovery, and SDE rom. Most of the roms advice you to use "Remove android kernel" from SDE before you install kernel. When you remove your android kernel from there and install kernel from custom rom, your archos boots directly to custom rom. If you don't delete it, your device boots to official, but keeping volume - while booting gives you change to boot to SDE.
There are 3 guides how to install SDE. Official SDE watermarks your device for archos (there is no watermark on screen ), so they can detect you have installed SDE in some point. It stays even if you remove SDE. Official way is more safe. Also, it removes "only" software warranty. If your devices powerbutton, Usb-port or etc brokes, you can still send it to warranty. Link to official SDE install guide. Big thanks for Shano56.
Then there is unofficial, a bit more dangerous method. It doesn't watermark your device, but is more complicated. Guide tells that it's outdated, but it worked for me. I used official 4.0.4 version while installing. Link to the guide. Big thanks to Shano56.
4.0.25 Guide, by surdu_petru
surdu_petru said:
Hi !
I uninstalled SDE by mistake yesterday !
...so, you can enable (install) unofficially SDE following this path ( work 100% on firmware 4.0.25 ) :
On your tablet :
check on Settings-> Developer options -> USB debugging on !
connect USB cable ( PC to tablet )
On your PC :
> adb push 1 /data/local
> adb push 2 /data/local
> adb shell
$ chmod 0755 /data/local/*
$ ./data/local/1
$ exit
> adb reboot
> adb shell
$ ./data/local/2
$ exit
> adb reboot
> adb push zimage /data/local/tmp
> adb push initrd.cpio.lzma /data/local/tmp
> adb push abcbox /data/local/tmp
> adb shell chmod 755 /data/local/tmp/abcbox
> adb shell /data/local/tmp/abcbox kd_flasher -k /data/local/tmp/zimage -i /data/local/tmp/initrd.cpio.lzma
( now you have installed unofficially SDE ! )
Flash Root version or other Custom Rom :
> adb reboot
> adb shell rm /data/local.prop
> adb push archos.ext4(.update) /mnt/storage
Go to SDE -> ( check "Reboot" on power off menu , and after a while press & keep volume down until you see SDE menu !)
Go to Recovery System -> Developer Edition Menu -> Remove Android Kernel -> I Undestand -> OK -> Developer Edition Menu -> Flash Kernel & Initramfs -> copy here zImage and initramfs.cpio.lzo appropriate archos.ext4(.update) -> OK -> wait to boot !
Now you have Rot version installed !
Here you will find the necessary files : Enable_SDE.zip
Click to expand...
Click to collapse
List of most commonly used roms​These roms are most commonly used. Most of them are still being developed. I also included link to rooted official honeycomb, because some people have better touchscreen responsibility with it.
ParanoidAndroid 3
Cyanogenmod 10, 4.2 mockup
Cyanogenmod 10
AOKP ROM
[email protected]
Clean_Slim&Fast(Based on official 4.0.25!)
Ubuntu. This requires special kernel, which is compatible with official android 4.0.4Overclockable stock rom
Early CM9
Stock ICS rom with root & busybox
Stock honeycomb with root. (FYI, kernel requires renaming while installing)
How to install custom roms​Custom roms have different installing methods, but basic idea is same. You move image file with specified name to specified location.
When coming from stock rom or whengoing to stock rom:
CyanogenMod 10, AOKP, CyanogenMod 9
surdu_petru said:
Installation : Now should be work on all devices Gen9 !!!
...connect USB cable to PC and ( you need to use a Rom with root access ) :
> adb shell
# stop
# rm -rf data/*
# mkdir data/local
# mkdir data/media
# exit
> adb push archos.ext4 /mnt/storage ( need to wait about ~150 seconds ) !
> at the same time do : adb reboot & press and keep volume down ; in SDE -> DEM-> Remove Android Kernel ( if exist ) -> Flash Kernel & Initramfs -> copy here zImage & initramfs.cpio.gz -> OK -> wait to reboot !
Click to expand...
Click to collapse
[email protected], Ubuntu, Root 4.0.7 Clean_Slim&Fast
surdu_petru said:
Install :
- copy archos.ext4.update(archos.ext4 in case of Clean_Slim&Fast) in /mnt/storage/ , you can use this command > adb push archos.ext4.update(remove .update if Clean_Slim&Fast) /mnt/storage/
- go to SDE -> Developer Edition Menu -> ( Remove Android Kernel if available ) -> Flash Kernel & Initramfs -> copy here zImage & initramfs.cpio.lzo -> OK! -> wait to reboot .....
- after everything was installed - please reboot your device !
Click to expand...
Click to collapse
Honeycomb
Install like Cyanogenmod and AOKP and others, but rename initramfs.cpio.gz to initramfs.cpio.lzo
How to install official rom​Download official 4.0.7 rom from here.
Now boot to recovery (hold volume- while booting) and choose update firmware.
Now there should be noew drive in your pc. Drop the downloaded firmware_archos_it4.aos to there and press ok in recovery. Keep usb plugged in while installing. It should take around 30 seconds to 2 minutes. Now choose ok again. your tablet should now reboot to stock rom.
4.0.24 Official is owrking on some devices, but because it won't work on all, i won't cover it here(yet)
How to multiboot android 4.0 based roms​Install modified initfram from this topic. Use the zimage from the rom you want to multiboot. AFAIK you can multiboot with following combos:
[email protected], Ubuntu (download newer kernel from later pages.), Root 4.0.7
and
AOKP, CyanogenMod 9.
You cant use [email protected] and AOKP because they do not use same kind of data. That means that after you have run first rom, the second will bootloop. That is also why it requires wiping data when changing from stock to aokp and vise versa.
Detailed:
Download dmenu-0.3a.zip, and extract initframfs to desktop. Then download [email protected] and stock 4.0.7 rooted. Extract Image files and zimage from either one of the roms. Now just instal like described in earlier section, while using initframfs from multiboot and kernel from other rom.
Installing 3G stick and Huawei modems support. ​
Trevd made a package to add 3G stick and extra Huawei modems work for AOKP and generally all ICS ROMs. This guy is awesome because he also made some Huawei modems work.
trevd said:
Hi surdu_petru and AOKP fans.
Great work as always, It's not a rom i'll ever use but It's the first time I've loaded an AOKP Rom, I like notification layout, I'll be having that away for my own personal rom Anyway I was more just passing through and noticed 3G was not working yet. As seen as though that seems to be my speciality and preoccupation/addiction for the last 9 months I thought I do something to remedy that situation for you.
Here's an hotfile link to download the update [ 3g-archos-aopk.7z ] this should contain everything you need to get the Archos 3G Dongle, just for ****s and giggles as a extra bonus i've also included the huawei support file as well :good:
Installation:
From a command prompt / bash terminal
Code:
7z x 3g-archos-aopk.7z
adb push 3g /
adb shell reboot_into sde
extracting the 3g-archos-aopk.7z will give youu a 3g directory in you current directory, we then push the contents of the 3g directory to the root direcotry on the device. This operation is recursive.
Have Fun!
What follows is a detailed explanation of what files and modifications are required to add 3G support.
Archos 3G Stick
The changes / additions to add this functionality breaks down like this ; The following required binary's were on the device already:
** /lib/modules/hso.ko is insmod'd by the device specific init file /etc/init/init..rc
Code:
/lib/modules/hso.ko[B]**[/B]
/usr/bin/usb_modeswitch
/system/lib/libtcl-ril.so
/system/bin/rild
/system/bin/pppd
/system/xbin/chat
/etc/ppp/init_pppd_datakey
/etc/ppp/ip-up-datakey
/etc/ppp/ip-down-datakey
/etc/ppp/peers/datakey
/etc/chatscripts/datakey_start
/etc/chatscripts/datakey_stop
/etc/usb_modeswitch/1bbb_f000
The following required services were already defined in the device specific init.rc's located in /etc/init/init..rc ,
*** switch_ms_3g defined by /etc/init/init.archos.rc
Code:
service service switch_ms_to_3g[B]***[/B]
service pppd_secrets
service pppd_datakey
service ril-daemon
So what's missing? you may ask as this pretty much is everything that is needed by the Archos 3G Stick.
Standard Archos Roms use the UsbKeyManager.apk system service to start the switch_ms_to_3g and ril-daemon service's. I replace that with my own ueventd handling native service and add an additional to configuration file keep everything clean
Code:
/system/bin/hotplugd
/init.dongle.rc
I've added the following line to the top of the /init.rc
Code:
import init.dongle.rc
All that is left to do now is enable mobile networks on the rom. I used apktool to decompile the /system/framework/framework-res.apk and change the following values
res/values/bools.xml
Code:
true
true
res/values/arrays.xml
Code:
wifi,1,1,1,-1,true
mobile,0,0,0,-1,true
mobile_mms,2,0,2,60000,true
mobile_supl,3,0,2,60000,true
mobile_hipri,5,0,3,60000,true
mobile_fota,10,0,2,60000,true
mobile_ims,11,0,2,60000,true
mobile_cbs,12,0,2,60000,true
wifi_p2p,13,1,0,-1,true
"1,1"
"0,1"
"7,1"
"9,1"
res/values/strings.xml
Code:
ppp1
Huawei Support
The extend this functionality further I added the following files
Code:
/etc/ppp/init_pppd_gprs
/etc/ppp/ip-up-gprs
/etc/ppp/ip-down-gprs
/etc/ppp/peers/gprs
/etc/chatscripts/gprs_start
/etc/chatscripts/gprs_stop
/etc/usb_modeswitch/ [ numerous configurations files ]
/lib/modules/usb_wwan.ko
/lib/modules/option.ko
/system/lib/libhuaweigeneric-ril.so
We also need to chmod 6755 /system/bin/pppd but that is handled/checked in the /init.dongle.rc so there is no need to do that manually
Click to expand...
Click to collapse
Change symlinks/binds​Trevd wrote guide to let people know how to change binds. That way you can move large folders, like Gameloft games and navigator files to ExternalSD, saving InternalSD space.
trevd said:
If you after freeing up space, it is still possible with a bit of hacking voodoo . There are 2 ways I know of in fact.
METHOD 1 - SDCARD SERVICE
you can point the /storage ( /mnt/storage in reality ) to any directory you like. I've currently got mine pointing to an multi partitioned external 32gb sdcard. :0 all you need to do is change the sdcard service in the /etc/init/init.A101S.rc,
Currently it mounts /data/media to /mnt/storage, if you have an external sdcard card handy, try this as a quick and dirty test
From a terminal emulator or adb shell run the following commands
Code:
stop sdcard ;
sdcard /mnt/sdcard 1000 1015 &
ls /storage
You will now see that the external sdcard can be access through /storage. to kill the test run
Code:
pkill -9 sdcard
start sdcard
Everything should be back to normal. As I mentioned to make a more permanent change edit the following line in the /etc/init/init.A101S.rc
Code:
service sdcard /system/bin/sdcard /data/media 1000 1015
METHOD 2 - MOUNT BIND
The other, perhaps more straight forward method uses the bind argument on the mount to command to "mount an already visible filesystem elsewhere" .
In the example I'll bind the external sdcard to a directory in the internal storage
use the terminal emulator or adb once again to execute the following commands
Code:
mkdir /storage/sdcard
mount --bind /mnt/sdcard /storage/sdcard
To make this more parmanent, I would probably create a wrapper shell script for the sdcard service to make sure it all gets started together, that's just my preference, As we say in trade ( or maybe it's a saying i've just made up :silly: ) ; "there's more than one way to mount a file system!"
In Summary: I would go with method 2 as this effectively achieves the desired effect off "symlinking" an external directory in the /storage
Cheers
Click to expand...
Click to collapse
Installing ADB​ADB comes from word android development bridge, and it allows you to debug, move files and get shell access to your tablet.
Archos said:
First make sure you are running the latest ARCHOS firmware. Connecting by this method will give you user shell privileges. Learn more to know how to use ADB on Windows, Mac or Linux operating system:
Go to the Android SDK page and download the latest SDK for your operating system.
For Windows users only: Install the Archos ADB USB Driver for Windows. The driver is available at the ARCHOS support ftp (ftp://support.archos.com). Instructions how to install the driver are available at USB Driver for Windows site on Android Developers.
Add Archos vendor ID (0x0e79) to adb_usb.ini in .android folder in your home directory:
Windows: echo 0x0e79 >> "%USERPROFILE%\.android\adb_usb.ini"
Macos: echo "0x0e79" >> ~/.android/adb_usb.ini
Linux: echo "0x0e79" >> ~/.android/adb_usb.ini
For Linux users only: You need to add a udev rule if ADB only works as root:
Create a file /etc/udev/rules.d/51-android.rules that contains the following lines:
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device",
ENV{PRODUCT}=="e79/*", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="e79", MODE="0666"
Make the rule known to udev with the following command:
udevadm control --reload-rules (or udevcontrol reload_rules on older systems)
Click to expand...
Click to collapse
Running adb from anywhere
steviewevie said:
We need to update your Path variable. This lets you run adb on your PC from a command window no matter which directory you are in (which makes things a lot easier). If you don't setup your Path, then every time you want to run adb, you will either have to type the whole long pathname where you put adb, or cd to where you've put adb and run it from there (which could be inconvenient if you are transferring files to/from your phone).
On your PC, right-click on "My Computer" and select "Properties". (on Vista, click on "Change Settings"). Go to the "Advanced" tab, then select "Environment Variables". Find the "Path" variable in the list of variables that it shows (you might need to scroll), and then double-click on that entry to edit it. Add the full path of the "tools" and "platform-tools" folders of the SDK to your path. e.g. if the SDK has been installed in "c:\Program Files\android-sdk-windows", then add to your Path "c:\Program Files\android-sdk-windows\tools;c:\Program Files\android-sdk-windows\platform-tools" (Please Note - don't put any spaces between the semi-colon and pathname, otherwise it won't work !)
Click to expand...
Click to collapse
sources:Archos, steviewevie
Installing Supercharger​Supercharger is a multiscript which makes the tablet work much better. Its created by Zeppelinrox, and its official topic is here. We are using also script manager in this guide. That way we can make MinFrees and OOM apply.
In this guide we'll use Apex launcher which is moved to /system/app for our default launcher.
We are also using adb to configure and run Supercharger.
Because stock launcher is odexed and i am not writing how to deodex, we are not using it.
First make sure apex is your default launcher. This can be tested by pressing home button in homescreen.
If it show mini previews of your homescreens, apex is your default launcher.
Now lets begin:
go to here and download newest file. At
the time of writing, it is Update 9_RC11_test6. Move it to your adb folder.
Then open commandline. This can be opened with windowskey + R and writing cmd. Navigate
to adb folder using cd command. I have made adb to run from anywhere, so i just navigate to the downloaded file.
Now use command "adb push v6* /mnt/sdcard" then use command "adb shell". Now you should have
shell access to your tablet. Now do following
su
cd /mnt/sdcard
sh V6* /remember capital V)
Supercharger script should open now. After presentation, script should print after telling your busybox version
"com.anddoes.launcher is the home launcher!" Now continue install. Supercharger will tell you everything you need to know.
So just follow the instructions. After choosing kernel tweak, you get bunch of permission denieds.
We can't help them, so lets just continue.I recommend on using all the tweaks that you can,
but it is your choise do you want to use or not. After all the selections are selected and your in
driver panel, choose number 32. It'll reboot your tablet and wipe dalvik. When the tablet has booted, lets run supercharger script again.
So write these again:
su
cd /mnt/sdcard
sh V6_Super*
After getting to drivers panel, you notice that minfrees are not in effect, and neither is OOM Grouping Fix BUT if they are, you can ignore this step..
Install script manager from market and open it. Give it root permissions and navigate to /system/etc/init.d
press SS99SuperCharger to open its settings. Now press the Su button and then Boot button.
Now press save, and then click it's name which appers to right. Then press back button and reboot.
Now Minfrees should work, and OOM too.
Now you can run 22 if you want to try it. Supercharger is now fully working.
Installing Chainfire3D​
Chainfire said:
Chainfire3D is an intermediary OpenGL driver. What does that mean? It means that Chainfire3D sits between your apps and the graphics drivers, and can intercept and/or change commands between the two. It has some built-in functions, and can be further extended with plugins to provide extra functionality.
Click to expand...
Click to collapse
It is very useful for running gameloft games and other games too. I recommend buying it. There are some plugin for it, but i'm not going to tell you about it now.Play store link.
After downloading it, open it and choose "Chainfire3D Driver" and from there "install". Then confirm it and tablet should reboot. Now reopen it and choose "Default opengl setting". From there you can tweak 3D performance if some games lag. Also, if you install plugin, there you can apply them. I personally use "reduce texture quality".
But why?​
This section is to point few reason why to follow these guides. Lets begin:
SDE
Well, you should install this if you want to customize your tablet. If your happy with your tablet running stock, you don't need this, or any other guides.
Custom roms/kernels
Custom roms allow you to use root, they make your tablet faster and add extra functionality. This "functionality" includes: Overclock, run init.d scripts, enable both cores with all governors, root and themes. The benefits are not limited to these, but I could name this quickly. If you wan't to try something which is close to stock, but still has root and some custom functionalities, i would recommend deodexed 4.0.7, or [email protected]
Install official roms
These roms do not require SDE, but will not include root or anything fun . Updating your official rom has many benefits. They include fixes and boost your tablets performance.
Multiboot
Multibooting allows you to have 2 or more roms, which you can choose which to boot on startup. I would recommend this if you want to test functions with root, but still have "backup plan" if testing rom renders unbootable.
3G support
Basicly this allowes some extra huawei 3G sticks to work. There is no list of working stick, you just have to try and hope.
Change symlinks/binds
These allow you to "move" eg. gameloft games to external sd, and allow you to acces your externalsd via internalsd folder.. That way your gamedata does not eat the valuable internalsd space.
ADB
You need this to transfer rom to your tablet. It is also required when you sent logcat reports to help remove bugs.
SuperCharger
This makes your tablet work more fluid. I personally install supercharger to all my android devices. It removes need for task killer, and makes the device work better. Everyone has different results, and it costs only time to install, so i would recommend installing it.
Chainfire3D
This tool allows you to play games made for other GPUs and it can tweak application graphics. You can make the game look worse, but run better or adjust the grphics for a bit higher, so the game looks nicer.
FAQ[/CENTER]
These questions and answers are collected from various sources.
surdu_petru said:
How to activate second core for all govenors in surdu_petrus roms?
To activate the second core, you need the following steps :
- copy /system/S1tweak in /system/etc/init.d/ or ( > adb shell ; # cp /system/S1tweak /system/etc/init.d ; # exit )
- open No-frills CPU Control :
- choose the desired Governor ( but not hotplug ) !
- choose the desired frequency , but not overclocked ! ( when the device will boot - will open with the selected frequency , so please choose max. frequency = your max. stock frequency )
- check "Apply on boot"
- check "Applay"
- check allow if superuser asked permission
- reboot your device !
- Now , both core will be used in any selected Governor ( other than hotplug ! ).
Click to expand...
Click to collapse
What modems does Trevds mod support?
trevd said:
The theoretical list of supportted devices come from those devices supportted by usb_wwan and option kernelp drivers.
Click to expand...
Click to collapse
Shano56 said:
Can I just drag the .zip file to the RAMDISK that appears when I flash zImage and initramfs?
No! Archos recovery cannot read ZIP files. You must first EXTRACT, then copy the contents of the extracted folder. NOT the folder itself. This means you will have two files on the RAMDISK, and no additional folders. If you don't know what a RAMDISK is, try Google or Wikipedia. If you get stuck in a boot loop because you forgot to extract archos.update.ext4 or drive.zip, you must follow the instructions below.
Help! I am stuck in a bootloop! Archos splash screen appears and keeps rebooting. I messed up when I was rooting, and now android will not boot! I accidentally formatted my device, and now I cannot boot into android.
This is a simple mistake and in 99% of cases it is easy to fix. Follow these steps:
Step 1: Download official Archos G9 firmware for ALL G9 tablets (aos file) HERE
Step 2: Boot into recovery turning your device off and then holding volume down + power at the same time
Step 3: Choose "Update Firmware"
Step 4: Connect USB cable to computer and tablet
Step 5: A removable device should appear (RAMDISK), copy the file you just download straight to that drive
Step 6: Press the power button once the file is done copying. DO NOT UNPLUG your device until it has finished updating and has booted back into android.
If you did not format your tablet or delete any personal media, your files should be uneffected.
Will I lose SDE menu if I update my tablet with official AOS or OTA update
As of the latest update (4.0.6) no official update from Archos has removed SDE menu. You should be fine, and your SDE menu should remain untouched.
Click to expand...
Click to collapse
[/quote]
Useful links​Some link i consider useful are here:
G9 101 16GB 1.5GHz Teardown! (Lots of Images)
XBMC for android
Want faster GPS? Follow this guide
3th just i remember something to add. Comment and give me some feedback. It helps me to make this topic useful for beginners, and for those who seek info.
I meant to edit first post... well, this works as 4th reserved then.
Hi there!
You have been busy! Thanks for kind words, Just an heads up really, you might want to update your post as I deleted the usb-modem-binary-redist github repo yesterday as it was a bit too clever for it's own good and I think a bit of abuse/misuse of the concept branching! Just because you can, doesn't always mean you should LOL, with that in mind I'd probably advise against linking to my github repos as they don't stay static for very long. I generally leave the hotfile links up "forever" so link away with them.
The Information and files included in the new AOKP post about 3G Dongles should be good across all ICS roms. Finally allow me to throw out this mini guide I wrote a while back which explains an "app-free" method of freeing up space, I noticed there been a bit of discussion about it, Using an app just seem like overkill, but that's just me I suppose.
Anyway good work. :good:
trevd said:
Hi there!
You have been busy! Thanks for kind words, Just an heads up really, you might want to update your post as I deleted the usb-modem-binary-redist github repo yesterday as it was a bit too clever for it's own good and I think a bit of abuse/misuse of the concept branching! Just because you can, doesn't always mean you should LOL, with that in mind I'd probably advise against linking to my github repos as they don't stay static for very long. I generally leave the hotfile links up "forever" so link away with them.
The Information and files included in the new AOKP post about 3G Dongles should be good across all ICS roms. Finally allow me to throw out this mini guide I wrote a while back which explains an "app-free" method of freeing up space, I noticed there been a bit of discussion about it, Using an app just seem like overkill, but that's just me I suppose.
Anyway good work. :good:
Click to expand...
Click to collapse
Thanks for the feedback.
I removed the part which had github link, and modified the AOKP section to tell it works with all ICS ROMs.
I'll included your mini guide. I might even have some use for it myself...
Sent from my GT-I9100 using xda app-developers app
help me for multi boot ubuntu ics bleuv03
hello I want to know is it possible to bleuv03 ics and multi boot with ubuntu and it is possible that what zImage and iniframts I should use.
desoler for my english I'm french and I go through a translator thank you.
muti642 said:
hello I want to know is it possible to bleuv03 ics and multi boot with ubuntu and it is possible that what zImage and iniframts I should use.
desoler for my english I'm french and I go through a translator thank you.
Click to expand...
Click to collapse
Download zimage, initfram and Ubuntu image from
http://forum.xda-developers.com/showthread.php?p=26000199
There is a high chance that touchscreen will not work if you have 101 G9 model in Ubuntu. You can still use USB OTG devices like mouse normally.
Sent from my GT-I9100 using xda app-developers app
julle131 said:
Download zimage, initfram and Ubuntu image from
http://forum.xda-developers.com/showthread.php?p=26000199
There is a high chance that touchscreen will not work if you have 101 G9 model in Ubuntu. You can still use USB OTG devices like mouse normally.
Sent from my GT-I9100 using xda app-developers app
Click to expand...
Click to collapse
thank you for answered. j've already managed to install ubuntu and I had no problem touch by cons I Can not get a dual boot ubuntu and bleuv03 ics. I shall therefore understands the multi boot flash I then I put two images but in the memory of the tablet and then I flash the kernel you gave me quote above and I should be able to boot on 2 rom and bleuv03 ubuntu?
muti642 said:
thank you for answered. j've already managed to install ubuntu and I had no problem touch by cons I Can not get a dual boot ubuntu and bleuv03 ics. I shall therefore understands the multi boot flash I then I put two images but in the memory of the tablet and then I flash the kernel you gave me quote above and I should be able to boot on 2 rom and bleuv03 ubuntu?
Click to expand...
Click to collapse
Download the this kernel https://docs.google.com/file/d/0BxgjsI4pMALheHZoVUdIYnVTN28/edit
It can dualboot [email protected] v03. If the ubuntu does not boot after flashing it, download this ubuntu image:
https://docs.google.com/file/d/0BxgjsI4pMALhVl9kek9SSFpKb2M/edit
THX
julle131 said:
Download the this kernel https://docs.google.com/file/d/0BxgjsI4pMALheHZoVUdIYnVTN28/edit
It can dualboot [email protected] v03. If the ubuntu does not boot after flashing it, download this ubuntu image:
https://docs.google.com/file/d/0BxgjsI4pMALhVl9kek9SSFpKb2M/edit
Click to expand...
Click to collapse
Thank you thanks you it works well, I do not use the right kernel or the good image of ubuntu. ps: the touchscreen does not work but using the OTG is perfect.
thank you again julie :good:
sorry for ignorance but for root i need to have adb sdk for do this steps??
"- copy archos.ext4.update to /mnt/storage/ , you can use this command > adb push archos.ext4.update /mnt/storage/
- go to SDE -> Developer Edition Menu ->( Remove Android Kernel if available ) -> Flash Kernel & Initramfs -> copy here zImage & initramfs.cpio.lzo -> OK! -> wait to reboot .....
- the first boot may be longer ! "
If my archos is untoot how i use this comand? with adb sdk ?!
solrakk6 said:
sorry for ignorance but for root i need to have adb sdk for do this steps??
"- copy archos.ext4.update to /mnt/storage/ , you can use this command > adb push archos.ext4.update /mnt/storage/
- go to SDE -> Developer Edition Menu ->( Remove Android Kernel if available ) -> Flash Kernel & Initramfs -> copy here zImage & initramfs.cpio.lzo -> OK! -> wait to reboot .....
- the first boot may be longer ! "
If my archos is untoot how i use this comand? with adb sdk ?!
Click to expand...
Click to collapse
Yes, you must use adb. I assume your "untoot" means unrooted. You use cd command to navigate to your adb folder and from there to platform-tools. Also drop archos.ext4.update to there. Then use the adb command to move the file. Moving file to that location does not require root.
Sent from my GT-I9100 using xda app-developers app
Archos G9 101 HD
Hi Surdu,
I tried to update after SDE install and then accidentally dont know what happened have lost android on my tablet G9 101 HD. I cant see my hd on pc and is not booting but only can see the rom image which appears on boot without animation. How can I transfer the update archos.ext4 into Internal Storage without seeing the drive on PC win 7. I have made mistake in steps may be.
Please help.
hondacity said:
Hi Surdu,
I tried to update after SDE install and then accidentally dont know what happened have lost android on my tablet G9 101 HD. I cant see my hd on pc and is not booting but only can see the rom image which appears on boot without animation. How can I transfer the update archos.ext4 into Internal Storage without seeing the drive on PC win 7. I have made mistake in steps may be.
Please help.
Click to expand...
Click to collapse
Go to the recovery menu, choose update firmware. When it prompts you to connect tablet to pc, cobbect it, but to different usb port than last time. That should cause the pc to reinstall usb drivers for the tablet.
Sent from my GT-I9100 using xda app-developers app
Archos G9 101 HD
julle131 said:
Go to the recovery menu, choose update firmware. When it prompts you to connect tablet to pc, cobbect it, but to different usb port than last time. That should cause the pc to reinstall usb drivers for the tablet.
Sent from my GT-I9100 using xda app-developers app
Click to expand...
Click to collapse
Thanks, for so fast reply Dear...
I did the same as you advised and a drive with name ending with "REC" with a capacity of 299 MB appeared. I tried to copy the Surdu's Deoedex update but it has more weight in MBS about 390. So it could not. I tried original Archos ROM with weight of 186 MB and it copied. Started update but returned with an error "Update failed: (221)".....
Please advise.
Note: I also tried in SDE menu to export data drive and got a drive 1.48 GB which I formated from win 7 and succeded in copying Stock and Surdu's ROMs one by one but always failed to get android and it always say failed update. Still get unanimated Archos logo on startup with no further bootup.
hondacity said:
Thanks, for so fast reply Dear...
I did the same as you advised and a drive with name ending with "REC" with a capacity of 299 MB appeared. I tried to copy the Surdu's Deoedex update but it has more weight in MBS about 390. So it could not. I tried original Archos ROM with weight of 186 MB and it copied. Started update but returned with an error "Update failed: (221)".....
Please advise.
Note: I also tried in SDE menu to export data drive and got a drive 1.48 GB which I formated from win 7 and succeded in copying Stock and Surdu's ROMs one by one but always failed to get android and it always say failed update. Still get unanimated Archos logo on startup with no further bootup.
Click to expand...
Click to collapse
Okay... So you have sde installed? Good. First, let's get the official firmware working. Download the latest official ROM from archos:
http://update.archos.com/9/gen9/gen9_4.0.26/firmware_archos_it4.aos
Drop this to the 300mb partition called REC. Then press power and let it install.
Now follow the install guide o. The ROM you want to install
Sent from my GT-I9100 using xda app-developers app
Archos G9 101 HD
julle131 said:
Okay... So you have sde installed? Good. First, let's get the official firmware working. Download the latest official ROM from archos:
Drop this to the 300mb partition called REC. Then press power and let it install.
Now follow the install guide o. The ROM you want to install
Sent from my GT-I9100 using xda app-developers app
Click to expand...
Click to collapse
Thanks Julle..But Now I understand that official ROM is not installing because of unofficial kernel flash I have already installed and had flushed original one. I think if I get original kernel then I can arrive to original Android ICS which you have mentioned. Please advise if you have any address of original kernel for "firmware_archos_it4.aos".
THANKS and Best Regards...
Further to my above thread...I found the stock kernel and flashed it but still after installing kernel and then original firmware, its giving same error of update failed (221).
Please advise if any remedy you prefer.
Regards...
Hi Julle,
Sorry too many threads from me but very much annoyed but sure thanks Dear for your kind help.
On export of HDD from "Repair system" menu...>>>> A drive appeared in PC but not opening as it says " Insert disk into drive". I think it is the problem which is preventing from installing the AOS file to run Android.
Please advise.
Regards,
hondacity said:
Thanks Julle..But Now I understand that official ROM is not installing because of unofficial kernel flash I have already installed and had flushed original one. I think if I get original kernel then I can arrive to original Android ICS which you have mentioned. Please advise if you have any address of original kernel for "firmware_archos_it4.aos".
THANKS and Best Regards...
Further to my above thread...I found the stock kernel and flashed it but still after installing kernel and then original firmware, its giving same error of update failed (221).
Please advise if any remedy you prefer.
Regards...
Hi Julle,
Sorry too many threads from me but very much annoyed but sure thanks Dear for your kind help.
On export of HDD from "Repair system" menu...>>>> A drive appeared in PC but not opening as it says " Insert disk into drive". I think it is the problem which is preventing from installing the AOS file to run Android.
Please advise.
Regards,
Click to expand...
Click to collapse
To install the update I linked, you shouldn't need any kernel changes. Removing kernel from SDE removes the official kernel, but that does not prevent installing official update. Also installing custom kernel will not prevent installing official rom.
I just do not understand why you get the 221 error as most of the people get it when that have incorrect file there or already have newer stock ROM installed. It is possible that your windows format broke it, because windows formats it to wrong format. You should never format any other than sdcards in windows. You could try the format system in recovery and choosing reformat device. After that install the official update I linked.
Sent from my GT-I9100 using xda app-developers app
Archos G9 101 HD
julle131 said:
To install the update I linked, you shouldn't need any kernel changes. Removing kernel from SDE removes the official kernel, but that does not prevent installing official update. Also installing custom kernel will not prevent installing official rom.
I just do not understand why you get the 221 error as most of the people get it when that have incorrect file there or already have newer stock ROM installed. It is possible that your windows format broke it, because windows formats it to wrong format. You should never format any other than sdcards in windows. You could try the format system in recovery and choosing reformat device. After that install the official update I linked.
Sent from my GT-I9100 using xda app-developers app
Click to expand...
Click to collapse
Thanks again Dear,
I applied same as you say but ending on same 221 error. Any thoughts please.
Best regards.:crying:

[Tools/Recovery] TWRP for LG Optimus F3Q

TWRP Recovery for the LG F3Q (codenames: fx3q, d520)
Background story (who ever wants to know):
As I'm currently testing around with flashing etc I hated it to re-flash the stock ROM again and again. It is sooo time consuming..
In that kind of ROM compiling learning process I also was able to build a working TWRP recovery for the LG F3Q so that was such a good feeling But as said the caveat was that because of the locked bootloader we can reach TWRP (or CWM) only when executing "adb reboot recovery" from the running system. That was not really satisfying me though..
Some day I've done a factory reset and well I saw that this is starting my TWRP recovery when executing it! Well it isn't such a surprise as TWRP sits on the recovery partition and will be triggered by the factory reset script but... well do you think what I think? When it would be possible to start TWRP fully and not that factory reset part of TWRP than we would have a workaround to reach the recovery mode without booting the system (which is in fact not possible anymore when flashing of system.img/boot.img fails)
That said.. I was in touch with the TWRP developers bigbiff and Dees_Troy and many thanks for the hint they gave me! I have build a new TWRP version based on that information I got and well the idea of that is:
Vol Down + Power -> LG Factory Reset screen appears
Confirming with power 2 times as asked
Voila: No factory reset anymore but TWRP is here!
Well that will have a caveat - READ CAREFULLY:
As you may think of the factory reset in the boot-up process and within the ROM will not working anymore until you flash another recovery!
But if you know that it is not such a caveat because you can choose the wipe options within TWRP to do a "manual" factory reset.
v2.8.1.0 build 5
USE THAT ON YOUR OWN RISK! BACKUP BEFORE!
Working (quickly tested):
Install (to flash a custom Kernel)
Mounting partitions
Reboot Recovery | System
adb shell (also see known issues)
Backup (compressed | uncompressed | encrypted (!) | unencrypted)
Restore (unencrypted | encypted (!) | compressed | uncompressed)
Internal storage /data/media
MTP which mounts the external storage!
File Manager
Terminal Command
Power charging while in TWRP
Displaying CPU temp
Totally untested:
WIPE (should work)
decrypting /data (but should work as it do so for encrypted backups already)
Every option which is not stated as "Known issue" or "Working"
Known issues (with workarounds):
ADB works only when screen "timed out" (manual locking does not help it must time out) therefore ADB can take up to 1 minute after boot until it becomes available (because screen need to be timed out first)
Workaround: set the time limit in the screen menu to e.g. 10 sec (that is the default value for now)
Timezone is not set correctly (that seems to be a well known bug in several devices using TWRP.... )
Workaround: set a timezone which displays the most accurate timezone
Known issues (without workarounds):
When you use the "Power Off" option in the "Reboot" menu the device will reboot instead of powering off
Wiping /data not possible after "factory reset buttons" used. You need to choose "wipe" and then "format data" manually (or use mke2fs on CLI).
Vibration is not working (I will not fix that atm because I like it that way)
Hardware keys at bottom doesn't work
If you use the factory reset button /data partition will be inaccessible and need to be re-flashed (means you will LOOSE your app and system configs when you use factore reset)
Download:
Attached you will find the TWRP v2.8.1.0 version ready to use even with locked bootloader:
BACKUP EVERYTHING BEFORE USING THIS. USE AT YOUR OWN RISK!
DD Image file:twrp_v2.8.1.0_build5_fx3q_FR-OFF.img.zip = FactoryReset is disabled / TWRP will be loaded instead (also see known issues)
Read the Installation & Usage instructions in this thread on how to install that file.
Installation & Usage instructions
Pre-Requirements
Read the FAQ
YOU NEED ROOT! (check FAQ)
YOU SHOULD do a NANDroid BACKUP! (check FAQ)
You need to boot up, enable USB debugging and then connect USB cable.(check FAQ get ROOT - the link contains a guide on that)
You better doing a NANDroid backup right? (I mentioned that before - but DO it! NOW!)
For the best usage experience install the sediKERNEL or use joel's debloated stock ROM which includes it already
Bulletproof Method 1: "the average user"
Use this guide if you simply want to install & use TWRP like it should be. If you're unsure use this guide!
Install:
Download the TWRP recovery file and unzip it
copy it to your device (e.g. adb push or simply copy & paste by your file browser)
Download the loki_tool (https://github.com/djrbliss/loki/raw/master/bin/loki_tool)
copy loki_tool to your device (e.g. adb push or simply copy & paste by your file browser)
execute:
adb shell
su (you may need to grant permission)
mount -oremount,rw /system
cp /PATH-WHERE-YOU-COPIED/loki_tool /system/bin/ && chmod 755 /system/bin/loki_tool
loki_tool flash recovery /PATH-WHERE-YOU-COPIED/twrp_X.X.X.X_recovery_FRoff/off.img
reboot recovery --> you should see the TWRP screen
Usage (sediKERNEL v2.0 or higher installed):
Power on the device
when you see the LG logo the first time do NOTHING!!
When the screen goes black THEN press Volume UP + Volume DOWN. Both the same time and hold them pressed.
Release the buttons when the screen goes black again
Wait. You will see the LG logo a third time and then you will see the recovery screen!
If you see a kernel crash then you have pressed the magic keys too early! Read and follow the above steps carefully and you should be fine.
Usage (without sediKERNEL v2.0 or higher):
boot into your ROM
execute "adb reboot recovery" from your PC or open a Terminal on your device and execute "su" then "reboot recovery"
Bulletproof Method 2: "developers only"
This is the developers preferred way of installing TWRP. It ensures that even when your ROM or Kernel gets damaged that you still be able to boot into recovery. This is to the developers or heavy testers who are knowing what they do ONLY!
But even when you think this is for you: Read the important hint at the end before deciding if you want to choose this method.
Install:
flash recovery image to your RECOVERY partition:
adb shell su -c dd if=/storage/external_SD/twrp_vXXXXX_fx3q_FR-OFF.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
adb reboot recovery
A user reports the the by-name does not worked for him but this one:
adb shell su -c dd if=/storage/external_SD/twrp_vXXXXX_fx3q_FR-OFF.img of=/dev/block/mmcblk0p17
-> If you can see TWRP now everything is fine - Otherwise DO NOT continue!
BACKUP YOUR WHOLE DEVICE NOW! I highly recommend to backup everything except /data from within TWRP because it is easy and works (from TWRP v2.8build5 or higher)
BACKUP /data is recommended to be done NOW and this way:
adb shell su -c dd if=/dev/block/platform/msm_sdcc.1/by-name/userdata of=/external_sd/userdata_backup_stock.img
--> This can take a long while but it contains also the backup for the internal storage not only /data and that internal part is not backupable over TWRP
while in TWRP flash the same recovery image to your BOOT partition now (do not think that this is dangerous. The boot partition is not a magic thing or so it is only the partition which will be started from the bootloader thats all about it. So yes you can install a recovery image on the boot partition without any harm.):
adb shell su -c dd if=/external_sd/twrp_vXXXXX_fx3q_FR-OFF.img.loki of=/dev/block/platform/msm_sdcc.1/by-name/boot
watch carefully that the process ended without errors and that the size is exactly the same as it should be (about 1,3GB)
adb shell sync
power off the device by taken out the battery (do not use reboot or something we want to be sure that the next step is absolutely really the normal boot up)
Boot up normally --> you should see TWRP !! You're NOT in recovery mode you're booting the normal boot mode!
Go on with flashing the sediKERNEL into your RECOVERY partition:
Download the sediKERNEL from here (the stock one could work, too but never tested ...)
push it to your device with adb or MTP (since v2.8build5)
Flash the sediKERNEL to your RECOVERY partition:
adb shell su -c dd if=/external_sd/sediKERNEL_JB-vXXXX.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
Reboot into Recovery by using TWRP GUI or by executing "adb reboot recovery"
Your ROM will boot.
Usage:
From now on every time your device booting up you will see the TWRP screen and need to choose Reboot-->Recovery to boot your ROM.
This is the absolute best way to use TWRP if you want to be sure that you will reach the recovery even when your ROM gets damaged and is confirmed to work very well (as always guarantees are not available )
Important hint:
Be sure that you keep in mind that from now on your recovery and boot partition are not the same anymore (you can always revert back to the normal behaviour, of course!). So if you want to flash a kernel image you need to ensure that it goes to the RECOVERY partition instead of the normal BOOT partition (because on boot partition is TWRP now).
If I got my ROM working I will definitively add an option to the installer where this will be ensured and I asked @joel.maxuel for his stock ROM to add that, too. As for now we are the only ones who are developing for the F3Q so you should be save enough atm but you will need to keep that always in mind when you want to replace the kernel and/or ROM.
What would happen if you forget about that? Well nothing really bad because when you install a kernel or ROM the boot image partition simply gets overwritten and that means only that your TWRP is not there anymore but the system will boot (if the new kernel/ROM is not buggy or damaged). You then could install TWRP by method 1 or using method 2 by using the boot image/Kernel you want to install.
Damage your device - booting (NOT RECOMMENDED will loose /data ):
You probably NEVER want to use this method. It is here for reference only.
I highly recommend to choose one of the above bulletproof versions instead of this one because it WILL damage /data and you need to restore that whole partition afterwards.
All my tests has shown that this comes not from TWRP (in one of my tests I disabled everything in the sourcecode of TWRP which wipes /data) but coming from LG itself. The factory reset button/option do something with the /data partition sturucture and afterwards you cannot use that anymore. I also tried to restore the partition info by trying all backup superblocks but that doesn't worked. No backup superblock is accessible.
Restoring them by mke2fs and e2fsck does not work unfortunately.. (mke2fs -S /dev/block/platform/msm_sdcc.1/by-name/userdata && e2fsck -yf /dev/block/platform/msm_sdcc.1/by-name/userdata)
So if you have loosed your /data and/or internal storage you need to have a DD imaged backup near.
Install:
same as for "Bulletproof Method 1" above
Usage:
When you choosen FR-OFF then TWRP will be able to start without booting up the whole system (also see known issues):
Power Off the device (remove battery)
Vol Down + Power --> Then put the battery back --> LG Factory Reset screen appears
Confirming with power button 2 times as asked - if you downloaded and flashed the FRoff version of TWRP it will NOT open the normal reset procedure but /data and the internal storage are not accessible afterwards (read above about the details). That means your app configs and systems configs get lost that way. You have been warned!
Voila: No (full) factory reset anymore but TWRP is here when you have damaged your ROM or for some dev approach
If you want the factory reset back simply choose the file twrp_2.7.1.0_recovery_FRon.img.lok and follow the above instructions. Afterwards you will have TWRP but it will be reachable only when you execute "adb reboot recovery" from the running system.
XDA:DevDB Information
sediTWRP for LG Optimus F3Q, Tool/Utility for the General Discussion
Contributors
xdajog
Source Code: https://github.com/xdajog/bootable_recovery_twrp_fx3q
Version Information
Status: Stable
Current Stable Version: v2.8.1.0 build 5
Stable Release Date: 2014-11-18
Created 2015-05-19
Last Updated 2015-07-20
FAQ
Frequently Asked Questions (FAQ)
What is that "adb" thing?
adb stands for: Android Debug Bridge and can help a lot when it comes to work with your device. It is not for developers only but they use it a lot of course.
But a normal user can use this to exchange files without the need of mounting, backing up the device, reboot the device and use it as a very comfortable way of having a terminal emulator.
Normally adb itself is not available as a standalone application - it comes with the Android SDK which is very big and heavy if you want to use adb and/or fastboot (another great tool) only.
But we live in a great world with many people wanting to make things easy so here you go when you want/need only adb and fastboot:
download & install adb at lifehacker
(Direct link for Windows users: Go to easy ADB install thread)
How to get root for the F3Q?
Here is the tool and guide: Saferoot
[*]What is a "nandroid" backup?
nandroid means essentially: "a full image of all your partitions" so it is a full snapshot of your ROM including all your apps and contents.
The name NANDroid is a portmanteau of "NAND" (as in Flash memory - NAND flash) and "Android." (Source)
[*]How to create a "nandroid" backup?
(See above for the meaning of "nandroid backup")
You have several options on how to do that.
The normal and absolutely recommended way is to do that "offline" (from within recovery mode) but you can also do it "online" (while Android is running).
.
Offline nandroid backup by using TWRP recovery: Guide
If you have no custom recovery installed read on.
.
Online nandroid backup:
by using an app:
There is 1 (known to me) "online" nandroid backup tool available which will backup from within your running Android: PlayStore.
I tested it and still using it since a while and I really like it but I would not fully resist on it.
I had no problems backing up but sometimes an app is lost when restoring. This may have been fixed but well it is like imaging a running Windows or Linux system:
Do not do it online if you can - it may/will work but there could be problems/inconsistencies later!!
If you never made a nandroid before doing it online will not harm anything and should be your first start. So install the Online Nandroid backup tool and begin.
Check out this guide for some hints: Guide
(If you like the Android app do not hesitate to buy the unlock key to support the developer!)
by using commandline tools:
First of all you need "adb" installed (check out the FAQ answer number 1 above).
Then you need someone who is telling you the device partition table and you need a big sized SD card to hold the images.
The reason is that you will use a special command named "dd" which images the whole partition (not the content only!).
dd is a VERY dangerous tool because if you use it wrong your device may get bricked so it is essential that you are using the
correct command and check that twice!
Check out the next FAQ on how to do this for the F3Q.
[*]How to create a "nandroid" backup for the F3Q - WITHOUT having a custom recovery?
The whole process will take a big amount of time but it is worth to follow each step including the md5sum checks at the end.
Please read the previous FAQ first because there you will find more information about background and other options you may have.
Ensure you have a SD card inserted which is big enough and having enough free space available (4GB at least! I recommend at least 8 GB but this depends on the size of your current data partition. A completely stock ROM with nothing installed and unused will need 3 GB space).
.
Install "adb" on your pc (check out the FAQ #1 above).
root your device (check out FAQ #2 above)
connect with adb to your (running) F3Q:
adb shell
(you should see a prompt)
su
(you need to grant permission if you haven't yet)
Then backup your current ROM and data:
dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/storage/external_SD/system.2015-07-20.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/storage/external_SD/boot.2015-07-20.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/userdata of=/storage/external_SD/userdata.2015-07-20.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/recovery of=/storage/external_SD/recovery.2015-07-20.img
# If you never backed up your EFS you really should do that once:
dd if=/dev/block/platform/msm_sdcc.1/by-name/modemst1 of=/storage/external_SD/modemst1.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/modemst2 of=/storage/external_SD/modemst2.img
Click to expand...
Click to collapse
Just to be sure you can do an online backup now, too ( Guide ) Online Nandroid backup App
.
copy the backup(s) to your device (connect USB cable - open your external storage and drag&drop) <--- DO NOT SKIP THIS STEP!!!! It is absolutely essential!
Check your copy on your device:
md5sum /storage/external_SD/system.2015-07-20.img
md5sum /storage/external_SD/boot.2015-07-20.img
md5sum /storage/external_SD/userdata.2015-07-20.img
md5sum /storage/external_SD/recovery.2015-07-20.img
md5sum /storage/external_SD/modemst1.img
md5sum /storage/external_SD/modemst2.img
Click to expand...
Click to collapse
Download a md5sum checker like this one Windows MD5 and load each file you copied to it (on Linux the "md5sum" command can be used of course).
compare the md5sums from the above output and ensure that they are all matching.
[*]Why is factory reset not working when installing TWRP? (or: AAAAaaaah my /data is inaccessible after doing a factory reset!!!!)
All my tests has shown that this comes not from TWRP (in one of my tests I disabled everything in the sourcecode of TWRP which wipes /data) but coming from LG itself. The factory reset button/option do something with the /data partition sturucture and afterwards you cannot use that anymore. I also tried to restore the partition info by trying all backup superblocks but that doesn't worked. No backup superblock is accessible.
Restoring them by mke2fs and e2fsck does not work unfortunately.. (mke2fs -S /dev/block/platform/msm_sdcc.1/by-name/userdata && e2fsck -yf /dev/block/platform/msm_sdcc.1/by-name/userdata)
So if you have loosed your /data and/or internal storage you need to have a DD imaged backup near. Sorry but you have been warned (known issues) before.
.
if you want the factory reset back simply choose the file twrp_2.7.1.0_recovery_FRon.img.lok and follow the above instructions. Afterwards you will have TWRP but it will be reachable only when you execute "adb reboot recovery" from the running system. v2.7. is not recommended to use but atm the only option if you really want that. Instead I would better try the wipe options from within TWRP and re-installing your ROM of choice or simply using the official LG flashing tool to get your F3Q fully reset.
.
History / Changelog
Previous development (v2.7.1.0)
I HIGHLY RECOMMEND USING v2.8 instead of this version!
You have been warned.. If you still want that buggy version go on here:
USE THAT ON YOUR OWN RISK! I STRONGLY RECOMMEND TO BACKUP EVERYTHING BEFORE PROCEEDING.
Working:
Install (to flash a custom Kernel)
Mounting partitions (see known issues for the internal one)
Reboot Recovery | System
adb shell
File Manager
Terminal Command
Totally untested:
WIPE (may work)
Known issues:
If the device becomes locked and then unlocked by the user adb will restart on the device (or crash and start again. haven't had looked into that yet)
When you use the "Power Off" option in the "Reboot" menu the device will reboot instead of powering off
RESTORE (will NOT work!)
BACKUP (will NOT work!)
You cannot mount the external sd via USB or MTP
Vibration is not working (I will not fix that atm because I like it that way)
Timezone is not set correctly (that seems to be a well known bug in several devices using TWRP....
Internal storage is missing (/data/media)
Hardware keys at bottom doesn't work
If you use the factory reset button /data partition will be inaccessible and need to be re-flashed (means you will LOOSE your app and system configs when you use factore reset)
Download:
Attached you will find the loki'ed TWRP version (v2.7.1.0):
AGAIN: THIS IS A PROOF-OF-CONCEPT only. It definitively WILL have bugs and problems! I want to proof that it will be possible to have TWRP on this device and also have a way to boot up into TWRP without booting the whole system.
twrp_2.7.1.0_recovery_FRoff.img.lok = FactoryReset is disabled / TWRP will be loaded instead
twrp_2.7.1.0_recovery_FRon.img.lok = FactoryReset is enabled / TWRP can be reached with "adb reboot recovery" only
Read the Installation & Usage instructions in the OP on how to install that file.
Awesome work! Saves having to risk modifying the bootloader (for now). :laugh: :highfive: Thanks!
xdajog said:
TWRP Recovery for the LG F3Q / D520
...
Click to expand...
Click to collapse
I'm unable to get logs from TWRP, it does crash reliably when messing about in settings and such.
Timezone fix is needed. (Devices time is set to the correct local time, but TWRPs timezones arent correct.)
Device does not show internal storage.
Wipe menu does not differentiate from internal storage and /data
there's no /mnt, /storage or /sdcard present while in TWRP.
Uhm, I'm sure there's some more I've missed, but that's all I've got for now.
eriklion said:
I'm unable to get logs from TWRP, it does crash reliably when messing about in settings and such.
Click to expand...
Click to collapse
Uhm what do you mean? adb shell and then open /tmp/recovery.log? Clicking on the small mini icon at middle bottom of the screen? Both working for me. Have you tested the above attached version or the one I gave you at dropbox? The above is a more current one!
Timezone fix is needed. (Devices time is set to the correct local time, but TWRPs timezones arent correct.)
Click to expand...
Click to collapse
hm I will look into that
Device does not show internal storage.
Click to expand...
Click to collapse
yeah forgot to mention that. Is that shown in CWM btw?
Wipe menu does not differentiate from internal storage and /data
Click to expand...
Click to collapse
Could you explain what does that means?
there's no /mnt, /storage or /sdcard present while in TWRP.
Click to expand...
Click to collapse
/mnt and /storage are not needed or am I wrong? /sdcard would point to the internal storage I think but I decided to use /external_sd instead which is accessible in the latest version.
Finally got around to test. Looks great, I love having TWRP over CWM!
Unfortunately the backup function is not working. TWRP errors out and reloads itself. I have a pastebin, sorry it's so long but I wanted to try a couple different backup options before I gave up and produced a log file:
http://pastebin.com/QUfNw6Rk
The portions of interest are:
Code:
Backing up Cache...
I:Creating backup...
I:Creating tar file '/external_sd/TWRP/BACKUPS/1db9cba/1970-01-24--22-43-59 JZO54K//cache.ext4.win'
I:addFile '/cache/recovery' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/cache/recovery/log' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
...
Code:
Backing up Data...
I:Creating backup...
I:Creating tar file '/external_sd/TWRP/BACKUPS/1db9cba/1970-01-24--22-43-59 JZO54K//data.ext4.win'
I:addFile '/data/dontpanic' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg0' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/next_count' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg1' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg2' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg3' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg4' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg5' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg6' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg7' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
Starting TWRP 2.7.1.0 on Sun Jan 25 03:44:01 1970
I:Single storage only.
I:No internal storage defined.
I:No storage defined, defaulting to /sdcard.
I:Lun file '/sys/devices/platform/usb_mass_storage/lun0/file' does not exist, USB storage mode disabled
I:Found brightness file at '/sys/class/leds/lcd-backlight/brightness'
I:TWFunc::Set_Brightness: Setting brightness control to 255
Starting the UI...Pixel format: 480x800 @ 32bpp
Pixel format: RGBX_8888
Not using qualcomm overlay, 'msmfb43_80201'
framebuffer: fd 4 (480 x 800)
=> Linking mtab
=> Processing recovery.fstab
I:Processing '/boot'
I:Processing '/cache'
I:Processing '/data'
I:Processing '/misc'
I:Processing '/recovery'
I:Processing '/external_sd'
I:Processing '/system'
I:Creating Android Secure: /external_sd/.android_secure
I:Backup folder set to '/external_sd/TWRP/BACKUPS/1db9cba'
I:Settings storage is '/external_sd'
Updating partition details...
I:Unmounting main partitions...
E:Unable to unmount '/data'
I have a stock based ROM to test, and I want to make sure I can enter recovery through the bootloader should things go sour. If TWRP can backup and restore, that allows me to go back to my true stock after the test. Any ideas?
joel.maxuel said:
Finally got around to test. Looks great, I love having TWRP over CWM!
Unfortunately the backup function is not working. TWRP errors out and reloads itself. [.....] Any ideas?
Click to expand...
Click to collapse
Yes.
There are several things coming in place when it comes to backing up out of TWRP atm...
You hopefully have read the big fat red warning ? What I mean is the part regarding /data gets lost when you do a factory-reset
That said if you have entered TWRP by pressing the physical keys your /data partition will be wiped (really bad thing but that it is made for and I haven't had the time to look into that further)
The result is a cleaned /data which is not mountable until you format it with mke2fs.
(e.g.: "adb shell mke2fs -T ext4 /dev/block/mmcblk0p15")
If you do not do that what MAY happens is that TWRP failing because of missing /data (and if not then you should ensure that /data was really backed up)
But as your log told me it seems to be not the problem here 'cause the /data partition is detected by TWRP. so it could be 2)
Mounting points.
As stated the mount points are not fully working in TWRP atm. That means when it comes to /sdcard which is the internal device storage it will fail, too because it cannot be found. The reason for this is that LG mounts /sdcard by the sdcard service but that is somehow tricky thats why it is not working atm.
And on top: the internal storage normally needs to be mounted to "/data/media" especially when we want to use MultiROM later.
So +1 for /sdcard or/and internal storage related
background info: http://teamw.in/DataMedia
The last one I could imagine is "something else" which could be catched by "/proc/last_kmsg"
The important thing is that this file gets written only after a crash and when the battery was not removed. So if the device reboots to TWRP again try to adb shell to the device and then paste the last_kmsg again. Maybe we can find something here.
When I will continue on TWRP I think of upgrading to v2.8 because they enable MTP here which could be good for copying data between device and pc..
BTW:
I have no idea what CWM port which is also be available would do in case of starting a backup especially what will REALLY gets backed up!!!!
IMHO the best way on doing a nandroid backup atm is "adb shell dd ...." Takes a long time but then you can be sure. I can give you all the mountpoints if you need them.
As I currently have not such much success with porting the ROM I will now come back here to TWRP and will finish it to have a hopefully fully working recovery. I cannot say the timeline for this but it will definitively be the next what I want to do because when this is done I can better match the rest for the ROM.
xdajog said:
<SNIP>
IMHO the best way on doing a nandroid backup atm is "adb shell dd ...." Takes a long time but then you can be sure. I can give you all the mountpoints if you need them.
As I currently have not such much success with porting the ROM I will now come back here to TWRP and will finish it to have a hopefully fully working recovery. I cannot say the timeline for this but it will definitively be the next what I want to do because when this is done I can better match the rest for the ROM.
Click to expand...
Click to collapse
This should work (I've done it before for eriklion):
Code:
adb shell
dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/storage/external_SD/system.2014-11-12.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/storage/external_SD/boot.2014-11-12.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/cache of=/storage/external_SD/cache.2014-11-12.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/userdata of=/storage/external_SD/userdata.2014-11-12.img
Now, is there a recommended adb command to wipe data and cache, since factory reset function is not the best choice? I see a few with the following process...
Code:
adb shell
su
format DATA
format CACHE
...but not much commentary on it.
I appreciate the second (third, whatever you are on) crack at TWRP. Hopefully the next version will squash the bugs. Btw, I will see if I can provide a /proc/last_kmsg tonight have posted a last_kmsg here.
joel.maxuel said:
This should work (I've done it before for eriklion):
Code:
adb shell
dd /dev/block/platform/msm_sdcc.1/by-name/system /storage/external_SD/system.2014-11-12.img
dd /dev/block/platform/msm_sdcc.1/by-name/boot /storage/external_SD/boot.2014-11-12.img
dd /dev/block/platform/msm_sdcc.1/by-name/cache /storage/external_SD/cache.2014-11-12.img
dd /dev/block/platform/msm_sdcc.1/by-name/userdata /storage/external_SD/userdata.2014-11-12.img
Click to expand...
Click to collapse
yes thats all you need to backup & restore
joel.maxuel said:
Now, is there a recommended adb command to wipe data and cache, since factory reset function is not the best choice? I see a few with the following process...
Code:
adb shell
su
format DATA
format CACHE
...but not much commentary on it.
I appreciate the second (third, whatever you are on) crack at TWRP. Hopefully the next version will squash the bugs. Btw, I will see if I can provide a /proc/last_kmsg tonight.
Click to expand...
Click to collapse
I always do it that way:
Code:
Starting TWRP
adb shell
("su" in TWRP not needed normally)
mke2fs -T ext4 /dev/block/mmcblk0p15 (for userdata)
mke2fs -T ext4 /dev/block/mmcblk0p14 (for cache)
Then you can be sure it is clean and well formatted. ext4 is for both cache and userdata and works fine for me.
twrp v2.8 with many enhancements and fixes is on its way
Stay tuned ....
if you get bored in the meanwhile ... click thanks
Is someone here with running the stock ROM (or absolutely not modified means formatted! /data partition) who is willing to give me a quick help? It must be stock or placed back to stock by using a backuped image dump if you have one.
The following need to be done in recovery so you need to have CWM or TWRP installed. Boot into recovery (adb reboot recovery) and then use "adb shell" to connect.
I need your output of this command:
Code:
mke2fs -n /dev/block/platform/msm_sdcc.1/by-name/userdata
This will not do/destroy/modify anything.
It should display some information about that partition. Read the details here http://linux.die.net/man/8/mke2fs
The reason is that LG factory reset seems to wipe superblocks (wanted by LG or not - fact is that they are thrown) and THEN forwarding to the recovery tool like TWRP but to be sure I need the above output from 1 or 2 people to be sure enough on how to proceed.
Thanks in advance
As Joel investigated that may destroy /data cause of a buggy version of mke2fs!! Oh man..
-----
Sent from my SGH-I927 using XDA Android mobile app
Ok thx to joel I'm able to investigate the LG facotry reset further.
In parallel I will try another way which will be (if I get it working) absolutely smooth and will not have such workaround character like the current idea (hijacking factory reset).
Give me some time but if that works it would be a great solution for accessing recovery..
Stay tuned some good things may happen...
-----
Sent from my SGH-I927 using XDA Android mobile app
Finally v2.8 for F3Q has arrived !!! I think a very good approach now!
Have fun and as usual any thx click.... and so on
Check out the OP for Download and details:
http://forum.xda-developers.com/showpost.php?p=55239027&postcount=1
UPDATE:
I have completely reworked the "Installation & Usage instructions" section in the OP. PLEASE READ and be happy
xdajog said:
Finally v2.8 for F3Q has arrived !!! I think a very good approach now!
Have fun and as usual any thx click.... and so on
Check out the OP for Download and details:
http://forum.xda-developers.com/showpost.php?p=55239027&postcount=1
UPDATE:
I have completely reworked the "Installation & Usage instructions" section in the OP. PLEASE READ and be happy
Click to expand...
Click to collapse
Great work.
Am looking at method two. If I was to install a ROM, wouldn't the boot partition (thus my new recovery) be overwritten by the ROM package's boot.img? And when I was cooking with the Kitchen, the ROM required a specific mount point for the boot partition. If it is supposed to point to recovery, seems to me that neither would boot (overwritten recovery, ROM pointing in the wrong location).
So, what is this solution getting around? So we have an option to load TWRP before a system we don't necessarily trust will boot? Thus avoiding the bootloader fallback even more? Or is it a broken boot.img breaks TWRP as well so even if we try to go in through the bootloader, TWRP fails to load as well?
Sorry for my confusion, still trying to grasp all this new information.
joel.maxuel said:
Great work.
Click to expand...
Click to collapse
Thanks
Am looking at method two. If I was to install a ROM, wouldn't the boot partition (thus my new recovery) be overwritten by the ROM package's boot.img?
Click to expand...
Click to collapse
Method 2 will suggest that if you install a custom ROM that you are be able to use/choose the boot.img partition (I hoped that the "hint" at the was clear enough but better to ask of course!)
And when I was cooking with the Kitchen, the ROM required a specific mount point for the boot partition. If it is supposed to point to recovery, seems to me that neither would boot (overwritten recovery, ROM pointing in the wrong location).
Click to expand...
Click to collapse
Well yes you either need to point to the recovery partition or (and that would be what I recommend) you let the user choose what he wanted to do.
So, what is this solution getting around?
Click to expand...
Click to collapse
The best we can do here (and that is what I will do for my custom ROM if I get it done some day) to use AROMA installer and ask the user if he has a recovery installed in the boot partition or not. Then you can choose what to do in the updater script.
I uploaded an example of my AROMA installation setup for the "sediROM for Samsung Captivate Glide" in this post. This one is VERY complex but you will get the idea and many input on how to do things.
So we have an option to load TWRP before a system we don't necessarily trust will boot? Thus avoiding the bootloader fallback even more?
Click to expand...
Click to collapse
Yes using method 2 we have always coming TWRP up when powering on the device. We then can choose to do things in there or to boot to "recovery" which will be the ROM. What do you meant with "bootloader fallback"?
Or is it a broken boot.img breaks TWRP as well so even if we try to go in through the bootloader, TWRP fails to load as well?
Click to expand...
Click to collapse
Not sure If I got you. When the boot partition gets overwritten TWRP and any possibility to get into TWRP will be lost because it sits only in the boot partition when using method 2. If you choose to do a factory reset when powering on the device or from within the ROM I have no idea what happens then unfortunately. That is untested but if you willing to test..
Sorry for my confusion, still trying to grasp all this new information.
Click to expand...
Click to collapse
No worry about that happy if that is useful for someone
xdajog said:
I uploaded an example of my AROMA installation setup for the "sediROM for Samsung Captivate Glide" in this post. This one is VERY complex but you will get the idea and many input on how to do things.
Click to expand...
Click to collapse
Thanks! I will take a look at this in the next few days.
xdajog said:
Yes using method 2 we have always coming TWRP up when powering on the device. We then can choose to do things in there or to boot to "recovery" which will be the ROM. What do you meant with "bootloader fallback"?
Click to expand...
Click to collapse
Bootloader fallback as in having to access TWRP via the bootloader. Our regular method is to access form the ROM, but if the ROM is bricked for whatever reason, the fallback is through the bootloader.
xdajog said:
Not sure If I got you. When the boot partition gets overwritten TWRP and any possibility to get into TWRP will be lost because it sits only in the boot partition when using method 2. If you choose to do a factory reset when powering on the device or from within the ROM I have no idea what happens then unfortunately. That is untested but if you willing to test..
Click to expand...
Click to collapse
I was alluding to the scenario if one was to choose method one, installed a ROM, and things got busted badly... Would you even be able to access TWRP with a bad boot partition? I think so, because recovery partition should be self sufficient (I think you proved it by swapping their places by way of method two), it is just getting into recovery by way of bootloader) I don't particularly like.
Had to face that fear last night, and ultimately, TWRP started up fast enough from the bootloader that it seemed like nothing happened, but when i went to dump the log, it could not recognize the sdcard. DD'ing my userdata partition back fixed that issue.
joel.maxuel said:
Bootloader fallback as in having to access TWRP via the bootloader. Our regular method is to access form the ROM, but if the ROM is bricked for whatever reason, the fallback is through the bootloader.
Click to expand...
Click to collapse
You mean "factory-reset" right? By either pressing the factory reset buttons (or by choosing from within the ROM) correct?
I was alluding to the scenario if one was to choose method one, installed a ROM, and things got busted badly... Would you even be able to access TWRP with a bad boot partition? I think so, because recovery partition should be self sufficient (I think you proved it by swapping their places by way of method two), it is just getting into recovery by way of bootloader) I don't particularly like.
Click to expand...
Click to collapse
If you install TWRP with method 1 and your boot partition gets corrupt you still be able to reach TWRP by using the factory-reset buttons. But you will loose /data then.
If you install TWRP with method 2 and your boot partition has gone you can not start TWRP anymore because it sits on there.
So you're more bulletproof by choosing method 1 because you would reach TWRP even when the boot partition gets damaged but you will loose /data then! Mentioned in the known issues in the OP.
Had to face that fear last night, and ultimately, TWRP started up fast enough from the bootloader that it seemed like nothing happened, but when i went to dump the log, it could not recognize the sdcard. DD'ing my userdata partition back fixed that issue.
Click to expand...
Click to collapse
When you have TWRP installed with method 1 you will reach TWRP by factory reset buttons and it will DO NOTHING ! Really! It simply starts TWRP because I patched TWRP that way that it will not wipe anything when triggered by the factory-reset command / button!
I can say that for double sure since today because:
1) In one of my tests I had disabled REALLY EVERY wipe option within TWRP - compiled it - installed it and even then /data gets lost!
2) I have installed the BOOT image means KERNEL on the RECOVERY partition today again and then used the factory-reset buttons again (after I restored /data of course)... and /data gets lost AGAIN--?!!
That means even when there is absolutely no custom recovery in place (like TWRP) which would normally handle wiping /data then nevertheless /data gets corrupted! I have tested that twice so I can say now for sure that this has nothing to do with TWRP but it comes from the LG bootloader instead! That bootloader is CRAP. sorry.
I had tested one approach which is build in boot image RAM disk which catches the keys which are pressed and then reboot into recovery. That would work but only as long as you have a working boot image partition. So that is the same good/bad as having TWRP sitting within the boot partition which is much easier to do so I decided to go this way for now.
One last word about the crappy factory-reset by LG: I have tried a lot to find out what really happens to the partition or partition table of /data when those keys are pressed but the only thing I can say is that the superblocks are inaccessible and the same for the backup superblocks. doing a "mke2fs -S" does not work (and wouldn't fix the root cause of the issue) and I have no idea what LG do here. Therefore cannot fix that ..
so I believe we will need to live with one of the 3 methods described in the OP....
Hope that answered some of your questions...
Bad news..
The Desire Z of my wife is completely broken now.
That means I cannot develop anymore..
- I ported and released the latest TWRP version to the F3Q
- I'm able to build AOSP JellyBean (not booting yet though),
- I compiled and released a custom AOSP Kernel (named sediKERNEL)
.... and a lot more..
I have everything I need to continue here in place...
I have the will and the ability to continue...
But no device anymore..
If someone has a F3Q to give away.. then I will continue but I'm not willing to buy a F3Q for developing only. So if you have an idea how we could continue let me know.
Update:
Check out the following link if you want to help http://forum.xda-developers.com/showthread.php?t=2952919
Otherwise that will end here for me unfortunately...
Hopefully not.
Yours
Xdajog.
-----
Sent from my SGH-I927 using XDA Android mobile app
I will update the installation instructions soon!
Because of the new sediKERNEL v2.0 the instructions will be made bullet proof only .. and i try to do it more detailed @Kediil
-----
Sent from my SGH-I927 using XDA Android mobile app

[GUIDE][XS/XSL]One time re-partitioning for Marshmelow ROM flashing

A Marshmellow based AOSP ROM was recently released by billchen1997. To flash it, re-partitioning of the partition table is required.To do so, following procedure can be used.
Note: This procedure doesn't work with nAOSP 6.0 ROM released by mickybart now, please find the appropriate instructions in ROM thread.
Do make a note of few things though:
Internal storage which can be accessed via PC by selecting "File transfer"option manually after connecting.
Recovery for Me was retained since I had flashed it in fota partition, hence I would recommend flashing recovery in fota partition before hand.
Performing them on PC would be convenient as some calculations are required.
Wiping all partitions before hand is recommended.
Text formatting conventions are used in the code sections to depict different meanings:
Bold : States the commands to be entered on adb.
Italic : States what values, usually which varies user to user, has to be entered at the place.
Underlined : States output shown by a certain command preceding it.
Repeated x/y/z are variables.
As pointed out by @GjorgiDxc, the phone is not directly encrypted. We need to encrypt it manually. To do so, flash only the ROM, without gapps or root, boot into ROM and encrypt the phone. More details can be found here. Encrypting data would make data partition inaccessible in TWRP.
Procedure:
Take backup of Your apps as well as the data from the internal storage (Photos, Music, Video etc) as it will all be wiped.
Boot into TWRP.
Goto mount option and untick all partitions.
On PC, using adb, type out the following commands,
Print the current partition table. Note down the starting cylinder of partition 14, It will be needed further.
Code:
[B]adb shell
fdisk /dev/block/mmcblk0
p[/B]
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Now delete the sdcard(15) and data(14) partition.
Code:
[B]d
15
d
14[/B]
Create new data partition which uses remaining space.
Code:
[B]n[/B]
[U]First cylinder (xxx-yyyyyy, default xxx): [/U] [I]You have to enter the start cylinder of partition 14 as read in partition table earlier.[/I]
[U]Last cylinder or +size or +sizeM or +sizeK (zzzzz-yyyyyy, default yyyyyy):[/U] [I]Enter the yyyyyy value.[/I]
Print and write the modified partition table. Note down the "Blocks" value of partition 14 here.
Code:
[B]p
w[/B]
Code:
[U]Command (m for help): [/U][B]t[/B]
[U]Partition number (1-14): [/U][B]14[/B]
[U]Hex code (type L to list codes):[/U][B] 83[/B]
One of the two paths can be followed here now. It depends on which filesystem is required for data partition, ext4 or f2fs. For ext4, follow the first subsection and for f2fs, second one.
Now the calculation needs to be done for ext4 file system. From the "Blocks" value of partition 14, subtract 16, since we have to leave 16384 bytes and each block equals 1024 bytes (16*1024=16384).
For Me, the "Blocks" value of partition 14 was 29161464. Hence, my final value was 29161464-16=29161448. Now divide the solution by 4.
Therefore, 29145080/4=7290362. Consider it as final_size. This many blocks will be allocated for the data partition. This needs to be done since the partition needs to be made using blocks size.
Now we format the data partition such that it acquires the space and as well as leaves the trailing 16384 bytes. This creates a data partition with ext4 type, allocation unit as 4096 and size in blocks as final_size.
Code:
[B]mke2fs -t ext4 -b 4096 /dev/block/mmcblk0p14[/B] [I]final_size[/I]
For f2fs file system, simply run the following command, no need of any calculation:
Code:
[B]mkfs.f2fs -r 16384 /dev/block/mmcblk0p14[/B]
Code:
[B]exit
adb push -p pure_aosp_marshmallow_r1.zip /tmp/[/B]
Now on phone, in TWRP, Flash the ROM via install option, and done!
Notes:
First Reboot is long.
If after boot it says encryption failed, let it reset the phone. Then it will work properly.
For root, flashing Update zip of SuperSU from here works.
Wiping data via TWRP menu will allocate the trailing 16384 bytes to it too, so it is not to be done.
For gapps, flash Pico gapps from here. Then after reboot and login, go to Settings, Apps>Settings icon at top right> App permissions. Now in each permission, open the permission, select show system from options and enable the permission for all system apps.
If You get error like "Error retrieving information from sever.[RPC:C:S-7:AEC-7 CDY7-E3OJ-V2TKC]" in Google Play Store and are not able to install any app, then log out and log in again into Your google account via settings.
If You copy a file and want to access it via TWRP, mount data partition and go to /data/media. Although data won't mount if You encrypt Your phone.
Credits to @SystemR89 for his tutorial as base and billchen1997, @mickybart for his instructions and TWRP.
Calculations are not needed now since micybart has modified the TWRP to leave trailing 16384 bytes at end. The TWRP can be found here.
Thanks for your guide friend. What is difference between this method and your previous method http://forum.xda-developers.com/showthread.php?p=64433804 ? I think your previous method is easier and it's not confusing.
BTW I wiped /data in twrp and I don't have any problem
@Mirhawk so what are you saying Friend? What will be the difference we get than your instruction.will it solve my battery not charching problem.?actually I used mickybarts recovery last time.so was that OK or I have to flash the official twrp to do the job
pejman97 said:
Thanks for your guide friend. What is difference between this method and your previous method http://forum.xda-developers.com/showthread.php?p=64433804 ? I think your previous method is easier and it's not confusing.
BTW I wiped /data in twrp and I don't have any problem
Click to expand...
Click to collapse
The earlier one allocated less space for user. Yeah, I agree, this one is a bit more complicated than previous one, but it is as per some of the instructions provided by billchen1997. Wiping /data with previous process works, but as it wouldn't with this process. I will have to test that if it will work.
nageswarswain said:
@Mirhawk so what are you saying Friend? What will be the difference we get than your instruction.will it solve my battery not charching problem.?actually I used mickybarts recovery last time.so was that OK or I have to flash the official twrp to do the job
Click to expand...
Click to collapse
As said above, it will allocate more usable space for user. Well, modifying of partition should not affect Your offline charging. I used the TWRP by SdtBarbarossa, if it makes any difference.
Why were you saying storage is not accessable via PC? Internal storage shows up fine for me via PC. The only issue I have is with recovery, but there should be a fix to the recovery by mickybart (he is maintaining TWRP) to recognize the new repartitioning, so I can live with that.
GjorgiDxc said:
Why were you saying storage is not accessable via PC? Internal storage shows up fine for me via PC. The only issue I have is with recovery, but there should be a fix to the recovery by mickybart (he is maintaining TWRP) to recognize the new repartitioning, so I can live with that.
Click to expand...
Click to collapse
You are able to save in internal storage using PC? And if You save a file, does it show up in /storage/emulated/0?
All I get is blank window when I open "Xperia S" icon in windows explorer.
Never mind, forgot to select the option for file transfer. Will update that now.
Mirhawk said:
You are able to save in internal storage using PC? And if You save a file, does it show up in /storage/emulated/0?
All I get is blank window when I open "Xperia S" icon in windows explorer.
Click to expand...
Click to collapse
Yes I can. I think after creating partiton14 you should type
t
14
c
I think I did that, but anyway yes i can see the whole 27GB of storage on the computer, and thats how i flash gapps. I flash rom via /tmp and gapps after it boots up. Also maybe you've missed this, but you have to toggle "File tranfer" in the notification shade, the default is "Charging cable" and it doesn't display the internal storage. Pull down notifications, tap on the one bellow USB debugging and select the second option. I'll post some screenshots maybe later, I'm doing some battery testing atm.
GjorgiDxc said:
Yes I can. I think after creating partiton14 you should type
t
14
c
I think I did that, but anyway yes i can see the whole 27GB of storage on the computer, and thats how i flash gapps. I flash rom via /tmp and gapps after it boots up. Also maybe you've missed this, but you have to toggle "File tranfer" in the notification shade, the default is "Charging cable" and it doesn't display the internal storage. Pull down notifications, tap on the one bellow USB debugging and select the second option. I'll post some screenshots maybe later, I'm doing some battery testing atm.
Click to expand...
Click to collapse
Yeah, thanks, the notification doesn't show up on lock screen.
I don't think there is any need to type "c" after creating partition, since it converts the partition to fat32 and it is not needed here.
Mirhawk said:
Yeah, thanks, the notification doesn't show up on lock screen.
I don't think there is any need to type "c" after creating partition, since it converts the partition to fat32 and it is not needed here.
Click to expand...
Click to collapse
I never knew that, still no issues with doing that
So you've missed the notification? You're able to see storage now right?
@Mirhawk try this if it works.connect device to PC.then select file transfer.then goto settings developer option and turn off the USB debugging.it worked for me
Mirhawk said:
You are able to save in internal storage using PC? And if You save a file, does it show up in /storage/emulated/0?
All I get is blank window when I open "Xperia S" icon in windows explorer.
Never mind, forgot to select the option for file transfer. Will update that now.
Click to expand...
Click to collapse
I'm able to access all 27GB in my device and PC. I did everything exactly like you instruction http://forum.xda-developers.com/showpost.php?p=64433804&postcount=1487 till item 4, then I went to wipe menu in twrp and ticked /data partition then pressed on "Repair or change file system" then pressed on resize, then it changed and shows all 27GB then I choose EXT4 then wiped all partitions on my device by twrp, then I did rest of your instruction
Screenshots
 @Mirhawk
GjorgiDxc said:
I never knew that, still no issues with doing that
So you've missed the notification? You're able to see storage now right?
Click to expand...
Click to collapse
nageswarswain said:
@Mirhawk try this if it works.connect device to PC.then select file transfer.then goto settings developer option and turn off the USB debugging.it worked for me
Click to expand...
Click to collapse
Yup, it works for Me, just had to unlock the screen to get notification.
pejman97 said:
I'm able to access all 27GB in my device and PC. I did everything exactly like you instruction http://forum.xda-developers.com/showpost.php?p=64433804&postcount=1487 till item 4, then I went to wipe menu in twrp and ticked /data partition then pressed on "Repair or change file system" then pressed on resize, then it changed and shows all 27GB then I choose EXT4 then wiped all partitions on my device by twrp, then I did rest of your instruction
Click to expand...
Click to collapse
Yeah, it would work that way since the 16384 bytes are left outside the data partition end border in the older procedure. Here, we leave the 16384 bytes inside the end boundary of the data partition. My screenshots after following this procedure with size are attached.
Mirhawk said:
Yup, it works for Me, just had to unlock the screen to get notification.
Yeah, it would work that way since the 16384 bytes are left outside the data partition end border in the older procedure. Here, we leave the 16384 bytes inside the end boundary of the data partition. My screenshots after following this procedure with size are attached.
Click to expand...
Click to collapse
We both did the same but why I lost about 1GB rather than you?
pejman97 said:
We both did the same but why I lost about 1GB rather than you?
Click to expand...
Click to collapse
In the previous method, more than 16384 bytes are left out. There 16384 cylinders*bytes_per_cylinder are left out. Hence there is a difference in size.
Mirhawk said:
In the previous method, more than 16384 bytes are left out. There 16384 cylinders*bytes_per_cylinder are left out. Hence there is a difference in size.
Click to expand...
Click to collapse
Thanks for your instructions it's clear at the the beginning. Now there is no way to use old p15 in this rom until doing like this to use all storage size. That's clear now. So, can I leave about 1G as mmcblk0p15 with vfat system just to flash an update and gapps in the future? Cause all data partition will be wiped if we reset the device.
Can anyone help me? When I try adb in PC, i receive this message: device not found.
I have the phone with TWRP and connected by Usb to the PC.
In the past, i increased the partition for lollipop without problems.
What am i doing bad??
Update:
If I connect the phone with lollipop instead TWRP i can access to the phone without problems. Adb found my de vice attached.
hi, thanks for the detailed instructions. is there any way (command) fo format as f2fs instead of ext4?
jgilalonso666 said:
Can anyone help me? When I try adb in PC, i receive this message: device not found.
I have the phone with TWRP and connected by Usb to the PC.
In the past, i increased the partition for lollipop without problems.
What am i doing bad??
Click to expand...
Click to collapse
Just connect your device to PC and open command. Write (adb devices) if the device doesn't detect while youre device is connected to PC go to advance menu in twrp and open side load and swipe then press cancel then your device should be detected by this command (adb devices)
Ok. I'm gonna try. Thanks

[! DISCONTINUED !] [TUTORIAL][LOCKED][UNLOCKED][ANY G4] DLM Backup

This thread is superseeded by: https://tinyurl.com/SALTatXDA
NO FURTHER SUPPORT HERE!
DLM Backup is a NANDROID BACKUP IN DOWNLOAD MODE!
(DLM Backup = [D]own[l]oad [M]ode Backup)
The following does not require an unlocked device and so even no TWRP.
Believe it or not but you are able to backup full partitions nevertheless!!! :victory:
.. and all this even for partitions you usually have NO ACCESS TO (e.g. laf, aboot etc) and all this even without root ! wtf its not a dream its true! :victory:
It's really awesome especially for those having a locked device but still wanted to have a nandroid backup
or for those encountering the ILAPO (Infinite Loop Auto Power off or just called "bootloop issue") wanting to save their data!
The following will make full disk dumps of all or only the system essential ones of your device. Choose whichever option you need.
Preparation
First of all you should download FWUL ( https://tinyurl.com/FWULatXDA ).
Every other Linux is fine as well as long as you can handle it! (do not expect support from me then - I support FWUL only)
You may still should consider FWUL as it has everything onboard and is preconfigured to work with Android devices out-of-the-box.
Keep in mind the FWUL password as you need it for the sudo commands within the terminal later.
Once FWUL is running open a terminal (little black icon in the panel):
Code:
git clone [url]https://github.com/steadfasterX/lglaf.git[/url]
cd lglaf
Leave this terminal window open - we need it in the next step.
Then boot your phone into download mode --> the following guide is 100% working and bulletproof:
take out battery and unplug USB cable
plugin USB cable to your PC (while battery ist still out)
wait until you see the missing battery icon (question mark within a battery symbol)
press Volume up and while keeping it pressed put battery in (take care that you do not press the power button)
keep pressing Volume up until you see "Download mode"
If that does not work for you try it this way instead:
unplug USB cable
power down device or pull out battery
put battery back
press Volume up and while keeping it pressed plugin USB cable to your PC (take care that you do not press the power button)
keep pressing Volume up until you see "Download mode"
Your phones screen should look similar to this afterwards:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
You need a USB stick or disk which is big enough to hold the backup.
Depending on the method you need either a ~8 GB one or a 64 GB..
Plugin the USB stick and find out the path to it by just double clicking on the USB stick icon which appears on the desktop after plugging in the stick.
Then write down / copy the path to the stick as shown in the screenshot:
If you encounter problems with the above (e.g. no icon appears after plugging in the USB stick) you can do this in a terminal instead:
Code:
df
Filesystem 1K-blocks Used Available Use%[COLOR="Red"] Mounted on[/COLOR]
dev 16439340 264744 16174596 2% /dev
[............]
/dev/sdd3 2978320 9532 2797780 1%[COLOR="red"] [B]/run/media/android/myusb-stick[/B][/COLOR]
When you are running LL you can skip this step but when you are on MM (or higher...) you need to do the following:
Execute this in your terminal left open from the "Preparation" topic:
Code:
sudo python2 auth.py
you should see something like:
LGLAF.py: DEBUG: Detaching kernel driver for intf 0
LGLAF.py: DEBUG: Using endpoints 83 (IN), 02 (OUT)
auth: DEBUG: Challenge: c0:45:6c:78
auth: DEBUG: Response: b4:1d:1e:cd:e8:f1:5f:b5:fa:78:9e:f8:2d:c6:83:86
Click to expand...
Click to collapse
Now you are authenticated with the download mode and we can continue:
Option A) FULL backup (includes everything e.g. system, cache and userdata / internal storage)
When to use:
if you want to flash new ROMs or bootloader stacks
if you want to backup all your internal storage (e.g. pictures, videos and stuff) - keep in mind TWRP does NOT backup your internal storage!!
if you want to have a real FULL NANDROID (e.g. TWRP will not backup partitions like misc, persistent, persistent-lg etc)
Requirements:
- FWUL
- a 64 GB or bigger USB stick / disk
Execute this in your terminal left open from the "Preparation" topic:
Code:
sudo python2 extract-partitions.py --max-size 0 -d [I]YOURUSBSTICKpath[/I]
(replace YOURUSBSTICKpath with the path you discovered in the Preparation topic!)
Be patient.. this can take a loooong time!
You can watch the progress e.g with executing this in a NEW terminal (just click the terminal icon in the panel again):
Code:
watch 'ls -lathr [I]YOURUSBSTICKpath[/I] | tail '
(replace YOURUSBSTICKpath with the path you discovered in the Preparation topic!)
Once finished you can reboot by either taking out the battery or typing:
Code:
sudo python2 lglaf.py --skip-hello -c '!CTRL RSET'
Option B) system essentials backup (does *NOT* include system, cache and userdata / internal storage!!)
When to use:
if you want to flash new bootloader stacks
if you want to backup your current lock/unlock state
if you want to backup your IMEI and EFS
Requirements:
FWUL
a 4 - 8 GB or bigger USB stick / disk
Execute this in your terminal left open from the "Preparation" topic:
Code:
sudo python2 extract-partitions.py -d [I]YOURUSBSTICKpath[/I]
(replace YOURUSBSTICKpath with the path you discovered in the Preparation topic!)
Be patient.. this can take some time!
You can watch the progress e.g with executing this in a NEW terminal (just click the terminal icon in the panel again):
Code:
watch 'ls -lathr [I]YOURUSBSTICKpath[/I] | tail '
(replace YOURUSBSTICKpath with the path you discovered in the Preparation topic!)
Once finished you can reboot by either taking out the battery or typing:
Code:
sudo python2 lglaf.py --skip-hello -c '!CTRL RSET'
... and the last 2 things which need to be done
1) Click the thanks button here
2) Enjoy
Restore a DLM Backup
Checkout Post #2 for the restore howto
Credits
Peter Wu for his absolutely awesome job on reverse engineering the LAF protocol and offering the lglaf code as python code.
Main thread for lglaf: https://forum.xda-developers.com/android/software-hacking/tool-lg-download-mode-laf-t3285946/page1
Donations: https://forum.xda-developers.com/member.php?u=4790426
.
Restore a previously taken backup or partitions of an already extracted KDZ
There are 2 methods available - choose the one matching your needs:
A) Restore a previously taken DLM Backup
B) Flash a KDZ / LGUP NG by sfX
Unfortunately this may not work on every firmware so you may try different firmwares then and you will receive the same error regarding communication port closing but in general it should work this way.
A) Restore a previously taken DLM Backup / Restore partitions from an extracted KDZ
To restore single partitions use the following
sudo python2 auth.py
sudo python2 partitions.py --restore /path/to/dumpfile partitionname
e.g.
sudo python2 auth.py
sudo python2 partitions.py --restore /tmp/misc misc (would restore the misc partition)
To restore ALL partitions in a folder
For this the best is to use the new LGUP NG kdzmanager which is explained in the next topic.
Install LGUP NG but skip the steps to extract a KDZ if you don't need it.
Then:
bash kdzmanager.sh --test --flash /path/to/imagefiles
(/path/to/imagefiles must contain your previously taken DLM backup files or an extracted KDZ)
This will just test flashing and not actually flash.
If that looks fine do it again but without --test parameter:
bash kdzmanager.sh --flash /path/to/imagefiles
B) Flash a KDZ / LGUP NG (next generation) by sfX
Forget LGUP to flash a KDZ from now on!
Just use my KDZManager
Features:
No worries anymore about those crappy DLL issues
Extract a KDZ
Test flashing partitions (dry run without actually flashing anything)
Flash partitions from a KDZ
when flashing avoid erasing/wiping userdata (keep your data between KDZ flashes)
Hint: not wiping userdata can occur in a bootloop when its not compatible with the ROM! So use that option with care.
will work on any Linux (but FWUL is the only supported)
Keep in mind that this is an early release and there are NO CHECKS like ARB or even if the device model matches with the KDZ but THIS WILL ALL COME (even with an option to override and flash regardless)
Roadmap:
GUI
Check for matching device model
Check for ARB
Instructions:
Boot FWUL (or your Linux but keep in mind that only FWUL is supported), choose language & login
Download the KDZ file you want to flash (we need to know the path later e.g. /home/android/Downloads/)
Open the folder LG
Connect device in download mode to the PC
Double click "LG laf NG" icon
Type in the new opened terminal:
sudo python2 auth.py
[*]sudo python2 partitions.py --list
If this lists your partitions then we can proceed with flashing.
Download my brand new kdzmanager tool in FWUL: (right click and save as)
When you are not using the persistent mode of FWUL: plug in a big USB stick (e.g. 32 GB or more) into FWUL and extract the attached file there
When you are using the persistent mode of FWUL: just extract it in your download folder
You need to know the full path so best is copying the path from the file manager (e.g. /home/android/Downloads/ ) or leave the file manager open there
Open another terminal (black little icon in the panel)
cd and directly behind this paste the path you copied (e.g. cd /home/android/Downloads/ )
press ENTER
bash kdzmanager.sh -x FILLINFULLPATH-TO-DOWNLOADED-KDZ
(e.g. bash kdzmanager.sh -x /home/android/Downloads/h811blablubb.kdz)
WARNING-1: Keep in mind that atm kdzmanager is not able to proof if you choose a compatible KDZ file for your device!
Check your device model and the KDZ twice!
WARNING-2: Keep in mind that atm kdzmanager is not able to proof your current ARB version so flashing an smaller ARB then your current one will BRICK your device.
Check ARB first: CLICK
If you understood the above 2 warnings proceed like this:
bash kdzmanager.sh --test --flash extracteddz/
(just like this as "extracteddz" is the path generated by the kdzmanager)
This will just test flashing and not actually flash. Let me know the results of this (copy & paste output)
if you can't wait the next step would be actually flashing ofc:
WARNING: by default the kdzmanager will not overwrite userdata (which would be like a factory reset) and I would recommend to leave it out always and better choose the LG factory reset menu (after flashing completed) if required. If you still want to flash it use --with-userdata as a parameter (can take a loooong time then btw).
bash kdzmanager.sh --flash extracteddz/
last step ( will be included in the next release): wipe your userdata:
sudo partitions.py --wipe userdata
Or just use the factory reset hardware key combo to do the same.
If you skip this step you may encounter a bootloop. If that happens you can at any time use the hardware key combo to boot into factory reset to fix that.
sfX
FAQ
1. Q: You get the error message: "Expected arrow in ls output" when executing lglaf
A: update to the latest version of lglaf (thx to @tulen_kobi for this patch!). For updating lglaf on FWUL check Q4.
If the error still persists your download mode version is not supported by lglaf. Its very likely that your carrier has a very strict policy activated in download mode. The only chance is to try other download mode version meaning to flash different KDZ files (on locked devices) or just the laf.img in fastboot (on unlocked devices).
On Nougat and when unlocked it is enough to just flash the laf.img of MM and you can use lglaf again.
2. Q: You get not an error but messages or files containing just "Hello, I am LAF. Nice to meet you."
A: your download mode version is not supported by lglaf. Its very likely that your carrier has a very strict policy activated in download mode. The only chance is to try other download mode version meaning to flash different KDZ files (on locked devices) or just the laf.img in fastboot (on unlocked devices).
On Nougat and when unlocked it is enough to just flash the laf.img of MM and you can use lglaf again.
3. Q: All seems fine but at the end of a command you see: "comm.call(close_cmd) [....someotherstuff...] Command failed with error code 0x8000010a"
A: This is known and not a serious issue. Once I have the time I will fix it but in the meanwhile pls ignore..
This has been fixed. please update your LGlaf like described in the next FAQ
4. Q: I want to update lglaf on FWUL v2 or higher
ok here is the correct way to achieve this on FWUL v2:
cd ~programs/lglafng/
git pull
git checkout g4
then you're up2date and can try again while in this folder!
sfX
I'm so happy that you were able to finally get this working. It's dumping my system partition right now. I'll report back when it's done.
Also. You should note that the sudo password is "linux" and to view progress on the dump, you should specify that the command should be opened in a new terminal window.
Over all. Awesome tutorial!
EDIT: Was able to retrieve 7gb of lost pictures thanks to this method! Thank you!
How to restore? Is it possible?
mateus.sc said:
How to restore? Is it possible?
Click to expand...
Click to collapse
Yes even that.. I will write down a restore guide soon.
.
Sent from my LG-H815 using XDA Labs
I cannot Auth with my device.
I get the first 2 lines from the auth.py command
No challenge or response.
Using Virtualbox.
OllieD said:
I cannot Auth with my device.
I get the first 2 lines from the auth.py command
No challenge or response.
Using Virtualbox.
Click to expand...
Click to collapse
what Android version is installed currently?
.
steadfasterX said:
what Android version is installed currently?
.
Click to expand...
Click to collapse
20G Stock Locked Bootloader.
Rebooted into live environment and worked.
Extract partitions errored out
Traceback (most recent call last):
File "extract-partitions.py", line 63, in <module>
main()
File "extract-partitions.py", line 60, in main
dump_partitions(comm, disk_fd, args.outdir, args.max_size * 1024)
File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
self.gen.next()
File "/home/android/lglaf/partitions.py", line 78, in laf_open_disk
comm.call(close_cmd)
File "/home/android/lglaf/lglaf.py", line 176, in call
raise RuntimeError('Command failed with error code %#x' % errCode)
RuntimeError: Command failed with error code 0x8000010a
After Dumping, Option B
Also the Firefox installer although it installs Firefox it wont launch and gives a SQLite Version Error so it will not run.
Chromium works fine.
Now i've backed up i can try and install V29
OllieD said:
20G Stock Locked Bootloader.
Rebooted into live environment and worked.
Extract partitions errored out
Traceback (most recent call last):
File "extract-partitions.py", line 63, in <module>
main()
File "extract-partitions.py", line 60, in main
dump_partitions(comm, disk_fd, args.outdir, args.max_size * 1024)
File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
self.gen.next()
File "/home/android/lglaf/partitions.py", line 78, in laf_open_disk
comm.call(close_cmd)
File "/home/android/lglaf/lglaf.py", line 176, in call
raise RuntimeError('Command failed with error code %#x' % errCode)
RuntimeError: Command failed with error code 0x8000010a
After Dumping, Option B
Also the Firefox installer although it installs Firefox it wont launch and gives a SQLite Version Error so it will not run.
Chromium works fine.
Now i've backed up i can try and install V29
Click to expand...
Click to collapse
well it sounds like u have not much RAM attached to your VM then. 4 GB are recommended.
The dump error can be ignored as long as auth.py has worked before and everything gets dumped..
.
steadfasterX said:
Just a quick note:
I completely re-worked the guide and fixed an issue for devices running MM!
Just re-do the guide if you encountered an issue before.
.
Click to expand...
Click to collapse
what if .. i dont have USB.? am planning of backing up my IMEI. as i been reading this on the new N roms..
what can i do.?
raptorddd said:
what if .. i dont have USB.? am planning of backing up my IMEI. as i been reading this on the new N roms..
what can i do.?
Click to expand...
Click to collapse
If you have an unlocked device you have luck and you could use dd commands in TWRP. I know that yours is unlocked so you could use dd on every partition available on your device.
Tbh the most important seems to be persistent, fsg, misc but until I know for sure I would just backup EVERY partition. It's only needed once in the phones life usually so it doesn't hurt..
I need to have my device repaired before I can test it further so this can take a while.. Until then the backup of every partition is the best choice.
if the device is locked and on LL then TWRP in FIsH plus the mentioned dd commands can be used as well. I would still recommend the download mode backup though..
if the device is locked and on MM or N (haven't tested N in download mode though) then USB plus download mode is the only choice.
.
Sent from my LG-H815 using XDA Labs
Similar question. What's the quick and dirty way to backup these partitions from terminal app / busybox?
Dd if=??? Etc
not sure if different between models but mines h815 international running 'stock' nougat
steadfasterX said:
If you have an unlocked device you have luck and you could use dd commands in TWRP. I know that yours is unlocked so you could use dd on every partition available on your device.
Tbh the most important seems to be persistent, fsg, misc but until I know for sure I would just backup EVERY partition. It's only needed once in the phones life usually so it doesn't hurt..
I need to have my device repaired before I can test it further so this can take a while.. Until then the backup of every partition is the best choice.
if the device is locked and on LL then TWRP in FIsH plus the mentioned dd commands can be used as well. I would still recommend the download mode backup though..
if the device is locked and on MM or N (haven't tested N in download mode though) then USB plus download mode is the only choice.
.
Sent from my LG-H815 using XDA Labs
Click to expand...
Click to collapse
OMG so basically if this works in locked N, can I flash the korean v30 kdz and then restore a backup the modem.img from v29a made for my H815 with this method?
The possibilities are amazing
obvious said:
Similar question. What's the quick and dirty way to backup these partitions from terminal app / busybox?
Dd if=??? Etc
not sure if different between models but mines h815 international running 'stock' nougat
Click to expand...
Click to collapse
I will add it in the TWRP thread ASAP
mateus.sc said:
OMG so basically if this works in locked N, can I flash the korean v30 kdz and then restore a backup the modem.img from v29a made for my H815 with this method?
The possibilities are amazing
Click to expand...
Click to collapse
Technically this method can provide that (as said I can't test N atm though so I don't know if this works in general for N but if LG hasn't changed anything.. )
but:
keep in mind that cross flashing partitions can result in a soft brick on locked devices!! I don't know how N behaves here tbh so it may just work or it may soft brick in the specific case of modem.
So it would be nice to have someone trying to use the auth command on a N bootloader stack. This will not harm anything but then we know for sure if this is usable for N or not
.
Sent from my LG-H815 using XDA Labs
steadfasterX said:
If you have an unlocked device you have luck and you could use dd commands in TWRP. I know that yours is unlocked so you could use dd on every partition available on your device.
Tbh the most important seems to be persistent, fsg, misc but until I know for sure I would just backup EVERY partition. It's only needed once in the phones life usually so it doesn't hurt..
I need to have my device repaired before I can test it further so this can take a while.. Until then the backup of every partition is the best choice.
if the device is locked and on LL then TWRP in FIsH plus the mentioned dd commands can be used as well. I would still recommend the download mode backup though..
if the device is locked and on MM or N (haven't tested N in download mode though) then USB plus download mode is the only choice.
.
Sent from my LG-H815 using XDA Labs
Click to expand...
Click to collapse
yes unlocked.. i downloaded FWUL but on step to place the command for python i had directiry not found and gave up use twrp for EFS.
for DD what are commands is this using ternimal? where can i find all the command to extract say boot ,system modem ect.?
raptorddd said:
yes unlocked.. i downloaded FWUL but on step to place the command for python i had directiry not found and gave up use twrp for EFS.
for DD what are commands is this using ternimal? where can i find all the command to extract say boot ,system modem ect.?
Click to expand...
Click to collapse
just try my new twrp version which will be uploaded in 5 minutes..
.
Hey I'm getting an error in running this - phone is in download mode and connected. Using FWUL on my machine and trying to dump to an extrernal HD (path below in first line).
Code:
[[email protected] lglaf]$ sudo python2 extract-partitions.py --max-size 0 -d /run/media/android/16a064ee-96de-4c4d-8c30-29cbcc2e5441/
Traceback (most recent call last):
File "extract-partitions.py", line 63, in <module>
main()
File "extract-partitions.py", line 60, in main
dump_partitions(comm, disk_fd, args.outdir, args.max_size * 1024)
File "extract-partitions.py", line 24, in dump_partitions
parts = partitions.get_partitions(comm)
File "/home/android/lglaf/partitions.py", line 41, in get_partitions
assert arrow == '->', "Expected arrow in ls output"
AssertionError: Expected arrow in ls output
ReeS86 said:
Hey I'm getting an error in running this - phone is in download mode and connected. Using FWUL on my machine and trying to dump to an extrernal HD (path below in first line).
Click to expand...
Click to collapse
Yea... I saw that on another phone as well. Weird.
I need your help to fix it..
Could you come into IRC on Monday?
sfX
Sent from my LG-H815 using XDA Labs
steadfasterX said:
Yea... I saw that on another phone as well. Weird.
I need your help to fix it..
Could you come into IRC on Monday?
sfX
Sent from my LG-H815 using XDA Labs
Click to expand...
Click to collapse
Ya I'll try to pop on after work. Can also see if the secure boot thing works once I get that backup.

TOLTESPR / SM-N910P hard brick trials and solution (mmc_read failed)

Greets all,
Apologies in advance for the longer post.
TLDR: Writing the debrick-n910p.img image to SDcard using Windows (10 x86_64) for me caused my hard bricked SM-N910P / Sprint Samsung Galaxy Note 4 to endlessly boot-loop (displaying BOOT RECOVERY MODE / CHECK BOOT PARTITIONS.. / COPY FROM T-FLASH.. / BOOT RECOVERY / WRITE 188416 sectors / REBOOT). I found my solution for this issue to be that as long as I wrote the debrick-n910p.img image in Windows (10 x86_64), then booted into Linux and wiped the GPT data structures on the SDcard only to convert the SDcard to basic MBR (+DOS compatible flag), then created & formatted a single 32GB partition as FAT32, then and only then, write the debrick-n910p.img image file to the SDcard in this way, I was able to save my hard-bricked phone flawlessly!
I ran into the "mmc_read failed" issue that many posters to this site have experienced. I wanted to add the solution that worked for me along with the issues I ran into, as a reference for myself if I ever need it again in the future, and to pass on the information in the event others may find it helpful.
In all my trials and research I never found a point-by-point / exact instructions for the SM-N910P / Sprint Samsung Galaxy Note 4, nor anyone running into the same issue(s) that I did. that's what this post is => links to others solutions, my experience, and my solution for a hard-bricked SM-N910P / Sprint Samsung Galaxy Note 4.
SCENARIO: After ~6months of owning my phone I bought from craigslist it started experiencing random lagging, then random reboots, and ultimately the phone failed to boot into the OS one day. So I booted up TWRP, did a full-wipe and fresh OS load. after the OS flash (like I've done a million times, nothing different/strange) the device was set to reboot, then the screen went dark, and never came back on. just poof. it would flat-out not boot again; no LED during charging, nothing would happen when attempting to power on the phone, or any attempt to try booting recovery (Home+Vol-Up+Power) or to Odin/Kies download-mode (Home+Vol-Down+Power). To me the phone was dead, I considered it the "true brick". Yet, I wondered at the most curious thing that would happen when I connected the phone to my computer via the microUSB cable without the battery; I would hear the "new device attached" Windows chime, and Device Manager would list a new "Qualcomm HS-USB QDLoader 9008" device. otherwise, the phone remained dark, and completely void of any life.
At this point I started researching to purchase a replacement cellphone when a website caught my eye with the title "Qualcomm Snapdragon Unbrick Guide, Snapdragon’s are UNBRICKABLE".
I skimmed over the text, and began thinking it possible to revive my (broken?) phone - I just desired a straight-forward HOWTO describing the procedure how I could resurrect my phone, and I figured I would be on my way.
In the end, I found some promising posts, and the very SM-N910P debrick image itself (see below for links), but never found a step-by-step for my exact model of phone.
N910P Debrick Image + Useful Links
Mega Link to the N910P debrick image (128MB)
Samsung N910P Galaxy Note 4 Sprint USA Repair Firmware (N910PVPU4COG5_SPT4COG5_Sprint_USA_v5.1.1_Repair_Firmware.zip)
Win32DiskImager (Project Homepage) (v0.9 binary)
dd for windows
Galaxy Note 4 Unbrick/Debrick.img for N910G/F/T/W8 [unbrick] [unbrick image]
[*]- Inside, a reference For N910P refer this thread​
Galaxy Note 4 N910T FIXED HARD BRICKED
SM-N910P (US-Sprint) debrick.img
All instructions seemed to state I needed a 16GB or larger SDcard, so I went out and purchased a brand new 128GB MicroSDXC card, specifically Samsung MicroSDXC EVO Memory Card w/ Adapter 128GB (2017 Model) - Model: MB-MP128G / Model Code: MB-MP128GA/AM
The gist of all the reports on how to fix my issue was to write the N910P debrick image to a micro SDcard and magically the phone would come back to life. And so, I did just that. In my case using Windows 10 x86_64 - using the suggested applications to write the image to the SDcard: Win32DiskImager and/or dd for windows, then popping the SDcard into the "dead" phone, attaching the battery to the phone and pushing power - or one of the 3 finger salutes (recovery/download-mode) - then the magic would happen, the screen would show the following text:
Code:
BOOT RECOVERY MODE
CHECK BOOT PARTITIONS..
COPY FROM T-FLASH..
BOOT RECOVERY
WRITE 188416 sectors
REBOOT
But, unfortunately for me, that is all it would do, I would keep seeing that text over and over... If I let the "COPY FROM T-FLASH.." appear then press one of the 3 finger salutes (recovery -or- download-mode), the phone would just reboot before it displayed the rest, and continue back in it's loop:
Code:
BOOT RECOVERY MODE
CHECK BOOT PARTITIONS..
COPY FROM T-FLASH..
BOOT RECOVERY
WRITE 188416 sectors
REBOOT
This just kept occurring over, and over with infinite reboots. Yet, ALL the documentation said it would ultimately boot into download-mode, I just had to "put it in the freezer to let the phone cool" (never mind that the phone wasn't hot AT ALL) for an hour or something similar?? All my searching found nobody else with this issue (at least no one reporting it). So I am reporting it and also reporting how I fixed my sorry state of affairs.
As I noted above, I was using Windows 10 x86_64 as the OS and Win32DiskImager, as well as dd for windows, to write the debrick image to the SDcard up to this point. This was my process:
:: Windows 10 ::
place SDCARD in drive
format the SDCARD (drive d:/f:, whichever) through Windows Explorer (explorer.exe) via RIGHT-CLICK on drive -> Format ...
capacity 119GB / Filesystem: exFAT / Allocation Size: drop-down = Default Allocatio-- n Size
CHECK Quick Format
click Start button
click OK
click OK when finished
click Close button
in Windows Explorer (explorer.exe), RIGHT-CLICK on SDCARD drive -> Eject
eject SDCARD from computer
- EITHER Win32DiskImager OR dd for windows, only do 1.
:: Win32DiskImager ::
run Win32DiskImager as Administrator
DEVICE = drive of the SDCARD (D:/F:, whichever)
IMAGE FILE = click FOLDER icon, select "debrick-n910p.img"
click WRITE button
click OK
at Write Successful = click OK
more then likely (win10) a ****-ton of Explorer screens pop up, with errors like "You need to format the disk in Drive ? before you can use it" pops up
IGNORE ALL THIS, ALT-F4 to close ALL the pop-ups and errors
OR just REBOOT, as at this point we are done
Shutdown Windows (10) -> REBOOT
:: dd for windows ::
open "cmd" as Administrator
dd --list
dd if=debrick-n910p.img of=\\.\Volume{3fde94fa-d22d-11e7-b791-806e6f6e6963} bs=1M
Once the debrick-n910p.img file is finished being written to the SDcard, 27 partitions (what appears to be mostly duplicate) will show up and all drive letters will get filled, being displayed as mostly unreadable, that is just the nature of what the debrick image is.
My Solution to this situation was as follows:
:: LINUX ::
boot linux from USB -or- CD (I booted a handy USB stick with Qubes OS v4-rc3, choose Troubleshooting -> Rescue a Qubes System)
upon boot, choose "3" to be dropped to shell
mount windows folder that holds the debrick N910P image = mount /dev/sda2 /mnt/sysimage
place SDCARD in drive
fdisk -l << make sure your SDcard shows up (/dev/mmcblk0) is there
cgdisk /dev/mmcblk0
delete ALL paritions (using "d" on each highlighted partition)
"New"
Fist sector = hit ENTER (choose default = 2048 for me)
Size in sectors = 32G
Hex code = 0700 (Microsoft basic data)
Partition name = hit ENTER
"Write"
type "yes"
"Quit"
gdisk /dev/mmcblk0
should display = "Found valid GPT with protective MBR; using GPT"
"x" (extra functionality (experts only))
"z" (zap (destroy) GPT data structures and exit)
"Y" (Yes to continue)
"N" (blank out MBR)
fdisk /dev/mmcblk0
"p" (print parition table)
"c" (toggle dos compatibility flag)
should show DOS COMPATABILITY FLAG SET (DEPRICATED)
"d" (delete partition)
MAKE SURE NO PARTITIONS EXIST!
"n" (new partition)
"p" (primary)
hit ENTER (default = "1")
hit ENTER (first sector, my default was 63)
"+32G" (last sector, this creates 32GB partition)
"a" (toggle bootable flag, should show "the bootable flag on partition 1 is enabled now")
"t" (partition type)
"c" (W95 FAT32 (LBA))
"w" (write table to disk and exit)
Format the new partition, FAT32
mkfs.fat -F 32 /dev/mmcblk0p1
Goto the folder containing the debrick N910P image
cd /mnt/sysimage/Users/$USER/Downloads/SM-N910P-trltespr
dd if=debrick-n910p.img of=/dev/mmcblk0 bs=1M
sync
Eject sdcard and place in your Note 4 phone
This time, when I put the battery in the phone, I got the same text as before:
Code:
BOOT RECOVERY MODE
CHECK BOOT PARTITIONS..
COPY FROM T-FLASH..
BOOT RECOVERY
WRITE 188416 sectors
REBOOT
And then, it did a REAL reboot, and went directly to download-mode!
I tested this multiple times - as long as I wrote the debrick image in Win10, and then erased the SDcard and formatted it as Fat32 without using GPT just a basic MBR, and wrote the debrick image that way in linux it worked flawlessly!
let it boot, then do it's reboot
should be able to go into RECOVERY = Home+Vol-Down+Power !!!
:: Boot Windows ::
unzip "N910PVPU4COG5_SPT4COG5_Sprint_USA_v5.1.1_Repair_Firmware.zip"
run Odin3 3.09
click PIT button -> select "TRLTE_USA_SPR.pit" -> click OPEN
click AP button -> select "ALL_SPT_N910PVPU4COG5_N910PSPT4COG5_CL5303209_QB5691107_REV00_user_low_ship_MULTI_CERT.tar.md5" -> click OPEN
phone should be in DOWNLOAD mode (home+vol-down+power -> UP to continue) and connected via microUSB, Odin3 should be detecting it with a BLUE ID:COM lit up on top-left
click START button in Odin3
when finished it will reboot, and all should be well
- One last note, about the "mmc read fail" error, I took this gentleman's advice:
As a side note....
IF YOU HAVE THE MMC READ FAIL MESSAGE!!!
Which consists of Random Reboots, Heating Issues when theirs hardly no apps on, or even Lag or Glitchyness.
The Temp FiX that I've been using everyday and haven't had these issues since was downloading this app
WakeLock Manager and setting to PARTIAL LOCK! on Level 4.
Click to expand...
Click to collapse
And am currently running Wake Lock - PowerManager from Google Play as suggested, just to be safe - and so far, I have not YET had to deal with that horrid business again (so far, fingers crossed).
And there ye have it, that is my story, my tribulations, and my fix. Thank you to all who came before me, and for everyone's good advice = Good luck to all, and have a great rest of 2017.
XORr0 said:
[*]mount windows folder that holds the debrick N910P image = mount /dev/sda2 /mnt/sysimage
Click to expand...
Click to collapse
Hi man, thank you for the post, but can´t mount the sysimage
Help me please!!!
Mega Link a la imagen de debrick N910P ( 128MB )
the files are not there if it is not too much trouble to provide me with the: confusing files: confusing

Categories

Resources