Dead Sensors in Redmi Note 8 Help please! - Redmi Note 8 Questions & Answers

I have changed from Rom from Android 11 to Android 10, and in the process the connection with the cell phone sensors has been lost. Investigating in Telegram groups about the RN8 I came up with the solution that was the following:
Code:
Fix for dead sensors
You might encounter the "Dead Sensors" bug when you flash a rom, DO NOT FLASH "persist.img" FILE!
But instead, do this workaround to fix the sensors without flashing anything.
INSTALL BUSYBOX FIRST
1) Open any Terminal Emulator app.
2) Type "su" to give it root permissions.
3) Copy and paste below command, apply it then reboot.
chcon -R u:object_r:sensors_persist_file:s0 /mnt/vendor/persist/sensors
4) Sensors should be working now, and this has been tested and it's working.
My problem is that since I made that rom change, the command files are not found so that I can solve the problem because those files have been deleted on my system.
I wanted to ask if someone would be so kind as to pass me the files of this root location:
/mnt/vendor/persist/sensors

same with me!i format all partions with some recovery,which i forget which one,since i tried all……
suddenly,sensors about display abnormal。
i tried fastboot mode to flash official ROM back,but do nothing to the dead sensor,very wired。
i thought i mistake formating some partion

Had the same problem almost a month ago.
*Spoiler* flashing the stock rom doesn't help.
The best way I found to fix it, was to use this solution.
[Guide] About repairing/fixing the persist partition
Disclaimer: I am not responsible for the results of any of these operations. Everyone knows that the persist partition is responsible for sonsors and carrier network etc. Once this partition is failed or lost, your phone will go wrong. I just...
forum.xda-developers.com

To make sure that something is wrong, run the CIT test.
If you don't know how to access it tell me

Related

Rooting Every Spreadtrum SC6820/SC8810 phones ! (1.5)

