[6045] If you want to be able to install OTA updates after root READ THIS! - Onetouch Idol 3 General

2015/10/07 The information below will be kept to help folks make backups and for linux/mac users to have some images to restore but if you have bricked your phone the recommended solution now is to install Alcatel's Mobile Q software version 4.9.2 or newer and use it to restore your phone to factory condition. Basically turn off the phone..plug it up to the pc via usb and run the software...it should prompt you from there. The link to download the software is here: http://alcatelonetouch.com/global-en/support/download/pixi_3_7_4g.html
*****Warning***** Recent updates from Alcatel have REMOVED the fastboot commands that allow root and custom recovery for some models of the 6039. Before updating read the details here: http://forum.xda-developers.com/showthread.php?t=3173598 and make sure the new update doesn't do the same!
You should also be aware that if your phone hangs on boot and you are rooted don't do a factory reset or you will lose adb access if you had it enabled which can be used to restore your phone
Table of Contents
Post #1: Intro
Post #2: Backup Instructions http://forum.xda-developers.com/showpost.php?p=62006344&postcount=2
Post #3: System Images http://forum.xda-developers.com/showpost.php?p=62006344&postcount=3
Post #4: Restore Instructions and firmware issues http://forum.xda-developers.com/showpost.php?p=62006344&postcount=4
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Folks, OTA updates for Lollipop check if your system has ever been mounted read/write (which is required to root) and if it has they do not allow the update to install. What that means is before you root you need to first go into fastboot and do a fastboot boot of TWRP (this boots twrp on your phone without installing it) then go into twrp and backup your system directory so you always have something to restore to if you want future OTA updates.
The bad news is that for folks who have already rooted, we need TWRP backups of the system partition for each model of the idol 3 BEFORE someone has rooted. 6045i, 6045k, 6045y...are there more?
If you have NOT yet rooted your phone and are willing to help out please post here with your model number(It shows in settings, about phone as Model Number). I'll add some instructions on how to take a backup then the backup needs to be uploaded online somewhere we can access it. The system partition is normally read only so it contains NONE of your personal information.
This paragraph from the TWRP documentation is taken from: https://twrp.me/site/update/2015/06/22/twrp-2.8.7.0-released.html
System read only option: Devices that ship with 5.0 and higher as their initial OS are using block level OTA updates. With this style of OTA update, the update script checks to see if the system partition has ever been mounted read/write. Further, the script also usually runs an SHA sum of the entire system partition to detect if any changes have been made. If any changes have been made, the OTA update will refuse to install. Since not all OEMs and devices have factory images available, we have created a new feature in TWRP that detects if the system partition has ever been mounted read/write. If not, you will be prompted asking if you want TWRP to mount system as read/write. If you choose not to allow TWRP to mount as read/write, TWRP won’t prompt to install SuperSU and TWRP won’t try to patch the stock ROM to prevent TWRP from being replaced by stock recovery. The goal of this option is to hopefully allow the user to make a raw system image backup that they can use to get back to a state where they can take OTA updates again.]
Here's an article that explains it better than I can: https://www.androidpit.com/android-5-0-lollipop-ota-update-fail
20150810 - Turns out all thats required to get updates at least for now is doing a FULL unroot. (That may not be the case with a major jump such as from 5.0.2 to 5.1.1) Failure to do a full unroot can result in boot loops after applying updates that currently DO NOT HAVE A SOLUTION because the default recovery for the 6045i and 6045Y do not have the reboot to bootloader option that IS present in the 6045K and all models of the 6039 Idol 3. Thanks Alcatel! An easier solution is to flash an already upgraded firmware if it is available. Canadian users have also found it useful to flash USA firmware (both have a 6045i) to get updates sooner than being released by the cell providers in canada.

