[RECOVERY][All-F2FS] TWRP-2.7.0.0 with All-F2FS support [10/05/14] - Nexus 5 Original Android Development

TWRP-2.7.0.0 with "All-F2FS" support​
NOTE: I don't have a Nexus 5 to test this. It should work.
Please report back.​
I have modified the standard TWRP recovery to work with F2FS partitions.
This is for "All-F2FS" that mean that /system, /cache and /data are formatted with F2FS.
Keep in mind that this can work only with a compatible kernel and ROM.
What is F2FS?
F2FS (Flash-Friendly File System) is a flash file system created by Kim Jaegeuk at Samsung for the Linux operating system kernel. The motive for F2FS was to build a file system that from the start takes into account the characteristics of NAND flash memory-based storage devices (such as solid-state disks, eMMC, and SD cards), which are widely used in computer systems ranging from mobile devices to servers.
Download:
FormatPartitions.zip: Here (It is named mako but work on N5 too)
TWRP-recovery img: Here
Chagelogs:
- 10/05/14: Fix TWRP
- 08/05/14: Initial release
Here are some explanations. Read them
Recovery has the usual red back key to remember you that you are using a F2FS-recovery.
If wiping /system and /cache and making a factory reset from Wipe menu doesn't work, use FormatPartitions.zip. (<- READ THIS)
Instead wiping /data is fine within the wipe menu.
To switch your /system, /cache and /data partitions to F2FS follow instructions:
Keep in mind that you will lose all the files on the memory of your N5.
You need:
- Two files you can download above (img and FormatPartitions.zip)
- A ROM with "All-F2FS" support
(One way to make your ROM is with Convert To F2FS)
- GApps (i think you want PlayStore.) Usual GApps. Slim AiO work well.
Copy a ROM with "All-F2FS" support to your N5
Copy GApps to your N5
Copy FormatPartitions.zip to your N5
Reboot in bootloader
Flash this recovery with Fastboot (Maybe Flashify works too)
Reboot in new recovery
Flash FormatPartitions.zip
Reboot recovery (It's needed for some reasons..)
Flash ROM
Flash GApps
Go to Wipe Menu and Format Data (Not a simple wipe)
Reboot
Done.
It's easier than it seems
To restore partitions to stock:
- Download a standard TWRP
- Download RestorePartitions.zip (It is named mako but work on N5 too)
Flash RestorePartitions.zip (Untested)
Flash standard Recovery
Format Data in Wipe Menu
Enjoy.
Thanks for:
- dennes544 (All-F2FS Recovery is based on his Recovery)
(Required Commit)
(Source Here)

Looks interesting. I'll give it a shot this weekend. Thanks for this!

I'm glad to see this. Thanks man!!
Sent from my Nexus 5 using XDA Free mobile app

Are there any compatible roms+kernels yet for this device? I've used the nodded slimkat on my 2012 nexus 7

This looks like a great thing! Thank you for taking your time to make this

Hi... First of all thank you been waiting for this mod
I have followed all the steps but no luck... Even got new convert to f2fs app and converted a rom but it fails to flash giving error with updater script.. And normal Roms kill recovery and have to restock

ishaqs60 said:
Hi... First of all thank you been waiting for this mod
I have followed all the steps but no luck... Even got new convert to f2fs app and converted a rom but it fails to flash giving error with updater script.. And normal Roms kill recovery and have to restock
Click to expand...
Click to collapse
As stated i don't have the Nexus 5. But i think that if you give me the recovery.log after the failed flash i can solve the problem.
If you have some time can you retry and after the failed flash go to Advanced -> Recovery log. And then send it to me? Thank you.

Can i use it with ParanoidAndroid?

@legolas93 can this be done without the play store app? I can't afford to buy it, but I am comfortable grabbing recovery logs. I just haven't messed with this F2FS stuff yet. Not sure what ROMs, if any, are F2FS compatible already.

RoyJ said:
@legolas93 can this be done without the play store app? I can't afford to buy it, but I am comfortable grabbing recovery logs. I just haven't messed with this F2FS stuff yet. Not sure what ROMs, if any, are F2FS compatible already.
Click to expand...
Click to collapse
There r no Roms which r f2fs-all compatible yet. But u can edit them urself to make them compatible.
Without the playstore app also its simple u just hv to change the updater-script of the rom in the META-INF folder
find for lines as below:
HTML:
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
and replace them with this:
HTML:
run_program("/sbin/mkfs.f2fs", "/dev/block/platform/msm_sdcc.1/by-name/system");
run_program("/sbin/busybox", "mount", "/system");
and sometimes u can see this line isolated
HTML:
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
so do the same thing and change it to this
HTML:
run_program("/sbin/busybox", "mount", "/system");
and u need f2fs-all compatible kernels aswell..

@kdh2834 is this method works on caf roms???

notthesun said:
@kdh2834 is this method works on caf roms???
Click to expand...
Click to collapse
Hmm.. Idk I'm not sure but.. Give it a try
I use only aosp ROMs.. So can't give u exact answer...
Sent from my Nexus 5 using XDA Free mobile app

kdh2834 said:
Hmm.. Idk I'm not sure but.. Give it a try
I use only aosp ROMs.. So can't give u exact answer...
Sent from my Nexus 5 using XDA Free mobile app
Click to expand...
Click to collapse
Any f2fs-all kernels out there?
Sent from my Nexus 5 using XDA Premium 4 mobile app

ishaqs60 said:
Any f2fs-all kernels out there?
Sent from my Nexus 5 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
hmm.. not yet for f2fs-all.. if u need i can upload some of kernels i use..
like furnace, franco.. i use these two the most..
and zeta kernel and elemetalx will work without editing

kdh2834 said:
Hmm.. Idk I'm not sure but.. Give it a try
I use only aosp ROMs.. So can't give u exact answer...
Sent from my Nexus 5 using XDA Free mobile app
Click to expand...
Click to collapse
I tried it and it does not work...tested on beanstalk rom

notthesun said:
I tried it and it does not work...tested on beanstalk rom
Click to expand...
Click to collapse
hmm.. maybe CAF roms need different codes..
OP's app also doesnt hv CAF option.. so i guess its different

kdh2834 said:
There r no Roms which r f2fs-all compatible yet. But u can edit them urself to make them compatible.
Without the playstore app also its simple u just hv to change the updater-script of the rom in the META-INF folder
find for lines as below:
HTML:
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
and replace them with this:
HTML:
run_program("/sbin/mkfs.f2fs", "/dev/block/platform/msm_sdcc.1/by-name/system");
run_program("/sbin/busybox", "mount", "/system");
and sometimes u can see this line isolated
HTML:
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
so do the same thing and change it to this
HTML:
run_program("/sbin/busybox", "mount", "/system");
and u need f2fs-all compatible kernels aswell..
Click to expand...
Click to collapse
Hello i tried yesterday and today with this trick, from mako thread, but with no success
Everytime i get a failed on twrp

micr0g said:
Hello i tried yesterday and today with this trick, from mako thread, but with no success
Everytime i get a failed on twrp
Click to expand...
Click to collapse
I think it only works with NON-CAF ROMS (AOSP)
so.. if u tried it with a CAF ROM it might give errors... but not in twrp for sure..
see if u did the zip properly..

kdh2834 said:
I think it only works with NON-CAF ROMS (AOSP)
so.. if u tried it with a CAF ROM it might give errors... but not in twrp for sure..
see if u did the zip properly..
Click to expand...
Click to collapse
I tried with Slimkat,so AOSP
replaced
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");
with
run_program("/sbin/mkfs.f2fs", "/dev/block/platform/msm_sdcc.1/by-name/system");
and
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
with
run_program("/sbin/busybox", "mount", "/system");

micr0g said:
I tried with Slimkat,so AOSP
replaced
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");
with
run_program("/sbin/mkfs.f2fs", "/dev/block/platform/msm_sdcc.1/by-name/system");
and
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
with
run_program("/sbin/busybox", "mount", "/system");
Click to expand...
Click to collapse
Have you flashed the recovery i posted in OP? Can i have a recovery.log of the failed flash?

Related

[Q] How to make CWM 3.1.0.1 (Purple) flashable zip

Ok guys, I'm trying to make a zip of a mod I did to fix hulu on flash 10.3 on gingerbread, but I can't get the zip to be flashable. I'm on the purple cwm 3.1.0.1, I tried the android customization tools to build an empty zip, copied that to my Ubuntu partition so the permissions stick, added the appropriate files into the zip, but I get an error whenever I try to flash:
E: Error in /sdcard/gbflash.zip
(Status 0)
Installation aborted.
Any ideas? Or maybe I need a newer "blank" zip? If anyone can provide I'd be most appreciative
EDIT: I've attached my NON-WORKING zip file so that maybe some kind person might be able to see what the issue is.
Really? Nobody? Just trying to share my mods with the community, sure could use a little help
compuw22c said:
Really? Nobody? Just trying to share my mods with the community, sure could use a little help
Click to expand...
Click to collapse
Try mounting like this instead?
Code:
run_program("/sbin/mount", "/dev/block/stl9", "/system");
run_program("/sbin/mount", "/dev/block/stl10", "/data");
run_program("/sbin/mount", "/dev/block/stl11", "/cache");
If all else fails, try using an existing CWM flash-able as a skeleton for your work. That's what I do.
Cool, thanks for the advice. Will try, hopefully I'll have something to share soon!

[HELP] Error (Status 7) - Porting A ROM to Wildfire

Hi,
I am a newbie in porting ROMS. Just started with one. But while flashing the ROM i'm getting Status 7 error.
I took RazoDroid ROM which is for Galaxy Fit and SplashMod ROM of Wildfire.
The following are the steps i followed while porting which were guided from here.
1.Extracted boot.img and replaced the kernel from SplashMOD.
2.From the ramdisk changed to init.buzz.rc
3.Repacked kernel.
4.Replaced the following folders/files from SpashMOD
Code:
/system/lib/modules/
/system/lib/hw/
/system/usr/keylayout/
/system/usr/keychars/
/system/etc/vold.fstab
/system/etc/wifi/
/system/etc/ppp/
5.In updater-script changed following lines
Code:
format("ext4", "EMMC", "/dev/block/stl12");
mount("ext4", "EMMC", "/dev/block/stl12", "/system");
to
Code:
format("yaffs2", "MTD", "system");
mount("yaffs2", "MTD", "system", "/system");
5.Rebuilt the ROM and signed.
6. Flashed using ClockworkMOD v5.0.2 i got the following error
Code:
Assert Failed
write_raw_image("/tmp/boot.img", "boot")
Can anyone please tell me what is the problem?
Else the procedure itself is wrong or the ROM can not be ported?
Please help me...
same problem happened to me when i tried to port a samsung rom to wildfire...
someone knows what is the problem?
isn't ext4 better than yaffs2?
otherwise it seems to be fine, the updater-script seems perfect
after googling it seems like many people have it.
usaff22 said:
isn't ext4 better than yaffs2?
otherwise it seems to be fine, the updater-script seems perfect
after googling it seems like many people have it.
Click to expand...
Click to collapse
might be ext4 is better but SplashMod rom is working fine with yaffs2.
but the problem i see is not with the system partition which i formatted it when writing the boot.img
what did you find after googling?? what do many people have??
bittu4u4ever said:
might be ext4 is better but SplashMod rom is working fine with yaffs2.
but the problem i see is not with the system partition which i formatted it when writing the boot.img
what did you find after googling?? what do many people have??
Click to expand...
Click to collapse
After googling lots of people seem to have the status 7 boot.img problem, that is what I meant
I have successfully installed the ROM.
Problem was with the size of ramdisk having extra lib files so deleted them and now the ROM gets installed perfectly.
Now the problem is its not booting up. Got stuck at htc Splash Screen (about 20mins) and no logcat tooo
How can i solve this...??? Anyone please help???
Hi,
I tried again to port a ROM from Huawei ROM 360Gravity.
Followed the same guide mentioned in 1st post.
Installed the ROM Successfully.
But again as my previous ROM this also got stuck at htc Splash Screen. And no logcat
Please guys help me out to solve this boot issue...
I have just ported GB Miui from the Galaxy Miui you might want to try and see if they have the rom too if they do then use that with the base you have already choosen. If you need a hand PM me.

[Q] Revert to RFS without ODIN??

Hi All
I have a broken USB port so ODIN is not an option.
Can I revert to my CWM stock ROM backup somehow? (RFS)
Yes: it involves carefully "dd"-ing the RFS partitions back into place from CWM recovery.
If you need the phone to be completely back to stock, you'll want to finish off the job by temporarily rooting your phone and using dd to flash the stock recovery back into place.
Check this thread out for more information.
Good luck,
Darkshado
Darkshado said:
Yes: it involves carefully "dd"-ing the RFS partitions back into place from CWM recovery.
If you need the phone to be completely back to stock, you'll want to finish off the job by temporarily rooting your phone and using dd to flash the stock recovery back into place.
Check this thread out for more information.
Good luck,
Darkshado
Click to expand...
Click to collapse
Yeah you can do that. Or you can wait for my Back To RFS Method that I'll provide
LOL
Use dd codes in ADB shell to pull system.rfs, boot.img, recovery from phone, tar them with cygwin and md5sum..
Sent from my GT-S5660 using xda premium
Lol, how to use adb shell without usb?
Peteragent5 said:
Yeah you can do that. Or you can wait for my Back To RFS Method that I'll provide
LOL
Click to expand...
Click to collapse
When will you provide this? Is this a joke because I have no idea how to DD from CWM.
hsrars-d said:
Lol, how to use adb shell without usb?
Click to expand...
Click to collapse
I guess I should have been more specific...
Make an updater-script, zip it as usual and run that from recovery.
To return from CWM to stock recovery, from the ROM, root and use a terminal emulator, possibly combined with a shell script to save a lot of typing from the phone itself.
OK, looks like out of my league.
Thanks guys for your responses.
Using dd is almost exactly the same what Odin does.
If you need RFS to flash another RFS-based ROM, flash it with Odin, wipe data and/or cache, then flash the ROM with Odin or flash CWM (ext+rfs) and use it instead.
In the end, you should get what you wanted.
jrusinek said:
Using dd is almost exactly the same what Odin does.
If you need RFS to flash another RFS-based ROM, flash it with Odin, wipe data and/or cache, then flash the ROM with Odin or flash CWM (ext+rfs) and use it instead.
In the end, you should get what you wanted.
Click to expand...
Click to collapse
How do I flash it with Odin without USB?? Am I missing something?
Is this script close to what I need?
Can you help me to get this to work?
ui_print("* *");
ui_print("Copying tools...");
package_extract_file("tools/fat.format", "/tmp/fat.format");
set_perm(0, 0, 0755, "/tmp/fat.format");
unmount("/system");
unmount("/cache");
unmount("/data");
ui_print("Formatting system...");
run_program("/sbin/dd", "if=/dev/zero", "of=/dev/block/stl12", "bs=4096", "count=$(( 256 * 10 ))");
run_program("/tmp/fat.format", "-F", "32", "-S", "4096", "-s", "1", "/dev/block/stl12");
ui_print("Formatting data...");
run_program("/tmp/fat.format", "-F", "16", "-S", "4096", "-s", "1", "/dev/block/stl13");
set_progress(0.400000);
ui_print("Formatting cache...");
run_program("/tmp/fat.format", "-F", "16", "-S", "4096", "-s", "1", "/dev/block/stl14");
set_progress(1.000000);

CWM and TWRP

Just curious. Will CWM will completely placed by TWRP nowadays?
I personally use CWM since the first time i use android. And now i saw on many forums, most of the custom Roms used TWRP to flash.
Are all the devs (and their roms) use only TWRP since now? Or are CWM still can be use to flash the roms too?
What? Use what you like, both should work just fine.
I thought some of the devs made and will make the roms only compatible with TWRP only. Thanks if they're not
alph0 said:
I thought some of the devs made and will make the roms only compatible with TWRP only. Thanks if they're not
Click to expand...
Click to collapse
It's my understanding that almost any rom will flash in any recovery. There are probably exceptions but this is what I've found to be the case most of the time.
Sent from my ThunderBolt using xda app-developers app
alph0 said:
I thought some of the devs made and will make the roms only compatible with TWRP only. Thanks if they're not
Click to expand...
Click to collapse
The ROMs are compatible with either recovery, but the OTA updating apps are not. Some newer ROMs use GooManager for OTA updates:
https://play.google.com/store/apps/details?id=com.s0up.goomanager&hl=en
...and this requires TWRP to automatically flash ROM updates.
Many older ROMs use ROM Manager for updates:
https://play.google.com/store/apps/details?id=com.koushikdutta.rommanager&hl=en
...and this requires CWM to flash ROMs from within the app.
Any recovery should flash any ROM (the newer versions of TWRP may have trouble with older ROMs due to those having outdated installer binaries), but if you use ROM Manager or GooManager to flash ROMS, you need the recovery that is compatible with the app.
Goo manager needs TWRP to OTA update. I switched from CWM to TWRP and I like TWRP better. IT has a much better interface, scrollable on the touch screen and the backups are compressible.
I tried twrp and could not get it to install a kernel zip. Kept giving an error.
Sent from my ADR6300 using xda premium
normanx said:
I tried twrp and could not get it to install a kernel zip. Kept giving an error.
Sent from my ADR6300 using xda premium
Click to expand...
Click to collapse
Probably because of...
musical_chairs said:
Any recovery should flash any ROM (the newer versions of TWRP may have trouble with older ROMs due to those having outdated installer binaries)
Click to expand...
Click to collapse
So you'll have to get with your kernel dev to update his update-binary.
It is pretty easy to update the files your self. Just open the flashables zip with a zip program like 7zip. Navigate to META-INF/com/google/android. Replace the update-binary in the zip with this one http://dinc.does-it.net/Recoveries/TWRP_2.3.1.0/update-binary compatible with twrp 2.3+.
With the updated binary comes some new coding in the updater-script also. Open the updater-script with a good text editor like Text Pad, do not use notepad or wordpad. Look for mount and format commands that look like this:
Code:
format("MTD", "system", "/system");
mount("MTD", "system", "/system");
format("MTD", "cache", "/cache");
And change them to look like this:
Code:
format("yaffs2", "MTD", "system", "0", "/system");
mount("yaffs2", "MTD", "system", "/system");
format("ext4", "MTD", "cache", "0", "/cache");
The above is just an example of the formating required for the new binary. Your roms updater-script may have other lines which format or mount other partitions than those listed. Format has 5 arguments "file system of partition - MTD - partition name - 0 - and mount point". Mount has 4 arguments "file system of partition - MTD - partition name - mount point".
If your decent with reading coding and have a little time its not to dificult to accomplish.
If anyone who cant figure it out is interested, i will start a new post in general where i will update your flashable for you. I know a lot of the roms kernels and flashables around arent really supported by their devs anymore, but are still used.
FYI. All flashable files on dinc.does-it.net are now twrp 2.3+ compatible.

[MOD] Advanced Power Menu for JWR66Y

UPDATE: I added screenshot to the power menu for anyone who is interested.
Hello all!
I recently saw a pretty cool advanced power menu mod for the Nexus 7 and really wanted it for our Nexus 4. Unfortunately, the developer did not have time to make a version for the Nexus 4. I modified the framework-res.apk and androidpolicy.jar from the zip on the Nexus 7 thread to work on the Nexus 4. The result is pretty close to the original mod and it looks great. I've only tested it on a stock deodexed JWR66Y build. This won't work on odex ROMs. If you have any modifications to your framework-res.apk or androidpolicy.jar this modification will overwrite your current one.
I personally like to use the stock ROM and having this advanced power menu is really nice. I just wanted to share this with everyone!
All credit goes to scrosler for his awesome mod so go give him some thanks on the original thread:
http://forum.xda-developers.com/showthread.php?t=2380413
Instructions:
1. Reboot to recovery
2. Mount system
3. Flash zip
4. Reboot
Enjoy!!
With "Screenshot" in the power menu:
https://dl.dropboxusercontent.com/u/43701045/APM - 4.3 - DE-ODEX -(With Screenshot).zip
Without "Screenshot" in the power menu:
https://dl.dropboxusercontent.com/u/43701045/APM - 4.3 - DE-ODEX - (Without Screenshot).zip
Could you make a version for stock/odex please?
I have this stock, deodexed JWR66Y rom installed,
http://forum.xda-developers.com/showthread.php?t=2010887
I'm trying to flash your mod. It appears to flash successfully in TWRP, but it is not working. Neither android.policy.jar or framework-res.apk are modified when I reboot after flashing this. I'm using ziddey's kernel based off franco's kernel, and there have been changes to framework-res.apk. Could that be the reason that nothing gets installed?
EDIT: I decided to manually install the 2 files, and that works fine. So I'm guessing that the mount command in the updater-script is incorrect? Did you actually get your zip file to install successfully on the Nexus 4? Or did you just install the files manually?
EDIT2: A couple of hours later, I changed the mount command in your updater-script (to be like one I have in another Nexus 4 update.zip), and it flashes just fine! But another person has reported that this works fine for him, so I'm very confused.
EDIT3: Well, here are my conclusions, some of which are the same as already described above. (I do know that I can use an app to get the advanced power menu, but I'm trying to figure out why this mod works for some but not for me).
1. Flashing this zip as-is does not install either file (android.policy.jar and framework-res.apk). I believe it's due to the mount.
2. Manually installing the 2 files DOES work, i.e. the advanced power menu displays when holding down the power button.
3. Changing the mount command in the updater-script DOES work.
original mount (fails?): mount("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP", "/system");
modified mount (works): mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
4. I found another mod for the advanced power menu which only modifies android.policy.jar and NOT framework-res.apk, and it DOES work. See this thread. http://forum.xda-developers.com/showthread.php?t=2383509
By the way, it has a completely different way of mounting, i.e. run_program("/sbin/busybox", "mount", "/system");
I'm hoping babalonius508 (or anyone else who says this mod is working) can help me figure out why the mount works for them and not for me!
EDIT4: I'm using TWRP. I booted into recovery and used ADB. I tried a mount similar to the "tegra" one that is in this mod's updater-script (see 3. above). It failed. Then I did one with the "sdcc" one (again, see 3. above). It worked.
So...does this have something to do with which recovery is used? I'm wondering if those who are failing to get this to install are running TWRP (like me), while those who are successful are running CWM. I could try installing CWM and test this myself, but it's late, and maybe some others can chime in here and see if I'm on the right track. Well, if I really think about it, I don't think recovery has anything to do with it. I don't see how this could possibly be working with that mount command. Anyone who has this working on the Nexus 4, please post here and tell me how!
random hero said:
Could you make a version for stock/odex please?
Click to expand...
Click to collapse
I'm searching stock / odex, too! Would be great! :good:
alfiriel said:
I'm searching stock / odex, too! Would be great! :good:
Click to expand...
Click to collapse
Here!
http://forum.xda-developers.com/showthread.php?t=2383509
Very useful . Thanks
Sent from my Nexus 4 using xda app-developers app
random hero said:
Could you make a version for stock/odex please?
Click to expand...
Click to collapse
alfiriel said:
I'm searching stock / odex, too! Would be great! :good:
Click to expand...
Click to collapse
I'll definitely try and do an odex version as soon as I can!
sga999 said:
I have this stock, deodexed JWR66Y rom installed,
http://forum.xda-developers.com/showthread.php?t=2010887
I'm trying to flash your mod. It appears to flash successfully in TWRP, but it is not working. Neither android.policy.jar or framework-res.apk are modified when I reboot after flashing this. I'm using ziddey's kernel based off franco's kernel, and there have been changes to framework-res.apk. Could that be the reason that nothing gets installed?
EDIT: I decided to manually install the 2 files, and that works fine. So I'm guessing that the mount command in the updater-script is incorrect? Did you actually get your zip file to install successfully on the Nexus 4? Or did you just install the files manually?
EDIT2: A couple of hours later, I changed the mount command in your updater-script (to be like one I have in another Nexus 4 update.zip), and it flashes just fine! But another person has reported that this works fine for him, so I'm very confused.
EDIT3: Well, here are my conclusions, some of which are the same as already described above. (I do know that I can use an app to get the advanced power menu, but I'm trying to figure out why this mod works for some but not for me).
1. Flashing this zip as-is does not install either file (android.policy.jar and framework-res.apk). I believe it's due to the mount.
2. Manually installing the 2 files DOES work, i.e. the advanced power menu displays when holding down the power button.
3. Changing the mount command in the updater-script DOES work.
original mount (fails?): mount("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP", "/system");
modified mount (works): mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
4. I found another mod for the advanced power menu which only modifies android.policy.jar and NOT framework-res.apk, and it DOES work. See this thread. http://forum.xda-developers.com/showthread.php?t=2383509
By the way, it has a completely different way of mounting, i.e. run_program("/sbin/busybox", "mount", "/system");
I'm hoping babalonius508 (or anyone else who says this mod is working) can help me figure out why the mount works for them and not for me!
EDIT4: I'm using TWRP. I booted into recovery and used ADB. I tried a mount similar to the "tegra" one that is in this mod's updater-script (see 3. above). It failed. Then I did one with the "sdcc" one (again, see 3. above). It worked.
So...does this have something to do with which recovery is used? I'm wondering if those who are failing to get this to install are running TWRP (like me), while those who are successful are running CWM. I could try installing CWM and test this myself, but it's late, and maybe some others can chime in here and see if I'm on the right track. Well, if I really think about it, I don't think recovery has anything to do with it. I don't see how this could possibly be working with that mount command. Anyone who has this working on the Nexus 4, please post here and tell me how!
Click to expand...
Click to collapse
I actually don't use TWRP so its hard for me to guide you on that because I have very little experience with it. When flashing this mod in ClockworkMod recovery, I simply mount system before I flash.
If all else fails just take the framework-res.apk and androidpolicy.jar out of the flashable zip, put it in system/framework, and change the permissions of both the files to rw-rw-r-- and reboot. Don't forget to make a backup of your current framework-res.apk and androidpolicy.jar. I hope you can get it working!
Not bad, i'll give a try!
babalonius508 said:
I actually don't use TWRP so its hard for me to guide you on that because I have very little experience with it. When flashing this mod in ClockworkMod recovery, I simply mount system before I flash.
If all else fails just take the framework-res.apk and androidpolicy.jar out of the flashable zip, put it in system/framework, and change the permissions of both the files to rw-rw-r-- and reboot. Don't forget to make a backup of your current framework-res.apk and androidpolicy.jar. I hope you can get it working!
Click to expand...
Click to collapse
If you look at my first EDIT comment, you'll see that I did do each part manually, and it worked fine. But the issue was how to get your zip file to work "as is", i.e. without issuing a mount command during recovery (whether CWM or TWRP). With other zip files that I flash, the mount is done correctly in the script. I've moved on to using Xposed with either GravityBox or Xblast, which means no more flashing.

Categories

Resources