Hello,
In this thread I will teach you every method I had to use to root any Spreadtrum devices, Starting with the riskless ones to the reckless ones.
I have to warn you that the last root method (using ResearchDownload to load a modified system.img) may be dangerous ! (because of possible partition table changes)
The others methods are pretty safe, don't be afraid by them if you do exactly what I wrote.
Theses processors are also named SP6820 and SP8810, it's exactly the same processor, it's just some misnaming from Chinese sellers.
Theses methods do work on the newest Spreadtrum CPUs, like the SC7710 (the 3G WCDMA model), and the more powerful SC8825/SC6825 (dual core).
Why buying a Spreadtrum based phone ?
They are really cheap, and they work amazingly well ! They can play some games and emulators very well, that's unexpected for such low end devices (50$ or less)
They usually only have 256MB of RAM but despite that, they still runs well ! (I tested a lot of games and some 3D games are working flawlessly, pretty amazing) - I discovered that they are using zram (or other swap methods) to provide more RAM by compressing it when needed. That's pretty neat and really helps with such a small amount of RAM !
They are very good as a portable multimedia device, to read mails, browsing the web, play some games, mp3, videos.
As a 2G phone they are competent, but the 2G modem is not as good as the one in MTK processors. (It takes longer to load something in the same conditions)
Boot very fast, and have decent battery life. (3-4 hours of video out of a 1200 mAh battery - 5-6 hours out of a 1800 mAh)
Why you should not ?
Not true anymore, but they were extremely difficult to root in some cases.
They don't seem to be well tested ... You can have a microphone so quiet nobody will be able to ear you. But it's easy to fix as you can see here: http://forum.xda-developers.com/showthread.php?p=38731407
They don't have any form of usable 3G support. (except the SC7710 who have WCDMA 850/2100 compatibility)
They usually have only 256MB of RAM again. So that can be a problem when you are, for example, using Opera Mobile Classic with more than 3 tabs. And make the transition between apps longer.
SC6820 and SC8810 model are all using Android 2.x, even if some are marketed as Android 4.0 phone (very big and blatant lie !)
They usually use android 2.3, but some are only Android 2.2 phones ! (The fake Android 4.0.3 for instance is usually only android 2.2)
SC6825 and SC8825 seems to only have a (real this time) Android 4.0.3 firmware. 4.1 are better is often advertised, but it's again ... lies ... Android 4.0 is not really suitable for phones with only 256 MB of RAM, so SC6825/8825 phones are pretty rough on the edges. Using more than one tab on the default web browser is asking for troubles for example.
They all use the MocorDroid Firmware. It's some kind of fork of Android that use NON-Standards and sometime buggy Launchers and they often use alternative keyboards like Go Keyboard which is kind of a bad choice considering the RAM and ROM constraints on theses devices ...
The only difference between the SC6820 and the SC8810 is the support for the Chinese form of 3G.
If you don't live in china, that means this two processors are essentially the same. (Don't trust sellers, the 8810 is NOT WCDMA "3G" compatible)
Some phones with the fake Android 4.0.3 based on 2.3.5 will brick themselves nearly 2 months after you first used it. It's a really weird behavior of this early Spreadtrum firmware. So if you have this firmware, just do whatever it takes to root it, make a backup and install CWM as soon as possible to be able to recover from this possible breakage. It's only a problem with a fraction of Spreadtrum phones, but you will be very happy if you have installed CWM before encountering it ^^ (applicable only if you bought one in 2012)
A lot of fakery in the Spreadtrum scene. For example fake MTK6515/MTK6572 phones that are in fact just SC6820/SC6825 phones with a firmware modified to lie its processor ID to populars android benchmarking tools like Antutu Benchmark.
If you are searching for a 512MB RAM phone, you'd better go for an MTK(6575/6572 or better) Phone. As you will never find a real 512MB Spreadtrum phone in the jungle of lies you are looking at ...
On all model with 2.3.5 based firmware (SC6820 and SC8810 essentially), you can have a lot of problems with the SIM card detection on some sim cards. For example I can't call somebody with mine, but I can answer a call or send/receive SMS ... Very weird bug ...
This bug seems to be related on the type a sim card you have. With some their is no problem at all.
I can confirm that it's working flawlessly on SC6825 and 8825 based phones with the real 4.0.3 based firmware.
Why rooting it ?
Because a lot of them come with a lot of sh*tty softwares, including the bad launcher and keyboard.
Because they can come with a "Virus" that can send SMS messages to china (so you have to pay for unwanted international SMS cost)
I myself have this Virus on one of my phones, as of now, I haven't noticed anything unusual. Just the useless, unkillable com.android.caivs.app process eating 15 MB of RAM doing nothing. (It is a significant waste of ram on such devices)
(As of now I only seen this malware on Feiteng devices - You can share your experience with this thing down bellow)
More about CAIVS here: http://web.archive.org/web/20110812021151/http://www.cseed.cn/chinese/news/portfolio2.htm
That virus was on most of the earliest Spreadtrum phones but don't seem to be a worry nowadays. But I haven't tried any new Feiteng devices. They were so poor in quality that I will never buy feiteng again so find it by yourselves if you feel adventurous xD
How-to do that ?!
If you are lucky you will be able to root your phone by traditional means.
If you are not, you can root them by manually adding the root utilities to the ROM.
I will describe every methods that you should try in order of difficulty and risks.
Before doing any of that, go to the android setting -> applications -> Development -> Check USB Debugging.
Universal Root utilities
Theses methods are safe, and the second one is, as of now, working on every Spreadtrum phones flawlessly !
1.1 - Z4Root
Just try z4root !
http://forum.xda-developers.com/showthread.php?t=833953
z4root is a little tool to root Android 2.2 and sometime work on 2.3
It's known to work on devices with the fake Android 4.0.3 based on 2.2 and MocorDroid 2.2.2
It may work on more of them, just try, there is no risks at all.
Make sure you have at least 50 MB of available space on the /data partition before trying this. (not the SDCard, the Applications Space)
Try a temporary root to see if it works, then you can do the permanent root.
You will maybe have to try it 2 or 3 times before it works.
Even if it doesn't work, reboot the phone after this. Because it can eat your battery while running in the backgroung if it fails.
1.2 - vRoot
vRoot is a chinese tool to root many devices !
It's proved to work very well with Spreadtrum (and MTK) devices. I used it successfully on a lot of Spreadtrum devices, even the most recent ones (SC8825).
You only need a Windows Computer (I personally use it on Windows 7 32bits).
Then download it from here: http://www.mgyun.com/en/getvroot
Install it and then open it.
As of now you only need to plug your USB cable to your computer, and then click on the Root button. (you don't need to do anything else, don't touch your phone)
Once it's done and the phone rebooted you will be rooted !
The root app is some kind of custom chinese one, but it's working properly.
Don't try to replace it with SuperSU as SuperSU don't seem to work properly on Spreadtrum devices.
If you want to understand what the root app is saying, try to set the language on your device to English.
2 - Custom Firmware Flash
Please never use any custom firmware available in .pac file format ! Or at least, don't use them before doing a full backup of your current firmware !
Feiteng A7100 (only if you have the mt6515_c910_ht_en_4.0_v01 rom/firmware on it !!! If not, don't touch it, you will end up with a brick ! Or screen reversed, or other strange bugs): http://forum.xda-developers.com/showthread.php?t=2149396
If you have a Feiteng A7100 I really recommend NOT TO USE this rom ! Why ? Because it only works on a fraction of A7100, newer releases of the same phone don't use the same firmware. With this tutorial here, you can root your A7100 easily and way safer. Please go to "4-" on this tutorial to know how to root your A7100.
If you append to find some others Custom roms for spreadtrum devices, or are making one, please send me a PM, I will link them here.
3 - Fastboot to the rescue !
If every fast, simple and secure methods are not working, then this will be difficult my friend !
3.1 - Find Fasboot
First, let check if we have fastboot in your phone !
Fastboot is a little tool inside the bootloader. It's here to help you flash the firmware.
Not every Spreatrum phones have it, so let's check if you are lucky !
You can access it by powering on the phone up while holding a key.
First power off your phone.
Then hold some button like volume+
while pressing this button, press and hold down the power button.
Keep holding the two buttons until the screen light up.
You should now have something on your screen. Maybe a system diagnostic tool (a menu with a set of system tests, that's totally useless) or maybe the recovery mode (a screen with a warning sign, and now your phone is stuck here until you pull out the battery) or, and that means victory, a screen that says "Fastboot".
If you are not on fastboot, but are on the Recovery or the System Test, turn the phone off again and try another button press at boot time exactly like I said before.
This time, try the Home button if you have one, or the Volume-.
You should also try buttons combinations. Like volume up and down at the same time. Home + vol Up, etc and maybe the 3 at the same time ...
(if you just boot as if nothing was pressed, you maybe have to unplug the battery, wait for a while and put it back before powering the phone on. Theses things are also not working when the usb/charging cable is plugged in - if some keys combinations are not doing anything, it's perfectly fine, it means they don't trigger any hidden boot mode)
If nothing bring fastboot up, you have to use the Spreadtrum Debug tool "ResearchDownload" ...
So Skip to "4-" ! ^^
3.2 - Install the drivers
If you append to find Fastboot, we will have to install the PC part of it !
Like every android phone, you have to install adb and his drivers to access the Android Debug Bridge.
You can find them and learn how they work here: http://dottech.org/21534/how-to-ins...ows-computer-for-use-with-your-android-phone/
On Ubuntu or Debian Linux you just have to install them that way:
Code:
sudo apt-get install android-tools-adb android-tools-fastboot
You also have to install the phone drivers if you are using Windows:
ADB Drivers: http://www.mediafire.com/download.php?c5nf3rlhxmxhu4x
Debug Drivers: http://www.mediafire.com/download.php?2tyg0k2xp3ejgyg
Mirror: http://www.mediafire.com/?o9km8vl287ev24j
Then you will have to tell adb what phone to use. By that I mean adding the PCI ID to a text file to tell adb that this peripheral is compatible.
The Spreadtrum PCI ID is 0x1782
add this line to "Your user directory/.android/adb_usb.ini"
Code:
0x1782
3.3 - Using fastboot to load CWM (Clockwork Mod)
CWM work on some of theses Spreadtrum devices, most of the time, the screen is reversed, but it works !
On some phone, you will be presented with a blank screen, but CWM will work ... That will just be very difficult to navigate ... (don't bother and use another method if you append to be in this boat)
Here are the recovery images available for Spreadtrum device to my knowledge:
* http://www.mediafire.com/download.php?u6uyignmdcpillt - extracted from a random SC6820 that I don't remember
* http://www.mediafire.com/download.php?bosnfcq9n65mtc5 - i9270+
* http://www.mediafire.com/download.php?xem49dy5dh99ml0 - 5830, S5830, Q5830, Q206 and GT-N9300 (maybe more)
* http://www.mediafire.com/download.php?adfwq6b5268qb58 - S9300 (SC6820A S3 Clone)
* http://www.mediafire.com/download.php?y2f7aaan4b00l1m - Feiteng GT-A7100 and probably more Feiteng devices.
* http://www.mediafire.com/download.php?lg7m6v49efzpnjk - 6500-TV or S560
* http://www.mediafire.com/download.php?6xn977jjsuusjan - N9300 (I9300 Clone)
* http://www.mediafire.com/download.php?d68wc334qn47tdd - S930 or N8820
If your device is not listed or the one for your device doesn't work, try them all, even if your phone is SC6820 and the recovery was made for SC8810, if none are working, we will have to flash the entire system partition, which is a lot more difficult and dangerous ...
Flashing CWM to the phone:
Linux Only: Initialize ADB:
Code:
sudo adb kill-server
sudo adb start-server
Boot your phone in fastboot mode.
Be sure your device shows up:
Code:
fastboot devices
if your device show up, it's time to flash
Code:
fastboot flash recovery recovery.img
It's flashed ! Let's reboot now.
Code:
fastboot reboot
Start on CWM, if it works, you can start to root the phone !
Download this patch: http://www.mediafire.com/download.php?131nsw87afzwb5v
Put it on the root of your SD Card.
Now you will have to boot on CWM, he is on the same key combination than the old useless recovery was. (Most of the time Volume- and Power)
You can also try this command with adb:
Code:
adb reboot recovery
Now it's the perfect time to do a full backup of your firmware with CWM, so please do so, that can come in handy. (please go to the end of this tutorial after rooting your phone to know how to make a FULL backup. CWM will only make a partial one.)
choose apply update.zip
Choose the file you have put on your sd card before
Apply it then reboot.
This update.zip have pushed everything needed to root your phone in the right place, you should be rooted now !
If you have an error like:"Can't mount /sdcard" you may have to try with another SD Card and be sure your SD Card if formated as Fat32.
3.4 - Using Fastboot to load a modified system partition image
Please follow the instructions down bellow on how to "5 - Create a rooted system partition image"
When you have done your Rooted system partition image, flash it like that:
Code:
sudo fastboot devices
#if your device show up, it's time to flash
Code:
sudo fastboot flash system system.img
#It's flashed ... Now let's reboot with all the apprehension of the world
Code:
sudo fastboot reboot
If it boots (should boot), you will be up and rooting !
4 - Spreadtrum ResearchDownload tool to the rescue !
First, if you have fastboot, use fastboot ! It's simple, more reliable, faster. It's bottomline better !
If you don't have fastboot or can't figure out how to bring him up on your phone despite trying for about an hour. This tool will most likely work.
First, you should use Windows XP 32bits. Even real XP or in virtualbox.
It might work on windows 7 32 bits and 64 bits but you will have to tweak the system to allow installation of non signed devices drivers ...
ResearchDownload work as this:
First you start the Channelserver - This thing is here to make a bridge between the tools and the driver.
Then you start ResearchDownload.
Now you can make a full firmware flash (you should not !! It's a terrible idea !) or flash a single partition. But to do that, unfortunately, you should have a compatible set of fdl files.
Finding them on google is impossible, you have to extract them from your full firmware .pac file.
If you can't find your firmware on the Internet, you will have to try every single one you can find from others firmwares. I gathered all the fdl files I could find in a single package, so it won't be that difficult.
It's highly probable that you will find one that will work with your phone. This thing have to boot the phone and flash the Nand Flash chip. I'm pretty sure there is not a lot of different ways to do this on a single processor.
I really don't know the risks of using a wrong fdl set. But we haven't seen any risks at all yet. Some will work on your phone, others will just do nothing. You will just have to try every single one until one work.
I named the folders with the names of the phones I know working with theses. So it will be easier to find the good one. (A7100, 6500-TV, 5830, Q206 and S930 users will feel very lucky ^^)
4.1 - Learn how ResearchDownload Work
First you have to install the drivers, you can find them here:
ADB Drivers: http://www.mediafire.com/download.php?c5nf3rlhxmxhu4x
Debug Drivers: http://www.mediafire.com/download.php?2tyg0k2xp3ejgyg
Then you have to plug your phone to your computer with your micro usb cable. Your phone have to be powered on.
Be sure every pieces of hardware are detected and installed correctly.
As you can see, this phone is not just detected as an ADB device, or as a mass storage device.
It actually have an internal serial port to usb adapter !
In other words that means this processor provide a way to flash his nand very easily even if it is fully bricked. It's a rare and pretty good feature you don't see that often. In fact, most of the time you have to solder a real serial port yourself on the phone motherboard, then have to use a Serial to USB adapter to have this level of access to the hardware.
So yes, back to tutorial.
Now you will have to unplug your phone and turn it off.
You have to download the debug tools, you can download them here: http://www.mediafire.com/download.php?rngukh111vqfr8h
First you have to start the channel server, you will have to disable your firewall for this app, it's because this tool use a network protocol to communicate with the other tools.
Then open ResearchDownload.
ResearchDownload is a weird flashing utility, it can open a .pac firmware file and can make a .pac out of .img files. You also can flash .img files and that's what we will do. But unfortunately it can't make a full backup ... So be careful !
The cog logo is here to let you open a .pac file. We don't need that as we probably don't have it.
The "two cogs logo" let you configure the flash utility.
Click on this to bring a new window.
On the download settings window, click on select product then choose your type of phone. (SC8810 or SC6820, it doesn't really matters if you take the wrong one out of those two.)
Then uncheck "Select All Files" as you don't have any of theses.
You can see FDL1 and FDL2 are still checked, and you don't have those files ...
As they are needed to start the Flash utility, we will have to find them.
I came across only 3 different FDL1 files, but for theses FDL1 it seems every phone have his own FDL2.
You will have to find the ones that work for you.
Here is an archive of nearly every FDLs available: http://www.mediafire.com/download.php?c6q2gxobccv32oj
Choose one FDL1, and one FDL2 located in the same folder. (you can choose a File with a right click on the FileName blank space in front of FDL1)
Click on OK.
Then click on the "Play button" saying start download.
It may show some warning, it's not a problem.
Now, press Volume Down on your phone, then you have to plug it on the USB Port, still holding the button.
You can release the button when the flash begins.
You may have to press an other button than Volume-. Some phones are reported to use the Home Button instead.
You may also have to remove, wait a while, and reinsert the battery before holding volume- or after the flashing procedure to be able to start the phone.
If ResearchDownload shows you an error or timeout, try another set of FDLs Files. Keep trying until you find one pair that work !
If it works the flashing process should start right away. Just a millisecond after Windows have detected and initialized the device when you plugged it.
When you have the right FDLs, you can go to the next step, flashing something useful ^^ (we haven't flashed anything as of now, just been searching for a compatible flashing bios)
If your working FDLs folder does not have the name of your phone, please tell me what phone you have and what FDLs you used so I can rename them.
4.2 - Using ResearchDownload to load CWM (Clockwork Mod)
Do exactly as said before, but check the "Recovery" checkbox on Download Settings. and choose one of theses CWM images:
* http://www.mediafire.com/download.php?y2f7aaan4b00l1m - Feiteng GT-A7100 and probably more Feiteng devices.
* http://www.mediafire.com/download.php?lg7m6v49efzpnjk - 6500-TV or S560
* http://www.mediafire.com/download.php?6xn977jjsuusjan - N9300 (I9300 Clone)
* http://www.mediafire.com/download.php?d68wc334qn47tdd - S930 or N8820
* http://www.mediafire.com/download.php?xem49dy5dh99ml0 - 5830, S5830, Q5830, Q206 and GT-N9300 (maybe more)
* http://www.mediafire.com/download.php?bdl1qr7orsj4ebr - extracted from a random SC6820 that I don't remember
* http://www.mediafire.com/download.php?6g1t6057p6c8wpt - i9720+
* http://www.mediafire.com/download.php?adfwq6b5268qb58 - S9300 (SC6820A S3 Clone)
When you flashed one successfully, try to boot on recovery (Usually by holding Volume- while holding the power button until the screen light up).
If your device is not listed or the one for your device doesn't work, try them all, even if your phone is SC6820 and the recovery was made for SC8810, if none are working, we will have to flash the entire system partition, which is a lot more difficult and dangerous ...
Download this patch: http://www.mediafire.com/download.php?131nsw87afzwb5v
Put it on the root of your SD Card.
Now you will have to boot on CWM, remember, he is on the same key combination than the old useless recovery was.
You can also try this command with adb:
Code:
adb reboot recovery
Now it's the perfect time to do a full backup of your firmware with CWM, so please do so, that can come in handy. (please go to the end of this tutorial after rooting your phone to know how to make a FULL backup. CWM will only make a partial one.)
choose apply update.zip
Choose the file you have put on your sd card before
Apply it then reboot.
This update.zip have pushed everything needed to root your phone in the right place, you should be rooted now !
If you have an error like:"Can't mount /sdcard" you may have to try with another SD Card and be sure your SD Card if formated as Fat32.
4.3 - Using ResearchDownload to load a modified system partition image
Now we are in deep **** ! This can be tedious ... You will need to drink a lot of coffee, then you will probably pull your hair off, but it's possible to root every single Spreadtrum devices this way !
Please follow the instructions down bellow on how to "5 - Create a rooted system partition image"
When you have done your Rooted system partition image, reboot on Windows, then flash it like that:
Do exactly as said on the paragraph on how ResearchDownload works, but check the "System" checkbox on Download Settings, and choose your modified system.img file to flash it on the device.
As it is still not tested at all, you will have to pray some kind of Spreadtrum God and hope it will be successful ...
The first boot after the flash can be very VERY long. It's perfectly normal.
After the flash is done, please make a full backup (see bellow how you can do that), so I can make a Clockwork recovery partition working with your phone.
You may need to flush your data partition with CWM to avoid some crazy bugs after the flash. You will have theses bugs because of the partitions realignment that might occurs as a result of using a slightly different FDL set as the manufacturer.
Don't even try to do a factory settings reset before installing CWM, as I don't know what monster can lie ahead if you do a factory reset without any working recovery installed
(If your phone doesn't boot after the flash, it is possible to flush the data and cache partition with ResearchDownload. I will explain it, if needed !)
5 - Create a rooted system partition image
Please always try the CWM method first ! There is no risks at all to destroy your phone if the recovery is not working. Here we are making a new system image to flash on the system partition, this partition contain the Android operating system. I will try to explain everything as good as I can, but if you make a mistake, if you don't read my warnings, you can brick your phone very easily !
That will be difficult ... And you will have to use a Linux computer, or Linux in Virtualbox, or in a Live CD, basically you will need Linux somewhere on your computer ^^
Why ? Because we will have to preserve unix permissions on an extracted tar archive ! Trust me, you will probably brick your phone if you do that on windows ...
#Install ADB
Code:
sudo apt-get install android-tools-adb android-tools-fastboot
#Configure ADB
Code:
mkdir ~/.android
Code:
echo 0x1782 > ~/.android/adb_usb.ini
#Start the ADB server
Code:
sudo adb kill-server
sudo adb start-server
#Just let's check just in case if your device is already rooted
Code:
adb shell su -c id
Possible answers:
uid = 0 (root) gid = 0 (root) - your phone is already rooted ! (if you haven't noticed it, it's because superuser.apk is not installed, so just push it and install it via ADB and you are rooted !)
SU: Permission denied - You are not rooted ... Good luck then !
#Now we will backup the system partition !
Code:
adb shell tar -cf /mnt/sdcard/system.tar system
Please pay attention to the errors !
There will be missing files, and we will have to add theses by ourselves after the backup to pretend to have a full backup.
Here is the archive for the known missing files: http://www.mediafire.com/download.php?fm1z5ujc75bg268
If you have more than theses:
Code:
tar: can not open 'system/etc/dbus.conf': Permission denied
tar: can not open 'system/etc/bluetooth/audio.conf': Permission denied
tar: can not open 'system/etc/bluetooth/auto_pairing.conf': Permission denied
tar: can not open 'system/etc/bluetooth/input.conf': Permission denied
tar: can not open 'system/etc/bluetooth/main.conf': Permission denied
tar: system/lost+found: Permission denied
tar: Error exit delayed from previous errors
Then you should just give up, or tell me so I can send you the missing files.
Note: Lost+found is not important, it's just a folder automatically created by Linux to collect any corrupt files.
#Now we will pull this nearly full backup to our computer. Please keep it preciously somewhere secure.
Code:
adb pull /mnt/sdcard/system.tar
#Warning, theses next steps have to be made ONLY on Linux on an ext2/3/4 partition ! Please never attempts to do this on Windows or On Linux on a FAT32 partition.
#untar the archive
Code:
sudo tar -xvpf system.tar
#now we will restore the files we have not been able to backup.
#Download this archive if you haven't done this before: http://www.mediafire.com/download.php?fm1z5ujc75bg268
#Then extract it on the same folder as you extracted your system.tar file with this command:
Code:
sudo tar -xvpf btdbus.tar
#Now it's time to add the root utilities, you can download them from here: http://www.mediafire.com/download.php?v69nm172heos17o
Code:
sudo tar -xvpf root.tar
sudo cp Superuser.apk system/app/Superuser.apk
sudo install -m 06755 su system/xbin/su
#Now we will get rid of this virus ! (the file name can be something else. Like caivs.apk, or some random numbers at the end)
Code:
sudo rm system/app/eyuSales_20121116.apk
#And now you will have to make a flashable system image with this tool, included in the root.tar archive
Code:
sudo ./mkyaffs system system.img
#Now you can reboot your phone in fastboot or use researchdownload to flash your new System image.
6 - Do a full nand backup
Here is how to do a full nand backup of your beloved Spreadtrum: http://forum.xda-developers.com/showthread.php?p=39270468
7 - Don't forget to remove to caivs Virus
When you are rooted, you can remove the Virus or any preinstalled apps using Link2SD.
I suggest you to remove everything you have preinstalled if it is available on the Google Play Store (except the keyboard or the launcher !!!). For example if you have an old version of ES File Explorer on your phone preventing you from updating it, you can remove it safely, then install the updated version from the the Play Store.
Never try to remove something that you don't know what it is !
For the Launcher or keyboard. You can remove them only if you installed a new one on the System partition and tested it successfully !
-----
I want to thanks every peoples at http://forum.china-iphone.ru and Yekdall for being one of the first to type something in English about spreadtrum firmware modding !
Data missing?
First of all, thanks a lot for tutorial! Unluckily there is missing the data that i should copy back into the tar and then the img-file. Could you upload the btdbus.tar and the root.tar?
Thanks again, have a nice day!
keulepeter said:
First of all, thanks a lot for tutorial! Unluckily there is missing the data that i should copy back into the tar and then the img-file. Could you upload the btdbus.tar and the root.tar?
Thanks again, have a nice day!
Click to expand...
Click to collapse
I'm uploading them right now ^^
By the way, what phone are you rooting ? I will try to make a "compatibility list", so I need the model number, and the brand name if any.
Good luck !
EDIT: I added the missing links
Are the sc8810 and sp8810 the same processors?
lynnox said:
Are the sc8810 and sp8810 the same processors?
Click to expand...
Click to collapse
Yes exactly the same, just a different way to name it.
ElectronikHeart said:
3 recovery images are available for Spreadtrum device to my knowledge:
1 http://www.mediafire.com/download.php?u6uyignmdcpillt
2 http://www.mediafire.com/download.php?bosnfcq9n65mtc5
3 http://www.mediafire.com/download.php?xem49dy5dh99ml0
Try them all, if none are working, we will have to do that the other way ...
Download this patch: """"""Link missing as of now, I have to upload it"""""""
Put it on the root of your SD Card.
Now you will have to boot on CWM, he is on the same key combination than the old useless recovery was.
choose apply a update.zip
Choose the file you have put on your sd card before
Apply it then reboot.
This update.zip have pushed everything needed to root your phone in the right place, you should be rooted now !
Click to expand...
Click to collapse
patch pls. (update.zip)
I'll try to load CWM even though at the moment I can only get into recovery. I have the exact same model as H_Bler's which is why I've been focusing more on his thread. From your description on how to access fastboot, I assume that it's the diagnostic mode when UpVol + Pwr is pressed. I never saw anything that said fastboot. The only thing unusual when I was going through the menus was I always got an error when I try the 4th or 5th option. Unfortunately, I can't really try it again because I can't access it anymore. That goes without saying the I can't work with IMG files as well.
5 - Spreadtrum ResearchDownload tool to the rescue !
Now we are in deep **** ! This is not tested as of now ... So come help me ! You will need to drink a lot of coffee, then you will probably pull your hair off, but we will know if it's possible to root every single Spreadtrum devices !
5.1 - Using ResearchDownload to load CWM (Clockwork Mod)
5.2 - Using ResearchDownload to load a modified system partition image
Click to expand...
Click to collapse
Something to look forward too.
I want to thanks every peoples at http://forum.china-iphone.ru and Yekdall for being one of the first to type something in English about spreadtrum firmware modding !
Click to expand...
Click to collapse
I've also been going here. I even tried 3 of the ROMs but I always get the verification failed message. I know it might be too much, but exact links for the thread would really be much appreciated (to be honest, I can't even remember exactly where I got the ROMs. All I remember is that the thread had a lot of collapsible trees.
ElectronikHeart said:
I'm uploading them right now ^^
By the way, what phone are you rooting ? I will try to make a "compatibility list", so I need the model number, and the brand name if any.
Good luck !
EDIT: I added the missing links
Click to expand...
Click to collapse
If and when I get my phone fixed/replaced. I'll try your method first. =P
jvrey5 said:
[Lot of things ...]
Click to expand...
Click to collapse
Well the thing you have when you push up and power is the system test menu. It's located on the android system partition. It's not fastboot.
Fastboot should be something that says "Fastboot" in red letter, or something else unusual.
If you have not fastboot you should use Spreadtrum Researchdownload to flash your phone, I will write the tutorial about it soon.
I really can't link you the thread on the russian forum, first because it will probably confuse you, and also because it's spread everywhere on so many threads it's unbelievable ... That's why I'm doing this centralization work for you ^^
I will post a list of ROMS for recovery purpose. Your phone seem to be bricked. I don't know how you've done it (I really want to know what you phone is and how you've bricked it, that will help me to write the warnings necessary to avoid such cases).
I have 14 roms for Spreadtrum devices, maybe one will work for your phone.
I just want to know what your phone is ^^ Please tell the name of your phone on your posts everyone and if you know how to find it, the exact name of your firmware.
PS: I will upload the patch soon, I'm just searching for a file hosting service that will keep it up and not erasing it 2 hours after I uploaded it ^^
EDIT: Link to the update.zip for rooting you device via CWM added.
Tutorial updated: Spreadtrum debug tools method added.
It may now be possible to root even Spreadtrum devices without Fastboot mode available.
Please feel free to tell me if it works !
ElectronikHeart said:
Tutorial updated: Spreadtrum debug tools method added.
It may now be possible to root even Spreadtrum devices without Fastboot mode available.
Please feel free to tell me if it works !
Click to expand...
Click to collapse
need help
Question
Dear Spreadtrum Master!
Please, can you help me with this problem:
I have a Star I8160 phone with Spreadtrum 6820 and 256 MB ROM. It seems, that everything is working fine, the ROM and the phone is fast, and cool. But when i try to use the phone as a phone, i talk to the phone, and the others just only hearing pieces of my sentences. Sometimes the phone is very-very silent, i need to shout for the others to hear. I thought, that this is a microphone problem, so i replaced the microphone. But nothing changed. I had 2 phones from this type, and both produces the same fault, so i think maybe the problem will be with the ROM. What do you think, is it possible? If so, can i replace my normal rom, which is DM_BASE_12A_w12.43 (sc6820_modem) 11-02-2012?
question
Hi ElectronikHeart, i need help
I have a feiteng a7100, and i flash a rom with ResearchDownload.exe, in the flash operations tab i choose the option to erase all flash. Now i have a brick phone. Do you have a copy of nv.bin? Do you know how to recover from it? how can i reflash nand?
thanks
gtxphoenix said:
Dear Spreadtrum Master!
But when i try to use the phone as a phone, i talk to the phone, and the others just only hearing pieces of my sentences. Sometimes the phone is very-very silent, i need to shout for the others to hear. I thought, that this is a microphone problem, so i replaced the microphone. But nothing changed. I had 2 phones from this type, and both produces the same fault,
Click to expand...
Click to collapse
The Master hasn't been in the past few days so I'll try to answer your issue as best I can.
Usually, the phones are designed for a specific region/country. It's possible that your ROM was built for a different one. How sure are you that the ROM which you are replacing it with will work for you? (I assume that you have a backup and you know how to load ROMs) Also, you might want to try editing the build.prop it increase/maximize reception.
To be honest, this is actually a complicated approach. From what you said, it seems that you've made other troubleshooting steps on your own. Since you really did not mention all of them I'm basing my response on what you said.
Let's try to stick to the basics first. Why did you replace the microphone in the first place? If the same issue happens with 2 other phones from this type, I don't think the mic is the problem. Also, does this mean that you can hear them fine, but they have a hard time hearing you? Have you tried using the stock sound recorder on your phone? Is it also choppy? Have you tried using Skype? You don't really have to call anyone, you just need to make a test call.
When using the device as a phone (eg. making calls, sending SMS, MMS, or connecting to the internet using EDGE or 3G), you're actually relying mostly on your carrier/service provider. How many signal bars do you get? The easiest way to test signal related issues would be by using a different SIM or using a different phone. (When you try a different phone, I suggest using a GSM one - the ones that can only make calls or do SMS.) It's highly possible that there's already something wrong with your SIM.
---------- Post added at 01:17 AM ---------- Previous post was at 01:08 AM ----------
jmss said:
Hi ElectronikHeart, i need help
I have a feiteng a7100, and i flash a rom with ResearchDownload.exe, in the flash operations tab i choose the option to erase all flash. Now i have a brick phone. Do you have a copy of nv.bin? Do you know how to recover from it? how can i reflash nand?
thanks
Click to expand...
Click to collapse
ElectronikHeart hasn't checked in the past few days, so I hope you don't mind me butting in.
When you say brick, does it mean that you don't even have recovery mode? If you don't, try to see if you can put CWM. Once successful, you can try to use the A7100 ROM if your original one was a mt6515_c910_ht_en_4.0_v01 rom using the update.zip
jvrey5 said:
The Master hasn't been in the past few days so I'll try to answer your issue as best I can.
Usually, the phones are designed for a specific region/country. It's possible that your ROM was built for a different one. How sure are you that the ROM which you are replacing it with will work for you? (I assume that you have a backup and you know how to load ROMs) Also, you might want to try editing the build.prop it increase/maximize reception.
To be honest, this is actually a complicated approach. From what you said, it seems that you've made other troubleshooting steps on your own. Since you really did not mention all of them I'm basing my response on what you said.
Let's try to stick to the basics first. Why did you replace the microphone in the first place? If the same issue happens with 2 other phones from this type, I don't think the mic is the problem. Also, does this mean that you can hear them fine, but they have a hard time hearing you? Have you tried using the stock sound recorder on your phone? Is it also choppy? Have you tried using Skype? You don't really have to call anyone, you just need to make a test call.
When using the device as a phone (eg. making calls, sending SMS, MMS, or connecting to the internet using EDGE or 3G), you're actually relying mostly on your carrier/service provider. How many signal bars do you get? The easiest way to test signal related issues would be by using a different SIM or using a different phone. (When you try a different phone, I suggest using a GSM one - the ones that can only make calls or do SMS.) It's highly possible that there's already something wrong with your SIM.
---------- Post added at 01:17 AM ---------- Previous post was at 01:08 AM ----------
ElectronikHeart hasn't checked in the past few days, so I hope you don't mind me butting in.
When you say brick, does it mean that you don't even have recovery mode? If you don't, try to see if you can put CWM. Once successful, you can try to use the A7100 ROM if your original one was a mt6515_c910_ht_en_4.0_v01 rom using the update.zip
Click to expand...
Click to collapse
I dont have recovery mode, the phone doesnt turn on. I already try to put CWN but it doesnt work. I need nv.bin file for sc6820a for rewrite nand flash.
jmss said:
I dont have recovery mode, the phone doesnt turn on. I already try to put CWN but it doesnt work. I need nv.bin file for sc6820a for rewrite nand flash.
Click to expand...
Click to collapse
Now we really need the Master
gtxphoenix said:
Dear Spreadtrum Master!
Please, can you help me with this problem:
I have a Star I8160 phone with Spreadtrum 6820 and 256 MB ROM. It seems, that everything is working fine, the ROM and the phone is fast, and cool. But when i try to use the phone as a phone, i talk to the phone, and the others just only hearing pieces of my sentences. Sometimes the phone is very-very silent, i need to shout for the others to hear. I thought, that this is a microphone problem, so i replaced the microphone. But nothing changed. I had 2 phones from this type, and both produces the same fault, so i think maybe the problem will be with the ROM. What do you think, is it possible? If so, can i replace my normal rom, which is DM_BASE_12A_w12.43 (sc6820_modem) 11-02-2012?
Click to expand...
Click to collapse
Hi,
I had the same problem with one of mine. You just have to use a diagnostic tool from Spreadtrum and adjust the microphone amplification level. I will start a thread on that subject and link it there.
It seems to be a very common problem with Spreadtrum phones, but it is, most of the time, very easy to fix.
edit: here is the link: http://forum.xda-developers.com/showthread.php?p=38731407
WARNING: Don't ever flash if you don't have a working copy of the original firmware somewhere (a complete backup that you have tested your ability to flash back) The first step to do a complete backup, if the manufacturer don't want to send you the firmware, is to successfully root your firmware)
Don't flash if you have a microphone problem, nothing good will happen, this problem is not firmware related AT ALL.
jmss said:
Hi ElectronikHeart, i need help
I have a feiteng a7100, and i flash a rom with ResearchDownload.exe, in the flash operations tab i choose the option to erase all flash. Now i have a brick phone. Do you have a copy of nv.bin? Do you know how to recover from it? how can i reflash nand?
thanks
Click to expand...
Click to collapse
Oh god ! Why have you checked that option ^^
I may be able to dump my nv.bin file from the a7100 I just bought. (If I recall correctly, the nv.bin contain the imei so I will have to edit it to use your imei instead, imei are written in the battery compartment)
Can you try flashing it a second time entirely, It's possible that your uboot partition (what manage the early time boot operations), is not flashed properly.
Even without the nv partition you phone should be able to boot android, you will just not be able to use the phone as a phone. (make a call and everything)
Try with a better micro usb cable, Chinese ones can be very cheap and corrupt data on the way to the phone.
If your phone is still able to flash using ReasearchDownload that is.
Re: 4.5 - Do a full nand backup and help me make you a new CWM recovery
ElectronikHeart said:
4.5 - Do a full nand backup and help me make you a new CWM recovery
Please if you have rooted your phone using this method, and can't use the CWM method, that mean I can do a CWM that work on your device !
Now that you are rooted, you can make a full backup of your phone with ADB !
#open adb shell:
Code:
adb shell
Code:
I still have to explain this if someone needs it
Then send me you boot.img file and I will send you a recovery.img that you can flash to your recovery partition.
That will help new users to root a lot faster the same phone as you, and will make your life easier is you have to restore a backup.
Click to expand...
Click to collapse
>>>
I have also the same kind of chinese android phone, having a model # S930 with the same cpu chipset SP8810 (aka. samsung galaxy s3 clone), i've successfully rooted my chinese android phone, and installed some very usable apps like link2sd & titanium backup pro, i want also to have a full backup of my phone using your methods & ideas, can you help me? where can i find my boot.img so that you can make me my recovery image for my phone? my phone don't have any compatible clockworkmod recovery, but it have a native recovery mode option which work on an update.zip or fastboot....i hope you can help me make my phone recovery image with a rooted features... Thanks!
earl22online said:
where can i find my boot.img so that you can make me my recovery image for my phone?
Click to expand...
Click to collapse
So, you already have tested every recovery already posted ?
To make a backup of your boot.img, you will have to do a full backup manually using the Android shell. I will make a tutorial about this, and link it here.
It's pretty easy as you already rooted your phone.
When you have your backup I will, post a recovery.img file suitable to your phone.
Please keep an eye to this post. I will post the tutorial very soon.
ElectronikHeart said:
Oh god ! Why have you checked that option ^^
I may be able to dump my nv.bin file from the a7100 I just bought. (If I recall correctly, the nv.bin contain the imei so I will have to edit it to use your imei instead, imei are written in the battery compartment)
Can you try flashing it a second time entirely, It's possible that your uboot partition (what manage the early time boot operations), is not flashed properly.
Even without the nv partition you phone should be able to boot android, you will just not be able to use the phone as a phone. (make a call and everything)
Try with a better micro usb cable, Chinese ones can be very cheap and corrupt data on the way to the phone.
If your phone is still able to flash using ReasearchDownload that is.
Click to expand...
Click to collapse
I already try with tree micro usb cables. when i try to flash with researchDownload it failed at nvitem (after FDL2).
can you post a link to your nv.bin to test it ?
jmss said:
I already try with tree micro usb cables. when i try to flash with researchDownload it failed at nvitem (after FDL2).
can you post a link to your nv.bin to test it ?
Click to expand...
Click to collapse
I just bought my A7100, so you will need to wait 2 weeks for me to dump it. Maybe you should try asking to the guy who have made the rooted rom for the A7100 ?
I will, none the less, make a full backup of my phone as soon as I receive it.

[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

[Q] Flashing my Fairphone

Hey everyone,
I really have a problem!
I somehow destroyed my software, by trying to do an partition on my own.
I found a solution for my problem in another forum, but I really don't understand how to do it.
This is the solution/answer:
_______________________________________________________________
Yes, this is a big problem.
Had one same incident before, and my technical colleague came up with a solution. You can only fix this by flashing your phone:
For GURU's only!. The alternative is to use the windows flasher tool
1)Download the original image ww.fairphone.com/downloads/softw...-07-31.zip
1)
unzip the file
2)
enable usb debugging
4)
push EBR1 on the phone
adb push Fairphone_1.6_Cherry_FUSE_Image_31-07-2014/EBR1 /mnt/sdcard/
5) (become root)
adb shell
6) (override the partition inforation)
dd if=/mnt/sdcard/EBR1 of=/dev/ebr1
7) reboot info recovery and wipe data
reboot recovery
and wipe//format
Hope this helps
_______________________________________________________________
I have two problems. First of all I don't undertand every step and secondly the first link (ww.fairphone.com/downloads/softw...-07-31.zip) is no longer available.
Is there an other solution do flash my fairphone and revert the partition ???
Werft said:
Hey everyone,
I really have a problem!
I somehow destroyed my software, by trying to do an partition on my own.
I found a solution for my problem in another forum, but I really don't understand how to do it.
This is the solution/answer:
_______________________________________________________________
Yes, this is a big problem.
Had one same incident before, and my technical colleague came up with a solution. You can only fix this by flashing your phone:
For GURU's only!. The alternative is to use the windows flasher tool
1)Download the original image ww.fairphone.com/downloads/softw...-07-31.zip
1)
unzip the file
2)
enable usb debugging
4)
push EBR1 on the phone
adb push Fairphone_1.6_Cherry_FUSE_Image_31-07-2014/EBR1 /mnt/sdcard/
5) (become root)
adb shell
6) (override the partition inforation)
dd if=/mnt/sdcard/EBR1 of=/dev/ebr1
7) reboot info recovery and wipe data
reboot recovery
and wipe//format
Hope this helps
_______________________________________________________________
I have two problems. First of all I don't undertand every step and secondly the first link (ww.fairphone.com/downloads/softw...-07-31.zip) is no longer available.
Is there an other solution do flash my fairphone and revert the partition ???
Click to expand...
Click to collapse
Does this link sove your second porblem? http://storage.googleapis.com/update-v1_6/FP1_Fairphone_OS_1G13G_v1_6_OTA_2014-07-31.zip
Have you tried a factory reset? https://forum.fairphone.com/t/how-to-perform-a-hard-reset-on-my-fairphone/209
Where do you run into problems while following the instructions -any specific steps?
Cheers!
I'm not sure what your exact problem is, and what the state of the phone is, or what operating system you're running on the computer that you're using to fix the phone. That being said, if it is completely bricked, the instructions on the wiki may be of help: http://forum.xda-developers.com/wiki/Fairphone_Fairphone/Guides#How_to_restore_Fairphone_if_you_totally_bricked_it . This is the alternative mentioned in the post you quote - if you feel uncomfortable using adb, this may be easier (though I have not tried it myself). You will need the image binaries for your model that are available at the bottom of the page here: https://fairphone.zendesk.com/hc/en-us/articles/201189497-Fairphone-OS-multiple-versions-. This is the same file as you need in step1 of the instructions you posted. The update to version 1.8 was postponed because of problems for some users, so you may want to stick to the 1.6 binaries.