Instructions to backup your system prior to rooting.
-Get/install Alcatel USB driver if Windows. (no need for Mac). FROM HERE: http://54.247.87.13/softwareupgrade/Driver/ALCATEL_ADB_ Driver Qualcomm_ADB.rar , or just connect your idol3 to the computer and from the phone select "cd rom" drive..it will install the drivers automatically
Windows and Mac users should have downloaded the android sdk to get adb and fastboot. [ https://developer.android.com/sdk/ ] Linux (ubuntu based) users should install packages android-tools-adb and android-tools-fastboot Windows users can try a minimal adb and fastboot install using the instructions here: http://forum.xda-developers.com/showthread.php?t=2317790 or here: http://dottech.org/21534/how-to-ins...ows-computer-for-use-with-your-android-phone/
download twrp from here: https://www.androidfilehost.com/?fid=24052804347778862
-Set USB debugging on in Developer settings (if these are not exposed, go to Settings/About Phone/Build number, and tap 7 times.)
-Plug in USB cable to phone and computer. Tap on USB icon in notifications panel; select MTP (file transfer) mode or PTP also works fine.
-ON your pc open command prompt in the directory where you have placed twrp-2.8.7.0-idol3.img (when using windows in the directory hold shift and press the right button on the mouse, it will pop-up a window where you have to select "open command prompt here" and type "adb reboot-bootloader" to reboot into bootloader
-Then type "fastboot -i 0x1bbb devices" This should show the device
-Type "fastboot -i 0x1bbb boot twrp-2.8.7.0-idol3.img" This will boot twrp on your phone without installing it.
-On your phone do a normal backup but make sure only "system image" (not system) and Boot (to keep the kernel in sync with the system) is checkmarked to be backed up. You can go into TWRP settings and have it write to the external_sd vs using internal "sdcard" before starting the backup if you have one installed
-After backup has completed it will have created a folder named TWRP on your /sdcard or /storage/sdcard1 depending on which you selected (/sdcard by default). Assuming this is your first use of twrp then copy the whole twrp folder over to your pc and zip or rar it then post a message with your model stating you have a backup and we'll work to get it uploaded. If you have previously used twrp and have multiple backups then just go one directory in "/sdcard/TWRP/" and backup only the directory with the date timestamp of your most recent backup.
When uploading to the cloud zip'ing or rar'ing the file will cut it's size by about half. (it's 3gb initially and roughly 900mb afterward) It's still a rather large file so you might look at http://www.filedropper.com/ to upload the file...they claim files allowed up to 5gb and no registration required. https://mega.co.nz is also a good alternative but can be slow. If you have suggestions for a better place to put the files please let me know.
If you are willing to contribute space that will not expire to host the system backups please contact me via pm. Make sure to hit thanks for our generous uploaders.

System Downloads Available [Each download is +- 1GB in size]
(Do not crossflash devices ie flash the 6045i image to a 6045K or 6045Y. We don't know what the results will be!):
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
6045 (5.5 inch model)
From most recent back to "out of the box".
Model: 60450(USA-Cricket) Firmware: 5.0.2-010 03 Link: https://mega.nz/#!xhhy0AKC!hWhDgXCQOGt0cNHcfkkejEEBiP1pjOT5-ZK6mAY5MUU Thanks to squeakychu for the upload!
Model: 6045i(usa) Firmware: 5.0.2.7SRA-UEA2 Link: https://mega.nz/#!dRkgxA5L!z7yVmmgeUWBpAGwJW6ixnGhGBzUky1dfhKksu3yGPKg Thanks to Brian117 for the uploads! (09/28/2015)
Model: 6045i(usa) Firmware: 5.0.2.7SR4-UE40 Link: https://mega.co.nz/#!K9szRIKR!ZdjIiH2Ol0ZCNe2VTSl6cbRyQeZFtafG3Y9CM0ecCkg 20150810 md5sum: 56376824f7c10d8debaec6c3a7100e50
Model: 6045i(usa) Firmware: 5.0.2-7SQR-UER0 Link: https://mega.co.nz/#!FB0DQAhQ!rQ4H39hQR2tDhfniEej-RvsSe5OqWY42_xCsjY08o4k Thanks to buggleston for the upload!
Model: 6045i(usa) Firmware: 5.0.2-7SQ3-UE30 Link: https://mega.co.nz/#!focwnJJL!VQW3Omi3TF4iJzIyNLu73P9gb8i_WKA_fu7ZWUiIsN0 Thanks to Electriccars for the upload!
Model: 6045i(usa) Firmware: 5.0.2.7SMA-UEA1 Link: https://mega.nz/#!pdlWhQLR!D2-mEnxp2SnxH0QBDsSSZ-YrDooJC8BdKronYxziF_A Thanks to lordlittlebrooks for the upload!
Model: 6045i(canada) Firmware: 5.0.2-7SQB-UCB0 Link: https://mega.nz/#!opolxbIY!A9dEfORplfhkmuNwobKsEF2wX6yY3oLq8M9dgWpDNq8 Thanks to KryPTiCk0d3 for the upload!
Model: 6045i(canada) Firmware: 5.0.2-7SQ9-UV93 Link: http://drive.google.com/file/d/0B8Gqss1TYorTaXZrRFdBdDJ2Vnc/view Thanks to green3water5 for the upload!
Model: 6045K(Serbia, Bulgaria, Macedonia and maybe Cz) Firmware: 5.0.2-010 0101001 Link: https://mega.nz/#!L5El0QqA!IrxnA4qyXONyWehaJltc7JsE5TgaAXIdT9RQ73K0Rdw Thanks to bokaco7 and Nikola Jovanovic for the upload!
Model: 6045Y(Europe) Firmware: 5.0.2-010 06 Link: https://mega.nz/#!N9phSbTR!hH0bTJnHcUrwKxdpA-RKyecHNPKls7Cy0fi-Ih3BWkM Thanks to Gynoid for the upload!
Model: 6045Y(Europe) Firmware: 5.0.2-010 05 Link: https://mega.nz/#!pxgwXKIA!TInG7xK9Z-qObX1Cc3BObGp88zx0FCpWI3RDt_wdD0Q and https://mega.nz/#!l5xnSDrL!-y2ye27vODfNAR2qcBAQN7q0gGYA579iRzla07lFkd4 [You will need to flash both as one has the system backup and the other has the boot] Thanks to Gynoid for the upload!
Model: 6045Y(Europe) Firmware: 5.0.2-010 03 Link: http://mega.co.nz/#!CYk2mBCa!XJd1nJI1cUcTcGjwzhApcAyABQ8y54D-bATvgxxHMsE Thanks to zrkkrz for uploading this 2 times!
Model: 6045Y(Europe) Firmware: 5.0.2-010 01 Link: http://data.nettitoimisto.com/f/e308c56574/ Thanks to tommihut for the upload!
Other models not listed? NEEDED!
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
All backups will eventually be mirrored to MEGA. If the file is missing I'm more than likely still trying to get it uploaded. MEGA can be slow however the files should never expire. The folder is here: https://mega.co.nz/#F!DgNhkDKR!GyJsku7nw4F6nLiT4XFRKA
If an individual download link is dead please let me know via post or pm.
Thanks to kirplunk and zrkkrz for uploading backups that ended up having to be replaced due to incorrect instructions to backup system instead of "system image" from within TWRP.

When using these backups.....
There is currently a bug in TWRP that appears to be showing 6045Y for ALL idol3 devices in the recovery.log so make SURE the system image you are flashing is meant for your device to the best of your ability.
Restoring a TWRP backup image:
If you wish to update to a newer firmware or restore an older one you can follow purple.epod's basic instructions here but use the firmware you want to restore: http://forum.xda-developers.com/showpost.php?p=62313284&postcount=1 Also make sure you restore both boot AND system image in the newer firmware's when selecting what to restore.
When restoring the UE40 firmware the first time you go into system update checker you need to delete the existing UE40 update as it kept it around...you should then be able to check updates as normal.

This was brought up in the main rooting thread, but you might also be able to unroot via SuperSU with the Full Unroot option. Haven't tried it yet but if it works, you can just unroot, install whatever OTA there may be, and re-root.

brian117 said:
This was brought up in the main rooting thread, but you might also be able to unroot via SuperSU with the Full Unroot option. Haven't tried it yet but if it works, you can just unroot, install whatever OTA there may be, and re-root.
Click to expand...
Click to collapse
Yeah, I'm the one who brought it up. I thought those about to root should be made aware.
Based on the twrp documentation it sounds like once it's been mounted once as read/write there is a way for them to check and it will kill the ota update. unrooting isn't going to fix that. We also have no good way to intercept the updates so we could alter them to install anyway. I used a squid transparent proxy to find the download url but won't do me any good if my phone can't download the update. If it lets the phone dwonload and then when it runs aborts I may still be able to grab the url and the update could be modified to apply anyway.

tried to upload stock system backup for 6045i
famewolf said:
Reserved 1
Click to expand...
Click to collapse
i have backed up the stock system twrp backup for 6045i zipped in folder then tried your file link to up load, after about 15 minutes it was still uploading seemed to long so i stopped the upload. do you or dallascz have another place to upload or email maybe? i still have not installed the recovery or rooted yet, trying to give back to Idol3ers.
---------- Post added at 01:51 AM ---------- Previous post was at 01:34 AM ----------
famewolf said:
Folks, OTA updates for Lollipop check if your system has ever been mounted read/write (which is required to root) and if it has they do not allow the update to install. What that means is before you root you need to first go into fastboot and do a fastboot boot of TWRP (this boots twrp on your phone without installing it) then go into twrp and backup your system directory so you always have something to restore to if you want future OTA updates.
The bad news is that for folks who have already rooted, we need TWRP backups of the system partition for each model of the idol 3 BEFORE someone has rooted. 6045i, 6045k, 6045y...are there more?
If you have NOT yet rooted your phone and are willing to help out please post here with your model number(It shows in settings, about phone as Model Number). I'll add some instructions on how to take a backup then the backup needs to be uploaded online somewhere we can access it. The system partition is normally read only so it contains NONE of your personal information.
System read only option: Devices that ship with 5.0 and higher as their initial OS are using block level OTA updates. With this style of OTA update, the update script checks to see if the system partition has ever been mounted read/write. Further, the script also usually runs an SHA sum of the entire system partition to detect if any changes have been made. If any changes have been made, the OTA update will refuse to install. Since not all OEMs and devices have factory images available, we have created a new feature in TWRP that detects if the system partition has ever been mounted read/write. If not, you will be prompted asking if you want TWRP to mount system as read/write. If you choose not to allow TWRP to mount as read/write, TWRP won’t prompt to install SuperSU and TWRP won’t try to patch the stock ROM to prevent TWRP from being replaced by stock recovery. The goal of this option is to hopefully allow the user to make a raw system image backup that they can use to get back to a state where they can take OTA updates again.]
Click to expand...
Click to collapse
i have backed up the stock system twrp backup for 6045i zipped in folder then tried your file link to up load, after about 15 minutes it was still uploading seemed to long so i stopped the upload. do you or dallascz have another place to upload or email maybe? i still have not installed the recovery or rooted yet, trying to give back to Idol3ers.

kirplunk said:
i have backed up the stock system twrp backup for 6045i zipped in folder then tried your file link to up load, after about 15 minutes it was still uploading seemed to long so i stopped the upload. do you or dallascz have another place to upload or email maybe? i still have not installed the recovery or rooted yet, trying to give back to Idol3ers.
---------- Post added at 01:51 AM ---------- Previous post was at 01:34 AM ----------
i have backed up the stock system twrp backup for 6045i zipped in folder then tried your file link to up load, after about 15 minutes it was still uploading seemed to long so i stopped the upload. do you or dallascz have another place to upload or email maybe? i still have not installed the recovery or rooted yet, trying to give back to Idol3ers.
Click to expand...
Click to collapse
kirplunk, how large is the file after you have zipped it? I'll check into some more services. I'm limited by the fact I don't have hi speed and I don't think xda rules allow me to mention any file sharing service that requires registration. If you do a google of "upload large file" and find a service that works for you let me know. If others have a suggestion also let me know. I'm reply back as soon as I find some other sites. Thanks for your assistance!
*update* In other areas of XDA they suggest https://mega.co.nz/ for large file uploads however it would require creating your own account. They give you 50GB. Let me know if this works for you please.

size reply
famewolf said:
kirplunk, how large is the file after you have zipped it? I'll check into some more services. I'm limited by the fact I don't have hi speed and I don't think xda rules allow me to mention any file sharing service that requires registration. If you do a google of "upload large file" and find a service that works for you let me know. If others have a suggestion also let me know. I'm reply back as soon as I find some other sites. Thanks for your assistance!
Click to expand...
Click to collapse
the unzipped folder with files was 2.1gb in size, the zipped folder with files that i tried to upload is 855mb in size. i do not use the cloud at all so i don't have a drop box or any thing of the type. the site you referenced said it was uploading but it seemed 15 minutes was more than enough time for that size of file. my browser kept saying it was uploading and connecting to site.

kirplunk said:
the unzipped folder with files was 2.1gb in size, the zipped folder with files that i tried to upload is 855mb in size. i do not use the cloud at all so i don't have a drop box or any thing of the type. the site you referenced said it was uploading but it seemed 15 minutes was more than enough time for that size of file. my browser kept saying it was uploading and connecting to site.
Click to expand...
Click to collapse
Can you please try https://mega.co.nz/ and see if it works better for you? It will require creating an account but they will give you 50GB and you could use a disposable email address if you prefer. I'm checking other areas of xda to see how they handle large file uploads and this is what I've seen so far.
I have no problem sharing one I've created but there will always be that one person who wants to come along and delete everything in it.
Another is http://www.filedropper.com/ which allows up to 5gb files and keeps them till 30 days of not being downloaded. No registration required.
Also is your backup after the two system updates? Just FYI your upload bandwidth is not going to be as high as your download typically so uploads of large files can take a while.

attempting the second site now, called file dropper.
the file folder i'm uploading is called, 6045i twrp stock system backup.7z
upload is at 10% right now
now at 20%, yes with updates firmware is 5.0.2-7sqr-uero
30% my upload speed should put this file up in 3 minutes but their server is taking it like sucking coffee up through a stir stick, slow
will update when it reaches 100%, but as a junior member i can not post links so you will have to find it at the file dropper.
100% uploaded,
as a junior member this is the best i can do for the link.
www dot filedropper dot com/6045itwrpstocksystembackup
hope this helps

Uploads tend to be much slower than downloads. LTE connections are an exception, but cable and DSL upstream speeds aren't fast.

kirplunk said:
the file folder i'm uploading is called, 6045i twrp stock system backup.7z
upload is at 10% right now
now at 20%, yes with updates firmware is 5.0.2-7sqr-uero
30% my upload speed should put this file up in 3 minutes but their server is taking it like sucking coffee up through a stir stick, slow
will update when it reaches 100%, but as a junior member i can not post links so you will have to find it at the file dropper.
Click to expand...
Click to collapse
Feel free to send me the link in a PM and I'll post it so others can download it in addition to me or I'm sure I can find it based on filename if they have search.
With your permission I'll put it in post #3 with your name and a thank you. I'll have to visit the local library that has rather fast internet to get these files downloaded and moved to one folder for everyone assuming others share theirs as well.

So using stock recovery to Wipe Data/Factory Reset back to new doesn't remove root or r/w status?

mk3 said:
So using stock recovery to Wipe Data/Factory Reset back to new doesn't remove root or r/w status?
Click to expand...
Click to collapse
A factory reset wipes the data and cache partitions. It does nothing to /system since it expects it to be read only.

famewolf said:
A factory reset wipes the data and cache partitions. It does nothing to /system since it expects it to be read only.
Click to expand...
Click to collapse
ahhh.... bummer. Thanks for the clarification.
So I used Hide My Root to hide su binary and the system update doesn't give me the error (like all is fine). Prior to hiding the su binary it throws the error about being rooted.
.

Is the /system partition different than the /system directory that's in the root of the device? If it's the same, we can change the read/write permissions with ES File Explorer if the device is rooted? I'm not sure if it'll offer us the chance, if we want it, to make all the contents of the dir have the same permissions we set for the dir itself. Can the same thing be done from a command line in TWRP?

Why does TWRP show "system" and "system image" as two different options and sizes to backup? I've never seen that before.

maigre said:
Is the /system partition different than the /system directory that's in the root of the device? If it's the same, we can change the read/write permissions with ES File Explorer if the device is rooted? I'm not sure if it'll offer us the chance, if we want it, to make all the contents of the dir have the same permissions we set for the dir itself. Can the same thing be done from a command line in TWRP?
Click to expand...
Click to collapse
The system partition is the same as the /system folder however it's not a file permission that's an issue and you'd never want to set all your files to the same permissions. Here is an article that explains it better than I can: https://www.androidpit.com/android-5-0-lollipop-ota-update-fail

kirplunk said:
the file folder i'm uploading is called, 6045i twrp stock system backup.7z
upload is at 10% right now
now at 20%, yes with updates firmware is 5.0.2-7sqr-uero
30% my upload speed should put this file up in 3 minutes but their server is taking it like sucking coffee up through a stir stick, slow
will update when it reaches 100%, but as a junior member i can not post links so you will have to find it at the file dropper.
100% uploaded,
as a junior member this is the best i can do for the link.
www dot filedropper dot com/6045itwrpstocksystembackup
hope this helps
Click to expand...
Click to collapse
Thanks kirplunk! I've got it downloading and will add my folder as a mirror to try to prevent the file from expiring.

Related

[GUIDE] Fix "assert failed: apply_patch_check" error

Overview:
This thread is a guide on how to fix the apply_patch_check error message experienced during an upgrade of the Android OS. Specifically, this will detail the steps for an upgrade of Jelly Bean from 4.1.1 to 4.1.2 on the Nexus 7 with CWM Recovery for a user of Windows. I'm sure similar steps will work for other recoveries/upgrades/devices and PC OSes.
You should only bother with this if you don't want to flash the entire system.img file to your phone, which is way easier.
Here is an example of the error message I'm talking about:
Code:
assert failed: apply_patch_check("/system/app/Chrome.apk", "819b34b66335c6faec86404d736a002b8871600", "9d6b55e63b0bf20bea433fb1ee7089f88ab73fb6")
E: Error in /sdcard/03a4eaf95f73.signed-nakasi-JZO54K-from-JRO03D.03a4eaf9.zip
(Status 7)
Installation aborted.
A few notes about the error:
This doesn't have to happen with the Chrome.apk specifically -- it could happen with any app in /system/app or .so in /system/lib.
Those random strings of numbers/letters are SHA-1 hashes of the apk.
The first one is the hash of the apk installed on your device. In my example, this happens to be the version of Chrome that comes with JB 4.1.2.
The second one is the expected hash of the apk that comes with JB 4.1.1.
Cause of the problem:
The reason this error occurs is because the file was somehow modified from its original state. In my case -- and most likely your case -- this was done by Titanium Backup. TB has an option to "Integrate updates of system apps into ROM", which will cause the apk in /system/app (and associated library files in /system/lib, if needed) to be overwritten with the updated apk.
Solution:
Download this zip file which contains the full /system/app and /system/lib directory from the JB 4.1.1 factory image. *
Extract the zip to a location of your choosing on your PC.
In the extracted folder, locate the .apk or .so file referenced in the error message on your device.
Copy this file to your device via your preferred method (USB cable works fine). I put my file in /sdcard/Download.
On your device, use a root file explorer to move the file from /sdcard/Download to /system/app (or /system/lib).
If you don't have a program that can do this, I use ES File Explorer. Be sure to go to Settings > Root Settings and turn on Root Explorer, Up to Root, and Mount File System.
Reboot into your Recovery and try to install the update again.
Repeat steps 3-6 for each subsequent file that produces an error. You will basically need to do this for each app you integrated using TB and maybe a few library files, too. **
* Future updates (above 4.1.2):
Since I won't be keeping the zip file from step #1 up-to-date, here's how to get the directories that I included in the zip for yourself:
Obtain a factory image for your device's current Android version (the version you're updating from).
For JB 4.1.1, this file is called nakasi-jro03d-factory-e102ba72.tgz.
If you're reading this guide at a later date, the JB 4.1.2 file is called nakasi-jzo54k-factory-973f190e.tgz.
You can try your luck at the official Google site, but they seem to only provide the version you're trying to update to, not from.
Extract the .tgz file somewhere on your PC.
Locate the image-naksi-jro03d.zip file and extract that, as well.
In the folder you just extracted from the previous step, located the system.img file.
Download and use a program called sgs2toext4 (View attachment 645320) to convert the system.img to system.ext4.img. ***
Download and use a program called Linux Reader to open system.ext4.img.
Do this by going to Drives > Mount Image > Next > select your file.
It will then be listed under the Hard Disk Drives section in red as "Linux Ext Volume 1".
Navigate to: Linux Ext Volume 1/system.
Right-click on the app (or lib) directory and pick Save > Next > Output to dir of your choice.
You now have the directories that were included with the zip file from Solution step #1, so just follow those steps now.
** How to avoid repeating steps:
If you'd rather not have to try to reinstall after updating only one file, just to find another file that needs updating, try this:
Obtain the /system/app and /system/lib folders from the factory image and save them to your PC.
For the sake of this guide, let's say you save them to C:\factory_app and C:\factory_lib.
Copy the /system/app and /system/lib directories from your phone to your PC.
For the sake of this guide, let's say you saved them to C:\phone_app and C:\phone_lib.
Download the File Checksum Integrity Verifier utility from Microsoft.
Start > Run > cmd
fciv.exe -sha1 -xml factory_app.xml -wp C:\factory_app
fciv.exe -sha1 -xml factory_app.xml -v -bp C:\phone_app
Don't ask me why, but you need to use -bp instead of -wp for the second command.
Don't forget the -v on the second command.
The output of the last command will show you the list of files that are different. These are the files you need to take from C:\factory_app and put into the /system/app directory on your phone.
Do the same for the lib directories (just replace all instances of "_app" with "_lib" in the previous commands).
Summary:
I hope that this post helped some of you who really didn't want to have to flash the system.img or wipe your device just to update. In the future, use TB to back up the original.
I wouldn't normally bother writing up a guide like this (it took almost as long to write as it did to figure out how to do this) but I couldn't find this solution anywhere even though I saw that I wasn't the only person with the problem. Sorry for not posting this guide sooner (update has been out for a while now), but the forum required me to make a bunch of useless spam posts before I could include any links in my guide and I didn't get around to making those posts right away.
*** I would like to thank balamu96m for his guide on extracting data from the system.img file and drphrozen for making the sgs2toext4 program.
Thanks for this. Will try now.
Worked great. Had to copy the apk and odex file.
Good job! It's great to see the steps for Windows users!
Just a heads up that I simply extracted the files I needed from and on my N7 using Root Explorer, without using my PC at all.
Great guide! Method worked perfectly on my Nexus 7 going from 4.1.2 to 4.2, thanks
Please... is there some other way to update the files w/o installing Java on my Windoze PeeCee? I accidentally messed up my YouTube.apk with Titanium Backup... now I can't update from 4.1.2 --> 4.2 JB.
EDIT: JavaPortable FTW... updating (fingers crossed)
EDIT: SUCCESS TY OP!
For anyone who flashed the 4.2 clock/keyboard already
Hey, for anyone who flashed the 4.2 clock and keyboard on their Nexus 7 already and need to roll back to do the 4.2 update, I used OP's method to make a flashable zip that puts the 4.1.2 clock and keyboard back.
Worked perfectly for my Nexus 7 to get me up and running. Hope it helps anyone!
cantthinkofa.com/files/RestoreClockKeyboard.zip
galaxy nexus
Hi can you post a guide for galaxy nexus? Or if it is the same, can you post the link of JB factory image for galaxy nexus? Sorry, I can't find any thread for galaxy nexus, and I don't want to complete flash the stock image since I don't want to wipe my phone.
Thanks in advance!
Nice Guide
perfect, the guide works just fine. Now finally running 4.2.
Awesome guide... Thanks... Happily running 4.2 now aften beeing stuck at libutils.so...
Sent from my Nexus 7 using xda premium
damagno said:
Hi can you post a guide for galaxy nexus? Or if it is the same, can you post the link of JB factory image for galaxy nexus? Sorry, I can't find any thread for galaxy nexus, and I don't want to complete flash the stock image since I don't want to wipe my phone.
Thanks in advance!
Click to expand...
Click to collapse
I don't have a Galazy Nexus, but I think the steps should be the same. Here is a link to the factory images: https://developers.google.com/android/nexus/images#takju . It looks like they now have links for older versions, rather than just the newest images (which is how it was when I made my guide). So that's pretty sweet.
Thanks a lot man, i succeeded to "patch" my system files to update from 4.2 to 4.2.1. I first check what files didn't correspond with fciv (9 files counting both apks and odex) and then replaced them in system/app. In fact they were the apps I previously integrated with tb (learned lesson: never do it if you want to remain stock and receive OTAs). I also noticed many not-matching files in system/lib but i didn't touch them and the update went smooth the same.
Another thing: when in the OP you say it's way easier just to reflash the system.img you mean just run from bootloader "fastboot flash system system.img" (taken from the factory image as usual) or there's some other thing to do in order to fix the system partition in the right way?
GallStones said:
Thanks a lot man, i succeeded to "patch" my system files to update from 4.2 to 4.2.1.
Click to expand...
Click to collapse
I was wondering if you could tell me how you did it? I'm searching a way to install 4.2.1 with no avail as of yet :crying:
GallStones said:
Thanks a lot man, i succeeded to "patch" my system files to update from 4.2 to 4.2.1. I first check what files didn't correspond with fciv (9 files counting both apks and odex) and then replaced them in system/app. In fact they were the apps I previously integrated with tb (learned lesson: never do it if you want to remain stock and receive OTAs). I also noticed many not-matching files in system/lib but i didn't touch them and the update went smooth the same.
Another thing: when in the OP you say it's way easier just to reflash the system.img you mean just run from bootloader "fastboot flash system system.img" (taken from the factory image as usual) or there's some other thing to do in order to fix the system partition in the right way?
Click to expand...
Click to collapse
Yes. I am having the same issue. I cannot update mine from 4.2 to 4.2.1. I wonder to know which original stock image you have used. Can you list a detail procedure?
Thank you very much.
Ric
dev/block/param
legom said:
Overview:
This thread is a guide on how to fix the apply_patch_check error message experienced during an upgrade of the Android OS. Specifically, this will detail the steps for an upgrade of Jelly Bean from 4.1.1 to 4.1.2 on the Nexus 7 with CWM Recovery for a user of Windows. I'm sure similar steps will work for other recoveries/upgrades/devices and PC OSes.
You should only bother with this if you don't want to flash the entire system.img file to your phone, which is way easier.
Here is an example of the error message I'm talking about:
Code:
assert failed: apply_patch_check("/system/app/Chrome.apk", "819b34b66335c6faec86404d736a002b8871600", "9d6b55e63b0bf20bea433fb1ee7089f88ab73fb6")
E: Error in /sdcard/03a4eaf95f73.signed-nakasi-JZO54K-from-JRO03D.03a4eaf9.zip
(Status 7)
Installation aborted.
A few notes about the error:
This doesn't have to happen with the Chrome.apk specifically -- it could happen with any app in /system/app or .so in /system/lib.
Those random strings of numbers/letters are SHA-1 hashes of the apk.
The first one is the hash of the apk installed on your device. In my example, this happens to be the version of Chrome that comes with JB 4.1.2.
The second one is the expected hash of the apk that comes with JB 4.1.1.
Cause of the problem:
The reason this error occurs is because the file was somehow modified from its original state. In my case -- and most likely your case -- this was done by Titanium Backup. TB has an option to "Integrate updates of system apps into ROM", which will cause the apk in /system/app (and associated library files in /system/lib, if needed) to be overwritten with the updated apk.
Solution:
Download this zip file which contains the full /system/app and /system/lib directory from the JB 4.1.1 factory image. *
Extract the zip to a location of your choosing on your PC.
In the extracted folder, locate the .apk or .so file referenced in the error message on your device.
Copy this file to your device via your preferred method (USB cable works fine). I put my file in /sdcard/Download.
On your device, use a root file explorer to move the file from /sdcard/Download to /system/app (or /system/lib).
If you don't have a program that can do this, I use ES File Explorer. Be sure to go to Settings > Root Settings and turn on Root Explorer, Up to Root, and Mount File System.
Reboot into your Recovery and try to install the update again.
Repeat steps 3-6 for each subsequent file that produces an error. You will basically need to do this for each app you integrated using TB and maybe a few library files, too. **
* Future updates (above 4.1.2):
Since I won't be keeping the zip file from step #1 up-to-date, here's how to get the directories that I included in the zip for yourself:
Obtain a factory image for your device's current Android version (the version you're updating from).
For JB 4.1.1, this file is called nakasi-jro03d-factory-e102ba72.tgz.
If you're reading this guide at a later date, the JB 4.1.2 file is called nakasi-jzo54k-factory-973f190e.tgz.
You can try your luck at the official Google site, but they seem to only provide the version you're trying to update to, not from.
Extract the .tgz file somewhere on your PC.
Locate the image-naksi-jro03d.zip file and extract that, as well.
In the folder you just extracted from the previous step, located the system.img file.
Download and use a program called sgs2toext4 (View attachment 645320) to convert the system.img to system.ext4.img. ***
Download and use a program called Linux Reader to open system.ext4.img.
Do this by going to Drives > Mount Image > Next > select your file.
It will then be listed under the Hard Disk Drives section in red as "Linux Ext Volume 1".
Navigate to: Linux Ext Volume 1/system.
Right-click on the app (or lib) directory and pick Save > Next > Output to dir of your choice.
You now have the directories that were included with the zip file from Solution step #1, so just follow those steps now.
** How to avoid repeating steps:
If you'd rather not have to try to reinstall after updating only one file, just to find another file that needs updating, try this:
Obtain the /system/app and /system/lib folders from the factory image and save them to your PC.
For the sake of this guide, let's say you save them to C:\factory_app and C:\factory_lib.
Copy the /system/app and /system/lib directories from your phone to your PC.
For the sake of this guide, let's say you saved them to C:\phone_app and C:\phone_lib.
Download the File Checksum Integrity Verifier utility from Microsoft.
Start > Run > cmd
fciv.exe -sha1 -xml factory_app.xml -wp C:\factory_app
fciv.exe -sha1 -xml factory_app.xml -v -bp C:\phone_app
Don't ask me why, but you need to use -bp instead of -wp for the second command.
Don't forget the -v on the second command.
The output of the last command will show you the list of files that are different. These are the files you need to take from C:\factory_app and put into the /system/app directory on your phone.
Do the same for the lib directories (just replace all instances of "_app" with "_lib" in the previous commands).
Summary:
I hope that this post helped some of you who really didn't want to have to flash the system.img or wipe your device just to update. In the future, use TB to back up the original.
I wouldn't normally bother writing up a guide like this (it took almost as long to write as it did to figure out how to do this) but I couldn't find this solution anywhere even though I saw that I wasn't the only person with the problem. Sorry for not posting this guide sooner (update has been out for a while now), but the forum required me to make a bunch of useless spam posts before I could include any links in my guide and I didn't get around to making those posts right away.
*** I would like to thank balamu96m for his guide on extracting data from the system.img file and drphrozen for making the sgs2toext4 program.
Click to expand...
Click to collapse
my error 7 was generated by emmc: dev/block/mmdblk0p7 (the file is "param" any suggestions?
Thanks. After searching for a lot of time, this post helped me updating my SGS3.:victory: I previously tried to integrate youtube update into rom using titanium backup.
GallStones said:
Another thing: when in the OP you say it's way easier just to reflash the system.img you mean just run from bootloader "fastboot flash system system.img" (taken from the factory image as usual)
Click to expand...
Click to collapse
Yes, that's what I mean. The reason I didn't want to do this on my device is because I had modified some other system files that I wanted to keep the modifications for.
Wow, thanks a lot OP! Your guide helped me fixing an error during the update to 4.2.2 on my Nexus 4.
please include a video ,im getting lost in the details
solved.

[tutorial]how to make nandroid backups without rebooting to recovery

WARNING: BEFORE YOU DO ANYTHING PLEASE READ THIS THREAD AND MAKE SURE YOU KNOW WHAT YOU ARE DOING. I AM NOT RESPONSIBLE FOR ANY DAMAGE TO YOUR PHONE.
A few days ago I came across this thread which made me think and try. At the beginning I couldn't flash the zips necessary for making backups without rebooting to recovery .
What you will need:
1.Bootloader unlocked and a rooted phone . If you don't have any of them please read here and here
2.Busybox
3.A root explorer of your choice
4.A terminal emulator app
5.The 2 files from the zip attached
6.Patience
Open your root explorer extract and copy the 2 files attached to /system/bin and set permissions 755( that's rwxr-xr-x).
Reboot your phone.
Open Terminal app and type su to obtain root followed by onandroid.
Sit back and relax while the script backs up your rom.
All thanks go to ameer1234567890 who gave us the Online Nandroid . I only found the thread and also found the method to copy the files to Razr I.
When i'll have some time i'll try to make a flashable zip for the lazy ones
As promised here are the zips for flashing from recovery with update binary working with the Razr I. I have only tested with CWM, but they should work with TWRP as well.
I suppose everyone knows what to do, but just in case someone new tries it:
-copy the 2 zips to you internal storage or external sdcard
-reboot to recovery
-select install zip from sdcard(now choose the location of your files)
-select zip
-install
-reboot
Enjoy
nandroid,etc, assistance
free2live said:
As promised here are the zips for flashing from recovery with update binary working with the Razr I. I have only tested with CWM, but they should work with TWRP as well.
I suppose everyone knows what to do, but just in case someone new tries it:
-copy the 2 zips to you internal storage or external sdcard
-reboot to recovery
-select install zip from sdcard(now choose the location of your files)
-select zip
-install
-reboot
Enjoy
Click to expand...
Click to collapse
Is this the best way to do a " nandroid " - I have been part of this site for quite some time , read numerous sites, but i have a very bad memory problem and that's why i have many text documents setup to the point i am confused. Right now I have an AT&T S4 which has a bad IMEI, so I want to use it as a test phone, but it has been updated to 4.3 -which from what I understand I would need to downgrade back to 4.1.2 order to unlock the phone via the dial pad. I was able to accomplish that one time when I first got a Samsung S4 and did it via the dial pad before the OTA came out for 4.3.
I also own a S3, also AT&T, so i can learn how to to root and unlock and use CWR or TWRP and than learn ROMS. I know I need to make a backup before I do anything, and also constantly reading the " Noob " general forums for both phones. I also am familiar with Samsung Kies, which does a backup but I don't think it's the same as this nandroid i have been reading about.
Thank you or taking out the time and reading my post. I will check back to see if anyone had some time to give me some direction or an answer to my problem with " nandroid" or if someone even could touch up on any subjects I have mentioned. Please don't think I haven't spent hrs of time on YouTube, Google, Howard forums and especially here on XDA.

how to build a flashable deployment file

HI,
I have looked at various tutorials and can't seem to find one specific to what i am looking for. Apologies if it's out there and i just haven't found it.
I have a bunch (like 250) of brand new Samsung Note 3's (Canadian N900W8 build) that have stock 4.4.2. I am required to get them all configured with a specific set of apps installed and various shortcuts on the home screen along with some custom settings (APN, data limits etc). so far i have been doing this manually and it is very time consuming and tedious. If there a way to take a phone i have already configured and make a file that i can flash in odin to each of the new phones that will mirror all of the changes i need to the new phones? Or some other tool to automate the process of deploying that many devices. If anyone can point me to a tool or tutorial i would be eternally grateful and may manage to retain my sanity.
I haven't seen anything like this yet in my browsing, most of the tutorials i have seen are for compiling/building a full rom.
Thanks
bugleboy said:
HI,
I have looked at various tutorials and can't seem to find one specific to what i am looking for. Apologies if it's out there and i just haven't found it.
I have a bunch (like 250) of brand new Samsung Note 3's (Canadian N900W8 build) that have stock 4.4.2. I am required to get them all configured with a specific set of apps installed and various shortcuts on the home screen along with some custom settings (APN, data limits etc). so far i have been doing this manually and it is very time consuming and tedious. If there a way to take a phone i have already configured and make a file that i can flash in odin to each of the new phones that will mirror all of the changes i need to the new phones? Or some other tool to automate the process of deploying that many devices. If anyone can point me to a tool or tutorial i would be eternally grateful and may manage to retain my sanity.
I haven't seen anything like this yet in my browsing, most of the tutorials i have seen are for compiling/building a full rom.
Thanks
Click to expand...
Click to collapse
This might not work for reasons I don't know about, but why not make a nandroid backup of the completed ROM and Apps etc, and copy it to multiple extSDCards then run a Restore on each phone? Although I guess you'd need to flash a custom recovery first... hm...
Maybe someone who knows ADB ins and outs could suggest something - connect phone, push SW out etc.
So i found a tutorial that described how to dump an img file for various partitions using ADB commands. I used the following to dump the system partition
Code:
dd if=/dev/block/mmcblk0p23 of=/mnt/extSdCard/backup/system.img bs=4096
I then coppied the system.img to computer and used a tool i found on here to convert it to system.tar.md5. I put a new phone into download mode and open odin load the system.tar.md5 into the PDA section it verifies the file ok, but when i try to flash it it fails instantly and a message appears on the phone saying "Unsupport dev_type"
I have seen a couple different versions of this tutorial out there, and i even tried booting to a ubuntu live CD to try to use the linux commands i saw on a different tutorial to convert the .img to a .tar.md5 but the result is the same.
Does anyone have any experience getting this method to work? any suggestions?
Thanks
bugleboy said:
So i found a tutorial that described how to dump an img file for various partitions using ADB commands. I used the following to dump the system partition
Code:
dd if=/dev/block/mmcblk0p23 of=/mnt/extSdCard/backup/system.img bs=4096
I then coppied the system.img to computer and used a tool i found on here to convert it to system.tar.md5. I put a new phone into download mode and open odin load the system.tar.md5 into the PDA section it verifies the file ok, but when i try to flash it it fails instantly and a message appears on the phone saying "Unsupport dev_type"
I have seen a couple different versions of this tutorial out there, and i even tried booting to a ubuntu live CD to try to use the linux commands i saw on a different tutorial to convert the .img to a .tar.md5 but the result is the same.
Does anyone have any experience getting this method to work? any suggestions?
Thanks
Click to expand...
Click to collapse
Maybe check adb setting in Developer menu? There's an ADB over network setting in there. Not sure if it will help, after looking at it it says it is reset on boot...
I ended up using a nandroid backup as suggested earlier. However i initially had issues doing that i think because i was using TWRP recovery and it requires the backups to be in a folder named uniquely per device id or something which requires you to make a backup on that device before you can copy the backup files . TWRP also write protected the backup folders requiring root to be able to copy a backup onto it.
I changed to CWM and it works much better, all i have to do is flash CWM recovery to a new device and then boot it to copy the backup files and then reboot to recovery and restore the backup.
bugleboy said:
I ended up using a nandroid backup as suggested earlier. However i initially had issues doing that i think because i was using TWRP recovery and it requires the backups to be in a folder named uniquely per device id or something which requires you to make a backup on that device before you can copy the backup files . TWRP also write protected the backup folders requiring root to be able to copy a backup onto it.
I changed to CWM and it works much better, all i have to do is flash CWM recovery to a new device and then boot it to copy the backup files and then reboot to recovery and restore the backup.
Click to expand...
Click to collapse
Make sure all the devices have the same bootloader and modem. What Firmware version are you using as a base?
Sent from my SM-N9005 using Tapatalk
celderic said:
Make sure all the devices have the same bootloader and modem. What Firmware version are you using as a base?
Sent from my SM-N9005 using Tapatalk
Click to expand...
Click to collapse
They're all using the same 4.4.2 base image, the only change i made was flashing a custom recovery to be able to create the initial backup of the configured phone and to restore the backup to the stock phones saving me having to maunally configure each device.

[Tutorial] LG Gpad v410 5.1 to 4.4 downgrade, root, & internal storage fix.

EDIT: If you are coming here for the first time, this guide should still work, but @PorygonZRocks has created a flashable zip that should deal with a lot of these issues automatically. You can check out his post here:
https://forum.xda-developers.com/showpost.php?p=75787067&postcount=699
This method will indirectly allow you to root the LG Gpad v410 after it has been upgraded to Lollipop 5.1.1. Yes. Rooting LG v410 Lollipop. It's through a downgrade, but it works.
It took a while to get working, but here's how I did it. The process is straightforward, but the details matter greatly. You will brick your device if you mess up. Please read everything *first* before you do anything. Be sure you understand the process. I'll try to explain what's going on along the way.
An external SD card is extremely helpful for this process. You *could* adb push everything, but that will tedious.
First, you need some files.
The 4.4.2 KDZ which is a TEST OS, but it can be rooted and it downgrades to a Bump'able bootlaoder:
http://forum.xda-developers.com/g-pad-10/general/kdz-lg-g-pad-7-0-v410-t3224867
The LG 2014 Flash Tool:
http://www.mediafire.com/download/fwrcd3pdj0svjtb/LG_Flash_Tool_2014.zip
Android LG Drivers:
https://www.androidfilehost.com/?fid=24052804347802528
Parted for Android. You can probably find it other places, but I found this file:https://dl.dropboxusercontent.com/u/84115590/LG%20G2%2016GB%20Solution/sdparted-recovery-all-files.zip
EDIT: There seems to be a lot of confusion here. My bad. All you need is the file named "parted" from this zip file - nothing else. Just put that one file in the root of your external SD card.
https://dl.dropboxusercontent.com/u/84115590/LG G2 16GB Solution/sdparted-recovery-all-files.zip linked from here: http://www.**********.com/your-32gb-lg-g2-shows-only-16gb-storage-space-heres-the-fix/
EDIT2: The dropbox link is down. I've attached the file directly.
The Candy5 ROM (This will potentially save you some manual steps. Somewhat optional, but highly recommended):
http://forum.xda-developers.com/g-pad-10/development/rom-candy5-g-pad-v410-lollipop-5-1-1-v2-t3111987
Flashify APK:
http://www.apkmirror.com/apk/christian-gollner/flashify/flashify-1-9-1-android-apk-download/
TWRP for the v410:
http://forum.xda-developers.com/g-pad-10/development/recovery-twrp2-8-5-0lgv400-410-t3049568
LG One Click Root:
http://forum.xda-developers.com/lg-g3/general/guide-root-lg-firmwares-kitkat-lollipop-t3056951
(You may use Purple Drake or whatever else you want. They all use the same root script as this does and the GUI is helpful for novices.)
Android SDK (specifically adb.exe. After installing go to SDK Manager and ensure that Android SDK Platform Tools is checked):
http://developer.android.com/sdk/index.html
For clarification below, when I have commands in "quotes" they are Windows commands. When they are in `backticks` they are commands that you run inside of ADB which actually run on your device....as root. Root can screw things up. Please be extra cautious. If you blame me for messing up your device I will laugh at you. But that's not gonna happen, right? Good. Let's go.
Now that you have everything, put it all into a folder where you can access it easily.
Install the LG Drivers.
Install Android SDK (or otherwise get adb.exe).
Extract all of the archives.
Move the KDZ to the LG Flash Tool 2014 folder.
Put the tablet into Download Mode by powering it off, holding VolUp, and plugging in the USB cable. Press VolUP when instructed. You must be in Download mode before continuing.
Run LGFlashTool2014.exe. Select the KDZ file. Click "CSE Flash". Click "Start". Select "English" and click OK. Do not change anything else.
WAIT for the flash to continue. If you really want to brick your device, here's a good opportunity.
The device will reboot into Android 4.4.2. You will only have 4GB of internal storage at this point. DON'T PANIC! We are fixing it.
Enable USB debugging.
Connect the device.
Install and run LG One Click Root. Wait for the device to be rooted before proceeding.
Copy the Flashify apk, TWRP image, and Candy5 ROM to your external SD card.
Install Flashify and flash TWRP to the recovery partition.
Use the Flashify menu to reboot in to recovery.
DON'T PANIC! You will get white vertical lines on the boot screen from now on. They only show up during boot animations. A small price to pay. This may be fixed at a later date. for the time being! Thanks to marcsoup's first post ever, we have a fix! Details below. PLEASE click this link and thank him!
Things get tricky here. Copy parted to your external SD card and then run "adb shell" from Windows to get a shell in TWRP.
In TWRP, unmount /data by tapping Mount > uncheck Data.
`cp /sdcard/parted /sbin/` This copies the parted binary to /sbin so it can be executed in the path. I had trouble running `/sdcard/parted`, but YMMV.
`chmod +x /sbin/parted` Make it executable.
`parted /dev/block/mmcblk0` Run parted against the internal mmc
`p` Prints the partition table.
`rm 34` Deletes partition 34 labeled "grow". This is the root of our problem. The KDZ apparently only creates a 4GB partition, I assume so the test build has maximum compatibility with all sized devices.
`rm 33` Deletes partition 33 "userdata"
`p` Print to verify
`mkpartfs` Create a partition and put a filesystem on it. If we only expand the partition it won't help us because the filesystem is still only 4 GB.
a) name: userdata
b) type: ext2 (the tool only supports ext2. This is ok for now.)
c) start: 3439MB (the end of part 32. IT MAY BE DIFFERENT FOR YOU!) Be sure you do not omit the MB part otherwise the offset will overwrite another critical partition.
d) end: 15.8GB (where "grow" ended above. IT MAY BE DIFFERENT FOR YOU!) Be sure you do not omit the GB part otherwise the offset will overwrite another critical partition.
`p` Verify. For me it did not name the partition properly. Gotta fix that.
(if necessary) `name 33 userdata` This is critical for mount to find it in /dev/block/platform/msm.sdcc.1/by-name/ on some/all ROMS.
`p`. Verify one last time. Compare it to my partition table in the attachments. If you want to brick, delete some random partitions here.
Flash Candy5 with TWRP. It's only 239 MB, so it will flash quickly. I do this because Candy5 will reformat mmcblk0p33 from ext2 to ext4 for you. It does this as part of it's system boot, apparently. If you install a different ROM that does not do this, you can reformat it by running `make_ext4fs /dev/block/mmcblk0p33`. If your ROM does not have make_ext4, it likely has some differnt method to make an EXT4 filesystem. `/system/bin/mke2fs -t ext4 /dev/block/mmcblk0p33` may work better. Just flash Candy5 and be done with it.
Tap Wipe > Swipe to Factory Reset.
Tap Reboot > System.
WAIT!!! It will take a minute for the ROM to start the first time. You will have white lines and and possibly a white screen. WAIT. It's moving the DEX files to cache, formatting a partition, creating default folders on the internal storage, and several other things. WAIT! When the screen goes dim or turns off then it's ready.
Cycle the display or turn it on. You should be at the Candy5 lock screen.
USB debugging is on by default. Run "adb shell".
`mount | grep userdata` Make sure mmcblk0p33 is mounted.
`df` Make sure /data is 11.3 GB (or whatever size it is on non-16GB devices).
HELL YEAH, you downgraded, rooted, and fixed the partition problem. Enjoy your tablet!
Thanks to dopekid313 for finding the KDZ.
Thanks to timmytim for Candy5.
Thanks to the creators of the root script, flashify, TWRP, and XDA for being so awesome.
Thanks to marcsoup for fixing a fix to the white lines.
Thanks to navin56 for the partition dumps. PLEASE thank his post!
White lines fix.
What we are going to do is flash the aboot partition with the stock image provided by navin56. I've removed the extra files from the dump, so simply download aboot.img.7z below. Unzip it using 7zip.
These commands are to be run in TWRP. Reboot to TWRP recovery and connect with "adb shell". All of the following commands will be run in ADB under TWRP. If you cannot figure out how to get here, please post in the thread and someone will help you. Onward:
If you do everything correctly then you don't have to reflash your ROM and you won't lose data. This process can be done any time after flashing the KDZ, even before you follow the steps above to resize the userdata partition. It's a completely separate process.
Unzip aboot.img.7z so you have the file named aboot.img. You should also make sure that aboot.img's MD5 sum is e97431a14d1cee3e9edba513be8e2b52. Do not flash the 7z file. Please.
Copy aboot.img to your external SD card. It should live at /sdcard/aboot.img
Boot to TWRP and run "adb shell"
`ls -al /dev/block/platform/msm_sdcc.1/by-name/` Let's make sure we are flashing the right partition. On my device "aboot" is /dev/block/mmcblk0p6. You should verify this on your device or you WILL brick your tablet.
`dd if=/dev/block/mmcblk0p6 of=/sdcard/aboot-fukt.img` Let's back up our current aboot partition before we go flashing things just in case there are unintended consequences later. Be sure you have the same partition that "aboot" referred to in the 4th step or you have just backed up the wrong partition.
`dd if=/sdcard/aboot.img of=/dev/block/mmcblk0p6` Be sure the file exists, is the correct aboot.img, and you are flashing the right partition. You have been warned!!
Reboot TWRP and enjoy your boot animations again.
If I missed anything, please let me know. As far as I know this is the very first tutorial that details what is necessary to accomplish this. Please hit the Thanks button on every thread that you visit to download files!
FAQ:
Q: Why do I only have 11.3 GB of space when my device is 16GB?
A: The entire internal SD card (eMMC) is 16 GB. Gotta have someplace to install the bootloader, recovery, android, the modem OS, the secondary bootloader, the cache, the resource and power manager, and all of the other partitions necessary for the table to operate. Please look at the second screenshot in the OP. All of those 33 partitions take up room on the internal card. Fortunately ALL of those partitions ONLY take up about 4.4 GB. Hence the 'userdata' partition is ~11.3 GB.
If anyone wants to use my work to create a flashable zip to make it easier for novices, please do so. My problem is solved and I don't have the time to create the zip. Please post any questions and I'll gladly answer them! I'm so stoked that we have a usable downgrade method now!
Thank You, Worked Great
Thanks for making this I was gonna do it but was to lazy lol and thanks for linking my thread and giving cred instead of just linking straight to the kdz thank you
grandamle91 said:
Thank You, Worked Great
Click to expand...
Click to collapse
Glad to be of help!
dopekid313 said:
Thanks for making this I was gonna do it but was to lazy lol and thanks for linking my thread and giving cred instead of just linking straight to the kdz thank you
Click to expand...
Click to collapse
Of course! If you hadn't obtained the firmware then we'd all still be looking for a solution. It pisses me off to no end when people try to take credit for other people's work. We all just need to realize and acknowledge that we are simply standing on the shoulders of those who did the work necessary for each of us to do our work.
I just noticed since we formatted the userdata it screws up TWRP. It won't mount Data and it says the settings are corrupted
grandamle91 said:
I just noticed since we formatted the userdata it screws up TWRP. It won't mount Data and it says the settings are corrupted
Click to expand...
Click to collapse
Is this after you've rebooted into Candy5 and the partition is reformatted as ext4 (or you've done so manually)? TWRP may not be able to mount an ext2 partition.
EDIT: I just tested this. Following my instructions and flashing to Candy5, TWRP sees mmcblk0p33 (userdata) as the full size and mounts it at /emmc.
For clarification, after you run the parted commands, it will mess with the partition table and TWRP will most likely not be able to see it to remount it - at least not until after a reboot. This is why you need an external SD card from which to install ROMs.
/data not mounted
Edit: nevermind. The partition 33 was still ext2. I had to run make_ext4fs /dev/block/mmcblk0p33 and now I am able to mount /data. Thanks.
Thanks for taking the time to help us.
I followed the steps and till 33 I am good. But once I am in Candy5, I am not able to adb shell (adb not recognizing device eventhough usb debugging is on). I rebooted to recovery and adb works there. But my /data partition is not enabled in TWRP. I am not able to check it either under Mount in TWRP.
Code:
mount | grep userdata
is empty
Code:
df
does not show data
I tried this and my tablet bootlooped. I was able to get into fastboot and restore. I would GREATLY appreciate it if someone who has the time, would kindly donate their valuable time to into making an exe zip or something.
gridironbear said:
I tried this and my tablet bootlooped. I was able to get into fastboot and restore. I would GREATLY appreciate it if someone who has the time, would kindly donate their valuable time to into making an exe zip or something.
Click to expand...
Click to collapse
At what point did it bootloop? What was the last step that you took before rebooting?
Zip
I would really appreciate a zip file as I have never been savvy with adb and for whatever reason it doesn't want to work on Windows 10.
drumm3rb0y said:
I would really appreciate a zip file as I have never been savvy with adb and for whatever reason it doesn't want to work on Windows 10.
Click to expand...
Click to collapse
A zip file for what part? The only part that requires ADB directly is to fix the internal storage. You absolutely have to flash the KDZ and then root before you can do anything. If you are on 5.x then you have no possible way to root, much less flash a zip file.
If you tell me what exactly you are having issues with I will try to help.
fatbas202 said:
A zip file for what part? The only part that requires ADB directly is to fix the internal storage. You absolutely have to flash the KDZ and then root before you can do anything. If you are on 5.x then you have no possible way to root, much less flash a zip file.
If you tell me what exactly you are having issues with I will try to help.
Click to expand...
Click to collapse
The adb part is the part im having issue with. Everything else is flashed already. I was wondering if you could make a zip for the adb part so I can just flash it through twrp.
thanks for the great help. it did work perfectly to regain the lost space.
what about white lines ? is there any solution for that problem ?
I have tried flashing back stock recovery extracted from kdz, dd' but didn't help.
Now i am thinking of flashing back the aboot.bin extracted from original kdz or i can dump ".img" from another working device. (i have 4 similar devices)
what is your opinion i m not a developer and i need your advise. should i go ahead and which partition should i dd ? aboot or abootb or boot ?
regards
shahidmianoor said:
thanks for the great help. it did work perfectly to regain the lost space.
what about white lines ? is there any solution for that problem ?
I have tried flashing back stock recovery extracted from kdz, dd' but didn't help.
Now i am thinking of flashing back the aboot.bin extracted from original kdz or i can dump ".img" from another working device. (i have 4 similar devices)
what is your opinion i m not a developer and i need your advise. should i go ahead and which partition should i dd ? aboot or abootb or boot ?
regards
Click to expand...
Click to collapse
I have no solid evidence of this, but I suspect that the white lines are caused by a display driver issue where when the bootloader hands over control of the display to the kernel it doesn't get reinitialized properly. I have no ideas as to how to get rid of that at the moment but if I stumble across something I'll be sure to post here.
While I'm not an Android developer, I've been a Linux admin for 10+ years and have a lot of experience with Android devices. I'd be really hesitant to go flashing things ad hoc. While Download Mode may save you if you flash the wrong thing, I'm not entirely sure what the limitations that you may run in to with a locked bootloader are.
After having this device for months on 5.x and FINALLY being able to downgrade and run custom ROMs with root, not seeing a boot animation is a pittance to pay. But I'll keep looking.
i have same problem entered in TWRP but when ADB sheel thorough DP tools it didn't connect to my device. i m also using windows 10
Do I need to Re-mount Data ? I press format data button at TWRP and mount data. It looks work great.
After all process, it shows 16Gb total at storage, 11.04GB available. it works perfectly.
I need the stock V41010d, so I reflash the stock rom rooted at [ROM][STOCK](V410 ONLY)KOT49I.V4101d | 4.4.2 | Rooted + Busybox
Now, my Gpad is at stock V41010d, but I have a question about the boot screen, is it still with white lines and white screen? Any method to fix it?
Hello,
Thanks for the great work. unfortunately I am facing some difficulty, starting from step# 16 "Things get tricky here", how to run"adb shell in TWRP?
also can I use minimal_adb_fastboot_v1.1.3_setup.exe as mentioned in the link in the OP http://www.droidviews.com/your-32gb-lg-g2-shows-only-16gb-storage-space-heres-the-fix/ ?
also I noticed the path have been used includes 'parted' folder, but the folder I have after unzipping the parted zip called 'sdparted-recovery-all-files', do I rename the folder to 'parted' instead?
please help and excuse my broken English.
I'm also having trouble with the adb shell step. When my device is powered on normally, adb commands work. However, in TWRP mode my computer can't recognize the tablet, mount properly, and copy over parted. All the steps have been identical to this point. Any ideas?
iphone5sf said:
Do I need to Re-mount Data ? I press format data button at TWRP and mount data. It looks work great.
After all process, it shows 16Gb total at storage, 11.04GB available. it works perfectly.
I need the stock V41010d, so I reflash the stock rom rooted at [ROM][STOCK](V410 ONLY)KOT49I.V4101d | 4.4.2 | Rooted + Busybox
Now, my Gpad is at stock V41010d, but I have a question about the boot screen, is it still with white lines and white screen? Any method to fix it?
Click to expand...
Click to collapse
You shouldn't need to remount or format data. The parted command nukes the filesystem and creates a new one formatted as ext2. At this point the running kernel has the old partition table loaded and won't know that the partition has been extended. Simply flash Candy5 and reboot at this point and it will reformat the userdata partition.
See above for the white lines during the boot animation. Known issue, no fix in sight, doesn't really matter.
nmnm4alll said:
Hello,
Thanks for the great work. unfortunately I am facing some difficulty, starting from step# 16 "Things get tricky here", how to run"adb shell in TWRP?
also can I use minimal_adb_fastboot_v1.1.3_setup.exe as mentioned in the link in the OP http://www.droidviews.com/your-32gb-lg-g2-shows-only-16gb-storage-space-heres-the-fix/ ?
also I noticed the path have been used includes 'parted' folder, but the folder I have after unzipping the parted zip called 'sdparted-recovery-all-files', do I rename the folder to 'parted' instead?
please help and excuse my broken English.
Click to expand...
Click to collapse
You only need the sdparted-recover-all-files.zip from that site. "parted" is not a folder, but the binary (without a file extension) inside of that zip file. Copy that file to /sbin and you are in business.
zmali1 said:
i have same problem entered in TWRP but when ADB sheel thorough DP tools it didn't connect to my device. i m also using windows 10
Click to expand...
Click to collapse
summonholmes said:
I'm also having trouble with the adb shell step. When my device is powered on normally, adb commands work. However, in TWRP mode my computer can't recognize the tablet, mount properly, and copy over parted. All the steps have been identical to this point. Any ideas?
Click to expand...
Click to collapse
I'd recommend installing the SDK and pulling the drivers from that. Alternatively, you can try the drivers here: https://github.com/koush/UniversalAdbDriver.
Technically, when I ran the "parted" commands I was actually booted in to rooted 4.4.2 from the KDZ; I wasn't actually in TWRP. It's just not a very recommended way of going about it. I explained how to run all of this from TWRP, but there's no technical reason that you *can't* run this from Android. You just *shouldn't* because you can't cleanly unmount the filesystem and it theoretically could cause filesystem corruption. I just figured that I don't care about that partition getting corrupted since it's getting wiped out.

