[Q] Pre "fixewd" CM 10.1 nigtly for 16. wanted - Galaxy S 4 Q&A, Help & Troubleshooting

There is a lot of problems installing updates atm. I am currently stuck in CMW because none of the CM 10.1 roms will flash.
Here is what happens:
Status 7 (if I dont modify the script)
Installation aborted (if I have modified the script)
I know we can edit the script file and delete the device check and or the format of /system. But for me, it is not working. I have tried many editors (on OS X) but the finished zip is always 0.3 MB bigger than the original, making me suspect that its saving the script file wrong.
So if any one could link me a .zip they have used, I would be very grateful!

Related

custom update.zip for gapps

FIRST: I know that there are custom ROMs and this has been done via root/etc. I want as vanilla of a gtab as possble (i've tried the TnT Enhancement pack and I have all sorts of issues w/ viewing mp4 files and the device locking up 'Scanning the SD card' that I don't have w/ the OTA updates)
I'm trying to create a custom update.zip that will JUST install the gapps on my gtab. I've got the necessary files from a previous thread: http://forum.xda-developers.com/showthread.php?t=827209
I've created a directory struction w/ update\system (with the files in the gapps zip from the thread) and update\META-INF\com\google\android with an update-script that says:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
I zip it up and sign it:
java -classpath testsign.jar testsign my1stupdate.zip update.zip
then I go to install it, have the \recovery with the command file that says "--update_package=SDCARD2:/update.zip" and it looks like it's installing it fine (get the standard square status screen with the install package icon looking like its going to install) until within a second or two I get the triangle with the exclaimation point in the middle and it reboots (package never gets installed)
what am I missing? anyone provide some insight into how I can figure out what happened to troubleshoot further?
Thanks in advance.
-Deniz
Do you mean something like this which is only the Google apps? No sense in reinventing the wheel.
http://android.d3xt3r01.tk/cyanogen/gapps/gapps-mdpi-tegra-20101020-signed.zip
tullywork;11012789
I'm trying to create a custom update.zip that will JUST install the gapps on my gtab. I've got the necessary files from a previous thread: [url said:
http://forum.xda-developers.com/showthread.php?t=827209[/url]
Click to expand...
Click to collapse
not sure why you are reading an old/closed thread when that thread actually directs you to the currently stickied thread:
http://forum.xda-developers.com/showthread.php?p=9257637
tullywork said:
FIRST: I know that there are custom ROMs and this has been done via root/etc. I want as vanilla of a gtab as possble (i've tried the TnT Enhancement pack and I have all sorts of issues w/ viewing mp4 files and the device locking up 'Scanning the SD card' that I don't have w/ the OTA updates)
I'm trying to create a custom update.zip that will JUST install the gapps on my gtab. I've got the necessary files from a previous thread: http://forum.xda-developers.com/showthread.php?t=827209
I've created a directory struction w/ update\system (with the files in the gapps zip from the thread) and update\META-INF\com\google\android with an update-script that says:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
I zip it up and sign it:
java -classpath testsign.jar testsign my1stupdate.zip update.zip
then I go to install it, have the \recovery with the command file that says "--update_package=SDCARD2:/update.zip" and it looks like it's installing it fine (get the standard square status screen with the install package icon looking like its going to install) until within a second or two I get the triangle with the exclaimation point in the middle and it reboots (package never gets installed)
what am I missing? anyone provide some insight into how I can figure out what happened to troubleshoot further?
Thanks in advance.
-Deniz
Click to expand...
Click to collapse
so what you want is a stock rooted rom with gapps? I wanted the same exact thing, if this is what you wanted let me know and I will let you know how i did it
1st: thanks for the replies.
I looked at the CyanogenMod update.zip and it has 33 different apks that get installed, which again, I don't want all the 'garbage' just gapps (they've got twitter, facebook, carhome, htc email/etc, passion quickoffice...etc..etc).
I've rooted it successfully and installed GApps, so I know how to get it to work successfully....i was just hoping for something easier (eg. load the update.zip on boot after doing a clean NVFlash and all the gapps stuff was there).
I was also hoping to learn a bit more about building my own update.zip and curious what I did wrong (i got pretty far along before it choked), obviously there are probably easier wasy to get this done other than building an update.zip, the learning is half the fun right?!
Thanks again for your replies/help.
-D
I do not have a gtab but a advent vega and believe they are similar.
I made a update.zip from the market_update.zip. Just added the apps i wanted to system/app folder in the zip file, and flash from the software update tool. Not sure if my edited one will work on the gtab because it has the advent vega framework to give a small taskbar.
Original thread: http://forum.xda-developers.com/showthread.php?t=931337
I have posted the original unedited one, hope it helps you out