{Help} Adding Dual boot patcher support

Being an avid user of Multirom with TWRP on my now dead LG Optimus G, I couldn't deal with the fact there is no multi boot option for my Honor 8 pro. So, I did some research and came to know that "Dual boot patcher" is the preferred solution to boot multiple roms at the moment. Thankfully, the project turned out to be open source and the developer has a well documented Git with information required to add support for new devices. I tried following the dev's guide found here https://github.com/chenxiaolong/DualBootPatcher/wiki/How-to-add-new-Devices-to-DualBootPatcher%3F by flashing the provided zip file. But it did not create any log files in the internal storage. So, if any of you happen to be in stock rom and are willing to help, kindly flash the file found in the above URL and upload the results. I'll proceed with the further steps. Thanks.
Will be glad to help. Can you explain in step-wise format on what to do. Any prerequisites other than a twrp recovery.
NIKHIL JOHN said:
Will be glad to help. Can you explain in step-wise format on what to do. Any prerequisites other than a twrp recovery.
Click to expand...
Click to collapse
Thanks for taking interest in this. To test it out, you will need a device with unlocked bootloader with twrp recovery installed. Also, I believe (not sure though) that file encryption needs to be disabled for this to work. To check file encryption state, go to
Settings → Security & Location → Encryption & Credentials & it shows phone encrypted
or
Use adb command
Code:
adb shell getprop ro.crypto.state
( works on unrooted devices also) returns encrypted or unencrypted
As far as flashing is concerned, it is pretty straight forward. Just download the zip file mentioned in the above post and transfer it to either internal storage or SD card. Boot into TWRP recovery and flash the zip file. If you need any help during the process, feel free to ask.
Andromann said:
Thanks for taking interest in this. To test it out, you will need a device with unlocked bootloader with twrp recovery installed. Also, I believe (not sure though) that file encryption needs to be disabled for this to work. To check file encryption state, go to
Settings → Security & Location → Encryption & Credentials & it shows phone encrypted
or
Use adb command
Code:
adb shell getprop ro.crypto.state
( works on unrooted devices also) returns encrypted or unencrypted
As far as flashing is concerned, it is pretty straight forward. Just download the zip file mentioned in the above post and transfer it to either internal storage or SD card. Boot into TWRP recovery and flash the zip file. If you need any help during the process, feel free to ask.
Click to expand...
Click to collapse
Hey buddy sorry for the late reply. My phone was bricked so had to get it fixed. Now my phone is updated to Andriod Oreo. Will try to root again and Follow the procedure. It would be helpful if you can give me your whatsapp number because i kind of mess things up and it takes a long time for me to get my phone back up and going. It would be helpful if you can assist on the way.