Any way to unlock the 5GHz WiFi band for US-version?

So the US-version of the Mediapad M3 does not support 5GHz Wifi as stated by Huawei and from my personal experience. Per Huawei's website:
Wi-Fi: IEEE 802.11a/b/g/n/ac at 2.4 GHz & 5 GHz (Products delivered to markets that impose FCC certification requirements do not support 802.11 a/ac at 5 GHz Wi-Fi)
I can't help but think that the hardware is there as I have never heard of a mobile WiFi chip that ONLY supports 802.11 ac at 2.4 GHz. Therefore, is or will there be any way to unlock the 5 GHz band of the WiFi chip assuming the hardware is there?
Well, if you have unlocked bootloader, you may try the following:
1) Get root access.
2) Open /system/build.prop and find ro.config.hw_is_hide_wifi_5g=true and change it to "false". Or to true if it's false.
3) If that doesn't work (cause I really don't know what this option stands for), see below.
4) Go into /cust folder and tell us what's in there. Maybe, there's something like "hw" folder with "eu" folder inside.
5) If there is, edit /data/custom.bin and put "hw/eu" there (without quotemarks), and see, if something has changed.
If you don't have "hw/eu" in /cust, you have two ways:
1) Ask me here to give you "hw/eu" folder, put it into /cust and do (3).
2) Find local.prop file (it's usually in "prop" folder, three folders down from /cust, but folders are those you have, not "hw/eu")
3) There you'll find ro.config.hw_opta and ro.config.hw_optb. Change them to 999 and 156 respectively.
If all that doesn't help, we'll need to find another ways.
Slavon-93 said:
Well, if you have unlocked bootloader, you may try the following:
1) Get root access.
2) Open /system/build.prop and find ro.config.hw_is_hide_wifi_5g=true and change it to "false". Or to true if it's false.
3) If that doesn't work (cause I really don't know what this option stands for), see below.
4) Go into /cust folder and tell us what's in there. Maybe, there's something like "hw" folder with "eu" folder inside.
5) If there is, edit /data/custom.bin and put "hw/eu" there (without quotemarks), and see, if something has changed.
If you don't have "hw/eu" in /cust, you have two ways:
1) Ask me here to give you "hw/eu" folder, put it into /cust and do (3).
2) Find local.prop file (it's usually in "prop" folder, three folders down from /cust, but folders are those you have, not "hw/eu")
3) There you'll find ro.config.hw_opta and ro.config.hw_optb. Change them to 999 and 156 respectively.
If all that doesn't help, we'll need to find another ways.
Click to expand...
Click to collapse
Has anyone been able to try this yet?
the7thson said:
Has anyone been able to try this yet?
Click to expand...
Click to collapse
C'mon, be the first one
Just another caution.
Please, do a backup first.
I had a factory reset after changing region in custom.bin. I don't know, what was the real cause, and now I don't do anything to my tablet, cause everything it setup and works fine.
You, probably, can avoid it in two cases:
1) Your original recovery was replaced by TWRP
2) You don't change the actual region, changing only the content of your region's folder.
the7thson said:
Has anyone been able to try this yet?
Click to expand...
Click to collapse
Changing ro.config.hw_is_hide_wifi_5g=true to "false" didn't do anything for me.
/cust folder contains /hw (subfolders /default, /normal, /oversea, and /usa), /lost+found, /preinstalled, and /special_cust. I haven't messed with any of them.
didn't work.
After unlocking the bootloader and getting root access I did the following:
1. Changed /system/build.prop: ro.config.hw_is_hide_wifi_5g=true to "false".
restarted the tablet but it did nothing
2. went to /cust. it contains the following folders: /hw (subfolders /default, /normal, /oversea, and /usa), /lost+found, /preinstalled, and /special_cust (just like for @neo_1221)
edited local.prop under /Cust/hw/usa/prop/ to ro.config.hw_opta=999 (was 567) and ro.config.hw_optb=156 (was 840).
restarted the tablet but it did nothing
What else can be done?
E.Vogel said:
What else can be done?
Click to expand...
Click to collapse
You may try to flash Chinese firmware. It's Something like BTV-W09C233B0xx or BTV-DL09C233B0xx
I don't have any other ideas, really. If even this doesn't help, then 5GHz is locked by OEMInfo or disabled in hardware.
Firmware can be found with this tool
Am confused by this thread. Are you saying you can only connect to 2.4 networks and cannot see 5ghz networks at all?? That normal only happens when a tablet physically does have a 5ghz radio.
The U.S version of the tablet does not support 5Ghz wi-fi.
We are assuming that there is only one variant of the tablet sold world wide (two actually LTE+wifi and wifi only),
and in order to comply with FCC requirements the 5Ghz wi-fi band was disabled by software and not hardware.
If that is the case than the band can be enabled back by flashing different non-U.S rom.
hopefully
It is WORKING!
I downloaded the latest Chinese version using the tool @Slavon-93 linked, version BTV-W09C233B022 from December 16 2016. I flashed it and after restarting the tablet, I have a Chinese version tablet, with 5Ghz band wi-fi working.
I lost custom recovery and root and may reflash them later.
I got some apps back that I previously removed, but happily all my other apps were still installed and configured.
Thanks @Slavon-93
p.s. I re-flashed TWRP and SU and now have custom recovery and root back
E.Vogel said:
I downloaded the latest Chinese version using the tool @Slavon-93 linked, version BTV-W09C233B022 from December 16 2016. I flashed it and after restarting the tablet, I have a Chinese version tablet, with 5Ghz band wi-fi working.
I lost custom recovery and root and may reflash them later.
I got some apps back that I previously removed, but happily all my other apps were still installed and configured.
Thanks @Slavon-93
p.s. I re-flashed TWRP and SU and now have custom recovery and root back
Click to expand...
Click to collapse
Can you select english as the language?
Yes you can, and since English was my selected language before I flashed the Chinese ROM it stayed as the selected language, so I never got a Chinese welcome screen and had to find out how to change it to English.
So this is a solution to get the "5Ghz band" working on a US WiFi only?
Those, who have a US tablet, could you please upload your entire /cust folder somewhere? If Chinese firmware is a solution, maybe there is something in /cust, that blocks 5GHz wifi? I wanna compare it to Chinese and Russian versions and maybe find something interesting.
@E.Vogel forgive me for being new to Huawei way of doing things. You said you flashed the Chinese ROM. Flashing makes me think of my Nexus 7 where I actually flashed the *.IMG files.
I downloaded the file you mentioned and I have update.app after extraction. I recall reading somewhere about creating a folder and transferring said file to device and restarting it. I'm curious if this is the route you took? I personally prefer fastboot flash but will have to do with what works. Thank you.
jmjm003 said:
@E.Vogel forgive me for being new to Huawei way of doing things. You said you flashed the Chinese ROM. Flashing makes me think of my Nexus 7 where I actually flashed the *.IMG files.
I downloaded the file you mentioned and I have update.app after extraction. I recall reading somewhere about creating a folder and transferring said file to device and restarting it. I'm curious if this is the route you took? I personally prefer fastboot flash but will have to do with what works. Thank you.
Click to expand...
Click to collapse
Forgive me for not being @E.Vogel, but let me explain. Huawei devices are not usual in terms of partition structure. For example, they have 2 recoveries, designed for different things. For a Nexus owner their update structure is also strange. Once upon a time, you could create a "dload" folder in /sdcard or in external SD, choose local update in update utility on your device, select update.app or update.zip, reboot and watch the device updating. Now we don't have an option to choose a local update, so the quickest way to install FULL OTA is from TWRP. You just need to put update.zip (~1.8 Gb) somewhere in /sdcard or other place, reboot into TWRP, press the Install button and select this file. TWRP installs it and you get your Chinese firmware. I recommend to make a backup first, in case something goes wrong. After installing FULL OTA you still get your apps and settings in place, but after a factory reset, you will lose Google Play and other a Google apps, and will have to manually install them from HiApp. Also, you will have to reinstall TWRP, root, xposed and other things you probably have flashed before.
I appreciate the reply all the same @Slavon-93. So creating the dload folder and dropping update.app in it no longer works?
I've not modified anything on my device other than fixing DPI so apps are in tablet mode.
Any idea what each recovery does since it has two of them?
I like to know there's a way out of a screwup if it happens. Nexus 7 was simple to fix.
Thank you.
jmjm003 said:
I appreciate the reply all the same @Slavon-93. So creating the dload folder and dropping update.app in it no longer works?
I've not modified anything on my device other than fixing DPI so apps are in tablet mode.
Any idea what each recovery does since it has two of them?
I like to know there's a way out of a screwup if it happens. Nexus 7 was simple to fix.
Thank you.
Click to expand...
Click to collapse
Huawei devices have two recovery partitions: recovery and recovery2.
Recovery has generally all the same features a typical Nexus recovery has, except it doesn't have an option to apply update.zip and has a touch interface unlike the Nexus recovery.
Recovery2, called eRecovery, also has a touch interface and is designed to make a totally screwed up device great work again. It has a button to download full firmware and install it but on my device it said "No firmware found" after connecting to Huawei servers. People in Russian forum say it works only if you're in China and have a Chinese device. Anyway, if eRecovery does nothing, I considered it totally useless and replaced with TWRP: fastboot flash recovery2 twrp.img
Generally Huawei devices can be restored the same way a Nexus device can. TWRP and fastboot work the same. Personally I prefer to make a total backup of all partitions in device with "dd". I think it will give me more flexibility in restoring if something goes completely wrong. On DL09 model, only modem partitions are the problem. You can find fastboot versions of Chinese ROMS easily, but after installing them, I've lost everything related to phone functions. The only way to fix it was installing Full Chinese firmware in form of update.zip with TWRP.
And about dload folder. I have no idea how it works. I am also a former owner of Nexus 7 and the logic of Huawei is new to me, so I don't know some nuances. On earlier devices there was another option to update: you put update.app to dload folder, dial *#*#2846579#*#*, select Software upgrade -> SDCard Upgrade, the device reboots and installs the update. Again, on my device this trick didn't work and update installation stopped at 5%, saying it's incompatible with my device.
@jmjm003, I also come from a nexus 7 and Huawei devices are different.
First of all there is no formal web site with all factory images and/or OTA to download, I had to use a tool an XDA user developed to find the factory image I needed.
The second change is that the factory image (file update.zip) does not contain *.img files inside like in Google images and contains "update.app" 1.8GB file and some other small files.
To flash the ROM I tried to use ADB sideload but got an error message about the file being unreadable, so I copied the file to the tablet and flashed it using TWRP install function like any other zip file.
@Slavon-93, my /cust/hw folder changed from before and now contains only two sub-folders "cn" and "default"
I uploaded the entire /cust folder to Google drive, use this link to download it.
E.Vogel said:
@Slavon-93, my /cust/hw folder changed from before and now contains only two sub-folders "cn" and "default"
I uploaded the entire /cust folder to Google drive, use this link to download it.
Click to expand...
Click to collapse
Thank you but I know what's inside Chinese /cust folder as I am using Chinese firmware myself. I am interested in untouched /cust of US version of tablet because I think there can be some option in local.prop or somewhere else, that blocks 5GHz Wi-Fi. I can try to look for it by comparing Russian, Chinese and US cust folders.

Categories

Resources