ClockWorkMod and Cyano with Rom Manager?

I have a GTab2 10.1, rooted with Odin.
After rooted, I opened Rom Manager, and see the Icon ClockworkMod: tapped, and oh, Rom Manager Installed versione 6.0.1.1
Then I see CyanogenMod icon, 9 and 10. I checked both, started download, Gtab rebooted but installation was aborted with an error
E:Can't open /sdcard/ clockworkmod /download/get.cm/get/jenkins/7108/cm-9.1.0-p5110.zip
(No such file or directory)
Installation aborted.
Continued manually, and the file WAS there, in the propher path.
Tryed to flash it, but another error
E:Error in /emmc/sdcard/clockworkmod/download/get.cm/get/jenkins/7108/cm-9.1.0-p5110.zip
Status 7
* * *
ok, tried another path, using the nice tutorial posted in
http://forum.xda-developers.com/showthread.php?t=1786828
I downloaded the propher file cm-10-2012-08-29-NIGHTLY-p5110.zip, but same error.
So prolly I'm missing something, but what?
bock2 said:
I have a GTab2 10.1, rooted with Odin.
After rooted, I opened Rom Manager, and see the Icon ClockworkMod: tapped, and oh, Rom Manager Installed versione 6.0.1.1
Then I see CyanogenMod icon, 9 and 10. I checked both, started download, Gtab rebooted but installation was aborted with an error
E:Can't open /sdcard/ clockworkmod /download/get.cm/get/jenkins/7108/cm-9.1.0-p5110.zip
(No such file or directory)
Installation aborted.
Continued manually, and the file WAS there, in the propher path.
Tryed to flash it, but another error
E:Error in /emmc/sdcard/clockworkmod/download/get.cm/get/jenkins/7108/cm-9.1.0-p5110.zip
Status 7
* * *
ok, tried another path, using the nice tutorial posted in
http://forum.xda-developers.com/showthread.php?t=1786828
I downloaded the propher file cm-10-2012-08-29-NIGHTLY-p5110.zip, but same error.
So prolly I'm missing something, but what?
Click to expand...
Click to collapse
1.
Have you tried to install the CM file from CWM Recovery.
I think it could be a compatibility-issue between Galaxy Tab 2 and ROM Manager.
Had the same problem as you,but it worked through CWM Recovery.
2.
You could try moving the CM file to the external memory and try flashing it from there to see if the problem persists.
Maybe it's because CWM Recovery is unable to flash the file from internal memory.
INSTRUCTIONS
First time installing CyanogenMod 9/10 to your Galaxy Tab 2, or coming from another ROM:
- Make sure you're running a proper working ClockworkMod-Recovery
- Copy GApps and CM9/10 ZIPs to your internal SDCard
- Boot into Recovery
- Flash CM9/10 zip from internal SDCard
- Flash GApps zip from internal SDCard
- DO A DATA WIPE / FACTORY RESET
- Reboot
- Don't restore Apps using Titanium Backup!
Upgrading from earlier version of CyanogenMod 9/10:
- Copy CM9/10 ZIP to your internal SDCard
- Boot into Recovery
- Flash CM9/10 zip from internal SDCard
- Reboot
Click to expand...
Click to collapse
Do it like that and you will never have any problems, Download from the threads provided. Follow the instructions to the letter and you cant go wrong. If you are not sure of anything ASK first and someone will help you out.
:laugh:

[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.

[MOD] No forced encryption on CM12 stock kernel - once and forever

Force-Encrypt Toggler
Disclaimer: I have no experience in Android/ROM development. This is the first time i decided to share something (that i initially made for myself). Flash at your own risk. I am not responsible for boot loops, unexpectedly encrypted partitions, data loses, etc. Make sure you have a backup first!
Click to expand...
Click to collapse
Now that CyanogenMod developers stated that they are going to follow Google's guidelines about forced encryption in their ROM for Nexus 9, those of us who want their tablets unencrypted will have to flash a modified boot image every time they update CM. I hate doing such things manually every time, so i created a patch that disables forced encryption the right way - flash once and forget forever.
force-encrypt-toggler reads and unpacks your boot image, patches the ramdisk, creates a new boot image and flashes it back to the boot partition. And all that is done right on your tablet. Than it uses CM's addon.d framework, so that each time you flash a new CM zip, force-encrypt-toggler is invoked automatically to patch the newly flashed boot image. Thus, you can just upgrade through CM's built-in updater and everything will be patched automatically every time . Also, the script itself can be used on any Linux computer to patch (probably) any boot.img you have.
Thus far i have used it on my Nexus 9 to stay unencrypted starting from 20150216 through 20150224 nightlies. It seems to be quite stable, i believe . See some notes in the second post.
Download
force-encrypt-toggler-1.1-flounder.zip : https://goo.gl/bw7YDq
force-encrypt-toggler-1.1-flounder-dbg.zip : https://goo.gl/95JN34 - this one creates log files in /cache every time
force-encrypt-toggler-1.1-linux.tar.gz : https://goo.gl/3PF6ru - to be used on a desktop to patch arbitrary boot.img
old versions (for CM12): https://goo.gl/125eey
Sorry, it looks like i can not post clickable links yet. Remove space between "https" and colon.
Compatibility
I have tested this script only on my Nexus 9 Wi-Fi with TWRP recovery and CM stock boot image. However, i believe that it should be possible to make it work on other devices (e.g. Nexus 6) by just changing a few constants at the beginning.
Version 1.1 requires TWRP version >= 2.8.7.1 and a CM13 nightly >= 20160110. Version 1.0 will work for CM12.x (but not for recent CM13 nightlies).
Known issues
The addon.d script uses a dirty hack to trick the recovery. While this never happened to me, if you ever encounter a strange recovery behavior regarding installation or backup of boot images after flashing CM zip over CM with this mod, this might be it. Just reboot and it should be ok. See the second post for more info.
If CM changes something in their updater or if something changes in the recovery, this mod may easily break due to the hack mentioned above. Read the disclaimer.
Each time you flash a CM zip over a CM installation with this mod installed, TWRP recovery will hang for 5-10 seconds after reporting successful completion and before showing buttons at the bottom (or before rebooting in case of open recovery script execution). It is possible to fix this easily, but than this mod might be much easier to break.
Installation
First, you should read the disclaimer above and backup your data. Than you just have to flash the zip you downloaded with TWRP recovery. CyanogenMod must be installed first. If your /data is currently encrypted, you will have to do a full factory reset to decrypt it (backup your data first!).
Your current boot image will be patched during installation process (it should not hurt, if it's already patched). In case if something goes wrong, installation script will tell you. In any case you can get force-encrypt-toggler debug output by something like:
Code:
adb pull /tmp/fet.log
Be sure to do this before you reboot, because that file is created in the RAM.
Removal
In order to remove force-encrypt-toggler you have to delete the following files from your /system partition:
Code:
/system/xbin/mkbootimg (v1.1)
/system/xbin/unpackbootimg (v1.1)
/system/bin/force-encrypt-toggler
/system/addon.d/90-force-encrypt-toggler.sh
/system/bin/mkbootimg (v1.0)
/system/bin/unpackbootimg (v1.0)
And than restore your original boot image. You can also just format /system and flash CM again, but that is such an overkill .
Usage
Normally you will not need to run force-encrypt-toggler yourself, but in case you need, you should be able to run it both in Android and in recovery via adb shell. Just run it with --help option to see what it can do. In case you will have to debug some glitches, this command may be useful:
Code:
force-encrypt-toggler --set-not-forced --debug --dry-run --no-cleanup
If you use it on a Linux computer, this is what you will probably need:
Code:
sudo ./force-encrypt-toggler --set-not-forced [ --input path/to/boot.img --output path/to/new/boot.img ]
Note that Android and computer versions are functionally equivalent, so you can theoretically patch boot images for one Android device on another one...
Changelog
Code:
v1.1
+ use toybox instead of busybox because CM now ships only the later
+ mkbootimg and unpackbootimg are now installed to /system/xbin
+ the --help option can now be used without root privileges
v1.0 - initial release
Credits
mkbootimg is built from AOSP source
unpackbootimg is taken from this GitHub page: https://github.com/Dees-Troy/unpackbootimg
update-binary is taken from a CM zip
There is one problem with patching the new boot image from an addon.d script: CM's updater-script flashes boot image after it invokes all addon.d scripts. Therefore at a time, when the script is called, it is possible to patch only the old boot image, and than it will still be overwritten anyway. In order to overcome this, i used a very dirty hack. In short, i replace the device node with a fifo and let the updater write new boot image into it, and than... Ok, so, i think there must be a cleaner solution, so i will appreciate if a more experienced developer takes a look at my code and proposes a better solution.
As for the 5-10 second hang, it is (unexpectedly) caused by that line with "sleep 15" at the end of addon.d script. If it really annoys you, you can comment it out along with the line, where force-encrypt-toggler is called directly (not through the helper script). Updating will be a bit faster than, but if CM devs ever decide to flash boot image prior to calling addon.d scripts, you /data will be silently encrypted.
Download :: For the lazy
force-encrypt-toggler-1.0-flounder.zip : http://goo.gl/N4rZDk
force-encrypt-toggler-1.0-flounder-dbg.zip : http://goo.gl/4nXmkD - this one creates log files in /cache every time
force-encrypt-toggler-1.0-linux.tar.gz : http://goo.gl/hDFNOY - to be used on a desktop to patch arbitrary boot.img
While there was zero discussion in this thread, goo.gl tells me that there was some downloads, so someone might be actually using my small mod. If so, they might notice that it got broken around one month ago. So i decided to share a fixed version. See updated links in the description (links in the USBhost's post above are for the old version, if you wonder).
If you currently have v1.0 installed, you can just flash v1.1 over it. Note however, that if you was flashing recent nightlies while using v1.0, you /data probably have been silently re-encrypted. Also, if you current boot image is patched by v1.0, the initial patching by v1.1 during zip installation will fail, but it should work during system updates afterward. Flash stock boot image and try again if you want to be sure.
The reason for v1.0 malfunction was that around a month ago CM13 stopped shipping busybox in favor of toybox. New version is only compatible with CM nightlies >= 20160110. Also you need TWRP >= 2.8.7.1.
I never took notice to this thread before until your post in the FED thread. I am going to keep an eye on it as I have been issued lately with the FED patch saying that my device is not supported (Nexus 9 Wi-Fi). Hopefully I will have better luck with this. Thank you for sharing your.

[GUIDE] Get Xposed working on your deodexed TouchWiz based Lollipop ROM! 2015/08/17

DISCLAIMER
The process of flashing a custom recovery/kernel/firmware may and will trigger your device's Knox Counter. Neither XDA nor I can be held responsible for your actions. Proceed with caution. During this process you will lose all your settings and apps. As long as you follow the instructions, your device's storage, internal and external, won't be touched​
Still not compatible with x64 systems! Not compatible with Samsung 5.1.x (sdk22) ROMs!
Hello, Ladies and Gentleman
Many people seem to have a hard time to understand how all of this here on XDA works. I constantly get PM's from users, asking how to do the most basic stuff like flashing a .zip or stock firmware via Odin. Usually, I don't even read them and just hit delete. I know it's not ok to deny people help, so I decided to show you how you can get Xposed working on your TW based stock or custom ROM since it's the most frequently asked question I get.
It's nothing you couldn't do if you'd just....
We're going to use @arter97's customized Xposed Framework as the one made by @darkera13 needs the user to manually modify and replace files which may be too complicated for some.
Preparation
-READ EVERYTHING OVER AND OVER AGAIN.
-A custom recovery System like TWRP or CWM (PhilZ or Stock)
-A deodexed ROM. It's the only way to go. YOU NEED A DEODEXED ROM. If your ROM is not deodexed and you flash the framework, you'll end up in a bootloop. To deodex your existing ROM carefully follow Post #2
Here are a few made by XDA Senior Member @_alexndr
Stock deodexed for SM-N9005 Galaxy Note 3 International Qualcomm.
Stock deodexed for SM-G900F Galaxy S5 International Qualcomm
-And the framework itself from here
[UNOFFICIAL] Xposed for Samsung Lollipop by arter97
-Flash a custom recovery system of your choice. This is listed under preperation on purpose since this guide is about getting Xposed on your TW Lollipop device. A guide on how to get a custom recovery system is most certainly available in your device's forum.
-Store the ROM and the Framework in an easy to find folder, which we're gonna call "folder x". It doesn't matter where you store it (ext. SD or int. SD)
The Fun Part
-Boot into your custom recovery and make a full wipe:
TWRP users: "Wipe>Advanced Wipe> Tick System, Data, Cache, Dalvik Cache> Slide to format.​CWM users: "Mounts and Storage> hit Format /System; hit Format /Data; hit Format /Cache.​
-Still in recovery system, install, or flash the files we put in folder x;
TWRP users: "Install> Navigate to folder x and choose the ROM file first> Add Zip> now choose the Xposed Framework from folder x> Slide to flash.​CWM users: "Install Zip> Choose zip from /sdcard if folder x is on internalt storage or /storage/sdcard1 if folder x is on ext. storage (SD-Card)>​choose the ROM file first> -Yes - install ROMXY.zip.​Do the same with the Xposed Framework zip file.​
-Still in recovery system, reboot device and wait for it to boot. It can take up to 20 minutes. Enjoy Xposed on your Samsung TouchWiz Lollipop ROM.
-Stuck in a bootloop? Try this and repeat the process.
XDA Senior Member @Honzze kindly pointed out to keep following in mind; You have to start JoelDroid Lollipop Batch Deodexer with Admin permissions. Otherwise this error might return "path variable" of Java "is not set".
Deodexing your existing ROM without having to flash an entire ROM
As the title says, with this awesome guide by XDA Senior Member @townsenk you don't have to reflash an entire new ROM to your device. Instead, youll just deodex those parts of your System which need to be modified in order to get Xposed working. You don't necessarily have to perform a full wipe if you do it this way. But if you encounter fc's or end up in a bootloop, you know what to do
Guide for this guide:
Regarding point 1: "...launch a DOS shell..." just means, you need to open the so called "CMD" programm in Windows. To "launch a DOS shell" or CMD from within a folder, you simply have to hold down the shift key and right click in that folder. The context menu will show an entry "open command window here". And that's it! (Windows XP users may have to search the internet for another solution)
For Galaxy S5 and Note 3 users: If ADB returns "device offline" or an empty line after "List of devices attached" make sure your using a USB 2.0 data cable on a USB 2.0 port
townsenk said:
How to DeOdex YOUR (...) Rom.
I would like to note that I appreciate all the work that developers have put forth in creating and maintaining modified Roms. there are some awesome feature rich implementations available. My intentions are not to be critical of any specific Rom or mod. Without the developers we would have nothing.
(...)
This method is very common knowledge I thought I'd just explain it in an easy to understand way.
Here is what you need.
A stock (...) ROOTED configurated phone. Debloat as needed. Set the phone up exactly how you like it with apps and such.
Make sure it's stable. (If you have issues before DeOdexing they will be there afterward!)
Here's the files you may need to make this happen
LBD2.4.zip
7-Zip
Installer template (at end of post)
1> Make sure ADB is working on your computer. USB debugging turned on. Create a folder to store your soon to be download system files and launch a DOS shell from that working folder. Working folder name should NOT contain spaces. With the phone hooked up you should be able to type adb shell and get a prompt.
2> Type these commands
adb pull /system/app app/
adb pull /system/priv-app/ priv-app/
adb pull /system/framework framework/
This will take awhile and you will be left with three folders
Create a new folder named "system" and place these three folders inside.
3> Extract and launch LBD2.4 (This is the DeOdexer and is AWESOME). Point it at your recently created "system" folder and let it do it's thing.
I'll assume this will occur without errors as I have never had any.
4> At this point you can manually apply modded apk's to the system folder but I don't really recommend it. They can be applied afterward using the seperate installer zips.
5> with 7-Zip installed open the provided Installer template. Do not Extract it. Just open it in the 7-Zip file browser using the right click context menu in windows.
Drag-Drop the contents of your system folder into the empty system folder in the 7-Zip browser It should be the three folders previously created but now they are Deodexed. Close the 7-zip file manager and select Yes if it asks you to save.
Note: The provided installer template has been modified to only wipe and replace the three system directories.
6. Copy the created installer to your sdcard and install with recovery. Wipe cache and Dalvik before rebooting.
Go have lunch. You will sit at a boot screen for about 10 minutes. Then another 20 to rebuild caches. Time varies.
7. Your system will now be Deodexed! At this point you can install your mods one at a time, I recommend this so you can test your system between installs to determine if a specific mod is creating problems.
This method has so far removed ALL of my stability issues.
Click to expand...
Click to collapse
Since I no longer own this device, I'm retiring from this thread as of now. Hope I could help you.
Don't know if someone can help me as you stated that you're retired from this thread.
I did every step you do mentioned here (for self deodexing existing rom)
I did everything successfully and deodexed my files with 2.5 deodexer, putted files in the system folder to the 7zip folder and sent to my device and flashed zip, cleaned cache and dalvik and it stuck on booting for about 15 minutes. I know, it takes alot time during rebuildup of cache, but guys, it's 15 minutes! for me, if i cleanup cache and the dalvik/art cache, it just takes 1minute on boot screen to show up the image of each apps cache, but i just sat there with lots of patient for 15 minutes or a bit more and still same, stuck in same crappy booting logo.
I did restore my system files, now i'll try to retry it and send it again. Im suspicious of the zip file being corrupted during trasmitting to Device, however install was a big success so im very sure it wasnt corrupted. I'll do 2nd test and see it again if it's happening again.
If it does, i'll most likely try to figure out other ways to deodex as there is already deodexed roms out there, so they must have done is somehow.
Thanks, hope someone can help me out with this.
P.S: My adb works fine, i got usb drivers for my device, i got usb debug on, i got lots of space on phone, i got TWRP recovery which got very high compatibility when it comes to install anything from zip via recovery where almost all roms do work stable with TWRP.
omg brilliant @nitrous² ! thanks so much! its been days i keep trying to deodex with others tool...
Sachitoge said:
Don't know if someone can help me as you stated that you're retired from this thread.
I did every step you do mentioned here (for self deodexing existing rom)
I did everything successfully and deodexed my files with 2.5 deodexer, putted files in the system folder to the 7zip folder and sent to my device and flashed zip, cleaned cache and dalvik and it stuck on booting for about 15 minutes. I know, it takes alot time during rebuildup of cache, but guys, it's 15 minutes! for me, if i cleanup cache and the dalvik/art cache, it just takes 1minute on boot screen to show up the image of each apps cache, but i just sat there with lots of patient for 15 minutes or a bit more and still same, stuck in same crappy booting logo.
I did restore my system files, now i'll try to retry it and send it again. Im suspicious of the zip file being corrupted during trasmitting to Device, however install was a big success so im very sure it wasnt corrupted. I'll do 2nd test and see it again if it's happening again.
If it does, i'll most likely try to figure out other ways to deodex as there is already deodexed roms out there, so they must have done is somehow.
Thanks, hope someone can help me out with this.
P.S: My adb works fine, i got usb drivers for my device, i got usb debug on, i got lots of space on phone, i got TWRP recovery which got very high compatibility when it comes to install anything from zip via recovery where almost all roms do work stable with TWRP.
Click to expand...
Click to collapse
Same happened to me.... Did you solved this problem?
Maurizio1953 said:
Same happened to me.... Did you solved this problem?
Click to expand...
Click to collapse
Nope, i ended up using CM12 (at that time, right now i got cm13 update).
Well i had to deodex apps to get xposed on TouchWiz, but i failed and didn't get headache because of the Xposed modules being not really well compatible on TouchWiz, so i jumped to CM, i find it more stable, and the CM13 is insane because it saves so much battery at stand by, compared to lollipop, the Android 6.0.1 Marshmallow is the biggest update in android history, that saves hell lot of battery (it can be also maybe because i don't have Xposed Framework in recent rom).
Anyway, im tired of it, and i don't need to hassle with Link2Sd because of Android Marshmallow offering to mount the SD Card, in the end, all my needs are being offered in this (for me) huge, best android update, being Marshmallow.
Try it i would say, so amazing.
Ok i would like to go to cm13 as you but i stil need the support to the gear s smartwatch so i decided to stay with touchwiz without xposed.

Categories

Resources