Decrypting internal storage

I've been running rooted ArrowOS on my Moto G 5G Plus for a while now, and yesterday I finally managed to completely bork my system. It went a bit like this:
* add Magisk modules
* apps start crashing
* reboot system
* does not get past ArrowOS logo anymore
* try to wipe cache in TWRP
* doesn't fix
* try to fix permissions in TWRP
* breaks mounting/decrypting internal storage
... so I figure it's time to get going while the getting is good. ADB works, TWRP works (and I can boot it from Fastboot too) - but how do I get my internal storage to decrypt again? I don't see how I can even get the decrypted data off my device right now, since I can't just pull the garbled-looking mounted encrypted stuff off:
adb: error: failed to copy '/data/media/0/e6fmZWR88AKV+tpEXng1HC' to './0/e6fmZWR88AKV+tpEXng1HC': remote open failed: Required key not available
... and my external SD card is not being recognized, so I can't dd this stuff off either:
/dev/block/sde27 50884572 17901084 32983488 36% /data
I suppose I could write a b64 encoder in sh and then adb shell 'dd /dev/block/sde27 | b64' and extract 17GB of data that way, but isn't there a less terrible and more reliable way to do this? There's supposed to be some kind of recovery.img somewhere, and that is supposed to help? I also have a backup I made with TWRP from right after installing but I'm not sure what to do with it and whether it'd overwrite my camera roll or not.
Exasperated greetings after a sleepless night, thanks for reading.

Categories

Resources